Beyond Linux® From Scratch (System V Edition)

Version 11.3

The BLFS Development Team

Copyright © 1999-2023, The BLFS Development Team

All rights reserved.

This book is licensed under a Creative Commons License.

Computer instructions may be extracted from the book under the MIT License.

Linux® is a registered trademark of Linus Torvalds.

Published 2023-03-01

Revision History
Revision 11.3 2023-03-01 Twenty-seventh Release
Revision 11.2 2022-09-01 Twenty-sixth Release
Revision 11.1 2022-03-01 Twenty-fifth Release
Revision 11.0 2021-09-01 Twenty-fourth Release
Revision 10.1 2021-03-01 Twenty-third Release
Revision 10.0 2020-09-01 Twenty-second Release
Revision 9.1 2020-03-01 Twenty-first Release
Revision 9.0 2019-09-01 Twentieth release
Revision 8.4 2019-03-01 Nineteenth release
Revision 8.3 2018-09-01 Eighteenth release
Revision 8.2 2018-03-02 Seventeenth release
Revision 8.1 2017-09-01 Sixteenth release
Revision 8.0 2017-02-25 Fifteenth release
Revision 7.10 2016-09-07 Fourteenth release
Revision 7.9 2016-03-08 Thirteenth release
Revision 7.8 2015-10-01 Twelfth release
Revision 7.7 2015-03-06 Eleventh release
Revision 7.6 2014-09-23 Tenth release
Revision 7.5 2014-03-05 Ninth release
Revision 7.4 2013-09-14 Eighth release
Revision 6.3 2008-08-24 Seventh release
Revision 6.2 2007-02-14 Sixth release
Revision 6.1 2005-08-14 Fifth release
Revision 6.0 2005-04-02 Fourth release
Revision 5.1 2004-06-05 Third release
Revision 5.0 2003-11-06 Second release
Revision 1.0 2003-04-25 First release

Abstract

This book follows on from the Linux From Scratch book. It introduces and guides the reader through additions to the system including networking, graphical interfaces, sound support, and printer and scanner support.


Dedication

This book is dedicated to the LFS community

Table of Contents

Preface

Having helped out with Linux From Scratch for a short time, I noticed that we were getting many queries as to how to do things beyond the base LFS system. At the time, the only assistance specifically offered relating to LFS were the LFS hints (https://www.linuxfromscratch.org/hints). Most of the LFS hints are extremely good and well written but I (and others) could still see a need for more comprehensive help to go Beyond LFS — hence BLFS.

BLFS aims to be more than the LFS-hints converted to XML although much of our work is based around the hints and indeed some authors write both hints and the relevant BLFS sections. We hope that we can provide you with enough information to not only manage to build your system up to what you want, whether it be a web server or a multimedia desktop system, but also that you will learn a lot about system configuration as you go.

Thanks as ever go to everyone in the LFS/BLFS community; especially those who have contributed instructions, written text, answered questions and generally shouted when things were wrong!

Finally, we encourage you to become involved in the community; ask questions on the mailing list or news gateway and join in the fun on #lfs and #lfs-support at Libera. You can find more details about all of these in the Introduction section of the book.

Enjoy using BLFS.

Mark Hymers
markh <at> linuxfromscratch.org
BLFS Editor (July 2001–March 2003)

I still remember how I found the BLFS project and started using the instructions that were completed at the time. I could not believe how wonderful it was to get an application up and running very quickly, with explanations as to why things were done a certain way. Unfortunately, for me, it wasn't long before I was opening applications that had nothing more than "To be done" on the page. I did what most would do, I waited for someone else to do it. It wasn't too long before I am looking through Bugzilla for something easy to do. As with any learning experience, the definition of what was easy kept changing.

We still encourage you to become involved as BLFS is never really finished. Contributing or just using, we hope you enjoy your BLFS experience.

Larry Lawrence
larry <at> linuxfromscratch.org
BLFS Editor (March 2003–June 2004)

The BLFS project is a natural progression of LFS. Together, these projects provide a unique resource for the Open Source Community. They take the mystery out of the process of building a complete, functional software system from the source code contributed by many talented individuals throughout the world. They truly allow users to implement the slogan Your distro, your rules.

Our goal is to continue to provide the best resource available that shows you how to integrate many significant Open Source applications. Since these applications are constantly updated and new applications are developed, this book will never be complete. Additionally, there is always room for improvement in explaining the nuances of how to install the different packages. To make these improvements, we need your feedback. I encourage you to participate on the different mailing lists, news groups, and IRC channels to help meet these goals.

Bruce Dubbs
bdubbs <at> linuxfromscratch.org
BLFS Editor (June 2004–December 2006 and February 2011–now)

My introduction to the [B]LFS project was actually by accident. I was trying to build a GNOME environment using some how-tos and other information I found on the web. A couple of times I ran into some build issues and Googling pulled up some old BLFS mailing list messages. Out for curiosity, I visited the Linux From Scratch web site and shortly thereafter was hooked. I've not used any other Linux distribution for personal use since.

I can't promise anyone will feel the sense of satisfaction I felt after building my first few systems using [B]LFS instructions, but I sincerely hope that your BLFS experience is as rewarding for you as it has been for me.

The BLFS project has grown significantly the last couple of years. There are more package instructions and related dependencies than ever before. The project requires your input for continued success. If you discover that you enjoy building BLFS, please consider helping out in any way you can. BLFS requires hundreds of hours of maintenance to keep it even semi-current. If you feel confident enough in your editing skills, please consider joining the BLFS team. Simply contributing to the mailing list discussions with sound advice and/or providing patches to the book's XML will probably result in you receiving an invitation to join the team.

Randy McMurchy
randy <at> linuxfromscratch.org
BLFS Editor (December 2006–January 2011)

Foreword

This version of the book is intended to be used when building on top of a system built using the LFS book. Every effort has been made to ensure accuracy and reliability of the instructions. Many people find that using the instructions in this book after building the current stable or development version of LFS provides a stable and very modern Linux system.

Enjoy!

Randy McMurchy
August 24th, 2008

Who Would Want to Read this Book

This book is mainly aimed at those who have built a system based on the LFS book. It will also be useful for those who are using other distributions, and for one reason or another want to manually build software and need some assistance. Note that the material in this book, in particular the dependency listings, assumes that you are using a basic LFS system with every package listed in the LFS book already installed and configured. BLFS can be used to create a range of diverse systems and so the target audience is probably as wide as that of the LFS book. If you found LFS useful, you should also like this!

Since Release 7.4, the BLFS book version has matched the LFS book version. This book may be incompatible with a previous or later release of the LFS book.

Organization

This book is divided into the following fourteen parts.

Part I - Introduction

This part contains essential information which is needed to understand the rest of the book.

Part II - Post LFS Configuration and Extra Software

Here we introduce basic configuration and security issues. We also discuss a range of text editors, file systems, and shells which aren't covered in the main LFS book.

Part III - General Libraries and Utilities

In this section we cover libraries which are often needed throughout the book, as well as system utilities. Information on programming (including recompiling GCC to support its full range of languages) concludes this part.

Part IV - Basic Networking

Here we explain how to connect to a network when you aren't using the simple static IP setup presented in the main LFS book. Networking libraries and command-line networking tools are also covered here.

Part V - Servers

Here we show you how to set up mail and other servers (such as FTP, Apache, etc.).

Part VI - X + Window Managers

This part explains how to set up a basic X Window System, along with some generic X libraries and Window managers.

Part VII - KDE

This part is for those who want to use the K Desktop Environment, or parts of it.

Part VIII - GNOME

GNOME is the main alternative to KDE in the Desktop Environment arena.

Part IX - Xfce

Xfce is a lightweight alternative to GNOME and KDE.

Part X - LXDE

LXDE is another lightweight alternative to GNOME and KDE.

Part XI - More X Software

Office programs and graphical web browsers are important to most people. They, and some generic X software, can be found in this part of the book.

Part XII - Multimedia

Here we cover multimedia libraries and drivers, along with some audio, video, and CD-writing programs.

Part XIII - Printing, Scanning and Typesetting (PST)

This part covers document handling, from applications like Ghostscript, CUPS, and DocBook, all the way to texlive.

Appendices

The Appendices present information which doesn't belong in the body of book; they are included as reference material. The glossary of acronyms is a handy feature.

Part I. Introduction

Chapter 1. Welcome to BLFS

The Beyond Linux From Scratch book is designed to carry on from where the LFS book leaves off. But unlike the LFS book, it isn't designed to be followed straight through. Reading the Which sections of the book? part of this chapter should help guide you through the book.

Please read most of this part of the book carefully as it explains quite a few of the conventions used throughout the book.

Which Sections of the Book Do I Want?

Unlike the Linux From Scratch book, BLFS isn't designed to be followed in a linear manner. LFS provides instructions on how to create a base system which can become anything from a web server to a multimedia desktop system. BLFS attempts to guide you in the process of going from the base system to your intended destination. Choice is very much involved.

Everyone who reads this book will want to read certain sections. The Introduction, which you are currently reading, contains generic information. Take special note of the information in Chapter 2, Important Information, as this contains comments about how to unpack software, issues related to the use of different locales, and various other considerations which apply throughout the book.

The part on Post LFS Configuration and Extra Software is where most people will want to turn next. This deals not only with configuration, but also with Security (Chapter 4, Security), File Systems (Chapter 5, File Systems and Disk Management -- including GRUB for UEFI), Editors (Chapter 6, Editors), and Shells (Chapter 7, Shells). Indeed, you may wish to reference some parts of this chapter (especially the sections on Editors and File Systems) while building your LFS system.

Following these basic items, most people will want to at least browse through the General Libraries and Utilities part of the book. This contains information on many items which are prerequisites for other sections of the book, as well as some items (such as Chapter 13, Programming) which are useful in their own right. You don't have to install all of the libraries and packages found in this part; each BLFS installation procedure tells you which other packages this one depends upon. You can choose the program you want to install, and see what it needs. (Don't forget to check for nested dependencies!)

Likewise, most people will probably want to look at the Networking section. It deals with connecting to the Internet or your LAN (Chapter 14, Connecting to a Network) using a variety of methods such as DHCP and PPP, and with items such as Networking Libraries (Chapter 17, Networking Libraries), plus various basic networking programs and utilities.

Once you have dealt with these basics, you may wish to configure more advanced network services. These are dealt with in the Servers part of the book. Those wanting to build servers should find a good starting point there. Note that this section also contains information on several database packages.

The next twelve chapters deal with desktop systems. This portion of the book starts with a part talking about Graphical Components. This part also deals with some generic X-based libraries (Chapter 25, Graphical Environment Libraries). After that, KDE, GNOME, Xfce, and LXDE are given their own parts, followed by one on X Software.

The book then moves on to deal with Multimedia packages. Note that many people may want to use the ALSA-1.2.7 instructions from this chapter when first starting their BLFS journey; the instructions are placed here because it is the most logical place for them.

The final part of the main BLFS book deals with Printing, Scanning and Typesetting. This is useful for most people with desktop systems, but even those who are creating dedicated server systems may find it useful.

We hope you enjoy using BLFS. May you realize your dream of building the perfectly personalized Linux system!

Conventions Used in this Book

Typographical Conventions

To make things easy to follow, a number of conventions are used throughout the book. Here are some examples:

./configure --prefix=/usr

This form of text should be typed exactly as shown unless otherwise noted in the surrounding text. It is also used to identify references to specific commands.

install-info: unknown option
`--dir-file=/mnt/lfs/usr/info/dir'

This form of text (fixed width font) shows screen output, probably the result of issuing a command. It is also used to show filenames such as /boot/grub/grub.conf

Emphasis

This form of text is used for several purposes, but mainly to emphasize important points, or to give examples of what to type.

https://www.linuxfromscratch.org/

This form of text is used for hypertext links external to the book, such as HowTos, download locations, websites, etc.

SeaMonkey-2.53.15

This form of text is used for links internal to the book, such as another section describing a different package.

cat > $LFS/etc/group << "EOF"
root:x:0:
bin:x:1:
......
EOF

This style is mainly used when creating configuration files. The first command (in bold) tells the system to create the file $LFS/etc/group from whatever is typed on the following lines, until the sequence EOF is encountered. Therefore, this whole section is usually typed exactly as shown. Remember, copy and paste is your friend!

<REPLACED TEXT>

This form of text is used to encapsulate text that should be modified, and is not to be typed as shown, or copied and pasted. The angle brackets are not part of the literal text; they are part of the substitution.

root

This form of text is used to show a specific system user or group reference in the instructions.

 

Conventions Used for Package Dependencies

When new packages are created, the software's authors depend on prior work. In order to build a package in BLFS, these dependencies must be built before the desired package can be compiled. For each package, prerequisites are listed in one or more separate sections: Required, Recommended, and Optional.

Required Dependencies

These dependencies are the bare minimum needed to build the package. Packages in LFS, and the required dependencies of these required packages, are omitted from this list. Always remember to check for nested dependencies.

Recommended Dependencies

These are dependencies the BLFS editors have determined are important to give the package reasonable capabilities. Package installation instructions assume they are installed. If a recommended package is not installed, the instructions may require modification, to accommodate the missing package.

Optional Dependencies

These are dependencies the package may use. Integration of optional dependencies may be automatic by the package, or additional steps not presented by BLFS may be necessary. Optional dependencies are sometimes listed without explicit BLFS instructions. In this case you must determine how to perform the installation yourself.

 

Conventions Used for Kernel Configuration Options

Some packages require specific kernel configuration options. The general layout for these looks like this:

Master section --->
  Subsection --->
    [*]     Required parameter                     [CONFIG_REQU_PAR]
    <*>     Required parameter (not as module)     [CONFIG_REQU_PAR_NMOD]
    <*/M>   Required parameter (could be a module) [CONFIG_REQU_PAR_MOD]
    <*/M/ > Optional parameter                     [CONFIG_OPT_PAR]
    [ ] Incompatible parameter                     [CONFIG_INCOMP_PAR]
    < > Incompatible parameter (even as module)    [CONFIG_INCOMP_PAR_MOD]

[CONFIG_...] on the right gives the name of the option, so you can easily check whether it is set in your .config file. The meaning of the various entries is:

Master section top level menu item
Subsection submenu item
Required parameter the option can either be built-in, or not selected: it must be selected
Required parameter (not as module) the option can be built-in, a module, or not selected (tri-state): it must be selected as built-in
Required parameter (could be a module) the option can be built-in, a module, or not selected: it must be selected, either as built-in or as a module
Optional parameter rarely used: the option can be built-in, a module, or not selected: it may be set any way you wish
Incompatible parameter the option can either be built-in or not selected: it must not be selected
Incompatible parameter (even as module) the option can be built-in, a module, or not selected: it must not be selected

Note that, depending on other selections, the angle brackets (<>) in the configuration menu may appear as braces ({}) if the option cannot be unselected, or even as dashes (-*- or -M-), when the choice is imposed. The help text describing the option specifies the other selections on which this option relies, and how those other selections are set.

 

SBU values in BLFS

As in LFS, each package in BLFS has a build time listed in Standard Build Units (SBUs). These times are relative to the time it took to build binutils in LFS, and are intended to provide some insight into how long it will take to build a package. Most times listed are for a single processor or core to build the package. In some cases, large, long running builds tested on multi-core systems have SBU times listed with comments such as '(parallelism=4)'. These values indicate testing was done using multiple cores. Note that while this speeds up the build on systems with the appropriate hardware, the speedup is not linear and to some extent depends on the individual package and the specific hardware used.

For packages which use ninja (i.e., anything using meson) or rust, by default all cores are used; similar comments will be seen on such packages even when the build time is minimal.

Where even a parallel build takes more than 15 SBU, on certain machines the time may be considerably greater even when the build does not use swap. In particular, different micro-architectures will build some files at different relative speeds, and this can introduce delays when certain make targets wait for another file to be created. Where a large build uses a lot of C++ files, processors with Simultaneous Multi Threading will share the Floating Point Unit and can take 45% longer than when using four 'prime' cores (measured on an intel i7 using taskset and keeping the other cores idle).

Some packages do not support parallel builds; for these, the make command must specify -j1. Packages that are known to impose such limits are so marked in the text.

Book Version

This is BLFS-BOOK version 11.3 dated March 1st, 2023. This is the 11.3 branch of the BLFS book, currently targeting the LFS 11.3 book. For development versions, if this version is older than a month, it's likely that your mirror hasn't been synchronized recently and a newer version is probably available for download or viewing. Check one of the mirror sites at https://www.linuxfromscratch.org/mirrors.html for an updated version.

Mirror Sites

The BLFS project has a number of mirrors set up world-wide to make it easier and more convenient for you to access the website. Please visit the https://www.linuxfromscratch.org/mirrors.html website for the list of current mirrors.

Getting the Source Packages

Within the BLFS instructions, each package has two references for finding the source files for the package—an HTTP link and an FTP link (some packages may only list one of these links). Every effort has been made to ensure that these links are accurate. However, the World Wide Web is in continuous flux. Packages are sometimes moved or updated and the exact URL specified is not always available.

To overcome this problem, the BLFS Team, with the assistance of Oregon State University Open Source Lab, has made an HTTP/FTP site available through world wide mirrors. See https://www.linuxfromscratch.org/blfs/download.html#sources for a list. These sites have all the sources of the exact versions of the packages used in BLFS. If you can't find the BLFS package you need at the listed addresses, get it from these sites.

We would like to ask a favor, however. Although this is a public resource for you to use, please do not abuse it. We have already had one unthinking individual download over 3 GB of data, including multiple copies of the same files that are placed at different locations (via symlinks) to make finding the right package easier. This person clearly did not know what files he needed and downloaded everything. The best place to download files is the site or sites set up by the source code developer. Please try there first.

Change Log

Current release: 11.3 – March 1st, 2023

Changelog Entries:

  • March 1st, 2023

    • [bdubbs] - Release of BLFS-11.3.

  • February 27th, 2023

    • [renodr] - Add information to the alsa-utils page about setting the default sound card.

    • [renodr] - Fix seamonkey crash when playing audio when it is compiled with rustc-1.67 or higher.

    • [renodr] - Add the intel-media-driver for video acceleration on Broadwell and higher Intel CPUs. Fixes #17668.

    • [renodr] - Add intel-gmmlib for intel-media-driver. Fixes #17668.

  • February 26th, 2023

    • [ken] - Rework inkscape dependencies: There are core (python) extensions shipped and installed by inkscape-1.2.2, these require several new modules or else they will not work: CacheControl-0.12.11 (with a dependency of msgpack-1.0.4), cssselect-1.2.0, numpy-1.24.0 and pyserial-3.5.

  • February 25th, 2023

    • [renodr] - Update to xf86-video-intel-20230223. Fixes #17668.

    • [timtas] - Update to thunar-4.18.4. Fixes #17699.

    • [timtas] - Update to transmission-4.0.1. Fixes #17700.

  • February 24th, 2023

    • [bdubbs] - Update to font-util-1.4.0 (Xorg Font). Fixes #17695.

    • [bdubbs] - Update to unrar-6.2.6. Fixes #17684.

    • [bdubbs] - Update to gdb-13.1. Fixes #17679.

    • [bdubbs] - Update to parole-4.18.0. Fixes #17677.

    • [bdubbs] - Update to xf86-video-amdgpu-23.0.0. Fixes #17698.

    • [bdubbs] - Update to sudo-1.9.13p1. Fixes #17692.

    • [bdubbs] - Update to gparted-1.5.0. Fixes #17690.

  • February 23rd, 2023

    • [ken] - Update to dvisvgm-3.0.3. Fixes #17691.

    • [ken] - Update to HTTP-Daemon-6.15 (Perl module, Security Update). Fixes #17696.

  • February 22nd, 2023

    • [renodr] - Update to epiphany-43.1 (Security Update). Fixes #17689.

    • [renodr] - Move GDM over to Display Managers.

    • [renodr] - Update to gnome-shell-43.3. Fixes #17662.

    • [renodr] - Update to mutter-43.3. Fixes #17663.

  • February 21st, 2023

    • [renodr] - Update to gnome-backgrounds-43.1. Fixes #17671.

    • [renodr] - Update to gnome-desktop-43.2. Fixes #17670.

    • [renodr] - Update to Thunderbird-102.8.0 (Security Update). Fixes #17664.

    • [pierre] - Update to Java-19.0.2+7 (security update). Fixes #17674.

    • [bdubbs] - Update to sudo-1.9.13. Fixes #17652.

    • [bdubbs] - Update to curl-7.88.1 (Security Update). Fixes #17656.

    • [bdubbs] - Update to bind-9.18.12. Fixes #17660.

  • February 20th, 2023

    • [bdubbs] - Update to plasma5-5.26.5. Fixes #17471.

  • February 19th, 2023

    • [bdubbs] - Update to kf5-apps-22.12.2, including kate, kwave, and falkon. Fixes #17485.

    • [bdubbs] - Update to kf5-5.103, including extra-cmake-modules, oxygen-icons and breeze-icons. Fixes #17518.

    • [bdubbs] - Update to pipewire-0.3.66. Fixes #17672.

    • [bdubbs] - Update to userspace-rcu-0.14. Fixes #17653.

    • [bdubbs] - Update to tigervnc-1.13.0. Fixes #17616.

    • [pierre] - Update to OpenJDK-19.0.2+7 (security update). Part of #17674.

  • February 18th, 2023

    • [renodr] - Update to webkitgtk-2.38.5. Fixes #17658.

    • [xry111] - Patch GRUB-2.06 for an issue triggered with e2fsprogs-1.47.0. Addresses LFS #5219.

  • February 17th, 2023

    • [thomas] - Update to xfce4-notifyd-0.8.1 and readd xfce-dev-tools-4.18.0 as a build-time dependency of xfce4-notifyd. Fixes #17673.

    • [ken] - Update to node.js-v18.14.1 (Security Update). Fixes #17669.

  • February 16th, 2023

    • [renodr] - Update to PHP-8.2.3 (Security Update). Fixes #17654.

    • [renodr] - Update to mariadb-10.6.12. Fixes #17665.

    • [renodr] - Update to git-2.39.2 (Security Update). Fixes #17651.

    • [renodr] - Update to harfbuzz-7.0.0. Fixes #17634.

    • [renodr] - Update to xterm-379. Fixes #17661.

    • [renodr] - Update to freetype-2.13.0. Fixes #17619.

    • [renodr] - Adapt Subversion to Ruby-3.2. Fixes #17666.

  • February 15th, 2023

    • [ken] - Update to x264-20230215 and x265-20230215. Fixes #17657.

  • February 14th, 2023

    • [ken] - Update to firefox-102.8.0 and JS-102.8.0 (Security updates). Fixes #17650.

    • [renodr] - Update to gnome-control-center-43.4.1. Fixes #17649.

    • [renodr] - Update to libadwaita-1.2.2. Fixes #17644.

    • [renodr] - Update to vala-0.56.4. Fixes #17643.

    • [renodr] - Update to vte-0.70.3. Fixes #17637.

    • [renodr] - Update to ruby-3.2.1. Fixes #17614.

    • [ken] - Update to nghttp2-1.52.0. Fixes #17647.

    • [timtas] - Update to openldap-2.6.4. Fixes #17648.

    • [thomas] - Update to traceroute-2.1.2. Fixes #17646.

  • February 13th, 2023

    • [renodr] - Update to seamonkey-2.53.15 (Security Update). Fixes #17285.

    • [ken] - Update to gnutls-3.8.0 (Security Update). Fixes #17633.

    • [bdubbs] - Update to rustc-1.67.1. Fixes #17642.

    • [bdubbs] - Update to util-macros-1.20.0. Fixes #17645.

    • [bdubbs] - Update to dos2unix-7.4.4. Fixes #17635.

    • [bdubbs] - Update to Python-3.11.2. Fixes #17613.

    • [bdubbs] - Update to dbus-1.14.6. Fixes #17611.

    • [bdubbs] - Update to libcap-2.67. Fixes #17600.

    • [ken] - Update to libdrm-2.4.115. Fixes #17621.

    • [renodr] - Update to Thunderbird-102.7.2 (Security Update). Fixes #17537.

  • February 12th, 2023

    • [renodr] - Update to gnome-terminal-3.46.8. Fixes #17641.

    • [renodr] - Update to gnome-maps-43.4. Fixes #17595.

    • [renodr] - Update to evolution and evolution-data-server 3.46.4. Fixes #17636.

    • [renodr] - Update to samba-4.17.5 (Security Update). Fixes #17567.

    • [renodr] - Update to libhandy-1.8.1. Fixes #17594.

    • [renodr] - Update to NetworkManager-1.42.0. Fixes #17632.

    • [renodr] - Update to libgusb-0.4.5. Fixes #17617.

    • [timtas] - Update to xfce4-settings-4.18.2. Fixes #17640.

    • [timtas] - Update to xfce4-notifyd-0.8.0. Fixes #17639.

    • [ken] - Update to XML-LibXSLT-2.002001 (Perl module). Fixes #17631.

  • February 11th, 2023

    • [thomas] - Update to postgresql-15.2 (includes fix for CVE-2022-41862). Fixes #17620.

    • [ken] - Update to asymptote-2.85. Fixes #17626.

    • [timtas] - Update to xfce4-panel-4.18.2. Fixes #17623.

    • [timtas] - Update to ristretto-0.13.0. Fixes #17624.

  • February 10th, 2023

    • [ken] - Update to libvpx-1.13.0. Fixes #17625.

    • [ken] - Update to nss-3.88.1. Fixes #17627.

    • [timtas] - Update to libxfce4ui-4.18.2. Fixes #17630.

    • [timtas] - Update to xfce4-session-4.18.1. Fixes #17628.

    • [timtas] - Update to xfce4-power-manager-4.18.1. Fixes #17629.

  • February 9th, 2023

    • [timtas] - Revert to old SBU estimate for transmission-4.0.0.

    • [bdubbs] - Update to libreoffice-7.5.0.3. Fixes #17596.

    • [timtas] - Update to transmission-4.0.0. Fixes #17609.

    • [timtas] - Update to mesa-22.3.5. Fixes #17616.

    • [bdubbs] - Update to stunnel-5.68. Fixes #17610.

    • [bdubbs] - Update to libjpeg-turbo-2.1.5.1. Fixes #17612.

    • [pierre] - Update to xwayland-22.1.8 (security update). Fixes #17607.

    • [pierre] - Update to sphinx_rtd_theme-1.2.0. Fixes #17608.

    • [pierre] - Add sphinxcontrib-jquery-2.0.0, as a dependency of sphinx_rtd_theme-1.2.0. Part of #17608.

  • February 8th, 2023

    • [bdubbs] - Update to xkeyboard-config-2.38. Fixes #17603.

    • [bdubbs] - Update to rustc-1.67.0. Fixes #17586.

    • [renodr] - Update to NetworkManager-1.40.12. Fixes #17568.

  • February 7th, 2023

    • [thomas] - Update to SDL2-2.26.3. Fixes #17606.

    • [timtas] - Update to xorg-server-21.1.7 (Security Update). Fixes #17605.

    • [timtas] - Update to libX11-1.8.4. Fixes #17602.

  • February 6th, 2023

    • [ken] - Update to ImageMagick-7.1.0-61. (Security Update) Addresses #16962.

    • [thomas] - Fix an issue in apr-1-config script.

  • February 5th, 2023

    • [pierre] - Add chardet-5.1.0 (python module), needed by doxypypy-0.8.8.7. Fixes #17604.

    • [bdubbs] - Update to doxypypy-0.8.8.7 (python module). Part of #17604.

    • [bdubbs] - Update to gnumeric-1.12.55. Fixes #17599.

    • [bdubbs] - Update to goffice-0.10.55. Fixes #17598.

    • [bdubbs] - Update to php-8.2.2. Fixes #17593.

    • [bdubbs] - Update to poppler-23.02.0 and poppler-data-0.4.12. Fixes #17587.

    • [pierre] - Update to vim-9.0.1273 (Sync with LFS). Part of #12241.

    • [renodr] - Update to WebKitGTK+-2.38.4 (Security Update). Fixes #17588.

  • February 4th, 2023

    • [ken] - Update perl modules: Alien-Build-2.77, Alien-Libxml2-0.19, B-COW-0.007, Clone-0.46, CPAN-Meta-Check-0.017, DateTime-1.59, DateTime-Locale-1.37, DateTime-TimeZone-2.57, Exporter-Tiny-1.006000, FFI-CheckLib-0.31, File-chdir-0.1011, HTTP-Message-6.44, List-SomeUtils-0.59, MIME-Charset-1.013.1, Module-Build-0.4232, Params-Validate-1.31, Params-ValidationCompiler-0.31, Path-Tiny-0.144, Sub-Quote-2.006008, Test-Deep-1.204, Test-Fatal-0.017, Test-File-1.993, Test-Needs-0.002010, Test-Without-Module-0.21, Text-CSV_XS-1.49, Variable-Magic-0.63, XML-LibXML-2.0208, and add Alien-Build-Plugin-Download-GitLab-0.01 (now required for Alien-libxml2). Addresses #13850.

  • February 4th, 2023

    • [timtas] - Update to fuse3-3.13.1. Fixes #17601.

    • [bdubbs] - Update to node-18.14.0. Fixes #17592.

  • February 3rd, 2023

    • [bdubbs] - Update to openssh and ssh-askpass 9.2p1. Fixes #17590.

    • [bdubbs] - Update to xapian-core-1.4.22. Fixes #17589.

    • [bdubbs] - Update to libjpeg-turbo-2.1.5. Fixes #17584.

    • [renodr] - Update to libwpe-1.14.1. Fixes #17591.

  • February 2nd, 2023

    • [timtas] - Update to apr-1.7.2. Fixes #17582.

    • [timtas] - Update to apr-util-1.6.3. Fixes #17583.

  • February 1st, 2023

    • [ken] - Update to HTML-Parser-3.81 (perl module). Fixes #17585.

    • [timtas] - Update to apr-1.7.1. Fixes #17582.

    • [timtas] - Update to apr-util-1.6.1. Fixes #17583.

  • January 31th, 2023

    • [ken] - Update to dvisvgm-3.0.2. Fixes #17581.

    • [renodr] - Update to xf86-video-vmware-13.4.0. Fixes #17558.

    • [bdubbs] - Update to libgusb-0.4.4. Fixes #17580.

    • [thomas] - Fix download url for proftpd.

  • January 30th, 2023

    • [ken] - Update to asymptote-2.84. Fixes #17556.

    • [ken] - Update to dvisvgm-3.0.1. Fixes #17190.

    • [bdubbs] - Update to pycryptodome-3.17.0 (Python module). Fixes #17579.

    • [bdubbs] - Update to umockdev-0.17.16. Fixes #17578.

    • [bdubbs] - Update to sysstat-12.7.2. Fixes #17577.

  • January 29th, 2023

    • [ken] - ruby-3.2.0 requires libyaml. Fixes #17576.

    • [bdubbs] - Update to c-ares-1.19.0. Fixes #17574.

    • [bdubbs] - Update to fetchmail-6.4.36. Fixes #17575.

  • January 27th, 2023

    • [bdubbs] - Update to fontconfig-2.14.2. Fixes #17573.

    • [bdubbs] - Update to geoclue-2.7.0. Fixes #17572.

  • January 27th, 2023

    • [bdubbs] - Update to libreoffice-7.4.5.1. Fixes #17570.

    • [bdubbs] - Update to mesa-22.3.4. Fixes #17569.

    • [bdubbs] - Update to pipewire-0.3.65. Fixes #17571.

  • January 26th, 2023

    • [bdubbs] - Update to bind and bind-utilities 9.18.11 (security update). Fixes #17562.

    • [bdubbs] - Update to xine-lib-1.2.13. Fixes #17566.

    • [bdubbs] - Update to IO-Socket-SSL-2.081 (Perl Module). Fixes #17564.

    • [bdubbs] - Update to btrfs-progs-v6.1.3. Fixes #17563.

    • [bdubbs] - Update to guile-3.0.9. Fixes #17565.

    • [bdubbs] - Update to gstreamer-1.22.0 stack. Includes gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly, gst-libav, and gstreamer-vaapi. Fixes #17555.

    • [bdubbs] - Update to doxyqml-0.5.2 (Python Module). Fixes #17561.

    • [bdubbs] - Update to Text-BibTeX-0.89 (Perl Module). Fixes #17560.

  • January 25th, 2023

    • [renodr] - Update to unrar-6.2.5. Fixes #17559.

  • January 24th, 2023

    • [renodr] - Update to libwacom-2.6.0. Fixes #17557.

    • [renodr] - Update to icewm-3.3.1. Fixes #17554.

    • [renodr] - Update to unrar-6.2.4. Fixes #17553.

    • [renodr] - Update to mc-4.8.29. Fixes #17549.

    • [bdubbs] - Update to graphviz-7.1.0. Fixes #17548.

    • [bdubbs] - Update to gnumeric-1.12.54. Fixes #17544.

    • [bdubbs] - Update to goffice-0.10.54. Fixes #17541.

    • [bdubbs] - Update to wireshark-4.0.3. Fixes #17534.

  • January 23rd, 2023

    • [bdubbs] - Update to postfix-3.7.4. Fixes #17551.

    • [bdubbs] - Update to neon-0.32.5. Fixes #17550.

    • [bdubbs] - Update to glib-2.74.5. Fixes #17540.

    • [bdubbs] - Update to cmake-3.25.2. Fixes #17539.

    • [renodr] - Update to gnome-desktop-43.1. Fixes #17542.

    • [renodr] - Update to gedit-44.2. Fixes #17538.

    • [renodr] - Update to libchamplain-0.12.21. Fixes #17536.

    • [xry111] - Use pip to install dbus-python. Fixes #17547.

    • [xry111] - Add meson_python-0.12.0 (Python dependencies). Part of #17547.

    • [xry111] - Add pyproject-metadata-0.7.0 (Python dependencies). Part of #17547.

    • [xry111] - Add patchelf-0.17.2. Part of #17547.

    • [pierre] - Update all python modules after merge. Fixes #17546.

    • [bdubbs] - Update to nano-7.2. Fixes #17530.

    • [bdubbs] - Update to exiv2-0.27.6. Fixes #17523.

    • [bdubbs] - Update to IO-Socket-SSL-2.080 (Perl Module). Fixes #17533.

    • [timtas] - Update to xfdesktop-4.18.1. Fixes #17552.

  • January 21st, 2023

    • [bdubbs] - Update to libXpm-3.5.15 (Xorg Library). Fixes #17523.

    • [pierre] - Update to plasma-wayland-protocols-1.10. Fixes #17535.

    • [pierre] - Update to talloc-2.4.0. Fixes #17531.

    • [pierre] - Update to libva-2.17.0 (Xorg driver). Fixes #17528.

    • [pierre] - Update to libinput-1.22.1 (Xorg driver). Fixes #17527.

    • [pierre] - Update to MarkupSafe-2.1.2 (Python Module). Fixes #17526.

    • [timtas] - Update to thunar-4.18.3. Fixes #17543.

  • January 19th, 2023

    • [timtas] - Update to sudo-1.9.12p2. Fixes #17529.

  • January 18th, 2023

    • [bdubbs] - Update to httpd-2.4.55. Fixes #17525.

    • [bdubbs] - Update to git-2.39.1. Fixes #17524.

  • January 17th, 2023

    • [pierre] - Change external references to python modules now in the book to internal references.

    • [ken] - Update to firefox-102.7.0 (security update), also update to JS-102.7.0 (normal update). Fixes #17521.

    • [renodr] - Update to fuse-3.13.0. Fixes #17514.

  • January 16th, 2023

    • [bdubbs] - Update to IO-Socket-SSL-2.079 (Perl Module). Fixes #17522.

    • [bdubbs] - Update to unbound-1.17.1. Fixes #17510.

    • [bdubbs] - Update to mpg123-1.31.2. Fixes #17519.

  • January 15th, 2023

    • [thomas] - Build ssh-askpass using gtk3 instead of gtk2.

  • January 14th, 2023

    • [ken] - Update to rustc-1.66.1 (security update). Fixes #17501. Please read yesterday's entry for 'Install FileCheck' if you have installed recent LLVM without that utility.

    • [timtas] - Update to thunar-4.18.2. Fixes #17498.

    • [timtas] - Update to libxfce4util-4.18.1. Fixes #17499.

    • [timtas] - Update to xfce4-panel-4.18.1. Fixes #17500.

    • [pierre] - Update to libreoffice-7.4.4.2. Fixes #17512.

    • [pierre] - Update to ed-1.19. Fixes #17516.

    • [pierre] - Update to xfsprogs-6.1.1. Fixes #17515.

    • [pierre] - Update to mesa-22.3.3. Fixes #17504.

  • January 13th, 2023

    • [pierre] - Add an XSL stylesheet for generating the pythonhosted.xml page from the information contained in the python modules and dependencies sections, and use it in Makefile.

    • [bdubbs] - Update to llvm-15.0.7. Fixes #17508.

    • [bdubbs] - Install FileCheck in LLVM. Partially addresses #17501. To build only FileCheck where LLVM has already been installed, see comment 42 in that ticket.

    • [thomas] - Update to iptables-1.8.9. Fixes #17506.

    • [renodr] - Update to pipewire-0.3.64. Fixes #17513.

    • [renodr] - Update to tracker-miners-3.4.3. Fixes #17511.

    • [renodr] - Update to libpcap-1.10.3. Fixes #17509.

    • [renodr] - Update to libwebp-1.3.0. Fixes #17507.

    • [renodr] - Update to gtksourceview5-5.6.2. Fixes #17505.

    • [renodr] - Update to NetworkManager-1.40.10. Fixes #17503.

    • [renodr] - Update to apache-ant-1.10.13. Fixes #17502.

  • January 10th, 2023

    • [renodr] - Update to eog-43.2. Fixes #17494.

    • [renodr] - Update to nautilus-43.2. Fixes #17493.

    • [timtas] - Fix setting hostname in dhcpcd service.

    • [timtas] - Add option in dhcpcd service script to set the hostname.

    • [bdubbs] - Update to xterm-378. Fixes #17497.

    • [bdubbs] - Update to libnma-1.10.6. Fixes #17496.

    • [bdubbs] - Update to xine-ui-0.99.14. Fixes #17495.

    • [bdubbs] - Update to mercurial-6.3.2. Fixes #17475.

  • January 9th, 2023

    • [bdubbs] - Update to php-8.2.1. Fixes #17484.

  • January 8th, 2023

    • [bdubbs] - Update to Cython-0.29.33 (Python module). Fixes #17487.

    • [pierre] - Update to gnome-maps-43.3. Fixes #17492.

    • [pierre] - Update to evolution-3.46.3. Fixes #17491.

    • [pierre] - Update to gvfs-1.50.3. Fixes #17490.

    • [pierre] - Update to evolution-data-server-3.46.3. Fixes #17489.

    • [pierre] - Update to libadwaita-1.2.1. Fixes #17488.

    • [pierre] - Update to graphviz-7.0.6. Fixes #17486.

    • [pierre] - Update to gedit-44.1. Fixes #17473.

  • January 7th, 2023

    • [bdubbs] - Update to libxfce4ui-4.18.1. Fixes #17477.

    • [ken] - Update to qtwebengine-5.15.12 (Security fix) with qmake switch to let ffmpeg decode proprietary codecs. Fixes #17478.

  • January 6th, 2023

    • [bdubbs] - Update to node-18.13.0. Fixes #17481.

    • [bdubbs] - Update to nss-3.87. Fixes #17479.

    • [bdubbs] - Update to libqalculate-4.5.1. Fixes #17474.

    • [bdubbs] - Update to python-dbusmock-0.28.7. Fixes #17483.

    • [bdubbs] - Update to LibRaw-0.21.1. Fixes #17482.

    • [bdubbs] - Update to xfsprogs-6.1.0. Fixes #17480.

    • [bdubbs] - Update to SDL2-2.26.2. Fixes #17472.

    • [bdubbs] - Update to btrfs-progs-v6.1.2. Fixes #17470.

    • [pierre] - Update to Qt5-5.15.8. Fixes #17476.

  • January 5th, 2023

    • [ken] - Expand the gentoo details in 'Going Beyond BLFS'. Fixes #17004.

  • January 4th, 2023

    • [ken] - Fix a header in boost-1.81.0 and patch libreoffice to accommodate another change in this version of boost, so that system boost can again be used. Fixes #17461.

  • January 3rd, 2023

    • [renodr] - Archive telepathy-logger.

    • [renodr] - Update to tepl-6.4.0. Fixes #17469.

    • [renodr] - Update to gedit-44.0. Fixes #17462.

    • [renodr] - Update to pidgin-2.14.12. Fixes #17466.

    • [renodr] - Update to libxkbcommon-1.5.0. Fixes #17467.

    • [renodr] - Update to rxvt-unicode-9.31 (Security Update). Fixes #17648.

  • January 2nd, 2023

    • [timtas] - Describe how to build and setup dhcpcd with or without privilege separation.

    • [bdubbs] - Update to fontforge-20230101. Fixes #17465.

    • [bdubbs] - Update to Pygments-2.14.0 (Python module). Fixes #17464.

    • [bdubbs] - Update to poppler-23.01.0. Fixes #17463.

  • January 1st, 2023

    • [pierre] - Fix an issue in libkdcraw introduced by recent libraw.

    • [pierre] - Update to bootscripts-20230101: fix several issues with winbindd.

    • [pierre] - Fix an issue in gegl introduced by recent libraw.

  • December 31st, 2022

    • [renodr] - Update to Thunderbird-102.6.1 (Security Update). Fixes #17431.

    • [renodr] - Update to WebKitGTK+-2.38.3 (Security Update). Fixes #17437.

    • [thomas] - Fix an issue in gptfdisk introduced by recent popt.

  • December 30th, 2022

    • [bdubbs] - Update to libpcap-1.10.2. Fixes #17460.

    • [bdubbs] - Update to Net-DNS-1.36 (Perl module). Fixes #17459.

    • [renodr] - Update to glib-2.74.4 (Security Update). Fixes #17441.

    • [renodr] - Update to libtiff-4.5.0 (Security Update). Fixes #17411.

    • [renodr] - Update to dovecot-2.3.20. Fixes #17438.

    • [renodr] - Update to curl-7.87.0 (Security Update). Fixes #17432.

    • [bdubbs] - Update to mesa-22.3.2. Fixes #17457.

    • [bdubbs] - Update to sqlite-autoconf-3400100. Fixes #17456.

    • [bdubbs] - Update to opencv-4.7.0. Fixes #17455.

  • December 29th, 2022

    • [bdubbs] - Update to traceroute-2.1.1. Fixes #17451.

    • [bdubbs] - Update to doxygen-1.9.6. Fixes #17450.

    • [bdubbs] - Update to libsndfile-1.2.0. Fixes #17448.

    • [bdubbs] - Update to libpsl-0.21.2. Fixes #17447.

    • [bdubbs] - Update to tree-2.1.0. Fixes #17446.

    • [bdubbs] - Update to ruby-3.2.0. Fixes #17379.

    • [bdubbs] - Update to gstreamer-1.20.5 stack. Includes gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly, gst-libav, and gstreamer-vaapi. Fixes #17420.

    • [pierre] - Update to gtk4-4.8.3. Fixes #17445.

    • [pierre] - Update to libsigc++2-2.12.0. Fixes #17443.

    • [pierre] - Update to graphviz-7.0.5. Fixes #17442.

    • [pierre] - Update to libgusb-0.4.3. Fixes #17428.

    • [pierre] - Update to libqalculate-4.5.0. Fixes #17421.

    • [pierre] - Update to NetworkManager-1.40.8. Fixes #17417.

  • December 28th, 2022

    • [bdubbs] - Update to LibRaw-0.21.0. Fixes #17419.

    • [renodr] - Update to gedit-43.2. Fixes #17266.

    • [renodr] - Update to tepl-6.2.0. Fixes #17454.

    • [renodr] - Restore tepl from the archives in support of gedit. Fixes #17454.

    • [renodr] - Update to amtk-5.6.1. Fixes #17453.

    • [renodr] - Restore amtk from the archives in support of gedit. Fixes #17453.

    • [renodr] - Update to gucharmap-15.0.2. Fixes #17030.

    • [renodr] - Update to gnome-weather-43.0. Fixes #17092.

    • [renodr] - Update to gnome-terminal-3.46.7. Fixes #17089.

    • [renodr] - Update to gnome-power-manager-43.0. Fixes #17049.

    • [renodr] - Archive folks. The only package which used it (gnome-maps) no longer uses it.

    • [renodr] - Update to gnome-maps-43.2. Fixes #17074.

    • [renodr] - Add libshumate in support of gnome-maps. Fixes #17452.

    • [renodr] - Update to gnome-disk-utility-43.0. Fixes #17057.

    • [renodr] - Update to gnome-calculator-43.0.1. Fixes #17053.

    • [renodr] - Update to file-roller-43.0. Fixes #17073.

    • [pierre] - Update to gtk+-3.24.36. Fixes #17344.

    • [renodr] - Fix building Seahorse with GnuPG-2.4.

    • [renodr] - Disable building the nautilus extension in Brasero. This is due to it being incompatible with the GTK-4 version of Nautilus.

    • [renodr] - Update to evolution-3.46.2. Fixes #17048.

    • [renodr] - Update to evince-43.1. Fixes #17088.

    • [renodr] - Update to eog-43.1. Fixes #17066.

    • [renodr] - Update to baobab-43.0. Fixes #17093.

    • [renodr] - Update to yelp-42.2. Fixes #17068.

    • [renodr] - Update to gnome-user-docs-43.0. Fixes #17081.

    • [renodr] - Update to gdm-43.0. Fixes #17101.

    • [renodr] - Update to gnome-session-43.0. Fixes #17102.

    • [renodr] - Update to gnome-shell-extensions-43.1. Fixes #17063.

    • [renodr] - Update to gnome-shell-43.2. Fixes #17062.

    • [renodr] - Archive Zenity. It's no longer used by either Mutter or Libreoffice.

    • [renodr] - Update to mutter-43.2. Fixes #17064.

    • [renodr] - Update to gnome-control-center-43.2. Fixes #17034.

    • [renodr] - Update to gnome-settings-daemon-43.0. Fixes #17077.

    • [renodr] - Update to gnome-bluetooth-42.5. Fixes #17407.

    • [renodr] - Update to nautilus-43.1. Fixes #17087.

    • [renodr] - Add libcloudproviders-0.3.1 in support of Nautilus. Fixes #17436.

    • [renodr] - Update to gnome-backgrounds-43.0. Fixes #17100.

    • [renodr] - Update to evolution-data-server-3.46.2. Fixes #17047.

    • [renodr] - Update to dconf-editor-43.0. Fixes #17059.

    • [renodr] - Update to tracker-miners-3.4.2. Fixes #17079.

    • [renodr] - Update to tracker-3.4.2. Fixes #17079.

    • [renodr] - Update to libwnck-43.0. Fixes #17050.

    • [renodr] - Update to libpeas-1.34.0. Fixes #17071.

    • [renodr] - Update to libgweather-4.2.0. Fixes #17091.

  • December 27th, 2022

    • [bdubbs] - Update to harfbuzz-6.0.0. Fixes #17415.

    • [bdubbs] - Update to tk8.6.13. Fixes #17414.

    • [bdubbs] - Update to unrar-6.2.3. Fixes #17412.

    • [bdubbs] - Update to boost_1_81_0. Fixes #17408.

    • [bdubbs] - Update to qemu-7.2.0. Fixes #17406.

    • [bdubbs] - Update to mupdf-1.21.1. Fixes #17398.

    • [bdubbs] - Update to xscreensaver-6.06. Fixes #17393.

    • [bdubbs] - Update to exempi-2.6.3. Fixes #17389.

    • [bdubbs] - Update to btrfs-progs-v6.1. Fixes #17440.

    • [bdubbs] - Update to LVM2.2.03.18. Fixes #17439.

    • [dj] - Update to make-ca-1.12. Fixes #17449.

  • December 25th, 2022

    • [thomas] - Update to git-2.39.0. Fixes #17390.

    • [thomas] - Update to nasm-2.16.01. Fixes #17444.

  • December 24th, 2022

    • [thomas] - Update to bind-9.18.10. Fixes #17435.

    • [thomas] - Update to nasm-2.16. Fixes #17434.

  • December 23nd, 2022

    • [timtas] - Update to Xfce 4.18, including garcon libxfce4ui libxfce4util tumbler exo xfce4-panel xfconf xfwm4 xfdesktop xfce4-settings xfce4-appfinder xfce4-session xfce4-power-manager thunar thunar-volman ristretto xfce4-notifyd. Fixes #17409.

  • December 22nd, 2022

    • [bdubbs] - Update to tcsh-6.24.07. Fixes #17396.

    • [bdubbs] - Update to dash-0.5.12. Fixes #17391.

    • [bdubbs] - Update to vim-9.0.1060. Addresses #12241.

    • [bdubbs] - Update to pipewire-0.3.63. Fixes #17386.

    • [bdubbs] - Update to php-8.2.0. Fixes #17385.

  • December 22nd, 2022

    • [bdubbs] - Update to python3-3.11.1. Fixes #17378.

    • [bdubbs] - Update to IO-Socket-SSL-2.078 (Perl module). Fixes #17392.

    • [bdubbs] - Update to File-Slurper-0.014 (Perl module). Fixes #17416.

    • [bdubbs] - Update to icewm-3.3.0. Fixes #17430.

    • [bdubbs] - Update to mesa-22.3.1. Fixes #17365.

  • December 21st, 2022

    • [pierre] - Update to gnupg2-2.4.0. Fixes #17427.

    • [pierre] - Update to libksba-1.6.3 (security update). Fixes #17429.

  • December 20th, 2022

    • [pierre] - Update to xcb-util-0.4.1. Fixes #17424.

    • [pierre] - Update to xwayland-22.1.7. Fixes #17423.

    • [pierre] - Update to libSM-1.2.4 (xorg library). Fixes #17425.

    • [pierre] - Update to libX11-1.8.3 (xorg library). Fixes #17413.

    • [pierre] - Update to xdriinfo-1.0.7 (xorg application). Fixes #17426.

    • [pierre] - Update to xhost-1.0.9 (xorg application). Fixes #17395.

    • [pierre] - Update to xorg-server-21.1.6 (security update). Fixes #17422.

  • December 18th, 2022

    • [thomas] - Remove an obsolete sed from libarchive.

    • [ken] - Update to nss-3.86. Fixes #17387.

  • December 17th, 2022

    • [thomas] - Update to libarchive-3.6.2. Fixes #17388.

    • [thomas] - Update to pcre2-10.42. Fixes #17397.

  • December 16th, 2022

    • [renodr] - Update to libgee-0.20.6. Fixes #17058.

    • [renodr] - Update to gnome-online-accounts-3.46.0. Fixes #17067.

    • [renodr] - Update to cheese-43.0. Fixes #17401.

    • [renodr] - Update to gnome-desktop-43. Fixes #17090.

    • [renodr] - Port geocode-glib to libsoup3.

    • [renodr] - Update to yelp-xsl-42.1. Fixes #17069.

    • [renodr] - Archive gfbgraph. Nothing uses it anymore and it is incompatible with rest-0.9.1/libsoup3.

    • [renodr] - Add an entity for the gi-docgen URL and change various packages to use this URL in Optional Dependencies.

    • [renodr] - Update to rest-0.9.1. Fixes #16011.

    • [renodr] - Update to vte-0.70.2. Fixes #17043.

    • [renodr] - Update to gsettings-desktop-schemas-43.0. Fixes #17078.

  • December 15th, 2022

    • [renodr] - Adapt Zenity to use WebKitGTK+-2.38 if present.

    • [renodr] - Adapt Balsa to work with WebKitGTK+-2.38.

    • [renodr] - Update to epiphany-43.0. Fixes #17035.

    • [renodr] - Update to WebKitGTK+-2.38.2 (Security Update). Fixes #17046.

    • [renodr] - Force gst-plugins-good to use libsoup3.

    • [renodr] - Update to samba-4.17.4 (Security Update). Fixes #17410.

    • [thomas] - Update to logrotate-3.21-0. Fixes #17399.

    • [thomas] - Update to nano-7.1. Fixes #17405.

    • [pierre] - Update to thunderbird-102.6.0 (security update). Fixes #17402.

    • [pierre] - Update to xorg-server-21.1.5 (security update). Fixes #17403.

    • [pierre] - Update to xwayland-22.1.6 (security update). Fixes #17404.

    • [pierre] - Update to lxml-4.9.2 (python module). Fixes #17400.

  • December 14th, 2022

    • [renodr] - Update to seahorse-43.0. Fixes #17186.

    • [renodr] - Update to sysprof-3.46.0. Fixes #17072.

    • [renodr] - Update to gtksourceview5-5.6.1. Fixes #17070.

    • [renodr] - Update to gtksourceview4-4.8.4. Fixes #17268.

    • [renodr] - Update to adwaita-icon-theme-43. Fixes #17099.

    • [renodr] - Update to pyatspi-2.46.0. Fixes #17111.

    • [renodr] - Archived at-spi2-atk since it's files are now provided by at-spi2-core.

    • [renodr] - Archived ATK since it's files are now provided by at-spi2-core.

    • [renodr] - Change dependencies on atk or at-spi2-atk to at-spi2-core throughout the book.

    • [renodr] - Update to at-spi2-core-2.46.0. Fixes #17060.

  • December 13th, 2022

    • [ken] - Update to firefox-102.6.0 (Security Update) and JS102.6.0. Fixes #17394.

  • December 12th, 2022

    • [renodr] - Update to libsoup-3.2.2. Fixes #17031.

    • [renodr] - Update to libadwaita-1.2.0. Fixes 17032.

    • [renodr] - Update to libhandy-1.8.0. Fixes #17033.

    • [renodr] - Update to glib-networking-2.74.0. Fixes #17036.

    • [ken] - Patch python module Requests to use the same environment variable as Pip to access system certificates, therefore remove the unneeded dependency of Certifi.

  • December 11th, 2022

    • [bdubbs] - Update to plasma5-5.26.4. Fixes #16996.

    • [bdubbs] - Add kuserfeedback-1.2.0 needed by plasma.

    • [bdubbs] - Update to kf5-apps-22.12.0, including kate, kwave, and falkon. Fixes #17006.

    • [bdubbs] - Update to kf5-5.101, including extra-cmake-modules, oxygen-icons and breeze-icons. Fixes #17021.

  • December 9th, 2022

    • [pierre] - Update to uchardet-0.0.8. Fixes #17384.

    • [pierre] - Update to libfontenc-1.1.7, libxkbfile-1.1.2, libxshmfence-1.3.2, and libICE-1.1.1 (Xorg Libraries). Fixes #17383.

    • [pierre] - Update to libXau-1.0.11. Fixes #17382.

    • [pierre] - Update to xkbcomp-1.4.6 (Xorg application). Fixes #17381.

  • December 8th, 2022

    • [bdubbs] - Update to wireshark-4.0.2. Fixes #17380.

    • [bdubbs] - Update to pcre2-10.41. Fixes #17377.

    • [bdubbs] - Update to NetworkManager-1.40.6. Fixes #17364.

    • [bdubbs] - Update to graphviz-7.0.4. Fixes #17370.

    • [bdubbs] - Update to tcsh-6.24.05. Fixes #17369.

    • [bdubbs] - Update to poppler-22.12.0. Fixes #17368.

    • [bdubbs] - Update to SDL2-2.26.1. Fixes #17367.

  • December 6th, 2022

    • [pierre] - Update to inkscape-1.2.2. Fixes #17376.

    • [pierre] - Update to icewm-3.2.3. Fixes #17374.

    • [pierre] - Update to xinit-1.4.2. Fixes #17373.

    • [pierre] - Update to xcursorgen-1.0.8, xgamma-1.0.7, xprop-1.2.6, xrandr-1.5.2, xset-1.2.5, and xvinfo-1.1.5 (Xorg applications). Fixes #17372.

    • [pierre] - Update to libICE-1.1.0, libXScrnSaver-1.2.4, libXcomposite-0.4.6, libXdamage-1.1.6, libXres-1.2.2, libXv-1.0.12, and libXxf86dga-1.1.6 (Xorg libraries). Fixes #17371.

  • December 5th, 2022

    • [bdubbs] - Update to swig-4.1.1. Fixes #17363.

    • [bdubbs] - Update to libass-0.17.0. Fixes #17361.

    • [thomas] - Update to proftpd-1.3.8. Fixes #17375.

  • December 3rd, 2022

    • [thomas] - Update to cmake-3.25.1. Fixes #17362.

    • [pierre] - Update to glib-2.74.3. Fixes #17237.

  • December 2nd, 2022

    • [pierre] - Update to thunderbird-102.5.1 (security update). Fixes #17360.

  • December 1st, 2022

    • [ken] - Add page explaining how to use the system CA Certificates with the vendored Python pip installed in LFS. Fixes #17354.

  • November 30th, 2022

    • [pierre] - Update to LLVM-15.0.6. Fixes #17359.

    • [pierre] - Update to newt-0.52.23. Fixes #17358.

    • [pierre] - Update to wayland-protocols-1.31. Fixes #17357.

  • November 28th, 2022

    • [bdubbs] - Update to pycairo-1.23.0. Fixes #17356.

    • [bdubbs] - Update to php-8.1.13. Fixes #17348.

    • [bdubbs] - Update to umockdev-0.17.15. Fixes #17347.

    • [bdubbs] - Update to btrfs-progs-v6.0.2. Fixes #17346.

    • [pierre] - Update to libreoffice-7.4.3.2. Fixes #17350.

    • [bdubbs] - Update to pycryptodome-3.16.0 (Python module). Fixes #17355.

    • [bdubbs] - Update to pipewire-0.3.61. Fixes #17351.

    • [bdubbs] - Update to tcsh-6.24.02. Fixes #17345.

    • [thomas] - Update to ruby-3.1.3. Fixes #17349.

  • November 27th, 2022

    • [bdubbs] - Update to vlc-3.0.18. Fixes #17343.

    • [bdubbs] - Update to newt-0.52.22. Fixes #17339.

    • [bdubbs] - Update to libpng-1.6.39. Fixes #17335.

    • [bdubbs] - Update to SDL2-2.26.0. Fixes #17335.

    • [bdubbs] - Update to qpdf-11.2.0. Fixes #17333.

    • [bdubbs] - Update to mercurial-6.3.1. Fixes #17330.

    • [bdubbs] - Update to graphviz-7.0.3. Fixes #17329.

  • November 26th, 2022

    • [bdubbs] - Update to xterm-377. Fixes #17353.

    • [bdubbs] - Update to pycairo-1.22.0. Fixes #17352.

    • [bdubbs] - Update to pciutils-3.9.0. Fixes #17342.

    • [bdubbs] - Update to usbutils-015. Fixes #17341.

    • [bdubbs] - Update to IO-Socket-SSL-2.077 (Perl Module). Fixes #17338.

    • [bdubbs] - Update to wayland-protocols-1.30. Fixes #17336.

    • [bdubbs] - Update to libinput-1.22.0 (Xorg driver). Fixes #17332.

    • [bdubbs] - Update to libXpm-3.5.14 (Xorg library). Fixes #17331.

    • [bdubbs] - Update to libXrandr-1.5.3 (Xorg library). Fixes #17334.

    • [bdubbs] - Update to pango-1.50.12. Fixes #17328.

    • [bdubbs] - Update to mlt-7.12.0. Fixes #17327.

  • November 24th, 2022

    • [dj] - Update to make-ca-1.11. Fixes #17340.

  • November 22nd, 2022

    • [pierre] - Update to NetworkManager-1.40.4. Fixes #17325.

  • November 20th, 2022

    • [pierre] - Update to libXdmcp-1.1.4. Fixes #17326.

    • [pierre] - Update to libpwquality-1.4.5. Fixes #17324.

    • [pierre] - Update to thunderbird-102.5.0 (security update). Fixes #17236.

  • November 18th, 2022

    • [bdubbs] - Update to bind and bind-utilities-9.18.9. Fixes #17320.

    • [bdubbs] - Update to sqlite-autoconf-3400000 (3.40.0). Fixes #17322.

    • [bdubbs] - Update to xterm-376. Fixes #17323.

    • [ken] - Update to mutt-2.2.9. Fixes #17274.

    • [pierre] - Update to mesa-22.2.4. Fixes #17321.

    • [pierre] - Update to libXft-2.3.7 (Xorg library). Fixes #17317.

    • [pierre] - Update to LLVM-15.0.5. Fixes #17319.

    • [pierre] - Update to cmake-3.25.0. Fixes #17318.

  • November 17th, 2022

    • [renodr] - Update to nano-7.0. Fixes #17314.

    • [renodr] - Update to samba-4.17.3 (Security Update). Fixes #17316.

    • [bdubbs] - Update to krb5-1.20.1 (Security Update). Fixes #17313.

    • [bdubbs] - Update to sysstat-12.7.1. Fixes #17310.

    • [bdubbs] - Update to xfsprogs-6.0.0. Fixes #17309.

    • [bdubbs] - Update to nghttp2-1.51.0. Fixes #17301.

    • [bdubbs] - Update to gegl-0.4.40. Fixes #17298.

    • [bdubbs] - Update to babl-0.1.98. Fixes #17297.

    • [bdubbs] - Update to grantlee-5.3.1. Fixes #17295.

    • [bdubbs] - Update to nss-3.85. Fixes #17294.

    • [pierre] - Update to Mako-1.2.4 (Python Module). Fixes #17315.

    • [pierre] - Update to mercurial-6.3.0. Fixes #17312.

  • November 16th, 2022

    • [bdubbs] - Update to postgresql-15.1. Fixes #17290.

    • [bdubbs] - Update to bluez-5.66. Fixes #17288.

    • [bdubbs] - Update to icewm-3.2.2. Fixes #17281.

    • [ken] - Update to firefox-102.5.0 (Security Update). Fixes #17306.

    • [ken] - Update js102 to 102.5.0 (security fix). Fixes #17308.

    • [pierre] - Update to shadow-4.13. Fixes #17282. Also increase the number of "crypt" rounds. This may require to update PAM files to keep them in sync.

    • [bdubbs] - Update to soundtouch-2.3.2. Fixes #17280.

    • [bdubbs] - Update to xlsclients-1.1.5 (Xorg App). Fixes #17305.

    • [bdubbs] - Update to xlsatoms-1.1.4 (Xorg App). Fixes #17304.

    • [bdubbs] - Update to xkill-1.0.6 (Xorg App). Fixes #17303.

    • [bdubbs] - Update to xkbevd-1.1.5 (Xorg App). Fixes #17302.

    • [bdubbs] - Update to IO-Socket-SSL-2.076 (Perl Module). Fixes #17311.

    • [pierre] - Update to fop-2.8. Fixes #17293.

    • [pierre] - Update to pipewire-0.3.60. Fixes #17292.

    • [pierre] - Update to libX11-1.8.2 (Xorg library). Fixes #17291.

    • [pierre] - Update to graphviz-7.0.1. Fixes #17287.

    • [pierre] - Update to LVM2-2.03.17. Fixes #17286.

    • [pierre] - Update to mesa-22.2.3. Fixes #17279.

  • November 15th, 2022

    • [bdubbs] - Update to bubblewrap-0.7.0. Fixes #17278.

    • [bdubbs] - Update to iso-codes-4.12.0. Fixes #17277.

    • [bdubbs] - Update to polkit-122. Fixes #17230.

  • November 14th, 2022

    • [renodr] - Added gcr4 in support of gnome-shell. Fixes #17084.

    • [renodr] - Added js102 in support of gjs. Archived js91. Fixes #16714.

    • [renodr] - Update to gjs-1.74.1. Fixes #17106.

    • [renodr] - Update to network-manager-applet-1.30.0. Fixes 17283.

    • [renodr] - Update to libnma-1.10.4. Fixes 17284.

    • [renodr] - Update to highlight-4.4. Fixes 17299.

    • [renodr] - Update to unrar-6.2.2. Fixes #17300.

    • [renodr] - Update to sysstat-12.6.1 (Security Update). Fixes #17289.

    • [renodr] - Update to xfce4-settings-4.16.5 (Security Update). Fixes #17296.

  • November 10th, 2022

    • [pierre] - Fix building mozilla applications and qtwebengine with Python-3.11.

    • [renodr] - Update to php-8.1.12 (Security Update). Fixes #17241.

  • November 9th, 2022

    • [renodr] - Update to ntfs-3g-2022.10.3 (Security Update). Fixes #17249.

    • [renodr] - Update to pixman-0.42.2 (Security Update). Fixes #17262.

  • November 8th, 2022

    • [bdubbs] - Update to mupdf-1.21.0. Fixes #17276.

    • [bdubbs] - Update to jasper-4.0.0 (Security Update). Fixes #17272.

    • [bdubbs] - Update to btrfs-progs-v6.0.1. Fixes #17271.

    • [pierre] - Update to node.js-18.12.1 (security update). Fixes #17228.

    • [bdubbs] - Update to sudo-1.9.12p1. Fixes #17270.

    • [bdubbs] - Update to wayland-protocols-1.28. Fixes #17269.

    • [bdubbs] - Update to llvm-15.0.4. Fixes #17264.

    • [bdubbs] - Update to libdrm-2.4.114. Fixes #17267.

    • [bdubbs] - Update to icewm-3.2.0. Fixes #17265.

    • [bdubbs] - Update to xwayland-22.1.5. Fixes #17261.

    • [bdubbs] - Update to mlt-7.10.0. Fixes #17259.

    • [bdubbs] - Update to SDL2-2.24.2. Fixes #17258.

    • [bdubbs] - Update to cmake-3.24.3. Fixes #17257.

    • [timtas] - Update to xfce4-settings-4.16.4. Fixes #17275.

  • November 6th, 2022

    • [bdubbs] - Update to poppler-22.11.0. Fixes #17255.

    • [bdubbs] - Update to lcms2-2.14 (Little CMS). Fixes #17254.

    • [bdubbs] - Update to stunnel-5.67. Fixes #17253.

  • November 3rd, 2022

    • [bdubbs] - Update to URI-5.17 (perl module). Fixes #17263.

    • [bdubbs] - Update to HTML-Parser-3.80 (Perl Module). Fixes #17256.

    • [xry111] - Replace hd2u-1.0.4 with dos2unix-7.4.3, in response to improper maintenance of hd2u.

  • November 1st, 2022

    • [bdubbs] - Update to mpg123-1.31.1. Fixes #17251.

    • [bdubbs] - Update to Python3-3.11.0. Fixes #17223.

  • October 31st, 2022

    • [pierre] - Update to OpenJDK-19.0.1 (security update). Fixes #17240.

    • [ken] - Update to asymptote-2.83. Fixes #17083.

  • October 30th, 2022

    • [bdubbs] - Update to mpg123-1.31.0. Fixes #17246.

    • [bdubbs] - Update to xsetroot-1.1.3 (Xorg app). Fixes #17244.

    • [bdubbs] - Update to sessreg-1.1.3 (Xorg app). Fixes #17248.

    • [bdubbs] - Update to libXinerama-1.1.5 (Xorg library). Fixes #17243.

    • [bdubbs] - Update to libXext-1.3.5 (Xorg library). Fixes #17242.

  • October 29th, 2022

    • [ken] - Allow postfix to build on linux-6.0. Fixes #17247.

    • [pierre] - Update to qt5-5.15.7. Fixes #17239.

  • October 28th, 2022

    • [renodr] - Update to samba-4.17.2 (Security Update). Fixes #17208.

    • [renodr] - Patch libtiff against several vulnerabilities. Fixes #17144.

    • [bdubbs] - Update to taglib-1.13. Fixes #17238.

    • [bdubbs] - Update to xarchiver-0.5.4.20. Fixes #17235.

    • [bdubbs] - Update to gdk-pixbuf-2.42.10. Fixes #17234.

    • [ken] - Update to fetchmail-6.4.34. Fixes #17188.

  • October 27th, 2022

    • [bdubbs] - Update to wireshark-4.0.1. Fixes #17232.

    • [bdubbs] - Update to curl-7.86.0. Fixes #17233.

    • [bdubbs] - Update to PerlIO-utf8_strict-0.010 (Perl module). Fixes #17231.

  • October 24th, 2022

    • [bdubbs] - Update to alsa-lib alsa-utils 1.2.8. Fixes #17226.

    • [bdubbs] - Update to unrar-6.2.1. Fixes #17229.

    • [bdubbs] - Update to gtk-4.8.2. Fixes #17227.

    • [bdubbs] - Update to valgrind-3.20.0. Fixes #17225.

    • [bdubbs] - Update to swig-4.1.0. Fixes #17224.

  • October 24th, 2022

    • [bdubbs] - Update to icewm-3.1.0. Fixes #17222.

    • [bdubbs] - Update to xterm-375. Fixes #17221.

    • [bdubbs] - Update to libidn2-2.3.4. Fixes #17220.

    • [bdubbs] - Update to sudo-1.9.12. Fixes #17219.

  • October 23rd, 2022

    • [bdubbs] - Update to thunderbird-102.4.0. Fixes #17209.

    • [bdubbs] - Update to flac-1.4.2. Fixes #17218.

    • [bdubbs] - Update to fontconfig-2.14.1. Fixes #17215.

    • [bdubbs] - Update to Log-Log4perl-1.57 (Perl module). Fixes #17216.

    • [bdubbs] - Update to xwayland-22.1.4. Fixes #17214.

    • [bdubbs] - Update to faad2-2.10.1. Fixes #17210.

    • [bdubbs] - Update to NetworkManager-1.40.2. Fixes #17204.

    • [bdubbs] - Update to llvm-15.0.3. Fixes #17154.

    • [bdubbs] - Update to harfbuzz-5.3.1. Fixes #17211.

    • [bdubbs] - Update to mesa-22.2.2. Fixes #17213.

    • [bdubbs] - Update to xcb-util-image-0.4.1, xcb-util-keysyms-0.4.1, xcb-util-renderutil-0.3.10, xcb-util-wm-0.4.2, xcb-util-cursor-0.1.4. Fixes #17206.

    • [bdubbs] - Update to libXrender-0.9.11 (Xorg Library). Fixes #17217.

    • [bdubbs] - Update to libxshmfence-1.3.1 (Xorg Library). Fixes #17205.

  • October 22nd, 2022

    • [bdubbs] - Update to pixman-0.42.0. Fixes #17203.

    • [bdubbs] - Update to qca-2.3.5. Fixes #17202.

    • [bdubbs] - Update to libgusb-0.4.2. Fixes #17201.

    • [bdubbs] - Update to icu4c-72_1. Fixes #17200.

  • October 21st, 2022

    • [thomas] - Update to bind-9.18.8, bind-utils-9.18.8. Fixes #17207.

    • [thomas] - Update to rsync-3.2.7. Fixes #17212.

    • [bdubbs] - Update to libqalculate-4.4.0. Fixes #17195.

    • [bdubbs] - Update to libical-3.0.16. Fixes #17194.

    • [bdubbs] - Update to libunistring-1.1. Fixes #17191.

    • [bdubbs] - Update to asciidoctor-2.0.18. Fixes #17187.

    • [bdubbs] - Update to unbound-1.17.0. Fixes #17184.

    • [bdubbs] - Update to nss-3.84. Fixes #17181.

    • [bdubbs] - Update to gnupg-2.3.8. Fixes #17180.

    • [bdubbs] - Update to libsoup-2.74.3. Fixes #17178.

  • October 20th, 2022

    • [bdubbs] - Update to libreoffice-7.4.2.3. Fixes #17179.

    • [bdubbs] - Update to node.js-16.18.0. Fixes #17176.

    • [bdubbs] - Update to gstreamer-1.20.4 gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav gstreamer-vaapi. Fixes #17175.

    • [pierre] - Update to libxkbfile-1.1.1 (Xorg library). Fixes #17198.

    • [pierre] - Update to libpciaccess-0.17 (Xorg library). Fixes #17197.

    • [pierre] - Update to libXmu-1.1.4 (Xorg library). Fixes #17196.

    • [pierre] - Update to smproxy-1.0.7 (Xorg application). Fixes #17189.

    • [pierre] - Update to libxml2-2.10.3 (security update). Fixes #17185.

    • [pierre] - Update to graphviz-6.0.2. Fixes #17172.

    • [pierre] - Update to libwacom-2.5.0. Fixes #17182.

    • [pierre] - Update to mesa-22.2.1. Fixes #17170.

    • [pierre] - Update to wayland-protocols-1.27. Fixes #17169.

    • [pierre] - Update to harfbuzz-5.3.0. Fixes #17166.

    • [pierre] - Update to libva-2.16.0 (Xorg driver). Fixes #17164.

    • [pierre] - Update to freeglut-3.4.0. Fixes #17163.

  • October 19th, 2022

    • [bdubbs] - Update to pipewire-0.3.59. Fixes #17139.

    • [bdubbs] - Update to git-2.38.1 (Security update). Fixes #17199.

    • [thomas] - Update to postgresql-15-0. Fixes #17183.

  • October 18th, 2022

    • [bdubbs] - Update to thunderbird-102.3.3 (Security update). Fixes #17138.

    • [bdubbs] - Update to sqlite-autoconf-3390400 (3.39.4). Fixes #17137.

    • [bdubbs] - Update to php-8.1.11. Fixes #17136.

    • [ken] - Update to firefox-102.4.0 (Security Update). Fixes #17192.

  • October 17th, 2022

    • [bdubbs] - Update to python-dbusmock-0.28.6. Fixes #17173.

    • [bdubbs] - Update to python3-3.10.8. Fixes #17174.

  • October 15th, 2022

    • [bdubbs] - Update to btrfs-progs-v6.0. Fixes #17171.

    • [bdubbs] - Update to libksba-1.6.2 (Security fix). Fixes #17162.

    • [bdubbs] - Update to libgpg-error-1.46. Fixes #17161.

    • [bdubbs] - Update to dbus-1.14.4. Fixes #17156.

    • [bdubbs] - Update to JSON-4.10 (Perl Module). Fixes #17165.

    • [bdubbs] - Update to URI-5.16 (Perl Module). Fixes #17167.

    • [bdubbs] - Update to HTML-Parser-3.79 (Perl Module). Fixes #17177.

  • October 14th, 2022

    • [bdubbs] - Update to libical-3.0.15. Fixes #17159.

    • [bdubbs] - Update to icewm-3.0.1. Fixes #17158.

    • [bdubbs] - Update to dhcp-4.4.3-P1. Fixes #17157.

  • October 12th, 2022

    • [thomas] - Update to postfix-3.7.3. Fixes #17160.

  • October 11th, 2022

    • [bdubbs] - Update to mercurial-6.2.3. Fixes #17155.

    • [thomas] - Update to xterm-374. Fixes #17168.

  • October 9th, 2022

    • [bdubbs] - Update to wireshark-4.0.0. Fixes #17152.

  • October 5th, 2022

    • [bdubbs] - Update to Net-DNS-1.35(Perl module). Fixes #17153.

    • [bdubbs] - Update to xkeyboard-config-2.37. Fixes #17151.

    • [bdubbs] - Update to SDL2-2.24.1. Fixes #17150.

    • [bdubbs] - Update to openssh-9.1p1 and ssh-askpass-9.1p1. Fixes #17149.

    • [bdubbs] - Update to icewm-3.0.0. Fixes #17148.

    • [bdubbs] - Update to git-2.38.0. Fixes #17147.

  • October 4th, 2022

    • [bdubbs] - Update to poppler-22.10.0. Fixes #17146.

    • [bdubbs] - Update to pango-1.50.11. Fixes #17145.

    • [bdubbs] - Update to libgusb-0.4.1. Fixes #17143.

    • [bdubbs] - Update to qpdf-11.1.1. Fixes #17142.

    • [bdubbs] - Update to links-2.28. Fixes #17141.

  • October 1st, 2022

    • [bdubbs] - Update to dbus-1.14.2. Fixes #17126.

    • [bdubbs] - Update to libcap-2.66. Fixes #17122.

  • September 29th, 2022

    • [timtas] - Fix Xfce4 Power Manager Introduction.

    • [pierre] - Update to seamonkey-2.53.14. Fixes #17135.

    • [pierre] - Update to plasma-wayland-protocols-1.9.0. Fixes #17134.

    • [pierre] - Update to highlight-4.3. Fixes #17133.

    • [pierre] - Update to gnutls-3.7.8. Fixes #17132.

    • [pierre] - Update to gspell-1.12.0. Fixes #17131.

  • September 27th, 2022

    • [renodr] - Update to libXtst-1.2.4 (Xorg Library). Fixes #17127.

    • [renodr] - Update to libXxf86vm-1.1.5 (Xorg Library). Fixes #17128.

  • September 26th, 2022

    • [bdubbs] - Update to ffmpeg-5.1.2. Fixes. #17124.

    • [bdubbs] - Update to xterm-373. Fixes. #17123.

  • September 25th, 2022

    • [pierre] - Update to thunderbird-102.3.0 (security update). Fixes #17105.

    • [pierre] - Update to rust-1.64.0. Fixes #17120.

    • [pierre] - Update to llvm-15.0.1. Fixes #16991.

  • September 24th, 2022

    • [bdubbs] - Update to node-16.17.1 (security update). Fixes #17119.

    • [bdubbs] - Update to unbound-1.16.3 (security update). Fixes #17114.

    • [bdubbs] - Update to bind-9.18.7 (security update). Fixes #17109.

    • [timtas] - Downgrade to mypaint-brushes-1.3.1. Fixes Gimp usage.

  • September 23rd, 2022

    • [bdubbs] - Update to xapian-core-1.4.21. Fixes #17117.

    • [bdubbs] - Update to flac-1.4.1. Fixes #17116.

    • [bdubbs] - Update to mesa-22.2.0. Fixes #17107.

    • [bdubbs] - Update to balsa-2.6.4. Fixes #17104.

    • [renodr] - Update to libwpe-1.14.0. Fixes #16535.

    • [renodr] - Update to nghttp2-1.50.0. Fixes #17113.

    • [renodr] - Update to Mako-1.2.3 (Python Module). Fixes #17118.

    • [pierre] - Update to ghostscript-10.00.0. Fixes #17115.

  • September 21st, 2022

    • [renodr] - Update to cmake-3.24.2. Fixes #17026.

    • [renodr] - Update to gtkmm-3.24.7. Fixes #17027.

    • [renodr] - Update to libblockdev-2.28. Fixes #17029.

    • [renodr] - Update to xfce4-pulseaudio-plugin-0.4.5. Fixes #17037.

    • [renodr] - Update to graphviz-6.0.1. Fixes #17019.

    • [renodr] - Update to kdsoap-2.1.1. Fixes #17020.

    • [renodr] - Update to neon-0.32.4. Fixes #17022.

    • [renodr] - Update to btrfs-progs-5.19.1. Fixes #17023.

    • [bdubbs] - Update to pangomm-2.46.3. Fixes #17110.

    • [bdubbs] - Update to wpebackend-fdo-1.14.0. Fixes #17103.

    • [bdubbs] - Update to mypaint-brushes-2.0.2. Fixes #17098.

    • [bdubbs] - Update to glibmm-2.66.5. Fixes #17095.

    • [bdubbs] - Update to popt-1.19. Fixes #17055.

    • [bdubbs] - Update to gobject-introspection-1.74.0. Fixes #17065.

    • [bdubbs] - Update to glib-2.74.0. Fixes #17061.

    • [renodr] - Update to nss-3.83. Fixes #17038.

  • September 20th, 2022

    • [renodr] - Update to WebKitGTK+-2.36.8 (Security Update). Fixes #17096.

    • [pierre] - Update to libreoffice-7.4.1.2. Fixes #17044.

    • [pierre] - Update to gnumeric-1.12.53. Fixes #17076.

    • [pierre] - Update to goffice-0.10.53. Fixes #17075.

    • [pierre] - Update to gtk-4.8.1. Fixes #17052.

    • [ken] - Update to firefox-102.3.0 (Security Update). Fixes #17097.

  • September 19th, 2022

    • [renodr] - Update to qtwebengine-5.15.11 (Security Update). Fixes #17028.

    • [bdubbs] - Update to harfbuzz-5.2.0. Fixes #17056.

    • [bdubbs] - Update to libksba-1.6.1. Fixes #17054.

    • [bdubbs] - Update to pango-1.50.10. Fixes #17051.

    • [bdubbs] - Update to pipewire-0.3.58. Fixes #17045.

    • [bdubbs] - Update to acpid-2.0.34. Fixes #17041.

    • [bdubbs] - Update to qpdf-11.1.0. Fixes #17040.

  • September 17th, 2022

    • [timtas] - Update to libpng-1.6.38. Fixes #17039.

  • September 16th, 2022

    • [bdubbs] - Update to nspr-4.35. Fixes #17018.

    • [bdubbs] - Update to libgusb-0.4.0. Fixes #17017.

    • [bdubbs] - Update to emacs-28.2. Fixes #17016.

    • [bdubbs] - Update to stunnel-5.66. Fixes #17015.

    • [renodr] - Update to Thunderbird-102.2.2. Fixes #17053.

    • [renodr] - Update to NetworkManager-1.40.0. Fixes #16956.

    • [renodr] - Update to gnome-bluetooth-42.4. Fixes #16997.

    • [renodr] - Update to samba-4.17.0. Fixes #16999.

    • [renodr] - Update to ModemManager-1.18.12. Fixes #17008.

    • [pierre] - Unconditionally use duktape for polkit: it adds low overhead and it simplifies instructions.

  • September 15th, 2022

    • [timtas] - Fix broken duktape download url.

    • [timtas] - Add duktape-2.7.0, allow polkit to use duktape instead of JS. Fixes #17025.

  • September 11th, 2022

    • [bdubbs] - Update to grantlee-5.3.0. Fixes #17014.

    • [bdubbs] - Update to libXft-2.3.6 (xorg library). Fixes #17013.

    • [bdubbs] - Update to qpdf-11.0.0. Fixes #17012.

    • [bdubbs] - Update to libnma-1.10.2. Fixes #17007.

    • [bdubbs] - Update to fuse-3.12.0. Fixes #17005.

    • [bdubbs] - Update to php-8.1.10. Fixes #16974.

  • September 10th, 2022

    • [pierre] - Enable pie and ssp by default in both GCC and LLVM/clang.

    • [bdubbs] - Update to xscreensaver-6.05.1. Fixes #17010.

    • [bdubbs] - Update to flac-1.4.0. Fixes #17011.

    • [bdubbs] - Update to rsync-3.2.6. Fixes #17009.

    • [bdubbs] - Update to gtk4-4.8.0. Fixes #17001.

    • [bdubbs] - Update to wireshark-3.6.8 (Security Update). Fixes #17000.

    • [bdubbs] - Update to hdparm-9.65. Fixes #16998.

    • [bdubbs] - Update to plasma-wayland-protocols-1.8.0. Fixes #16995.

    • [bdubbs] - Update to Python-3.10.7 (Security Update). Fixes #16994.

    • [bdubbs] - Add Cython python module.

  • September 9th, 2022

    • [pierre] - Update to Qt-5.15.6. Fixes #17002.

  • September 6th, 2022

    • [bdubbs] - Update to dbus-python-1.3.2. Fixes #16993.

    • [bdubbs] - Update to tree-2.0.4. Fixes #16992.

    • [bdubbs] - Update to shadow-4.12.3. Fixes #16932.

  • September 6th, 2022

    • [bdubbs] - Update to nmap-7.93. Fixes #16975.

    • [bdubbs] - Update to git-2.37.3. Fixes #16967.

    • [bdubbs] - Update to mercurial-6.2.2. Fixes #16973.

    • [bdubbs] - Update to xfce4-pulseaudio-plugin-0.4.4. Fixes #16979.

    • [bdubbs] - Update to xfce4-notifyd-0.6.4. Fixes #16976.

    • [bdubbs] - Update to libXft-2.3.5 (xorg library). Fixes #16990.

    • [bdubbs] - Update to sqlite-autoconf-3390300 (3.39.3). Fixes #16989.

    • [bdubbs] - Update to ffmpeg-5.1.1. Fixes #16972.

  • September 5th, 2022

    • [bdubbs] - Update to neon-0.32.3. Fixes #16988.

    • [bdubbs] - Update to libwpe-1.12.3. Fixes #16987.

    • [bdubbs] - Update to cracklib-2.9.8. Fixes #16981.

    • [bdubbs] - Update to libsoup-3.0.8. Fixes #16977.

    • [bdubbs] - Add --no-user in Python module installation instructions. Fixes #16965.

  • September 4th, 2022

    • [pierre] - Update to pipewire-0.3.57. Fixes #16984.

    • [pierre] - Update to vala-0.56.3. Fixes #16980.

    • [pierre] - Update to libadwaita-1.1.5. Fixes #16978.

    • [pierre] - Update to libdrm-2.4.113. Fixes #16970.

    • [pierre] - Update to librsvg-2.54.5. Fixes #16953.

    • [bdubbs] - Update to Log-Log4perl-1.56 (Perl Module). Fixes #16983.

    • [bdubbs] - Update to IO-Socket-SSL-2.075 (Perl Module). Fixes #16982.

    • [bdubbs] - Update to doxygen-1.9.5. Fixes #16955.

    • [bdubbs] - Update to libatomic_ops-7.6.14. Fixes #16952.

  • September 3rd, 2022

    • [renodr] - Update to libtasn1-4.19.0. Fixes #16942.

    • [renodr] - Update to babl-0.1.96. Fixes #16943.

    • [renodr] - Update to fetchmail-6.4.33. Fixes #16961.

    • [renodr] - Update to gc-8.2.2. Fixes #15732.

    • [renodr] - Update to libqalculate-4.3.0. Fixes #16933.

    • [renodr] - Update to nghttp2-1.49.0. Fixes #16935.

    • [renodr] - Update to mozjs-91.13.0. Fixes #16941.

    • [renodr] - Fix building inkscape with poppler-22.09. Fixes #16985.

    • [renodr] - Fix building libreoffice with poppler-22.09. Fixes #16986.

    • [renodr] - Update to thunderbird-102.2.1 (Security Update). Fixes #16971.

    • [renodr] - Update to poppler-22.09.0 (Security Update). Fixes #16969.

    • [renodr] - Update to curl-7.85.0 (Security Update). Fixes #16968.

  • September 2nd, 2022

    • [bdubbs] - Update to libxslt-1.1.37. Fixes #16963.

    • [bdubbs] - Update to libxml2-2.10.2. Fixes #16950.

    • [bdubbs] - Update to libXau-1.0.10. Fixes #16958.

    • [bdubbs] - Update to libfontenc-1.1.6 (Xorg library). Fixes #16960.

    • [bdubbs] - Update to libXfont2-2.0.6 (Xorg library). Fixes #16959.

    • [bdubbs] - Update to libFS-1.0.9 (Xorg library). Fixes #16957.

    • [bdubbs] - Update to Mako-1.2.2 (Python module). Fixes #16964.

    • [bdubbs] - Update to PyYAML-6.0 (Python module). Fixes #16951.

  • September 1st, 2022

    • [timtas] - Update to qemu-7.1.0. Fixes #16966.

    • [bdubbs] - Release of BLFS-11.2.

Mailing Lists

The linuxfromscratch.org server is hosting a number of mailing lists that are used for the development of the BLFS book. These lists include, among others, the main development and support lists.

For more information regarding which lists are available, how to subscribe to them, archive locations, etc., visit https://www.linuxfromscratch.org/mail.html.

BLFS Wiki

The BLFS Project has created a Wiki for users to comment on pages and instructions at https://wiki.linuxfromscratch.org/blfs/wiki. Comments are welcome from all users.

The following are the rules for posting:

  • Users must register and log in to edit a page.

  • Suggestions to change the book should be made by creating a new ticket, not by making comments in the Wiki.

  • Questions with your specific installation problems should be made by subscribing and mailing to the BLFS Support Mailing List at mailto:blfs-support AT linuxfromscratch D0T org.

  • Discussions of build instructions should be made by subscribing and mailing to the BLFS Development List at mailto:blfs-dev AT linuxfromscratch D0T org.

  • Inappropriate material will be removed.

Asking for Help and the FAQ

If you encounter a problem while using this book, and your problem is not listed in the FAQ (https://www.linuxfromscratch.org/faq), you will find that most of the people on Internet Relay Chat (IRC) and on the mailing lists are willing to help you. An overview of the LFS mailing lists can be found in Mailing lists. To assist us in diagnosing and solving your problem, include as much relevant information as possible in your request for help.

Things to Check Prior to Asking

Before asking for help, you should review the following items:

  • Is the hardware support compiled into the kernel or available as a module to the kernel? If it is a module, is it configured properly in modprobe.conf and has it been loaded? You should use lsmod as the root user to see if it's loaded. Check the sys.log file or run modprobe <driver> to review any error message. If it loads properly, you may need to add the modprobe command to your boot scripts.

  • Are your permissions properly set, especially for devices? LFS uses groups to make these settings easier, but it also adds the step of adding users to groups to allow access. A simple usermod -G audio <user> may be all that's necessary for that user to have access to the sound system. Any question that starts out with It works as root, but not as ... requires a thorough review of permissions prior to asking.

  • BLFS liberally uses /opt/<package>. The main objection to this centers around the need to expand your environment variables for each package placed there (e.g., PATH=$PATH:/opt/kde/bin). In most cases, the package instructions will walk you through the changes, but some will not. The section called Going Beyond BLFS is available to help you check.

Things to Mention

Apart from a brief explanation of the problem you're having, the essential things to include in your request are:

  • the version of the book you are using (being 11.3),

  • the package or section giving you problems,

  • the exact error message or symptom you are receiving,

  • whether you have deviated from the book or LFS at all,

  • if you are installing a BLFS package on a non-LFS system.

(Note that saying that you've deviated from the book doesn't mean that we won't help you. It'll just help us to see other possible causes of your problem.)

Expect guidance instead of specific instructions. If you are instructed to read something, please do so. It generally implies that the answer was way too obvious and that the question would not have been asked if a little research was done prior to asking. The volunteers in the mailing list prefer not to be used as an alternative to doing reasonable research on your end. In addition, the quality of your experience with BLFS is also greatly enhanced by this research, and the quality of volunteers is enhanced because they don't feel that their time has been abused, so they are far more likely to participate.

An excellent article on asking for help on the Internet in general has been written by Eric S. Raymond. It is available online at http://www.catb.org/~esr/faqs/smart-questions.html. Read and follow the hints in that document and you are much more likely to get a response to start with and also to get the help you actually need.

Credits

Many people have contributed both directly and indirectly to BLFS. This page lists all of those we can think of. We may well have left people out and if you feel this is the case, drop us a line. Many thanks to all of the LFS community for their assistance with this project.

Current Editors

  • Bruce Dubbs

  • Pierre Labastie

  • DJ Lucas

  • Ken Moffat

  • Douglas Reno

Contributors and Past Editors

The list of contributors is far too large to provide detailed information about the contributions for each contributor. Over the years, the following individuals have provided significant inputs to the book:

  • Timothy Bauscher

  • Daniel Bauman

  • Jeff Bauman

  • Andy Benton

  • Wayne Blaszczyk

  • Paul Campbell

  • Nathan Coulson

  • Jeroen Coumans

  • Guy Dalziel

  • Robert Daniels

  • Richard Downing

  • Manuel Canales Esparcia

  • Jim Gifford

  • Manfred Glombowski

  • Ag Hatzimanikas

  • Mark Hymers

  • James Iwanek

  • David Jensen

  • Jeremy Jones

  • Seth Klein

  • Alex Kloss

  • Eric Konopka

  • Larry Lawrence

  • Chris Lynn

  • Andrew McMurry

  • Randy McMurchy

  • Denis Mugnier

  • Billy O'Connor

  • Fernando de Oliveira

  • Alexander Patrakov

  • Olivier Peres

  • Andreas Pedersen

  • Henning Rohde

  • Matt Rogers

  • James Robertson

  • Henning Rohde

  • Chris Staub

  • Jesse Tie-Ten-Quee

  • Ragnar Thomsen

  • Thomas Trepl

  • Tushar Teredesai

  • Jeremy Utley

  • Zack Winkles

  • Christian Wurst

  • Igor Živković

General Acknowledgments

  • Fernando Arbeiza

  • Miguel Bazdresch

  • Gerard Beekmans

  • Oliver Brakmann

  • Jeremy Byron

  • Ian Chilton

  • David Ciecierski

  • Jim Harris

  • Lee Harris

  • Marc Heerdink

  • Steffen Knollmann

  • Eric Konopka

  • Scot McPherson

  • Ted Riley

Contact Information

Please direct your emails to one of the BLFS mailing lists. See Mailing lists for more information on the available mailing lists.

Chapter 2. Important Information

This chapter is used to explain some of the policies used throughout the book, to introduce important concepts and to explain some issues you may see with some of the included packages.

Notes on Building Software

Those people who have built an LFS system may be aware of the general principles of downloading and unpacking software. Some of that information is repeated here for those new to building their own software.

Each set of installation instructions contains a URL from which you can download the package. The patches; however, are stored on the LFS servers and are available via HTTP. These are referenced as needed in the installation instructions.

While you can keep the source files anywhere you like, we assume that you have unpacked the package and changed into the directory created by the unpacking process (the 'build' directory). We also assume you have uncompressed any required patches and they are in the directory immediately above the 'build' directory.

We can not emphasize strongly enough that you should start from a clean source tree each time. This means that if you have had an error during configuration or compilation, it's usually best to delete the source tree and re-unpack it before trying again. This obviously doesn't apply if you're an advanced user used to hacking Makefiles and C code, but if in doubt, start from a clean tree.

Building Software as an Unprivileged (non-root) User

The golden rule of Unix System Administration is to use your superpowers only when necessary. Hence, BLFS recommends that you build software as an unprivileged user and only become the root user when installing the software. This philosophy is followed in all the packages in this book. Unless otherwise specified, all instructions should be executed as an unprivileged user. The book will advise you on instructions that need root privileges.

Unpacking the Software

If a file is in .tar format and compressed, it is unpacked by running one of the following commands:

tar -xvf filename.tar.gz
tar -xvf filename.tgz
tar -xvf filename.tar.Z
tar -xvf filename.tar.bz2

Note

You may omit using the v parameter in the commands shown above and below if you wish to suppress the verbose listing of all the files in the archive as they are extracted. This can help speed up the extraction as well as make any errors produced during the extraction more obvious to you.

You can also use a slightly different method:

bzcat filename.tar.bz2 | tar -xv

Finally, you sometimes need to be able to unpack patches which are generally not in .tar format. The best way to do this is to copy the patch file to the parent of the 'build' directory and then run one of the following commands depending on whether the file is a .gz or .bz2 file:

gunzip -v patchname.gz
bunzip2 -v patchname.bz2

Verifying File Integrity

Generally, to verify that the downloaded file is complete, many package maintainers also distribute md5sums of the files. To verify the md5sum of the downloaded files, download both the file and the corresponding md5sum file to the same directory (preferably from different on-line locations), and (assuming file.md5sum is the md5sum file downloaded) run the following command:

md5sum -c file.md5sum

If there are any errors, they will be reported. Note that the BLFS book includes md5sums for all the source files also. To use the BLFS supplied md5sums, you can create a file.md5sum (place the md5sum data and the exact name of the downloaded file on the same line of a file, separated by white space) and run the command shown above. Alternately, simply run the command shown below and compare the output to the md5sum data shown in the BLFS book.

md5sum <name_of_downloaded_file>

MD5 is not cryptographically secure, so the md5sums are only provided for detecting unmalicious changes to the file content. For example, an error or truncation introduced during network transfer, or a stealth update to the package from the upstream (updating the content of a released tarball instead of making a new release properly).

There is no 100% secure way to make sure the genuity of the source files. Assuming the upstream is managing their website correctly (the private key is not leaked and the domain is not hijacked), and the trust anchors have been set up correctly using make-ca-1.12 on the BLFS system, we can reasonably trust download URLs to the upstream official website with https protocol. Note that BLFS book itself is published on a website with https, so you should already have some confidence in https protocol or you wouldn't trust the book content.

If the package is downloaded from an unofficial location (for example a local mirror), checksums generated by cryptographically secure digest algorithms (for example SHA256) can be used to verify the genuity of the package. Download the checksum file from the upstream official website (or somewhere you can trust) and compare the checksum of the package from unofficial location with it. For example, SHA256 checksum can be checked with the command:

Note

If the checksum and the package are downloaded from the same untrusted location, you won't gain security enhancement by verifying the package with the checksum. The attacker can fake the checksum as well as compromising the package itself.

sha256sum -c file.sha256sum

If GnuPG-2.4.0 is installed, you can also verify the genuity of the package with a GPG signature. Import the upstream GPG public key with:

gpg --recv-key keyID

keyID should be replaced with the key ID from somewhere you can trust (for example, copy it from the upstream official website using https). Now you can verify the signature with:

gpg --recv-key file.sig file

The advantage of GnuPG signature is, once you imported a public key which can be trusted, you can download both the package and its signature from the same unofficial location and verify them with the public key. So you won't need to connect to the official upstream website to retrieve a checksum for each new release. You only need to update the public key if it's expired or revoked.

Creating Log Files During Installation

For larger packages, it is convenient to create log files instead of staring at the screen hoping to catch a particular error or warning. Log files are also useful for debugging and keeping records. The following command allows you to create an installation log. Replace <command> with the command you intend to execute.

( <command> 2>&1 | tee compile.log && exit $PIPESTATUS )

2>&1 redirects error messages to the same location as standard output. The tee command allows viewing of the output while logging the results to a file. The parentheses around the command run the entire command in a subshell and finally the exit $PIPESTATUS command ensures the result of the <command> is returned as the result and not the result of the tee command.

Using Multiple Processors

For many modern systems with multiple processors (or cores) the compilation time for a package can be reduced by performing a "parallel make" by either setting an environment variable or telling the make program how many processors are available. For instance, a Core2Duo can support two simultaneous processes with:

export MAKEFLAGS='-j2'

or just building with:

make -j2

If you have applied the optional sed when building ninja in LFS, you can use:

export NINJAJOBS=2

when a package uses ninja, or just:

ninja -j2

but for ninja, the default number of jobs is <N>+2, where <N> is the number of processors available, so that using the above commands is rather for limiting the number of jobs (see below for why this could be necessary).

Generally the number of processes should not exceed the number of cores supported by the CPU. To list the processors on your system, issue: grep processor /proc/cpuinfo.

In some cases, using multiple processes may result in a 'race' condition where the success of the build depends on the order of the commands run by the make program. For instance, if an executable needs File A and File B, attempting to link the program before one of the dependent components is available will result in a failure. This condition usually arises because the upstream developer has not properly designated all the prerequisites needed to accomplish a step in the Makefile.

If this occurs, the best way to proceed is to drop back to a single processor build. Adding '-j1' to a make command will override the similar setting in the MAKEFLAGS environment variable.

Note

When running the package tests or the install portion of the package build process, we do not recommend using an option greater than '-j1' unless specified otherwise. The installation procedures or checks have not been validated using parallel procedures and may fail with issues that are difficult to debug.

Important

Another problem may occur with modern CPU's, which have a lot of cores. Each job started consumes memory, and if the sum of the needed memory for each job exceeds the available memory, you may encounter either an OOM (Out of Memory) kernel interrupt or intense swapping that will slow the build beyond reasonable limits.

Some compilations with g++ may consume up to 2.5 GB of memory, so to be safe, you should restrict the number of jobs to (Total Memory in GB)/2.5, at least for big packages such as LLVM, WebKitGtk, QtWebEngine, or libreoffice.

Automated Building Procedures

There are times when automating the building of a package can come in handy. Everyone has their own reasons for wanting to automate building, and everyone goes about it in their own way. Creating Makefiles, Bash scripts, Perl scripts or simply a list of commands used to cut and paste are just some of the methods you can use to automate building BLFS packages. Detailing how and providing examples of the many ways you can automate the building of packages is beyond the scope of this section. This section will expose you to using file redirection and the yes command to help provide ideas on how to automate your builds.

File Redirection to Automate Input

You will find times throughout your BLFS journey when you will come across a package that has a command prompting you for information. This information might be configuration details, a directory path, or a response to a license agreement. This can present a challenge to automate the building of that package. Occasionally, you will be prompted for different information in a series of questions. One method to automate this type of scenario requires putting the desired responses in a file and using redirection so that the program uses the data in the file as the answers to the questions.

Building the CUPS package is a good example of how redirecting a file as input to prompts can help you automate the build. If you run the test suite, you are asked to respond to a series of questions regarding the type of test to run and if you have any auxiliary programs the test can use. You can create a file with your responses, one response per line, and use a command similar to the one shown below to automate running the test suite:

make check < ../cups-1.1.23-testsuite_parms

This effectively makes the test suite use the responses in the file as the input to the questions. Occasionally you may end up doing a bit of trial and error determining the exact format of your input file for some things, but once figured out and documented you can use this to automate building the package.

Using yes to Automate Input

Sometimes you will only need to provide one response, or provide the same response to many prompts. For these instances, the yes command works really well. The yes command can be used to provide a response (the same one) to one or more instances of questions. It can be used to simulate pressing just the Enter key, entering the Y key or entering a string of text. Perhaps the easiest way to show its use is in an example.

First, create a short Bash script by entering the following commands:

cat > blfs-yes-test1 << "EOF"
#!/bin/bash

echo -n -e "\n\nPlease type something (or nothing) and press Enter ---> "

read A_STRING

if test "$A_STRING" = ""; then A_STRING="Just the Enter key was pressed"
else A_STRING="You entered '$A_STRING'"
fi

echo -e "\n\n$A_STRING\n\n"
EOF
chmod 755 blfs-yes-test1

Now run the script by issuing ./blfs-yes-test1 from the command line. It will wait for a response, which can be anything (or nothing) followed by the Enter key. After entering something, the result will be echoed to the screen. Now use the yes command to automate the entering of a response:

yes | ./blfs-yes-test1

Notice that piping yes by itself to the script results in y being passed to the script. Now try it with a string of text:

yes 'This is some text' | ./blfs-yes-test1

The exact string was used as the response to the script. Finally, try it using an empty (null) string:

yes '' | ./blfs-yes-test1

Notice this results in passing just the press of the Enter key to the script. This is useful for times when the default answer to the prompt is sufficient. This syntax is used in the Net-tools instructions to accept all the defaults to the many prompts during the configuration step. You may now remove the test script, if desired.

File Redirection to Automate Output

In order to automate the building of some packages, especially those that require you to read a license agreement one page at a time, requires using a method that avoids having to press a key to display each page. Redirecting the output to a file can be used in these instances to assist with the automation. The previous section on this page touched on creating log files of the build output. The redirection method shown there used the tee command to redirect output to a file while also displaying the output to the screen. Here, the output will only be sent to a file.

Again, the easiest way to demonstrate the technique is to show an example. First, issue the command:

ls -l /usr/bin | more

Of course, you'll be required to view the output one page at a time because the more filter was used. Now try the same command, but this time redirect the output to a file. The special file /dev/null can be used instead of the filename shown, but you will have no log file to examine:

ls -l /usr/bin | more > redirect_test.log 2>&1

Notice that this time the command immediately returned to the shell prompt without having to page through the output. You may now remove the log file.

The last example will use the yes command in combination with output redirection to bypass having to page through the output and then provide a y to a prompt. This technique could be used in instances when otherwise you would have to page through the output of a file (such as a license agreement) and then answer the question of do you accept the above?. For this example, another short Bash script is required:

cat > blfs-yes-test2 << "EOF"
#!/bin/bash

ls -l /usr/bin | more

echo -n -e "\n\nDid you enjoy reading this? (y,n) "

read A_STRING

if test "$A_STRING" = "y"; then A_STRING="You entered the 'y' key"
else A_STRING="You did NOT enter the 'y' key"
fi

echo -e "\n\n$A_STRING\n\n"
EOF
chmod 755 blfs-yes-test2

This script can be used to simulate a program that requires you to read a license agreement, then respond appropriately to accept the agreement before the program will install anything. First, run the script without any automation techniques by issuing ./blfs-yes-test2.

Now issue the following command which uses two automation techniques, making it suitable for use in an automated build script:

yes | ./blfs-yes-test2 > blfs-yes-test2.log 2>&1

If desired, issue tail blfs-yes-test2.log to see the end of the paged output, and confirmation that y was passed through to the script. Once satisfied that it works as it should, you may remove the script and log file.

Finally, keep in mind that there are many ways to automate and/or script the build commands. There is not a single correct way to do it. Your imagination is the only limit.

Dependencies

For each package described, BLFS lists the known dependencies. These are listed under several headings, whose meaning is as follows:

  • Required means that the target package cannot be correctly built without the dependency having first been installed.

  • Recommended means that BLFS strongly suggests this package is installed first for a clean and trouble-free build, that won't have issues either during the build process, or at run-time. The instructions in the book assume these packages are installed. Some changes or workarounds may be required if these packages are not installed.

  • Optional means that this package might be installed for added functionality. Often BLFS will describe the dependency to explain the added functionality that will result.

Using the Most Current Package Sources

On occasion you may run into a situation in the book when a package will not build or work properly. Though the Editors attempt to ensure that every package in the book builds and works properly, sometimes a package has been overlooked or was not tested with this particular version of BLFS.

If you discover that a package will not build or work properly, you should see if there is a more current version of the package. Typically this means you go to the maintainer's web site and download the most current tarball and attempt to build the package. If you cannot determine the maintainer's web site by looking at the download URLs, use Google and query the package's name. For example, in the Google search bar type: 'package_name download' (omit the quotes) or something similar. Sometimes typing: 'package_name home page' will result in you finding the maintainer's web site.

Stripping One More Time

In LFS, stripping of debugging symbols and unneeded symbol table entries was discussed a couple of times. When building BLFS packages, there are generally no special instructions that discuss stripping again. Stripping can be done while installing a package, or afterwards.

Stripping while Installing a Package

There are several ways to strip executables installed by a package. They depend on the build system used (see below the section about build systems), so only some generalities can be listed here:

Note

The following methods using the feature of a building system (autotools, meson, or cmake) will not strip static libraries if any is installed. Fortunately there are not too many static libraries in BLFS, and a static library can always be stripped safely by running strip --strip-unneeded on it manually.

  • The packages using autotools usually have an install-strip target in their generated Makefile files. So installing stripped executables is just a matter of using make install-strip instead of make install.

  • The packages using the meson build system can accept -Dstrip=true when running meson. If you've forgot to add this option running the meson, you can also run meson install --strip instead of ninja install.

  • cmake generates install/strip targets for both the Unix Makefiles and Ninja generators (the default is Unix Makefiles on linux). So just run make install/strip or ninja install/strip instead of the install counterparts.

  • Removing (or not generating) debug symbols can also be achieved by removing the -g<something> options in C/C++ calls. How to do that is very specific for each package. And, it does not remove unneeded symbol table entries. So it will not be explained in detail here. See also below the paragraphs about optimization.

Stripping Installed Executables

The strip utility changes files in place, which may break anything using it if it is loaded in memory. Note that if a file is in use but just removed from the disk (i.e. not overwritten nor modified), this is not a problem since the kernel can use deleted files. Look at /proc/*/maps and it is likely that you'll see some (deleted) entries. The mv just removes the destination file from the directory but does not touch its content, so that it satisfies the condition for the kernel to use the old (deleted) file. The script below is just an example. It should be run as the root user:

cat > /usr/sbin/strip-all.sh << "EOF"
#!/usr/bin/bash

if [ $EUID -ne 0 ]; then
  echo "Need to be root"
  exit 1
fi

{ find /usr/lib -type f -name '*.so*' ! -name '*dbg'
  find /usr/lib -type f -name '*.a'
  find /usr/{bin,sbin,libexec} -type f
} |  while read file; do
       if ! readelf -h $file >/dev/null 2>&1; then continue; fi
       if file $file | grep --quiet --invert-match 'not stripped'; then continue; fi

       cp --preserve $file    ${file}.tmp
       strip --strip-unneeded ${file}.tmp
       mv ${file}.tmp $file
     done
EOF
chmod 744 /usr/sbin/strip-all.sh

If you install programs in other directories such as /opt or /usr/local, you may want to strip the files there too. Just add other directories to scan in the compound list of find commands between the braces.

For more information on stripping, see https://www.technovelty.org/linux/stripping-shared-libraries.html.

Working with different build systems

There are now three different build systems in common use for converting C or C++ source code into compiled programs or libraries and their details (particularly, finding out about available options and their default values) differ. It may be easiest to understand the issues caused by some choices (typically slow execution or unexpected use of, or omission of, optimizatons) by starting with the CFLAGS and CXXFLAGS environment variables. There are also some programs which use rust.

Most LFS and BLFS builders are probably aware of the basics of CFLAGS and CXXFLAGS for altering how a program is compiled. Typically, some form of optimization is used by upstream developers (-O2 or -O3), sometimes with the creation of debug symbols (-g), as defaults.

If there are contradictory flags (e.g. multiple different -O values), the last value will be used. Sometimes this means that flags specified in environment variables will be picked up before values hardcoded in the Makefile, and therefore ignored. For example, where a user specifies '-O2' and that is followed by '-O3' the build will use '-O3'.

There are various other things which can be passed in CFLAGS or CXXFLAGS, such as forcing compilation for a specific microarchitecture (e.g. -march=amdfam10, -march=native) or specifying a specific standard for C or C++ (-std=c++17 for example). But one thing which has now come to light is that programmers might include debug assertions in their code, expecting them to be disabled in releases by using -DNDEBUG. Specifically, if Mesa-22.3.5 is built with these assertions enabled, some activities such as loading levels of games can take extremely long times, even on high-class video cards.

Autotools with Make

This combination is often described as 'CMMI' (configure, make, make install) and is used here to also cover the few packages which have a configure script that is not generated by autotools.

Sometimes running ./configure --help will produce useful options about switches which might be used. At other times, after looking at the output from configure you may need to look at the details of the script to find out what it was actually searching for.

Many configure scripts will pick up any CFLAGS or CXXFLAGS from the environment, but CMMI packages vary about how these will be mixed with any flags which would otherwise be used (variously: ignored, used to replace the programmer's suggestion, used before the programmer's suggestion, or used after the programmer's suggestion).

In most CMMI packages, running 'make' will list each command and run it, interspersed with any warnings. But some packages try to be 'silent' and only show which file they are compiling or linking instead of showing the command line. If you need to inspect the command, either because of an error, or just to see what options and flags are being used, adding 'V=1' to the make invocation may help.

CMake

CMake works in a very different way, and it has two backends which can be used on BLFS: 'make' and 'ninja'. The default backend is make, but ninja can be faster on large packages with multiple processors. To use ninja, specify '-G Ninja' in the cmake command. However, there are some packages which create fatal errors in their ninja files but build successfully using the default of Unix Makefiles.

The hardest part of using CMake is knowing what options you might wish to specify. The only way to get a list of what the package knows about is to run cmake -LAH and look at the output for that default configuration.

Perhaps the most-important thing about CMake is that it has a variety of CMAKE_BUILD_TYPE values, and these affect the flags. The default is that this is not set and no flags are generated. Any CFLAGS or CXXFLAGS in the environment will be used. If the programmer has coded any debug assertions, those will be enabled unless -DNDEBUG is used. The following CMAKE_BUILD_TYPE values will generate the flags shown, and these will come after any flags in the environment and therefore take precedence.

Value Flags
Debug -g
Release -O3 -DNDEBUG
RelWithDebInfo -O2 -g -DNDEBUG
MinSizeRel -Os -DNDEBUG

CMake tries to produce quiet builds. To see the details of the commands which are being run, use make VERBOSE=1 or ninja -v.

By default, CMake treats file installation differently from the other build systems: if a file already exists and is not newer than a file that would overwrite it, then the file is not installed. This may be a problem if a user wants to record which file belongs to a package, either using LD_PRELOAD, or by listing files newer than a timestamp. The default can be changed by setting the variable CMAKE_INSTALL_ALWAYS to 1 in the environment, for example by export'ing it.

Meson

Meson has some similarities to CMake, but many differences. To get details of the defines that you may wish to change you can look at meson_options.txt which is usually in the top-level directory.

If you have already configured the package by running meson and now wish to change one or more settings, you can either remove the build directory, recreate it, and use the altered options, or within the build directory run meson configure, e.g. to set an option:

meson configure -D<some_option>=true

If you do that, the file meson-private/cmd_line.txt will show the last commands which were used.

Meson provides the following buildtype values, and the flags they enable come after any flags supplied in the environment and therefore take precedence.

  • plain : no added flags. This is for distributors to supply their own CLFAGS, CXXFLAGS and LDFLAGS. There is no obvious reason to use this in BLFS.

  • debug : '-g' - this is the default if nothing is specified in either meson.build or the command line. However it results large and slow binaries, so we should override it in BLFS.

  • debugoptimized : '-O2 -g' : this is the default specified in meson.build of some packages.

  • release : '-O3 -DNDEBUG' (but occasionally a package will force -O2 here)

Although the 'release' buildtype is described as enabling -DNDEBUG, and all CMake Release builds pass that, it has so far only been observed (in verbose builds) for Mesa-22.3.5. That suggests that it might only be used when there are debug assertions present.

The -DNDEBUG flag can also be provided by passing -Db_ndebug=true.

To see the details of the commands which are being run in a package using meson, use 'ninja -v'.

Rustc and Cargo

Most released rustc programs are provided as crates (source tarballs) which will query a server to check current versions of dependencies and then download them as necessary. These packages are built using cargo --release. In theory, you can manipulate the RUSTFLAGS to change the optimize-level (default is 3, like -O3, e.g. -Copt-level=3) or to force it to build for the machine it is being compiled on, using -Ctarget-cpu=native but in practice this seems to make no significant difference.

If you find an interesting rustc program which is only provided as unpackaged source, you should at least specify RUSTFLAGS=-Copt-level=2 otherwise it will do an unoptimized compile with debug info and run much slower.

The rust developers seem to assume that everyone will compile on a machine dedicated to producing builds, so by default all CPUs are used. This can often be worked around, either by exporting CARGO_BUILD_JOBS=<N> or passing --jobs <N> to cargo. For compiling rustc itself, specifying --jobs <N> on invocations of x.py (together with the CARGO_BUILD_JOBS environment variable, which looks like a "belt and braces" approach but seems to be necessary) mostly works. The exception is running the tests when building rustc, some of them will nevertheless use all online CPUs, at least as of rustc-1.42.0.

Optimizing the build

Many people will prefer to optimize compiles as they see fit, by providing CFLAGS or CXXFLAGS. For an introduction to the options available with gcc and g++ see https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html and https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html and info gcc.

Some packages default to '-O2 -g', others to '-O3 -g', and if CFLAGS or CXXFLAGS are supplied they might be added to the package's defaults, replace the package's defaults, or even be ignored. There are details on some desktop packages which were mostly current in April 2019 at https://www.linuxfromscratch.org/~ken/tuning/ - in particular, README.txt, tuning-1-packages-and-notes.txt, and tuning-notes-2B.txt. The particular thing to remember is that if you want to try some of the more interesting flags you may need to force verbose builds to confirm what is being used.

Clearly, if you are optimizing your own program you can spend time to profile it and perhaps recode some of it if it is too slow. But for building a whole system that approach is impractical. In general, -O3 usually produces faster programs than -O2. Specifying -march=native is also beneficial, but means that you cannot move the binaries to an incompatible machine - this can also apply to newer machines, not just to older machines. For example programs compiled for 'amdfam10' run on old Phenoms, Kaveris, and Ryzens : but programs compiled for a Kaveri will not run on a Ryzen because certain op-codes are not present. Similarly, if you build for a Haswell not everything will run on a SandyBridge.

There are also various other options which some people claim are beneficial. At worst, you get to recompile and test, and then discover that in your usage the options do not provide a benefit.

If building Perl or Python modules, or Qt packages which use qmake, in general the CFLAGS and CXXFLAGS used are those which were used by those 'parent' packages.

Options for hardening the build

Even on desktop systems, there are still a lot of exploitable vulnerabilities. For many of these, the attack comes via javascript in a browser. Often, a series of vulnerabilities are used to gain access to data (or sometimes to pwn, i.e. own, the machine and install rootkits). Most commercial distros will apply various hardening measures.

In the past, there was Hardened LFS where gcc (a much older version) was forced to use hardening (with options to turn some of it off on a per-package basis). The current LFS and BLFS books are carrying forward a part of its spirit by enabling PIE (-fPIE -pie) and SSP (-fstack-protector-strong) as the defaults for GCC and clang. What is being covered here is different - first you have to make sure that the package is indeed using your added flags and not over-riding them.

For hardening options which are reasonably cheap, there is some discussion in the 'tuning' link above (occasionally, one or more of these options might be inappropriate for a package). These options are -D_FORTIFY_SOURCE=2 and (for C++) -D_GLIBCXX_ASSERTIONS. On modern machines these should only have a little impact on how fast things run, and often they will not be noticeable.

The main distros use much more, such as RELRO (Relocation Read Only) and perhaps -fstack-clash-protection. You may also encounter the so-called userspace retpoline (-mindirect-branch=thunk etc.) which is the equivalent of the spectre mitigations applied to the linux kernel in late 2018. The kernel mitigations caused a lot of complaints about lost performance, if you have a production server you might wish to consider testing that, along with the other available options, to see if performance is still sufficient.

Whilst gcc has many hardening options, clang/LLVM's strengths lie elsewhere. Some options which gcc provides are said to be less effective in clang/LLVM.

The /usr Versus /usr/local Debate

Should I install XXX in /usr or /usr/local?

This is a question without an obvious answer for an LFS based system.

In traditional Unix systems, /usr usually contains files that come with the system distribution, and the /usr/local tree is free for the local administrator to manage. The only really hard and fast rule is that Unix distributions should not touch /usr/local, except perhaps to create the basic directories within it.

With Linux distributions like Red Hat, Debian, etc., a possible rule is that /usr is managed by the distribution's package system and /usr/local is not. This way the package manager's database knows about every file within /usr.

LFS users build their own system and so deciding where the system ends and local files begin is not straightforward. So the choice should be made in order to make things easier to administer. There are several reasons for dividing files between /usr and /usr/local.

  • On a network of several machines all running LFS, or mixed LFS and other Linux distributions, /usr/local could be used to hold packages that are common between all the computers in the network. It can be NFS mounted or mirrored from a single server. Here local indicates local to the site.

  • On a network of several computers all running an identical LFS system, /usr/local could hold packages that are different between the machines. In this case local refers to the individual computers.

  • Even on a single computer, /usr/local can be useful if you have several distributions installed simultaneously, and want a place to put packages that will be the same on all of them.

  • Or you might regularly rebuild your LFS, but want a place to put files that you don't want to rebuild each time. This way you can wipe the LFS file system and start from a clean partition every time without losing everything.

Some people ask why not use your own directory tree, e.g., /usr/site, rather than /usr/local?

There is nothing stopping you, many sites do make their own trees, however it makes installing new software more difficult. Automatic installers often look for dependencies in /usr and /usr/local, and if the file it is looking for is in /usr/site instead, the installer will probably fail unless you specifically tell it where to look.

What is the BLFS position on this?

All of the BLFS instructions install programs in /usr with optional instructions to install into /opt for some specific packages.

Optional Patches

As you follow the various sections in the book, you will observe that the book occasionally includes patches that are required for a successful and secure installation of the packages. The general policy of the book is to include patches that fall in one of the following criteria:

  • Fixes a compilation problem.

  • Fixes a security problem.

  • Fixes a broken functionality.

In short, the book only includes patches that are either required or recommended. There is a Patches subproject which hosts various patches (including the patches referenced in the books) to enable you to configure your LFS the way you like it.

BLFS Boot Scripts

The BLFS Bootscripts package contains the init scripts that are used throughout the book. It is assumed that you will be using the BLFS Bootscripts package in conjunction with a compatible LFS-Bootscripts package. Refer to ../../../../lfs/view/11.3/chapter09/bootscripts.html for more information on the LFS-Bootscripts package.

The BLFS Bootscripts package will be used throughout the BLFS book for startup scripts. Unlike LFS, each init script has a separate install target in the BLFS Bootscripts package. It is recommended you keep the package source directory around until completion of your BLFS system. When a script is requested from BLFS Bootscripts, simply change to the directory and as the root user, execute the given make install-<init-script> command. This command installs the init script to its proper location (along with any auxiliary configuration scripts) and also creates the appropriate symlinks to start and stop the service at the appropriate run-level.

Note

You should review each bootscript before installation to ascertain that it satisfies your need. Also verify that the start and stop symlinks it creates match your preferences.

Note

From time to time the bootscripts are updated to accommodate new packages or to make minor corrections. All versions of the bootscripts are located at https://anduin.linuxfromscratch.org/BLFS/blfs-bootscripts/.

About Libtool Archive (.la) files

Files with a .la extension

In LFS and BLFS, many packages use a internally shipped libtool copy to build on a variety of Unix platforms. This includes platforms such as AIX, Solaris, IRIX, HP-UX, and Cygwin as well as Linux. The origins of this tool are quite dated. It was intended to manage libraries on systems with less advanced capabilities than a modern Linux system.

On a Linux system, libtool specific files are generally unneeded. Normally libraries are specified in the build process during the link phase. Since a linux system uses the Executable and Linkable Format (ELF) for executables and dynamic libraries, information needed to complete the task is embedded in the files. Both the linker and the program loader can query the appropriate files and properly link or execute the program.

Static libraries are rarely used in LFS and BLFS. And, nowadays most packages store the information needed for linking against a static library into a .pc file, instead of relying on libtool. A pkg-config --static --libs command will output the sufficient flags for the linker to link against a static library without any libtool magic.

The problem is that libtool usually creates one or more text files for package libraries called libtool archives. These small files have a ".la" extension and contain information that is similar to that embedded in the libraries or pkg-config files. When building a package that uses libtool, the process automatically looks for these files. Sometimes a .la file can contains the name or path of a static library used during build but not installed, then the build process will break because the .la file refers to something nonexistent on the system. Similarly, if a package is updated and no longer uses the .la file, then the build process can break with the old .la files.

The solution is to remove the .la files. However there is a catch. Some packages, such as ImageMagick-7.1.0-61, use a libtool function, lt_dlopen, to load libraries as needed during execution and resolve their dependencies at run time. In this case, the .la files should remain.

The script below, removes all unneeded .la files and saves them in a directory, /var/local/la-files by default, not in the normal library path. It also searches all pkg-config files (.pc) for embedded references to .la files and fixes them to be conventional library references needed when an application or library is built. It can be run as needed to clean up the directories that may be causing problems.

cat > /usr/sbin/remove-la-files.sh << "EOF"
#!/bin/bash

# /usr/sbin/remove-la-files.sh
# Written for Beyond Linux From Scratch
# by Bruce Dubbs <[email protected]>

# Make sure we are running with root privs
if test "${EUID}" -ne 0; then
    echo "Error: $(basename ${0}) must be run as the root user! Exiting..."
    exit 1
fi

# Make sure PKG_CONFIG_PATH is set if discarded by sudo
source /etc/profile

OLD_LA_DIR=/var/local/la-files

mkdir -p $OLD_LA_DIR

# Only search directories in /opt, but not symlinks to directories
OPTDIRS=$(find /opt -mindepth 1 -maxdepth 1 -type d)

# Move any found .la files to a directory out of the way
find /usr/lib $OPTDIRS -name "*.la" ! -path "/usr/lib/ImageMagick*" \
  -exec mv -fv {} $OLD_LA_DIR \;
###############

# Fix any .pc files that may have .la references

STD_PC_PATH='/usr/lib/pkgconfig
             /usr/share/pkgconfig
             /usr/local/lib/pkgconfig
             /usr/local/share/pkgconfig'

# For each directory that can have .pc files
for d in $(echo $PKG_CONFIG_PATH | tr : ' ') $STD_PC_PATH; do

  # For each pc file
  for pc in $d/*.pc ; do
    if [ $pc == "$d/*.pc" ]; then continue; fi

    # Check each word in a line with a .la reference
    for word in $(grep '\.la' $pc); do
      if $(echo $word | grep -q '.la$' ); then
        mkdir -p $d/la-backup
        cp -fv  $pc $d/la-backup

        basename=$(basename $word )
        libref=$(echo $basename|sed -e 's/^lib/-l/' -e 's/\.la$//')

        # Fix the .pc file
        sed -i "s:$word:$libref:" $pc
      fi
    done
  done
done

EOF

chmod +x /usr/sbin/remove-la-files.sh

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/la-files

Libraries: Static or shared?

Libraries: Static or shared?

The original libraries were simply an archive of routines from which the required routines were extracted and linked into the executable program. These are described as static libraries, with names of the form libfoo.a on UNIX-like operating systems. On some old operating systems they are the only type available.

On almost all Linux platforms there are also shared (or equivalently dynamic) libraries (with names of the form libfoo.so) – one copy of the library is loaded into virtual memory, and shared by all the programs which call any of its functions. This is space efficient.

In the past, essential programs such as a shell were often linked statically so that some form of minimal recovery system would exist even if shared libraries, such as libc.so, became damaged (e.g. moved to lost+found after fsck following an unclean shutdown). Nowadays, most people use an alternative system install or a USB stick if they have to recover. Journaling filesystems also reduce the likelihood of this sort of problem.

Within the book, there are various places where configure switches such as --disable-static are employed, and other places where the possibility of using system versions of libraries instead of the versions included within another package is discussed. The main reason for this is to simplify updates of libraries.

If a package is linked to a dynamic library, updating to a newer library version is automatic once the newer library is installed and the program is (re)started (provided the library major version is unchanged, e.g. going from libfoo.so.2.0 to libfoo.so.2.1. Going to libfoo.so.3 will require recompilation – ldd can be used to find which programs use the old version). If a program is linked to a static library, the program always has to be recompiled. If you know which programs are linked to a particular static library, this is merely an annoyance. But usually you will not know which programs to recompile.

One way to identify when a static library is used, is to deal with it at the end of the installation of every package. Write a script to find all the static libraries in /usr/lib or wherever you are installing to, and either move them to another directory so that they are no longer found by the linker, or rename them so that libfoo.a becomes e.g. libfoo.a.hidden. The static library can then be temporarily restored if it is ever needed, and the package needing it can be identified. This shouldn't be done blindly since many libraries only exist in a static version. For example, some libraries from the glibc and gcc packages should always be present on the system (libc_nonshared.a, libg.a, libpthread_nonshared.a, libssp_nonshared.a, libsupc++.a as of glibc-2.36 and gcc-12.2).

If you use this approach, you may discover that more packages than you were expecting use a static library. That was the case with nettle-2.4 in its default static-only configuration: It was required by GnuTLS-3.0.19, but also linked into package(s) which used GnuTLS, such as glib-networking-2.32.3.

Many packages put some of their common functions into a static library which is only used by the programs within the package and, crucially, the library is not installed as a standalone library. These internal libraries are not a problem – if the package has to be rebuilt to fix a bug or vulnerability, nothing else is linked to them.

When BLFS mentions system libraries, it means shared versions of libraries. Some packages such as Firefox-102.8.0 and ghostscript-10.00.0 bundle many other libraries in their build tree. The version they ship is often older than the version used in the system, so it may contain bugs – sometimes developers go to the trouble of fixing bugs in their included libraries, other times they do not.

Sometimes, deciding to use system libraries is an easy decision. Other times it may require you to alter the system version (e.g. for libpng-1.6.39 if used for Firefox-102.8.0). Occasionally, a package ships an old library and can no longer link to the current version, but can link to an older version. In this case, BLFS will usually just use the shipped version. Sometimes the included library is no longer developed separately, or its upstream is now the same as the package's upstream and you have no other packages which will use it. In those cases, you'll be lead to use the included library even if you usually prefer to use system libraries.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libraries

Locale Related Issues

This page contains information about locale related problems and issues. In the following paragraphs you'll find a generic overview of things that can come up when configuring your system for various locales. Many (but not all) existing locale related problems can be classified and fall under one of the headings below. The severity ratings below use the following criteria:

  • Critical: The program doesn't perform its main function. The fix would be very intrusive, it's better to search for a replacement.

  • High: Part of the functionality that the program provides is not usable. If that functionality is required, it's better to search for a replacement.

  • Low: The program works in all typical use cases, but lacks some functionality normally provided by its equivalents.

If there is a known workaround for a specific package, it will appear on that package's page. For the most recent information about locale related issues for individual packages, check the User Notes in the BLFS Wiki.

The Needed Encoding is Not a Valid Option in the Program

Severity: Critical

Some programs require the user to specify the character encoding for their input or output data and present only a limited choice of encodings. This is the case for the -X option in Enscript-1.6.6, the -input-charset option in unpatched Cdrtools-3.02a09, and the character sets offered for display in the menu of Links-2.28. If the required encoding is not in the list, the program usually becomes completely unusable. For non-interactive programs, it may be possible to work around this by converting the document to a supported input character set before submitting to the program.

A solution to this type of problem is to implement the necessary support for the missing encoding as a patch to the original program or to find a replacement.

The Program Assumes the Locale-Based Encoding of External Documents

Severity: High for non-text documents, low for text documents

Some programs, nano-7.2 or JOE-4.6 for example, assume that documents are always in the encoding implied by the current locale. While this assumption may be valid for the user-created documents, it is not safe for external ones. When this assumption fails, non-ASCII characters are displayed incorrectly, and the document may become unreadable.

If the external document is entirely text based, it can be converted to the current locale encoding using the iconv program.

For documents that are not text-based, this is not possible. In fact, the assumption made in the program may be completely invalid for documents where the Microsoft Windows operating system has set de facto standards. An example of this problem is ID3v1 tags in MP3 files (see the BLFS Wiki ID3v1Coding page for more details). For these cases, the only solution is to find a replacement program that doesn't have the issue (e.g., one that will allow you to specify the assumed document encoding).

Among BLFS packages, this problem applies to nano-7.2, JOE-4.6, and all media players except Audacious-4.2.

Another problem in this category is when someone cannot read the documents you've sent them because their operating system is set up to handle character encodings differently. This can happen often when the other person is using Microsoft Windows, which only provides one character encoding for a given country. For example, this causes problems with UTF-8 encoded TeX documents created in Linux. On Windows, most applications will assume that these documents have been created using the default Windows 8-bit encoding.

In extreme cases, Windows encoding compatibility issues may be solved only by running Windows programs under Wine.

The Program Uses or Creates Filenames in the Wrong Encoding

Severity: Critical

The POSIX standard mandates that the filename encoding is the encoding implied by the current LC_CTYPE locale category. This information is well-hidden on the page which specifies the behavior of Tar and Cpio programs. Some programs get it wrong by default (or simply don't have enough information to get it right). The result is that they create filenames which are not subsequently shown correctly by ls, or they refuse to accept filenames that ls shows properly. For the GLib-2.74.5 library, the problem can be corrected by setting the G_FILENAME_ENCODING environment variable to the special "@locale" value. Glib2 based programs that don't respect that environment variable are buggy.

The Zip-3.0 and UnZip-6.0 have this problem because they hard-code the expected filename encoding. UnZip contains a hard-coded conversion table between the CP850 (DOS) and ISO-8859-1 (UNIX) encodings and uses this table when extracting archives created under DOS or Microsoft Windows. However, this assumption only works for those in the US and not for anyone using a UTF-8 locale. Non-ASCII characters will be mangled in the extracted filenames.

The general rule for avoiding this class of problems is to avoid installing broken programs. If this is impossible, the convmv command-line tool can be used to fix filenames created by these broken programs, or intentionally mangle the existing filenames to meet the broken expectations of such programs.

In other cases, a similar problem is caused by importing filenames from a system using a different locale with a tool that is not locale-aware (e.g., OpenSSH-9.2p1). In order to avoid mangling non-ASCII characters when transferring files to a system with a different locale, any of the following methods can be used:

  • Transfer anyway, fix the damage with convmv.

  • On the sending side, create a tar archive with the --format=posix switch passed to tar (this will be the default in a future version of tar).

  • Mail the files as attachments. Mail clients specify the encoding of attached filenames.

  • Write the files to a removable disk formatted with a FAT or FAT32 filesystem.

  • Transfer the files using Samba.

  • Transfer the files via FTP using RFC2640-aware server (this currently means only wu-ftpd, which has bad security history) and client (e.g., lftp).

The last four methods work because the filenames are automatically converted from the sender's locale to UNICODE and stored or sent in this form. They are then transparently converted from UNICODE to the recipient's locale encoding.

The Program Breaks Multibyte Characters or Doesn't Count Character Cells Correctly

Severity: High or critical

Many programs were written in an older era where multibyte locales were not common. Such programs assume that C "char" data type, which is one byte, can be used to store single characters. Further, they assume that any sequence of characters is a valid string and that every character occupies a single character cell. Such assumptions completely break in UTF-8 locales. The visible manifestation is that the program truncates strings prematurely (i.e., at 80 bytes instead of 80 characters). Terminal-based programs don't place the cursor correctly on the screen, don't react to the "Backspace" key by erasing one character, and leave junk characters around when updating the screen, usually turning the screen into a complete mess.

Fixing this kind of problems is a tedious task from a programmer's point of view, like all other cases of retrofitting new concepts into the old flawed design. In this case, one has to redesign all data structures in order to accommodate to the fact that a complete character may span a variable number of "char"s (or switch to wchar_t and convert as needed). Also, for every call to the "strlen" and similar functions, find out whether a number of bytes, a number of characters, or the width of the string was really meant. Sometimes it is faster to write a program with the same functionality from scratch.

Among BLFS packages, this problem applies to xine-ui-0.99.14 and all the shells.

The Package Installs Manual Pages in Incorrect or Non-Displayable Encoding

Severity: Low

LFS expects that manual pages are in the language-specific (usually 8-bit) encoding, as specified on the LFS Man DB page. However, some packages install translated manual pages in UTF-8 encoding (e.g., Shadow, already dealt with), or manual pages in languages not in the table. Not all BLFS packages have been audited for conformance with the requirements put in LFS (the large majority have been checked, and fixes placed in the book for packages known to install non-conforming manual pages). If you find a manual page installed by any of BLFS packages that is obviously in the wrong encoding, please remove or convert it as needed, and report this to BLFS team as a bug.

You can easily check your system for any non-conforming manual pages by copying the following short shell script to some accessible location,

#!/bin/sh
# Begin checkman.sh
# Usage: find /usr/share/man -type f | xargs checkman.sh
for a in "$@"
do
    # echo "Checking $a..."
    # Pure-ASCII manual page (possibly except comments) is OK
    grep -v '.\\"' "$a" | iconv -f US-ASCII -t US-ASCII >/dev/null 2>&1 \
        && continue
    # Non-UTF-8 manual page is OK
    iconv -f UTF-8 -t UTF-8 "$a" >/dev/null 2>&1 || continue
    # Found a UTF-8 manual page, bad.
    echo "UTF-8 manual page: $a" >&2
done
# End checkman.sh

and then issuing the following command (modify the command below if the checkman.sh script is not in your PATH environment variable):

find /usr/share/man -type f | xargs checkman.sh

Note that if you have manual pages installed in any location other than /usr/share/man (e.g., /usr/local/share/man), you must modify the above command to include this additional location.

Going Beyond BLFS

The packages that are installed in this book are only the tip of the iceberg. We hope that the experience you gained with the LFS book and the BLFS book will give you the background needed to compile, install and configure packages that are not included in this book.

When you want to install a package to a location other than /, or /usr, you are installing outside the default environment settings on most machines. The following examples should assist you in determining how to correct this situation. The examples cover the complete range of settings that may need updating, but they are not all needed in every situation.

  • Expand the PATH to include $PREFIX/bin.

  • Expand the PATH for root to include $PREFIX/sbin.

  • Add $PREFIX/lib to /etc/ld.so.conf or expand LD_LIBRARY_PATH to include it. Before using the latter option, check out http://xahlee.info/UnixResource_dir/_/ldpath.html. If you modify /etc/ld.so.conf, remember to update /etc/ld.so.cache by executing ldconfig as the root user.

  • Add $PREFIX/man to /etc/man_db.conf or expand MANPATH.

  • Add $PREFIX/info to INFOPATH.

  • Add $PREFIX/lib/pkgconfig to PKG_CONFIG_PATH. Some packages are now installing .pc files in $PREFIX/share/pkgconfig, so you may have to include this directory also.

  • Add $PREFIX/include to CPPFLAGS when compiling packages that depend on the package you installed.

  • Add $PREFIX/lib to LDFLAGS when compiling packages that depend on a library installed by the package.

If you are in search of a package that is not in the book, the following are different ways you can search for the desired package.

Some general hints on handling new packages:

  • Many of the newer packages follow the ./configure && make && make install process. Help on the options accepted by configure can be obtained via the command ./configure --help.

  • Most of the packages contain documentation on compiling and installing the package. Some of the documents are excellent, some not so excellent. Check out the homepage of the package for any additional and updated hints for compiling and configuring the package.

  • If you are having a problem compiling the package, try searching the LFS archives at https://www.linuxfromscratch.org/search.html for the error or if that fails, try searching Google. Often, a distribution will have already solved the problem (many of them use development versions of packages, so they see the changes sooner than those of us who normally use stable released versions). But be cautious - all builders tend to carry patches which are no longer necessary, and to have fixes which are only required because of their particular choices in how they build a package. You may have to search deeply to find a fix for the package version you are trying to use, or even to find the package (names are sometimes not what you might expect, e.g. ghostscript often has a prefix or a suffix in its name), but the following notes might help, particularly for those who, like the editors, are trying to build the latest versions and encountering problems:

    • Arch https://www.archlinux.org/packages/ - enter the package name in the 'Keywords' box, select the package name, select the 'Source Files' field, and then select the PKGBUILD entry to see how they build this package.

    • Debian https://ftp.debian.org/debian/pool (use your country's version if there is one) - the source will be in .tar.gz tarballs (either the original upstream .orig source, or else a dfsg containing those parts which comply with debian's free software guidelines) accompanied by versioned .diff.gz or .tar.gz additions. These additions often show how the package is built, and may contain patches. In the .diff.gz versions, any patches create files in debian/patches.

    • Fedora package source gets reorganized from time to time. At the moment the package source for rpms is at https://src.fedoraproject.org/projects/rpms/%2A and from there you can try putting a package name in the search box. If the package is found you can look at the files (specfile to control the build, various patches) or the commits. If that fails, you can download an srpm (source rpm) and using rpm2cpio (see the Tip at the bottom of the page). For rpms go to https://dl.fedoraproject.org/pub/fedora/linux/ and then choose which repo you wish to look at - development/rawhide is the latest development, or choose releases for what was shipped in a release, updates for updates to a release, or updates/testing for the latest updates which might work or might have problems.

    • Gentoo - First use a search engine to find an ebuild which looks as if it will fix the problem, or search at https://packages.gentoo.org/ - use the search field. Note where the package lives in the portage hierarchy, e.g. app-something/. In general you can treat the ebuild as a sort of pseudo-code / shell combination with some functions you can hazard a guess at, such as dodoc. If the fix is just a sed, try it. However, in most cases the fix will use a patch. To find the patch, use a gentoo-portage mirror: Two links to mirrors in the U.S.A. which seem to usually be up to date are https://mirror.rackspace.com/gentoo-portage/ and https://mirror.steadfast.net/gentoo-portage/. Navigate down the tree to the package, then to the files/ directory to look for the patch. Sometimes a portage mirror has not yet been updated, particularly for a recent new patch. In a few cases, gentoo batch the patches into a tarball and the ebuild will have a link in the form https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz : here, look for PATCH_DEV and PATCH_VER in the build and format the full URL in your browser or for wget : remember the '~' before the developer's ID and note that trying to search the earlier levels of the URL in a browser may drop you at www.gentoo.org or return 403 (forbidden).

    • openSUSE provide a rolling release, some package versions are in https://download.opensuse.org/source/tumbleweed/repo/oss/src/ but others are in ../update/openSUSE-current/src - the source only seems to be available in source rpms.

    • Slackware - the official package browser is currently broken. The site at https://slackbuilds.org/ has current and previous versions in their unofficial repository with links to homepages, downloads, and some individual files, particularly the .SlackBuild files.

    • Ubuntu ftp://ftp.ubuntu.com/ubuntu/pool/ - see the debian notes above.

    If everything else fails, try the blfs-support mailing-list.

Tip

If you have found a package that is only available in .deb or .rpm format, there are two small scripts, rpm2targz and deb2targz that are available at https://anduin.linuxfromscratch.org/BLFS/extras/deb2targz.tar.bz2 and https://anduin.linuxfromscratch.org/BLFS/extras/rpm2targz.tar.bz2 to convert the archives into a simple tar.gz format.

You may also find an rpm2cpio script useful. The Perl version in the linux kernel archives at https://lore.kernel.org/all/[email protected]/2-rpm2cpio works for most source rpms. The rpm2targz script will use an rpm2cpio script or binary if one is on your path. Note that rpm2cpio will unpack a source rpm in the current directory, giving a tarball, a spec file, and perhaps patches or other files.

Part II. Post LFS Configuration and Extra Software

Chapter 3. After LFS Configuration Issues

The intention of LFS is to provide a basic system which you can build upon. There are several things about tidying up the system which many people wonder about once they have done the base install. We hope to cover these issues in this chapter.

Most people coming from non-Unix like backgrounds to Linux find the concept of text-only configuration files slightly strange. In Linux, just about all configuration is done via the manipulation of text files. The majority of these files can be found in the /etc hierarchy. There are often graphical configuration programs available for different subsystems but most are simply pretty front ends to the process of editing a text file. The advantage of text-only configuration is that you can edit parameters using your favorite text editor, whether that be vim, emacs, or any other editor.

The first task is making a recovery boot device in Creating a Custom Boot Device because it's the most critical need. Hardware issues relevant to firmware and other devices is addressed next. The system is then configured to ease addition of new users, because this can affect the choices you make in the two subsequent topics—The Bash Shell Startup Files and The vimrc Files.

The remaining topics, Customizing your Logon with /etc/issue and Random number generation are then addressed, in that order. They don't have much interaction with the other topics in this chapter.

Creating a Custom Boot Device

Decent Rescue Boot Device Needs

This section is really about creating a rescue device. As the name rescue implies, the host system has a problem, often lost partition information or corrupted file systems, that prevents it from booting and/or operating normally. For this reason, you must not depend on resources from the host being "rescued". To presume that any given partition or hard drive will be available is a risky presumption.

In a modern system, there are many devices that can be used as a rescue device: floppy, cdrom, usb drive, or even a network card. Which one you use depends on your hardware and your BIOS. In the past, a rescue device was thought to be a floppy disk. Today, many systems do not even have a floppy drive.

Building a complete rescue device is a challenging task. In many ways, it is equivalent to building an entire LFS system. In addition, it would be a repetition of information already available. For these reasons, the procedures for a rescue device image are not presented here.

Creating a Rescue Floppy

The software of today's systems has grown large. Linux 2.6 no longer supports booting directly from a floppy. In spite of this, there are solutions available using older versions of Linux. One of the best is Tom's Root/Boot Disk available at http://www.toms.net/rb/. This will provide a minimal Linux system on a single floppy disk and provides the ability to customize the contents of your disk if necessary.

Creating a Bootable CD-ROM

There are several sources that can be used for a rescue CD-ROM. Just about any commercial distribution's installation CD-ROMs or DVDs will work. These include RedHat, Ubuntu, and SuSE. One very popular option is Knoppix.

Also, the LFS Community has developed its own LiveCD available at https://www.linuxfromscratch.org/livecd/. This LiveCD, is no longer capable of building an entire LFS/BLFS system, but is still a good rescue CD-ROM. If you download the ISO image, use xorriso to copy the image to a CD-ROM.

The instructions for using GRUB2 to make a custom rescue CD-ROM are also available in LFS Chapter 10.

Creating a Bootable USB Drive

A USB Pen drive, sometimes called a Thumb drive, is recognized by Linux as a SCSI device. Using one of these devices as a rescue device has the advantage that it is usually large enough to hold more than a minimal boot image. You can save critical data to the drive as well as use it to diagnose and recover a damaged system. Booting such a drive requires BIOS support, but building the system consists of formatting the drive, adding GRUB as well as the Linux kernel and supporting files.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/CreatingaCustomBootDevice

About Console Fonts

An LFS system can be used without a graphical desktop, and unless or until you install a graphical environment you will have to work in the console. Most, if not all, PCs boot with an 8x16 font - whatever the actual screen size. There are a few things you can do to alter the display on the console. Most of them involve changing the font, but the first alters the commandline used by grub.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/aboutconsolefonts

Setting a smaller screen size in grub

Modern screens often have a lot more pixels then the screens used in the past. If your screen is 1600 pixels wide, an 8x16 font will give you 200 columns of text - unless your monitor is enormous, the text will be tiny. One of the ways to work around this is to tell grub to use a smaller size, such as 1024x768 or 800x600 or even 640x480. Even if your screen does not have a 4:3 aspect ratio, this should work.

To try this, you can reboot and edit grub's command-line to insert a 'video=' parameter between the 'root=/dev/sdXn' and 'ro', for example root=/dev/sda2 video=1024x768 ro based on the example in LFS section 10.4.4 : ../../../../lfs/view/11.3/chapter10/grub.html.

If you decide that you wish to do this, you can then (as the root user) edit /boot/grub/grub.cfg.

Using the standard psf fonts

In LFS the kbd package is used. The fonts it provides are PC Screen Fonts, usually called PSF, and they were installed into /usr/share/consolefonts. Where these include a unicode mapping table, the file suffix is often changed to .psfu although packages such as terminus-font (see below) do not add the 'u'. These fonts are usually compressed with gzip to save space, but that is not essential.

The initial PC text screens had 8 colours, or 16 colours if the bright versions of the original 8 colours were used. A PSF font can include up to 256 characters (technically, glyphs) while allowing 16 colours, or up to 512 characters (in which case, the bright colours will not be available). Clearly, these console fonts cannot be used to display CJK text - that would need thousands of available glyphs.

Some fonts in kbd can cover more than 512 codepoints ('characters'), with varying degrees of fidelity: unicode contains several whitespace codepoints which can all be mapped to a space, varieties of dashes can be mapped to a minus sign, smart quotes can map to the regular ASCII quotes rather than to whatever is used for "codepoint not present or invalid", and those cyrillic or greek letters which look like latin letters can be mapped onto them, so 'A' can also do duty for cyrillic A and greek Alpha, and 'P' can also do duty for cyrillic ER and greek RHO. Unfortunately, where a font has been created from a BDF file (the method in terminus and debian's console-setup ) such mapping of additional codepoints onto an existing glyph is not always done, although the terminus ter-vXXn fonts do this well.

There are over 120 combinations of font and size in kbd: often a font is provided at several character sizes, and sometimes varieties cover different subsets of unicode. Most are 8 pixels wide, in heights from 8 to 16 pixels, but there are a few which are 9 pixels wide, some others which are 12x22, and even one (latarcyrheb-sun32.psfu) which has been scaled up to 16x32. Using a bigger font is another way of making text on a large screen easier to read.

Testing different fonts

You can test fonts as a normal user. If you have a font which has not been installed, you can load it with :

setfont /path/to/yourfont.ext

For the fonts already installed you only need the name, so using gr737a-9x16.psfu.gz as an example:

setfont gr737a-9x16

To see the glyphs in the font, use:

showconsolefont

If the font looks as if it might be useful, you can then go on to test it more thoroughly.

When you find a font which you wish to use, as the root user) edit /etc/sysconfig/console as described in LFS section 9.6.5 ../../../../lfs/view/11.3/chapter09/usage.html. .

For fonts not supplied with the kbd package you will need to optionally compress it / them with gzip and then install it / them as the root user.

Editing fonts using psf-tools

Although some console fonts are created from BDF files, which is a text format with hex values for the pixels in each row of the character, there are more-modern tools available for editing psf fonts. The psftools package allows you to dump a font to a text representation with a dash for a pixel which is off (black) and a hash for a pixel which is on (white). You can then edit the text file to add more characters, or reshape them, or map extra codepoints onto them, and then create a new psf font with your changes.

Using fonts from Terminus-font

The Terminus Font package provides fixed-width bitmap fonts designed for long (8 hours and more per day) work with computers. Under 'Character variants' on that page is a list of patches (in the alt/ directory). If you are using a graphical browser to look at that page, you can see what the patches do, e.g. 'll2' makes 'l' more visibly different from 'i' and '1'.

By default terminus-fonts will try to create several types of font, and it will fail if bdftopcf from Xorg Applications has not been installed. The configure script is only really useful if you go on to install all the fonts (console and X11 bitmap) to the correct directories, as in a distro. To build only the PSF fonts and their dependencies, run:

make psf

This will create more than 240 ter-*.psf fonts. The 'b' suffix indicates bright, 'n' indicates normal. You can then test them to see if any fit your requirements. Unless you are creating a distro, there seems little point in installing them all.

As an example, to install the last of these fonts, you can gzip it and then as the root user:

install -v -m644 ter-v32n.psf.gz /usr/share/consolefonts

About Firmware

On some recent PCs it can be necessary, or desirable, to load firmware to make them work at their best. There is a directory, /lib/firmware, where the kernel or kernel drivers look for firmware images.

Currently, most firmware can be found at a git repository: https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/tree/. For convenience, the LFS Project has created a mirror, updated daily, where these firmware files can be accessed via wget or a web browser at https://anduin.linuxfromscratch.org/BLFS/linux-firmware/.

To get the firmware, either point a browser to one of the above repositories and then download the item(s) which you need, or install git-2.39.2 and clone that repository.

For some other firmware, particularly for Intel microcode and certain wifi devices, the needed firmware is not available in the above repository. Some of this will be addressed below, but a search of the Internet for needed firmware is sometimes necessary.

Firmware files are conventionally referred to as blobs because you cannot determine what they will do. Note that firmware is distributed under various different licenses which do not permit disassembly or reverse-engineering.

Firmware for PCs falls into four categories:

  • Updates to the CPU to work around errata, usually referred to as microcode.

  • Firmware for video controllers. On x86 machines this is required for ATI devices (Radeon and AMDGPU chips) and may be useful for Intel (Skylake and later) and Nvidia (Kepler and later) GPUs.

    ATI Radeon and AMDGPU devices all require firmware to be able to use KMS (kernel modesetting - the preferred option) as well as for Xorg. For old radeon chips (before the R600), the firmware is still in the kernel source.

    Intel integrated GPUs from Skylake onwards can use firmware for GuC (the Graphics microcontroller), and also for the HuC (HEVC/H265 microcontroller which offloads to the GPU) and the DMC (Display Microcontroller) to provide additional low-power states. The GuC and HuC have had a chequered history in the kernel and updated firmware may be disabled by default, depending on your kernel version. Further details may be found at 01.org and Arch linux.

    Nvidia GPUs from Kepler onwards require signed firmware, otherwise the nouveau driver is unable to provide hardware acceleration. Nvidia has now released firmware up to Ampere (GeForce30 series) to linux-firmware. Note that faster clocks than the default are not enabled by the released firmware.

  • Firmware updates for wired network ports. Mostly they work even without the updates, but probably they will work better with the updated firmware. For some modern laptops, firmware for both wired ethernet (e.g. rtl_nic) and also for bluetooth devices (e.g. qca) is required before the wired network can be used.

  • Firmware for other devices, such as wifi. These devices are not required for the PC to boot, but need the firmware before these devices can be used.

Note

Although not needed to load a firmware blob, the following tools may be useful for determining, obtaining, or preparing the needed firmware in order to load it into the system: cpio-2.13, git-2.39.2, pciutils-3.9.0, and Wget-1.21.3

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/aboutfirmware

Microcode updates for CPUs

In general, microcode can be loaded by the BIOS or UEFI, and it might be updated by upgrading to a newer version of those. On linux, you can also load the microcode from the kernel if you are using an AMD family 10h or later processor (first introduced late 2007), or an Intel processor from 1998 and later (Pentium4, Core, etc), if updated microcode has been released. These updates only last until the machine is powered off, so they need to be applied on every boot.

Intel provide updates of their microcode for Skylake and later processors as new vulnerabilities come to light, and have in the past provided updates for processors from SandyBridge onwards, although those are no-longer supported for new fixes. New versions of AMD firmware are rare and usually only apply to a few models, although motherboard manufacturers get AGESA (AMD Generic Encapsulated Software Architecture) updates to change BIOS values, e.g. to support more memory variants, new vulnerability fixes or newer CPUs.

There were two ways of loading the microcode, described as 'early' and 'late'. Early loading happens before userspace has been started, late loading happens after userspace has started. However, late loading is known to be problematic and not supported anymore (see the kernel commit x86/microcode: Taint and warn on late loading.) Indeed, early loading is needed to work around one particular erratum in early Intel Haswell processors which had TSX enabled. (See Intel Disables TSX Instructions: Erratum Found in Haswell, Haswell-E/EP, Broadwell-Y.) Without this update glibc can do the wrong thing in uncommon situations.

In previous versions of this book, late loading of microcode to see if it gets applied was recommended, followed by using an initrd to force early loading. But now that the contents of the Intel microcode tarball is documented, and AMD microcode can be read by a Python script to determine which machines it covers, there is no real reason to use late loading.

It might be still possible to manually force late loading of microcode. But it may cause kernel malfunction and you should take the risk yourself. You will need to reconfigure your kernel for either method. The instructions here will show you how to create an initrd for early loading. It is also possible to build the same microcode bin file into the kernel, which allows early loading but requires the kernel to be recompiled to update the microcode.

To confirm what processor(s) you have (if more than one, they will be identical) look in /proc/cpuinfo. Determine the decimal values of the cpu family, model and stepping by running the following command (it will also report the current microcode version):

head -n7 /proc/cpuinfo

Convert the cpu family, model and stepping to pairs of hexadecimal digits, and remember the value of the microcode field. You can now check if there is any microcode available.

If you are creating an initrd to update firmware for different machines, as a distro would do, go down to 'Early loading of microcode' and cat all the Intel blobs to GenuineIntel.bin or cat all the AMD blobs to AuthenticAMD.bin. This creates a larger initrd - for all Intel machines in the 20200609 update the size was 3.0 MB compared to typically 24 KB for one machine.

Intel Microcode for the CPU

The first step is to get the most recent version of the Intel microcode. This must be done by navigating to https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/releases/ and downloading the latest file there. As of this writing the most secure version of the microcode is microcode-20230214. Extract this file in the normal way, the microcode is in the intel-ucode directory, containing various blobs with names in the form XX-YY-ZZ. There are also various other files, and a releasenote.

In the past, intel did not provide any details of which blobs had changed versions, but now the releasenote details this. You can compare the microcode version in /proc/cpuinfo with the version for your CPU model in the releasenote to know if there is an update.

The recent firmware for older processors is provided to deal with vulnerabilities which have now been made public, and for some of these such as Microarchitectural Data Sampling (MDS) you might wish to increase the protection by disabling hyperthreading, or alternatively to disable the kernel's default mitigation because of its impact on compile times. Please read the online documentation at https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/index.html.

For an Icelake mobile (described as Intel(R) Core(TM) i7-1065G7 CPU) the relevant values are cpu family 6, model 126, stepping 5 so in this case the required identification is 06-7e-05. The releasenote says the latest microcode for it is versioned 0xb8. If the value of the microcode field in /proc/cpuinfo is 0xb8 or greater, it indicates the microcode update is already applied by the BIOS. Otherwise, configure the kernel to support loading Intel microcode, and then proceed to the section called “Early loading of microcode”:

General Setup --->
  [*] Initial RAM filesystem and RAM disk (initramfs/initrd) support [CONFIG_BLK_DEV_INITRD]
Processor type and features  --->
  [*] CPU microcode loading support  [CONFIG_MICROCODE]
  [*]      Intel microcode loading support [CONFIG_MICROCODE_INTEL]

AMD Microcode for the CPU

Begin by downloading a container of firmware for your CPU family from https://anduin.linuxfromscratch.org/BLFS/linux-firmware/amd-ucode/. The family is always specified in hex. Families 10h to 14h (16 to 20) are in microcode_amd.bin. Families 15h, 16h, 17h (Zen, Zen+, Zen2) and 19h (Zen3) have their own containers, but very few machines are likely to get updated microcode. Instead, AMD provide an updated AGESA to the motherboard makers, who may provide an updated BIOS using this. There is a Python3 script at https://github.com/AMDESE/amd_ucode_info/blob/master/amd_ucode_info.py. Download that script and run it against the bin file to check which processors have updates.

For the very old Athlon(tm) II X2 in these examples the values were cpu family 16, model 5, stepping 3 giving an identification of Family=0x10 Model=0x05 Stepping=0x03. One line of the amd_ucode_info.py script output describes the microcode version for it:

Family=0x10 Model=0x05 Stepping=0x03: Patch=0x010000c8 Length=960 bytes

If the value of the microcode field in /proc/cpuinfo is 0x10000c8 or greater, it indicates the BIOS has already applied the microcode update. Otherwise, configure the kernel to support loading AMD microcode, and then proceed to the section called “Early loading of microcode”:

General Setup --->
  [*] Initial RAM filesystem and RAM disk (initramfs/initrd) support [CONFIG_BLK_DEV_INITRD]
Processor type and features  --->
  [*] CPU microcode loading support  [CONFIG_MICROCODE]
  [*]      AMD microcode loading support [CONFIG_MICROCODE_AMD]

Early loading of microcode

If you have established that updated microcode is available for your system, it is time to prepare it for early loading. This requires an additional package, cpio-2.13 and the creation of an initrd which will need to be added to grub.cfg.

It does not matter where you prepare the initrd, and once it is working you can apply the same initrd to later LFS systems or newer kernels on this same machine, at least until any newer microcode is released. Use the following commands:

mkdir -p initrd/kernel/x86/microcode
cd initrd

For an AMD machine, use the following command (replace <MYCONTAINER> with the name of the container for your CPU's family):

cp -v ../<MYCONTAINER> kernel/x86/microcode/AuthenticAMD.bin

Or for an Intel machine copy the appropriate blob using this command:

cp -v ../intel-ucode/<XX-YY-ZZ> kernel/x86/microcode/GenuineIntel.bin

Now prepare the initrd:

find . | cpio -o -H newc > /boot/microcode.img

You now need to add a new entry to /boot/grub/grub.cfg and here you should add a new line after the linux line within the stanza. If /boot is a separate mountpoint:

initrd /microcode.img

or this if it is not:

initrd /boot/microcode.img

If you are already booting with an initrd (see the section called “About initramfs”), you should run mkinitramfs again after putting the appropriate blob or container into /lib/firmware. More precisely, put an intel blob in a /lib/firmware/intel-ucode directory or an AMD container in a /lib/firmware/amd-ucode directory before running mkinitramfs. Alternatively, you can have both initrd on the same line, such as initrd /microcode.img /other-initrd.img (adapt that as above if /boot is not a separate mountpoint).

You can now reboot with the added initrd, and then use the following command to check that the early load worked:

dmesg | grep -e 'microcode' -e 'Linux version' -e 'Command line'

If you updated to address vulnerabilities, you can look at the output of the lscpu command to see what is now reported.

The places and times where early loading happens are very different in AMD and Intel machines. First, an example of an Intel (Icelake mobile) with early loading:

[    0.000000] microcode: microcode updated early to revision 0xb8, date = 2022-08-31
[    0.000000] Linux version 6.1.11 (xry111@stargazer) (gcc (GCC) 12.2.0, GNU ld (GNU Binutils) 2.40) #2 SMP PREEMPT_DYNAMIC Tue Feb 14 23:23:31 CST 2023
[    0.000000] Command line: BOOT_IMAGE=/vmlinuz-6.1.11-lfs-11.3-rc1 root=PARTUUID=<CLASSIFIED> ro
[    0.452924] microcode: sig=0x706e5, pf=0x80, revision=0xb8
[    0.453197] microcode: Microcode Update Driver: v2.2.

A historic AMD example:

[    0.000000] Linux version 4.15.3 (ken@testserver) (gcc version 7.3.0 (GCC))
               #2 SMP Sun Feb 18 02:32:03 GMT 2018
[    0.000000] Command line: BOOT_IMAGE=/vmlinuz-4.15.3-sda5 root=/dev/sda5 ro
[    0.307619] microcode: microcode updated early to new patch_level=0x010000c8
[    0.307678] microcode: CPU0: patch_level=0x010000c8
[    0.307723] microcode: CPU1: patch_level=0x010000c8
[    0.307795] microcode: Microcode Update Driver: v2.2.

Firmware for Video Cards

Firmware for ATI video chips (R600 and later)

These instructions do NOT apply to old radeons before the R600 family. For those, the firmware is in the kernel's /lib/firmware/ directory. Nor do they apply if you intend to avoid a graphical setup such as Xorg and are content to use the default 80x25 display rather than a framebuffer.

Early radeon devices only needed a single 2K blob of firmware. Recent devices need several different blobs, and some of them are much bigger. The total size of the radeon firmware directory is over 500K — on a large modern system you can probably spare the space, but it is still redundant to install all the unused files each time you build a system.

A better approach is to install pciutils-3.9.0 and then use lspci to identify which VGA controller is installed.

With that information, check the RadeonFeature page of the Xorg wiki for Decoder ring for engineering vs marketing names to identify the family (you may need to know this for the Xorg driver in BLFS — Southern Islands and Sea Islands use the radeonsi driver) and the specific model.

Now that you know which controller you are using, consult the Radeon page of the Gentoo wiki which has a table listing the required firmware blobs for the various chipsets. Note that Southern Islands and Sea Islands chips use different firmware for kernel 3.17 and later compared to earlier kernels. Identify and download the required blobs then install them:

mkdir -pv /lib/firmware/radeon
cp -v <YOUR_BLOBS> /lib/firmware/radeon

There are actually two ways of installing this firmware. BLFS, in the 'Kernel Configuration for additional firmware' section part of the Xorg ATI Driver-19.1.0 section gives an example of compiling the firmware into the kernel - that is slightly faster to load, but uses more kernel memory. Here we will use the alternative method of making the radeon driver a module. In your kernel config set the following:

Device Drivers --->
  Graphics support --->
      Direct Rendering Manager --->
        [*] Direct Rendering Manager (XFree86 ... support)  [CONFIG_DRM]
      [M] ATI Radeon                                        [CONFIG_DRM_RADEON]

Loading several large blobs from /lib/firmware takes a noticeable time, during which the screen will be blank. If you do not enable the penguin framebuffer logo, or change the console size by using a bigger font, that probably does not matter. If desired, you can slightly reduce the time if you follow the alternate method of specifying 'y' for CONFIG_DRM_RADEON covered in BLFS at the link above — you must specify each needed radeon blob if you do that.

Firmware for AMD/ATI amdgpu video chips

All video controllers using the amdgpu kernel driver require firmware, whether you will be using the xorg amdgpu driver, the xserver's modesetting driver, or just kernel modesetting to get a console framebuffer larger than 80x25.

Install pciutils-3.9.0 and use that to check the model name (look for 'VGA compatible controller:'). If you have an APU (Accelerated Processing Unit, i.e. CPU and video on the same chip) that will probably tell you the name. If you have a separate amdgpu video card you will need to search to determine which name it uses (e.g. a card described as Advanced Micro Devices, Inc. [AMD/ATI] Baffin [Radeon RX 550 640SP / RX 560/560X] needs Polaris11 firmware. There is a table of "Family, Chipset name, Product name and Firmware" at the end of the Kernel sections in AMDGPU page of the Gentoo wiki.

Once you have identified the firmware name, install all the relevant files for it. For example, the Baffin card mentioned above has 21 different polaris11* files, APUs such as renoir and picasso have at least 12 files and might gain more in future updates (e.g. the raven APU now has a 13th file, raven_ta.bin).

mkdir -pv /lib/firmware/amdgpu
cp -v <YOUR_BLOBS> /lib/firmware/amdgpu

If disk space is not a problem, you could install all the current amdgpu firmware files and not worry about exactly which chipset is installed.

Building the kernel amdgpu driver as a module is recommended. In your kernel .config set at least the following options and review the other AMDGPU options according to your target hardware, for example "ACP (Audio Co-Processor) Configuration":

Device Drivers --->
  Graphics support --->
      Direct Rendering Manager --->
        [*] Direct Rendering Manager (XFree86 ... support)  [CONFIG_DRM]
        [M] AMD GPU                                         [CONFIG_DRM_AMDGPU]
        Display Engine Configuration --->
          [*] AMD DC - Enable new display engine (NEW)      [CONFIG_DRM_AMD_DC]

As written above at the end of the section on 'Firmware for ATI video chips', loading large blobs from /lib/firmware can take a noticeable time during which the screen will be blank. On a slow machine you might wish to refer to the 'Kernel Configuration for additional firmware' part of Xorg AMDGPU Driver-23.0.0 and compile all the required modules into the kernel to reduce this time, at the cost of using more kernel memory.

Firmware for Nvidia video chips

Nvidia has released basic signed firmware for recent graphics chips, but significantly after the chips and its own binary drivers were first available. For other chips it has been necessary to extract the firmware from the binary driver.

For more exact information about which chips need extracted firmware, see https://nouveau.freedesktop.org/wiki/VideoAcceleration/#firmware.

First, the kernel Nvidia driver must be activated:

Device Drivers --->
  Graphics support --->
      Direct Rendering Manager --->
        <*> Direct Rendering Manager (XFree86 ... support)  [CONFIG_DRM]
      <*/M> Nouveau (NVIDIA) cards                          [CONFIG_DRM_NOUVEAU]

If the necessary firmware is available in the nvidia/ directory of linux-firmware, copy it to /lib/firmware/nouveau.

If the firmware has not been made available in linux-firmware, for the old chips mentioned in the nouveau wiki link above ensure you have installed Python-2.7.18 and run the following commands:

wget https://raw.github.com/imirkin/re-vp2/master/extract_firmware.py
wget https://us.download.nvidia.com/XFree86/Linux-x86/325.15/NVIDIA-Linux-x86-325.15.run
sh NVIDIA-Linux-x86-325.15.run --extract-only
python2 extract_firmware.py
mkdir -p /lib/firmware/nouveau
cp -d nv* vuc-* /lib/firmware/nouveau/

Firmware for Network Interfaces

The kernel likes to load firmware for some network drivers, particularly those from Realtek (the /lib/linux-firmware/rtl_nic/) directory, but they generally appear to work without it. Therefore, you can boot the kernel, check dmesg for messages about this missing firmware, and if necessary download the firmware and put it in the specified directory in /lib/firmware so that it will be found on subsequent boots. Note that with current kernels this works whether or not the driver is compiled in or built as a module, there is no need to build this firmware into the kernel. Here is an example where the R8169 driver has been compiled in but the firmware was not made available. Once the firmware had been provided, there was no mention of it on later boots.

dmesg | grep firmware | grep r8169
[    7.018028] r8169 0000:01:00.0: Direct firmware load for rtl_nic/rtl8168g-2.fw failed with error -2
[    7.018036] r8169 0000:01:00.0 eth0: unable to load firmware patch rtl_nic/rtl8168g-2.fw (-2)

Firmware for Other Devices

Identifying the correct firmware will typically require you to install pciutils-3.9.0, and then use lspci to identify the device. You should then search online to check which module it uses, which firmware, and where to obtain the firmware — not all of it is in linux-firmware.

If possible, you should begin by using a wired connection when you first boot your LFS system. To use a wireless connection you will need to use a network tools such as Wireless Tools-29 and wpa_supplicant-2.10.

Different countries have different regulations on the radio spectrum usage of wireless devices. You can install a firmware to make the wireless devices obey local spectrum regulations, so you won't be inquired by local authority or find your wireless NIC jamming the frequencies of other devices (for example, remote controllers). The regulatory database firmware can be downloaded from https://kernel.org/pub/software/network/wireless-regdb/. To install it, simply extract regulatory.db and regulatory.db.p7s from the tarball into /lib/firmware. The access point would send a country code to your wireless NIC, and wpa_supplicant-2.10 would tell the kernel to load the regulation of this country from regulatory.db, and enforce it.

Firmware may also be needed for other devices such as some SCSI controllers, bluetooth adaptors, or TV recorders. The same principles apply.

About Devices

Although most devices needed by packages in BLFS and beyond are set up properly by udev using the default rules installed by LFS in /etc/udev/rules.d, there are cases where the rules must be modified or augmented.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/aboutdevices

Multiple Sound Cards

If there are multiple sound cards in a system, the "default" sound card becomes random. The method to establish sound card order depends on whether the drivers are modules or not. If the sound card drivers are compiled into the kernel, control is via kernel command line parameters in /boot/grub/grub.cfg. For example, if a system has both an FM801 card and a SoundBlaster PCI card, the following can be appended to the command line:

snd-fm801.index=0 snd-ens1371.index=1

If the sound card drivers are built as modules, the order can be established in the /etc/modprobe.conf file with:

options snd-fm801 index=0
options snd-ens1371 index=1

USB Device Issues

USB devices usually have two kinds of device nodes associated with them.

The first kind is created by device-specific drivers (e.g., usb_storage/sd_mod or usblp) in the kernel. For example, a USB mass storage device would be /dev/sdb, and a USB printer would be /dev/usb/lp0. These device nodes exist only when the device-specific driver is loaded.

The second kind of device nodes (/dev/bus/usb/BBB/DDD, where BBB is the bus number and DDD is the device number) are created even if the device doesn't have a kernel driver. By using these "raw" USB device nodes, an application can exchange arbitrary USB packets with the device, i.e., bypass the possibly-existing kernel driver.

Access to raw USB device nodes is needed when a userspace program is acting as a device driver. However, for the program to open the device successfully, the permissions have to be set correctly. By default, due to security concerns, all raw USB devices are owned by user root and group usb, and have 0664 permissions (the read access is needed, e.g., for lsusb to work and for programs to access USB hubs). Packages (such as SANE and libgphoto2) containing userspace USB device drivers also ship udev rules that change the permissions of the controlled raw USB devices. That is, rules installed by SANE change permissions for known scanners, but not printers. If a package maintainer forgot to write a rule for your device, report a bug to both BLFS (if the package is there) and upstream, and you will need to write your own rule.

There is one situation when such fine-grained access control with pre-generated udev rules doesn't work. Namely, PC emulators such as KVM, QEMU and VirtualBox use raw USB device nodes to present arbitrary USB devices to the guest operating system (note: patches are needed in order to get this to work without the obsolete /proc/bus/usb mount point described below). Obviously, maintainers of these packages cannot know which USB devices are going to be connected to the guest operating system. You can either write separate udev rules for all needed USB devices yourself, or use the default catch-all "usb" group, members of which can send arbitrary commands to all USB devices.

Before Linux-2.6.15, raw USB device access was performed not with /dev/bus/usb/BBB/DDD device nodes, but with /proc/bus/usb/BBB/DDD pseudofiles. Some applications (e.g., VMware Workstation) still use only this deprecated technique and can't use the new device nodes. For them to work, use the "usb" group, but remember that members will have unrestricted access to all USB devices. To create the fstab entry for the obsolete usbfs filesystem:

usbfs  /proc/bus/usb  usbfs  devgid=14,devmode=0660  0  0

Note

Adding users to the "usb" group is inherently insecure, as they can bypass access restrictions imposed through the driver-specific USB device nodes. For instance, they can read sensitive data from USB hard drives without being in the "disk" group. Avoid adding users to this group, if you can.

Udev Device Attributes

Fine-tuning of device attributes such as group name and permissions is possible by creating extra udev rules, matching on something like this. The vendor and product can be found by searching the /sys/devices directory entries or using udevadm info after the device has been attached. See the documentation in the current udev directory of /usr/share/doc for details.

SUBSYSTEM=="usb_device", SYSFS{idVendor}=="05d8", SYSFS{idProduct}=="4002", \
  GROUP:="scanner", MODE:="0660"

Note

The above line is used for descriptive purposes only. The scanner udev rules are put into place when installing SANE-1.0.32.

Devices for Servers

In some cases, it makes sense to disable udev completely and create static devices. Servers are one example of this situation. Does a server need the capability of handling dynamic devices? Only the system administrator can answer that question, but in many cases the answer will be no.

If dynamic devices are not desired, then static devices must be created on the system. In the default configuration, the /etc/rc.d/rcS.d/S10udev boot script mounts a tmpfs partition over the /dev directory. This problem can be overcome by mounting the root partition temporarily:

Warning

If the instructions below are not followed carefully, your system could become unbootable.

mount --bind / /mnt
cp -a /dev/* /mnt/dev
rm /etc/rc.d/rcS.d/{S10udev,S50udev_retry}
umount /mnt

At this point, the system will use static devices upon the next reboot. Create any desired additional devices using mknod.

If you want to restore the dynamic devices, recreate the /etc/rc.d/rcS.d/{S10udev,S50udev_retry} symbolic links and reboot again. Static devices do not need to be removed (console and null are always needed) because they are covered by the tmpfs partition. Disk usage for devices is negligible (about 20–30 bytes per entry.)

Devices for DVD Drives

If the initial boot process does not set up the /dev/dvd device properly, it can be installed using the following modification to the default udev rules. As the root user, run:

sed '1d;/SYMLINK.*cdrom/ a\
KERNEL=="sr0", ENV{ID_CDROM_DVD}=="1", SYMLINK+="dvd", OPTIONS+="link_priority=-100"' \
/lib/udev/rules.d/60-cdrom_id.rules > /etc/udev/rules.d/60-cdrom_id.rules

Configuring for Adding Users

Together, the /usr/sbin/useradd command and /etc/skel directory (both are easy to set up and use) provide a way to assure new users are added to your LFS system with the same beginning settings for things such as the PATH, keyboard processing and other environmental variables. Using these two facilities makes it easier to assure this initial state for each new user added to the system.

The /etc/skel directory holds copies of various initialization and other files that may be copied to the new user's home directory when the /usr/sbin/useradd program adds the new user.

Useradd

The useradd program uses a collection of default values kept in /etc/default/useradd. This file is created in a base LFS installation by the Shadow package. If it has been removed or renamed, the useradd program uses some internal defaults. You can see the default values by running /usr/sbin/useradd -D.

To change these values, simply modify the /etc/default/useradd file as the root user. An alternative to directly modifying the file is to run useradd as the root user while supplying the desired modifications on the command line. Information on how to do this can be found in the useradd man page.

/etc/skel

To get started, create an /etc/skel directory and make sure it is writable only by the system administrator, usually root. Creating the directory as root is the best way to go.

The mode of any files from this part of the book that you put in /etc/skel should be writable only by the owner. Also, since there is no telling what kind of sensitive information a user may eventually place in their copy of these files, you should make them unreadable by "group" and "other".

You can also put other files in /etc/skel and different permissions may be needed for them.

Decide which initialization files should be provided in every (or most) new user's home directory. The decisions you make will affect what you do in the next two sections, The Bash Shell Startup Files and The vimrc Files. Some or all of those files will be useful for root, any already-existing users, and new users.

The files from those sections that you might want to place in /etc/skel include .inputrc, .bash_profile, .bashrc, .bash_logout, .dircolors, and .vimrc. If you are unsure which of these should be placed there, just continue to the following sections, read each section and any references provided, and then make your decision.

You will run a slightly modified set of commands for files which are placed in /etc/skel. Each section will remind you of this. In brief, the book's commands have been written for files not added to /etc/skel and instead just sends the results to the user's home directory. If the file is going to be in /etc/skel, change the book's command(s) to send output there instead and then just copy the file from /etc/skel to the appropriate directories, like /etc, ~ or the home directory of any other user already in the system.

When Adding a User

When adding a new user with useradd, use the -m parameter, which tells useradd to create the user's home directory and copy files from /etc/skel (can be overridden) to the new user's home directory. For example (perform as the root user):

useradd -m <newuser>

If you are sharing a /home or /usr/src with another Linux distro (for example, the host distro used for building LFS), you can create a user with the same UID (and, same primary group GID) to keep the file ownership consistent across the systems. First, on the other distro, get the UID of the user and the GID of the user's primary group:

getent passwd <username> | cut -d ':' -f 3,4

The command should output the UID and GID, separated by a colon. Now on the BLFS system, create the primary group and the user:

groupadd -g <GID> <username> &&
useradd -u <UID> -g <username> <username>

About System Users and Groups

Throughout BLFS, many packages install programs that run as daemons or in some way should have a user or group name assigned. Generally these names are used to map a user ID (uid) or group ID (gid) for system use. Generally the specific uid or gid numbers used by these applications are not significant. The exception of course, is that root has a uid and gid of 0 (zero) that is indeed special. The uid values are stored in /etc/passwd and the gid values are found in /etc/group.

Customarily, Unix systems classify users and groups into two categories: system users and regular users. The system users and groups are given low numbers and regular users and groups have numeric values greater than all the system values. The cutoff for these numbers is found in two parameters in the /etc/login.defs configuration file. The default UID_MIN value is 1000 and the default GID_MIN value is 1000. If a specific uid or gid value is not specified when creating a user with useradd or a group with groupadd the values assigned will always be above these cutoff values.

Additionally, the Linux Standard Base recommends that system uid and gid values should be below 100.

Below is a table of suggested uid/gid values used in BLFS beyond those defined in a base LFS installation. These can be changed as desired, but provide a suggested set of consistent values.

Table 3.1. UID/GID Suggested Values

Name uid gid
bin 1
lp 9
adm 16
atd 17 17
messagebus 18 18
lpadmin   19
named 20 20
gdm 21 21
fcron 22 22
systemd-journal 23 23
apache 25 25
smmsp 26 26
polkitd 27 27
rpc 28 28
exim 31 31
postfix 32 32
postdrop 33
sendmail 34
mail 34
vmailman 35 35
news 36 36
kdm 37 37
fetchmail 38
mysql 40 40
postgres 41 41
dovecot 42 42
dovenull 43 43
ftp 45 45
proftpd 46 46
vsftpd 47 47
rsyncd 48 48
sshd 50 50
stunnel 51 51
dhcpcd 52 52
svn 56 56
svntest 57
git 58 58
games 60 60
kvm 61
wireshark 62
lightdm 63 63
sddm 64 64
lightdm 65 65
scanner 70
colord 71 71
systemd-journal-gateway 73 73
systemd-journal-remote 74 74
systemd-journal-upload 75 75
systemd-network 76 76
systemd-resolve 77 77
systemd-timesync 78 78
systemd-coredump 79 79
uuidd 80 80
systemd-oom 81 81
ldap 83 83
avahi 84 84
avahi-autoipd 85 85
netdev 86
ntp 87 87
unbound 88 88
plugdev 90
wheel 97
anonymous 98
nobody 65534
nogroup 65534

The Bash Shell Startup Files

The shell program /bin/bash (hereafter referred to as just "the shell") uses a collection of startup files to help create an environment. Each file has a specific use and may affect login and interactive environments differently. The files in the /etc directory generally provide global settings. If an equivalent file exists in your home directory it may override the global settings.

An interactive login shell is started after a successful login, using /bin/login, by reading the /etc/passwd file. This shell invocation normally reads /etc/profile and its private equivalent ~/.bash_profile (or ~/.profile if called as /bin/sh) upon startup.

An interactive non-login shell is normally started at the command-line using a shell program (e.g., [prompt]$/bin/bash) or by the /bin/su command. An interactive non-login shell is also started with a terminal program such as xterm or konsole from within a graphical environment. This type of shell invocation normally copies the parent environment and then reads the user's ~/.bashrc file for additional startup configuration instructions.

A non-interactive shell is usually present when a shell script is running. It is non-interactive because it is processing a script and not waiting for user input between commands. For these shell invocations, only the environment inherited from the parent shell is used.

The file ~/.bash_logout is not used for an invocation of the shell. It is read and executed when a user exits from an interactive login shell.

Many distributions use /etc/bashrc for system wide initialization of non-login shells. This file is usually called from the user's ~/.bashrc file and is not built directly into bash itself. This convention is followed in this section.

For more information see info bash -- Nodes: Bash Startup Files and Interactive Shells.

Note

Most of the instructions below are used to create files located in the /etc directory structure which requires you to execute the commands as the root user. If you elect to create the files in user's home directories instead, you should run the commands as an unprivileged user.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/bash-shell-startup-files

/etc/profile

Here is a base /etc/profile. This file starts by setting up some helper functions and some basic parameters. It specifies some bash history parameters and, for security purposes, disables keeping a permanent history file for the root user. It also sets a default user prompt. It then calls small, single purpose scripts in the /etc/profile.d directory to provide most of the initialization.

For more information on the escape sequences you can use for your prompt (i.e., the PS1 environment variable) see info bash -- Node: Printing a Prompt.

cat > /etc/profile << "EOF"
# Begin /etc/profile
# Written for Beyond Linux From Scratch
# by James Robertson <[email protected]>
# modifications by Dagmar d'Surreal <[email protected]>

# System wide environment variables and startup programs.

# System wide aliases and functions should go in /etc/bashrc.  Personal
# environment variables and startup programs should go into
# ~/.bash_profile.  Personal aliases and functions should go into
# ~/.bashrc.

# Functions to help us manage paths.  Second argument is the name of the
# path variable to be modified (default: PATH)
pathremove () {
        local IFS=':'
        local NEWPATH
        local DIR
        local PATHVARIABLE=${2:-PATH}
        for DIR in ${!PATHVARIABLE} ; do
                if [ "$DIR" != "$1" ] ; then
                  NEWPATH=${NEWPATH:+$NEWPATH:}$DIR
                fi
        done
        export $PATHVARIABLE="$NEWPATH"
}

pathprepend () {
        pathremove $1 $2
        local PATHVARIABLE=${2:-PATH}
        export $PATHVARIABLE="$1${!PATHVARIABLE:+:${!PATHVARIABLE}}"
}

pathappend () {
        pathremove $1 $2
        local PATHVARIABLE=${2:-PATH}
        export $PATHVARIABLE="${!PATHVARIABLE:+${!PATHVARIABLE}:}$1"
}

export -f pathremove pathprepend pathappend

# Set the initial path
export PATH=/usr/bin

# Attempt to provide backward compatibility with LFS earlier than 11
if [ ! -L /bin ]; then
        pathappend /bin
fi

if [ $EUID -eq 0 ] ; then
        pathappend /usr/sbin
        if [ ! -L /sbin ]; then
                pathappend /sbin
        fi
        unset HISTFILE
fi

# Set up some environment variables.
export HISTSIZE=1000
export HISTIGNORE="&:[bf]g:exit"

# Set some defaults for graphical systems
export XDG_DATA_DIRS=${XDG_DATA_DIRS:-/usr/share/}
export XDG_CONFIG_DIRS=${XDG_CONFIG_DIRS:-/etc/xdg/}
export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/tmp/xdg-$USER}

# Set up a red prompt for root and a green one for users.
NORMAL="\[\e[0m\]"
RED="\[\e[1;31m\]"
GREEN="\[\e[1;32m\]"
if [[ $EUID == 0 ]] ; then
  PS1="$RED\u [ $NORMAL\w$RED ]# $NORMAL"
else
  PS1="$GREEN\u [ $NORMAL\w$GREEN ]\$ $NORMAL"
fi

for script in /etc/profile.d/*.sh ; do
        if [ -r $script ] ; then
                . $script
        fi
done

unset script RED GREEN NORMAL

# End /etc/profile
EOF

The /etc/profile.d Directory

Now create the /etc/profile.d directory, where the individual initialization scripts are placed:

install --directory --mode=0755 --owner=root --group=root /etc/profile.d

/etc/profile.d/bash_completion.sh

Note

Using the bash completion script below is controversial. Not all users like it. It adds many (usually over 1000) lines to the bash environment and makes it difficult to use the 'set' command to examine simple environment variables. Omitting this script does not interfere with the ability of bash to use the tab key for file name completion.

This script imports bash completion scripts, installed by many other BLFS packages, to allow TAB command line completion.

cat > /etc/profile.d/bash_completion.sh << "EOF"
# Begin /etc/profile.d/bash_completion.sh
# Import bash completion scripts

# If the bash-completion package is installed, use its configuration instead
if [ -f /usr/share/bash-completion/bash_completion ]; then

  # Check for interactive bash and that we haven't already been sourced.
  if [ -n "${BASH_VERSION-}" -a -n "${PS1-}" -a -z "${BASH_COMPLETION_VERSINFO-}" ]; then

    # Check for recent enough version of bash.
    if [ ${BASH_VERSINFO[0]} -gt 4 ] || \
       [ ${BASH_VERSINFO[0]} -eq 4 -a ${BASH_VERSINFO[1]} -ge 1 ]; then
       [ -r "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion" ] && \
            . "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion"
       if shopt -q progcomp && [ -r /usr/share/bash-completion/bash_completion ]; then
          # Source completion code.
          . /usr/share/bash-completion/bash_completion
       fi
    fi
  fi

else

  # bash-completions are not installed, use only bash completion directory
  if shopt -q progcomp; then
    for script in /etc/bash_completion.d/* ; do
      if [ -r $script ] ; then
        . $script
      fi
    done
  fi
fi

# End /etc/profile.d/bash_completion.sh
EOF

Make sure that the directory exists:

install --directory --mode=0755 --owner=root --group=root /etc/bash_completion.d

For a more complete installation, see https://wiki.linuxfromscratch.org/blfs/wiki/bash-shell-startup-files#bash-completions.

/etc/profile.d/dircolors.sh

This script uses the ~/.dircolors and /etc/dircolors files to control the colors of file names in a directory listing. They control colorized output of things like ls --color. The explanation of how to initialize these files is at the end of this section.

cat > /etc/profile.d/dircolors.sh << "EOF"
# Setup for /bin/ls and /bin/grep to support color, the alias is in /etc/bashrc.
if [ -f "/etc/dircolors" ] ; then
        eval $(dircolors -b /etc/dircolors)
fi

if [ -f "$HOME/.dircolors" ] ; then
        eval $(dircolors -b $HOME/.dircolors)
fi

alias ls='ls --color=auto'
alias grep='grep --color=auto'
EOF

/etc/profile.d/extrapaths.sh

This script adds some useful paths to the PATH and can be used to customize other PATH related environment variables (e.g. LD_LIBRARY_PATH, etc) that may be needed for all users.

cat > /etc/profile.d/extrapaths.sh << "EOF"
if [ -d /usr/local/lib/pkgconfig ] ; then
        pathappend /usr/local/lib/pkgconfig PKG_CONFIG_PATH
fi
if [ -d /usr/local/bin ]; then
        pathprepend /usr/local/bin
fi
if [ -d /usr/local/sbin -a $EUID -eq 0 ]; then
        pathprepend /usr/local/sbin
fi

if [ -d /usr/local/share ]; then
        pathprepend /usr/local/share XDG_DATA_DIRS
fi

# Set some defaults before other applications add to these paths.
pathappend /usr/share/man  MANPATH
pathappend /usr/share/info INFOPATH
EOF

/etc/profile.d/readline.sh

This script sets up the default inputrc configuration file. If the user does not have individual settings, it uses the global file.

cat > /etc/profile.d/readline.sh << "EOF"
# Set up the INPUTRC environment variable.
if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ] ; then
        INPUTRC=/etc/inputrc
fi
export INPUTRC
EOF

/etc/profile.d/umask.sh

Setting the umask value is important for security. Here the default group write permissions are turned off for system users and when the user name and group name are not the same.

cat > /etc/profile.d/umask.sh << "EOF"
# By default, the umask should be set.
if [ "$(id -gn)" = "$(id -un)" -a $EUID -gt 99 ] ; then
  umask 002
else
  umask 022
fi
EOF

/etc/profile.d/i18n.sh

This script sets an environment variable necessary for native language support. A full discussion on determining this variable can be found on the LFS Bash Shell Startup Files page.

cat > /etc/profile.d/i18n.sh << "EOF"
# Set up i18n variables
export LANG=<ll>_<CC>.<charmap><@modifiers>
EOF

Other Initialization Values

Other initialization can easily be added to the profile by adding additional scripts to the /etc/profile.d directory.

/etc/bashrc

Here is a base /etc/bashrc. Comments in the file should explain everything you need.

cat > /etc/bashrc << "EOF"
# Begin /etc/bashrc
# Written for Beyond Linux From Scratch
# by James Robertson <[email protected]>
# updated by Bruce Dubbs <[email protected]>

# System wide aliases and functions.

# System wide environment variables and startup programs should go into
# /etc/profile.  Personal environment variables and startup programs
# should go into ~/.bash_profile.  Personal aliases and functions should
# go into ~/.bashrc

# Provides colored /bin/ls and /bin/grep commands.  Used in conjunction
# with code in /etc/profile.

alias ls='ls --color=auto'
alias grep='grep --color=auto'

# Provides prompt for non-login shells, specifically shells started
# in the X environment. [Review the LFS archive thread titled
# PS1 Environment Variable for a great case study behind this script
# addendum.]

NORMAL="\[\e[0m\]"
RED="\[\e[1;31m\]"
GREEN="\[\e[1;32m\]"
if [[ $EUID == 0 ]] ; then
  PS1="$RED\u [ $NORMAL\w$RED ]# $NORMAL"
else
  PS1="$GREEN\u [ $NORMAL\w$GREEN ]\$ $NORMAL"
fi

unset RED GREEN NORMAL

# End /etc/bashrc
EOF

~/.bash_profile

Here is a base ~/.bash_profile. If you want each new user to have this file automatically, just change the output of the command to /etc/skel/.bash_profile and check the permissions after the command is run. You can then copy /etc/skel/.bash_profile to the home directories of already existing users, including root, and set the owner and group appropriately.

cat > ~/.bash_profile << "EOF"
# Begin ~/.bash_profile
# Written for Beyond Linux From Scratch
# by James Robertson <[email protected]>
# updated by Bruce Dubbs <[email protected]>

# Personal environment variables and startup programs.

# Personal aliases and functions should go in ~/.bashrc.  System wide
# environment variables and startup programs are in /etc/profile.
# System wide aliases and functions are in /etc/bashrc.

if [ -f "$HOME/.bashrc" ] ; then
  source $HOME/.bashrc
fi

if [ -d "$HOME/bin" ] ; then
  pathprepend $HOME/bin
fi

# Having . in the PATH is dangerous
#if [ $EUID -gt 99 ]; then
#  pathappend .
#fi

# End ~/.bash_profile
EOF

~/.profile

Here is a base ~/.profile. The comments and instructions for using /etc/skel for .bash_profile above also apply here. Only the target file names are different.

cat > ~/.profile << "EOF"
# Begin ~/.profile
# Personal environment variables and startup programs.

if [ -d "$HOME/bin" ] ; then
  pathprepend $HOME/bin
fi

# Set up user specific i18n variables
#export LANG=<ll>_<CC>.<charmap><@modifiers>

# End ~/.profile
EOF

~/.bashrc

Here is a base ~/.bashrc.

cat > ~/.bashrc << "EOF"
# Begin ~/.bashrc
# Written for Beyond Linux From Scratch
# by James Robertson <[email protected]>

# Personal aliases and functions.

# Personal environment variables and startup programs should go in
# ~/.bash_profile.  System wide environment variables and startup
# programs are in /etc/profile.  System wide aliases and functions are
# in /etc/bashrc.

if [ -f "/etc/bashrc" ] ; then
  source /etc/bashrc
fi

# Set up user specific i18n variables
#export LANG=<ll>_<CC>.<charmap><@modifiers>

# End ~/.bashrc
EOF

~/.bash_logout

This is an empty ~/.bash_logout that can be used as a template. You will notice that the base ~/.bash_logout does not include a clear command. This is because the clear is handled in the /etc/issue file.

cat > ~/.bash_logout << "EOF"
# Begin ~/.bash_logout
# Written for Beyond Linux From Scratch
# by James Robertson <[email protected]>

# Personal items to perform on logout.

# End ~/.bash_logout
EOF

/etc/dircolors

If you want to use the dircolors capability, then run the following command. The /etc/skel setup steps shown above also can be used here to provide a ~/.dircolors file when a new user is set up. As before, just change the output file name on the following command and assure the permissions, owner, and group are correct on the files created and/or copied.

dircolors -p > /etc/dircolors

If you wish to customize the colors used for different file types, you can edit the /etc/dircolors file. The instructions for setting the colors are embedded in the file.

Finally, Ian Macdonald has written an excellent collection of tips and tricks to enhance your shell environment. You can read it online at https://www.caliban.org/bash/index.shtml.

The /etc/vimrc and ~/.vimrc Files

The LFS book installs Vim as its text editor. At this point it should be noted that there are a lot of different editing applications out there including Emacs, nano, Joe and many more. Anyone who has been around the Internet (especially usenet) for a short time will certainly have observed at least one flame war, usually involving Vim and Emacs users!

The LFS book creates a basic vimrc file. In this section you'll find an attempt to enhance this file. At startup, vim reads the global configuration file (/etc/vimrc) as well as a user-specific file (~/.vimrc). Either or both can be tailored to suit the needs of your particular system.

Here is a slightly expanded .vimrc that you can put in ~/.vimrc to provide user specific effects. Of course, if you put it into /etc/skel/.vimrc instead, it will be made available to users you add to the system later. You can also copy the file from /etc/skel/.vimrc to the home directory of users already on the system, such as root. Be sure to set permissions, owner, and group if you do copy anything directly from /etc/skel.

" Begin .vimrc

set columns=80
set wrapmargin=8
set ruler

" End .vimrc

Note that the comment tags are " instead of the more usual # or //. This is correct, the syntax for vimrc is slightly unusual.

Below you'll find a quick explanation of what each of the options in this example file means here:

  • set columns=80: This simply sets the number of columns used on the screen.

  • set wrapmargin=8: This is the number of characters from the right window border where wrapping starts.

  • set ruler: This makes vim show the current row and column at the bottom right of the screen.

More information on the many vim options can be found by reading the help inside vim itself. Do this by typing :help in vim to get the general help, or by typing :help usr_toc.txt to view the User Manual Table of Contents.

Customizing your Logon with /etc/issue

When you first boot up your new LFS system, the logon screen will be nice and plain (as it should be in a bare-bones system). Many people however, will want their system to display some information in the logon message. This can be accomplished using the file /etc/issue.

The /etc/issue file is a plain text file which will also accept certain escape sequences (see below) in order to insert information about the system. There is also the file issue.net which can be used when logging on remotely. ssh however, will only use it if you set the option in the configuration file and will not interpret the escape sequences shown below.

One of the most common things which people want to do is clear the screen at each logon. The easiest way of doing that is to put a "clear" escape sequence into /etc/issue. A simple way of doing this is to issue the command clear > /etc/issue. This will insert the relevant escape code into the start of the /etc/issue file. Note that if you do this, when you edit the file, you should leave the characters (normally '^[[H^[[2J') on the first line alone.

Note

Terminal escape sequences are special codes recognized by the terminal. The ^[ represents an ASCII ESC character. The sequence ESC [ H puts the cursor in the upper left hand corner of the screen and ESC 2 J erases the screen. For more information on terminal escape sequences see http://rtfm.etla.org/xterm/ctlseq.html

The following sequences are recognized by agetty (the program which usually parses /etc/issue). This information is from man agetty where you can find extra information about the logon process.

The issue file can contain certain character sequences to display various information. All issue sequences consist of a backslash (\) immediately followed by one of the letters explained below (so \d in /etc/issue would insert the current date).

b   Insert the baudrate of the current line.
d   Insert the current date.
s   Insert the system name, the name of the operating system.
l   Insert the name of the current tty line.
m   Insert the architecture identifier of the machine, e.g., i686.
n   Insert the nodename of the machine, also known as the hostname.
o   Insert the domainname of the machine.
r   Insert the release number of the kernel, e.g., 2.6.11.12.
t   Insert the current time.
u   Insert the number of current users logged in.
U   Insert the string "1 user" or "<n> users" where <n> is the
    number of current users logged in.
v   Insert the version of the OS, e.g., the build-date etc.

Random Number Generation

The Linux kernel supplies a random number generator which is accessed through /dev/random and /dev/urandom. Programs that utilize the random and urandom devices, such as OpenSSH, will benefit from these instructions.

When a Linux system starts up without much operator interaction, the entropy pool (data used to compute a random number) may be in a fairly predictable state. This creates the real possibility that the number generated at startup may always be the same. In order to counteract this effect, you should carry the entropy pool information across your shut-downs and start-ups.

Install the /etc/rc.d/init.d/random init script included with the blfs-bootscripts-20230101 package.

make install-random

Chapter 4. Security

Security takes many forms in a computing environment. After some initial discussion, this chapter gives examples of three different types of security: access, prevention and detection.

Access for users is usually handled by login or an application designed to handle the login function. In this chapter, we show how to enhance login by setting policies with PAM modules. Access via networks can also be secured by policies set by iptables, commonly referred to as a firewall. The Network Security Services (NSS) and Netscape Portable Runtime (NSPR) libraries can be installed and shared among the many applications requiring them. For applications that don't offer the best security, you can use the Stunnel package to wrap an application daemon inside an SSL tunnel.

Prevention of breaches, like a trojan, are assisted by applications like GnuPG, specifically the ability to confirm signed packages, which recognizes modifications of the tarball after the packager creates it.

Finally, we touch on detection with a package that stores "signatures" of critical files (defined by the administrator) and then regenerates those "signatures" and compares for files that have been changed.

Vulnerabilities

About vulnerabilities

All software has bugs. Sometimes, a bug can be exploited, for example to allow users to gain enhanced privileges (perhaps gaining a root shell, or simply accessing or deleting other user's files), or to allow a remote site to crash an application (denial of service), or for theft of data. These bugs are labelled as vulnerabilities.

The main place where vulnerabilities get logged is cve.mitre.org. Unfortunately, many vulnerability numbers (CVE-yyyy-nnnn) are initially only labelled as "reserved" when distributions start issuing fixes. Also, some vulnerabilities apply to particular combinations of configure options, or only apply to old versions of packages which have long since been updated in BLFS.

BLFS differs from distributions—there is no BLFS security team, and the editors only become aware of vulnerabilities after they are public knowledge. Sometimes, a package with a vulnerability will not be updated in the book for a long time. Issues can be logged in the Trac system, which might speed up resolution.

The normal way for BLFS to fix a vulnerability is, ideally, to update the book to a new fixed release of the package. Sometimes that happens even before the vulnerability is public knowledge, so there is no guarantee that it will be shown as a vulnerability fix in the Changelog. Alternatively, a sed command, or a patch taken from a distribution, may be appropriate.

The bottom line is that you are responsible for your own security, and for assessing the potential impact of any problems.

The editors now issue Security Advisories for packages in BLFS (and LFS), which can be found at BLFS Security Advisories, and grade the severity according to what upstream reports, or to what is shown at nvd.nist.gov if that has details.

To keep track of what is being discovered, you may wish to follow the security announcements of one or more distributions. For example, Debian has Debian security. Fedora's links on security are at the Fedora wiki. Details of Gentoo linux security announcements are discussed at Gentoo security. Finally, the Slackware archives of security announcements are at Slackware security.

The most general English source is perhaps the Full Disclosure Mailing List, but please read the comment on that page. If you use other languages you may prefer other sites such as heise.de (German) or cert.hr (Croatian). These are not linux-specific. There is also a daily update at lwn.net for subscribers (free access to the data after 2 weeks, but their vulnerabilities database at lwn.net/Alerts is unrestricted).

For some packages, subscribing to their 'announce' lists will provide prompt news of newer versions.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/vulnerabilities

make-ca-1.12

Introduction to make-ca

Public Key Infrastructure (PKI) is a method to validate the authenticity of an otherwise unknown entity across untrusted networks. PKI works by establishing a chain of trust, rather than trusting each individual host or entity explicitly. In order for a certificate presented by a remote entity to be trusted, that certificate must present a complete chain of certificates that can be validated using the root certificate of a Certificate Authority (CA) that is trusted by the local machine.

Establishing trust with a CA involves validating things like company address, ownership, contact information, etc., and ensuring that the CA has followed best practices, such as undergoing periodic security audits by independent investigators and maintaining an always available certificate revocation list. This is well outside the scope of BLFS (as it is for most Linux distributions). The certificate store provided here is taken from the Mozilla Foundation, who have established very strict inclusion policies described here.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

make-ca Dependencies

Required

p11-kit-0.24.1 (required at runtime to generate certificate stores from trust anchors)

Optional (runtime)

nss-3.88.1 (to generate a shared NSSDB)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/make-ca

Installation of make-ca

The make-ca script will download and process the certificates included in the certdata.txt file for use as trust anchors for the p11-kit-0.24.1 trust module. Additionally, it will generate system certificate stores used by BLFS applications (if the recommended and optional applications are present on the system). Any local certificates stored in /etc/ssl/local will be imported to both the trust anchors and the generated certificate stores (overriding Mozilla's trust). Additionally, any modified trust values will be copied from the trust anchors to /etc/ssl/local prior to any updates, preserving custom trust values that differ from Mozilla when using the trust utility from p11-kit to operate on the trust store.

To install the various certificate stores, first install the make-ca script into the correct location. As the root user:

make install &&
install -vdm755 /etc/ssl/local

As the root user, after installing p11-kit-0.24.1, download the certificate source and prepare for system use with the following command:

Note

If running the script a second time with the same version of certdata.txt, for instance, to update the stores when make-ca is upgraded, or to add additional stores as the requisite software is installed, replace the -g switch with the -r switch in the command line. If packaging, run make-ca --help to see all available command line options.

/usr/sbin/make-ca -g

You should periodically update the store with the above command, either manually, or via a cron job. If you've installed Fcron-3.2.1 and completed the section on periodic jobs, execute the following commands, as the root user, to create a weekly cron job:

cat > /etc/cron.weekly/update-pki.sh << "EOF" &&
#!/bin/bash
/usr/sbin/make-ca -g
EOF
chmod 754 /etc/cron.weekly/update-pki.sh

Configuring make-ca

For most users, no additional configuration is necessary, however, the default certdata.txt file provided by make-ca is obtained from the mozilla-release branch, and is modified to provide a Mercurial revision. This will be the correct version for most systems. There are several other variants of the file available for use that might be preferred for one reason or another, including the files shipped with Mozilla products in this book. RedHat and OpenSUSE, for instance, use the version included in nss-3.88.1. Additional upstream downloads are available at the links included in /etc/make-ca/make-ca.conf.dist. Simply copy the file to /etc/make-ca.conf and edit as appropriate.

About Trust Arguments

There are three trust types that are recognized by the make-ca script, SSL/TLS, S/Mime, and code signing. For OpenSSL, these are serverAuth, emailProtection, and codeSigning respectively. If one of the three trust arguments is omitted, the certificate is neither trusted, nor rejected for that role. Clients that use OpenSSL or NSS encountering this certificate will present a warning to the user. Clients using GnuTLS without p11-kit support are not aware of trusted certificates. To include this CA into the ca-bundle.crt, email-ca-bundle.crt, or objsign-ca-bundle.crt files (the GnuTLS legacy bundles), it must have the appropriate trust arguments.

Adding Additional CA Certificates

The /etc/ssl/local directory is available to add additional CA certificates to the system trust store. This directory is also used to store certificates that were added to or modified in the system trust store by p11-kit-0.24.1 so that trust values are maintained across upgrades. Files in this directory must be in the OpenSSL trusted certificate format. Certificates imported using the trust utility from p11-kit-0.24.1 will utilize the x509 Extended Key Usage values to assign default trust values for the system anchors.

If you need to override trust values, or otherwise need to create an OpenSSL trusted certificate manually from a regular PEM encoded file, you need to add trust arguments to the openssl command, and create a new certificate. For example, using the CAcert roots, if you want to trust both for all three roles, the following commands will create appropriate OpenSSL trusted certificates (run as the root user after Wget-1.21.3 is installed):

wget http://www.cacert.org/certs/root.crt &&
wget http://www.cacert.org/certs/class3.crt &&
openssl x509 -in root.crt -text -fingerprint -setalias "CAcert Class 1 root" \
        -addtrust serverAuth -addtrust emailProtection -addtrust codeSigning \
        > /etc/ssl/local/CAcert_Class_1_root.pem &&
openssl x509 -in class3.crt -text -fingerprint -setalias "CAcert Class 3 root" \
        -addtrust serverAuth -addtrust emailProtection -addtrust codeSigning \
        > /etc/ssl/local/CAcert_Class_3_root.pem &&
/usr/sbin/make-ca -r

Overriding Mozilla Trust

Occasionally, there may be instances where you don't agree with Mozilla's inclusion of a particular certificate authority. If you'd like to override the default trust of a particular CA, simply create a copy of the existing certificate in /etc/ssl/local with different trust arguments. For example, if you'd like to distrust the "Makebelieve_CA_Root" file, run the following commands:

openssl x509 -in /etc/ssl/certs/Makebelieve_CA_Root.pem \
             -text \
             -fingerprint \
             -setalias "Disabled Makebelieve CA Root" \
             -addreject serverAuth \
             -addreject emailProtection \
             -addreject codeSigning \
       > /etc/ssl/local/Disabled_Makebelieve_CA_Root.pem &&
/usr/sbin/make-ca -r

Using make-ca with Python3

When Python3 was installed in LFS it included the pip3 module with vendored certificates from the Certifi module. That was necessary, but it means that whenever pip3 is used it can reference those certificates, primarily when creating a virtual environment or when installing a module with all its wheel dependencies in one go.

It is generally considered that the System Administrator should be in charge of which certificates are available. Now that make-ca-1.12 and p11-kit-0.24.1 have been installed and make-ca has been configured, it is possible to make pip3 use the system certificates.

The vendored certificates installed in LFS are a snapshot from when the pulled-in version of Certifi was created. If you regularly update the system certificates, the vendored version will become out of date.

To use the system certificates in Python3 you should set _PIP_STANDALONE_CERT to point to them, e.g for the bash shell:

export _PIP_STANDALONE_CERT=/etc/pki/tls/certs/ca-bundle.crt

Warning

If you have created virtual environments, for example when testing modules, and those include the Requests and Certifi modules in ~/.local/lib/python3.11/ then those local modules will be used instead of the system certificates unless you remove the local modules.

To use the system certificates in Python3 with the BLFS profiles add the following variable to your system or personal profiles:

mkdir -pv /etc/profile.d &&
cat > /etc/profile.d/pythoncerts.sh << "EOF"
# Begin /etc/profile.d/pythoncerts.sh

export _PIP_STANDALONE_CERT=/etc/pki/tls/certs/ca-bundle.crt

# End /etc/profile.d/pythoncerts.sh
EOF

Contents

Installed Programs: make-ca
Installed Directories: /etc/ssl/{certs,local} and /etc/pki/{nssdb,anchors,tls/{certs,java}}

Short Descriptions

make-ca

is a shell script that adapts a current version of certdata.txt, and prepares it for use as the system trust store

CrackLib-2.9.8

Introduction to CrackLib

The CrackLib package contains a library used to enforce strong passwords by comparing user selected passwords to words in chosen word lists.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

There are additional word lists available for download, e.g., from https://wiki.skullsecurity.org/index.php/Passwords. CrackLib can utilize as many, or as few word lists you choose to install.

Important

Users tend to base their passwords on regular words of the spoken language, and crackers know that. CrackLib is intended to filter out such bad passwords at the source using a dictionary created from word lists. To accomplish this, the word list(s) for use with CrackLib must be an exhaustive list of words and word-based keystroke combinations likely to be chosen by users of the system as (guessable) passwords.

The default word list recommended above for downloading mostly satisfies this role in English-speaking countries. In other situations, it may be necessary to download (or even create) additional word lists.

Note that word lists suitable for spell-checking are not usable as CrackLib word lists in countries with non-Latin based alphabets, because of word-based keystroke combinations that make bad passwords.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/cracklib

Installation of CrackLib

Install CrackLib by running the following commands:

autoreconf -fiv &&

PYTHON=python3               \
./configure --prefix=/usr    \
            --disable-static \
            --with-default-dict=/usr/lib/cracklib/pw_dict &&
make

Now, as the root user:

make install

Issue the following commands as the root user to install the recommended word list and create the CrackLib dictionary. Other word lists (text based, one word per line) can also be used by simply installing them into /usr/share/dict and adding them to the create-cracklib-dict command.

install -v -m644 -D    ../cracklib-words-2.9.8.bz2 \
                         /usr/share/dict/cracklib-words.bz2    &&

bunzip2 -v               /usr/share/dict/cracklib-words.bz2    &&
ln -v -sf cracklib-words /usr/share/dict/words                 &&
echo $(hostname) >>      /usr/share/dict/cracklib-extra-words  &&
install -v -m755 -d      /usr/lib/cracklib                     &&

create-cracklib-dict     /usr/share/dict/cracklib-words \
                         /usr/share/dict/cracklib-extra-words

If desired, check the proper operation of the library as an unprivileged user by issuing the following command:

make test

Important

If you are installing CrackLib after your LFS system has been completed and you have the Shadow package installed, you must reinstall Shadow-4.13 if you wish to provide strong password support on your system. If you are now going to install the Linux-PAM-1.5.2 package, you may disregard this note as Shadow will be reinstalled after the Linux-PAM installation.

Command Explanations

sed -i '/skipping/d' util/packer.c: Remove a meaningless warning.

autoreconf -fiv: The configure script shipped with the package is too old to get the right version string of Python 3.10 or later. This command regenerates it with a more recent version of autotools, which fixes the issue.

PYTHON=python3: This forces the installation of python bindings for Python 3, even if Python 2 is installed.

--with-default-dict=/lib/cracklib/pw_dict: This parameter forces the installation of the CrackLib dictionary to the /lib hierarchy.

--disable-static: This switch prevents installation of static versions of the libraries.

install -v -m644 -D ...: This command creates the /usr/share/dict directory (if it doesn't already exist) and installs the compressed word list there.

ln -v -s cracklib-words /usr/share/dict/words: The word list is linked to /usr/share/dict/words as historically, words is the primary word list in the /usr/share/dict directory. Omit this command if you already have a /usr/share/dict/words file installed on your system.

echo $(hostname) >>...: The value of hostname is echoed to a file called cracklib-extra-words. This extra file is intended to be a site specific list which includes easy to guess passwords such as company or department names, user names, product names, computer names, domain names, etc.

create-cracklib-dict ...: This command creates the CrackLib dictionary from the word lists. Modify the command to add any additional word lists you have installed.

Contents

Installed Programs: cracklib-check, cracklib-format, cracklib-packer, cracklib-unpacker and create-cracklib-dict
Installed Libraries: libcrack.so and the _cracklib.so (Python module)
Installed Directories: /lib/cracklib, /usr/share/dict and /usr/share/cracklib

Short Descriptions

cracklib-check

is used to determine if a password is strong

cracklib-format

is used to format text files (lowercases all words, removes control characters and sorts the lists)

cracklib-packer

creates a database with words read from standard input

cracklib-unpacker

displays on standard output the database specified

create-cracklib-dict

is used to create the CrackLib dictionary from the given word list(s)

libcrack.so

provides a fast dictionary lookup method for strong password enforcement

cryptsetup-2.4.3

Introduction to cryptsetup

cryptsetup is used to set up transparent encryption of block devices using the kernel crypto API.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

cryptsetup Dependencies

Required

JSON-C-0.16, LVM2-2.03.18, and popt-1.19

Optional

libpwquality-1.4.5, argon2, libssh, and passwdqc

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/cryptsetup

Kernel Configuration

Encrypted block devices require kernel support. To use it, the appropriate kernel configuration parameters need to be set:

Device Drivers  --->
  [*] Multiple devices driver support (RAID and LVM) ---> [CONFIG_MD]
       <*/M> Device mapper support                        [CONFIG_BLK_DEV_DM]
       <*/M> Crypt target support                         [CONFIG_DM_CRYPT]

Cryptographic API  --->
  <*/M> XTS support                                       [CONFIG_CRYPTO_XTS]
  <*/M> SHA224 and SHA256 digest algorithm                [CONFIG_CRYPTO_SHA256]
  <*/M> AES cipher algorithms                             [CONFIG_CRYPTO_AES]
  <*/M> User-space interface for symmetric key cipher algorithms
                                                          [CONFIG_CRYPTO_USER_API_SKCIPHER]
  For tests:
  <*/M> Twofish cipher algorithm                          [CONFIG_CRYPTO_TWOFISH]

Installation of cryptsetup

Install cryptsetup by running the following commands:

./configure --prefix=/usr --disable-ssh-token &&
make

To test the result, issue as the root user: make check. Some tests will fail if appropriate kernel configuration options are not set. Some additional options that may be needed for tests are: CONFIG_SCSI_LOWLEVEL, CONFIG_SCSI_DEBUG, CONFIG_BLK_DEV_DM_BUILTIN, CONFIG_CRYPTO_USER, CONFIG_CRYPTO_CRYPTD, CONFIG_CRYPTO_LRW, CONFIG_CRYPTO_XTS, CONFIG_CRYPTO_ESSIV, CONFIG_CRYPTO_CRCT10DIF, CONFIG_CRYPTO_AES_TI, CONFIG_CRYPTO_AES_NI_INTEL, CONFIG_CRYPTO_BLOWFISH, CONFIG_CRYPTO_CAST5, CONFIG_CRYPTO_SERPENT, CONFIG_CRYPTO_SERPENT_SSE2_X86_64, CONFIG_CRYPTO_SERPENT_AVX_X86_64, CONFIG_CRYPTO_SERPENT_AVX2_X86_64, and CONFIG_CRYPTO_TWOFISH_X86_64.

Now, as the root user:

make install

Command Explanations

--disable-ssh-token: This option is required if the optional libssh dependency is not installed.

Configuring cryptsetup

Because of the number of possible configurations, setup of encrypted volumes is beyond the scope of the BLFS book. Please see the configuration guide in the cryptsetup FAQ.

Contents

Installed Programs: cryptsetup, cryptsetup-reencrypt, integritysetup, and veritysetup
Installed Libraries: libcryptsetup.so
Installed Directories: None

Short Descriptions

cryptsetup

is used to setup dm-crypt managed device-mapper mappings

cryptsetup-reencrypt

is a tool for offline LUKS device re-encryption

integritysetup

is a tool to manage dm-integrity (block level integrity) volumes

veritysetup

is used to configure dm-verity managed device-mapper mappings. Device-mapper verity target provides read-only transparent integrity checking of block devices using kernel crypto API

Cyrus SASL-2.1.28

Introduction to Cyrus SASL

The Cyrus SASL package contains a Simple Authentication and Security Layer implementation, a method for adding authentication support to connection-based protocols. To use SASL, a protocol includes a command for identifying and authenticating a user to a server and for optionally negotiating protection of subsequent protocol interactions. If its use is negotiated, a security layer is inserted between the protocol and the connection.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Cyrus SASL Dependencies

Recommended
Optional

Linux-PAM-1.5.2, MIT Kerberos V5-1.20.1, MariaDB-10.6.12 or MySQL, OpenLDAP-2.6.4, PostgreSQL-15.2, sphinx-6.1.3, SQLite-3.40.1, krb4, Dmalloc, and Pod::POM::View::Restructured

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/cyrus-sasl

Installation of Cyrus SASL

Note

This package does not support parallel build.

Install Cyrus SASL by running the following commands:

./configure --prefix=/usr        \
            --sysconfdir=/etc    \
            --enable-auth-sasldb \
            --with-dbpath=/var/lib/sasl/sasldb2 \
            --with-sphinx-build=no              \
            --with-saslauthd=/var/run/saslauthd &&
make -j1

This package does not come with a test suite. If you are planning on using the GSSAPI authentication mechanism, test it after installing the package using the sample server and client programs which were built in the preceding step. Instructions for performing the tests can be found at https://www.linuxfromscratch.org/hints/downloads/files/cyrus-sasl.txt.

Now, as the root user:

make install &&
install -v -dm755                          /usr/share/doc/cyrus-sasl-2.1.28/html &&
install -v -m644  saslauthd/LDAP_SASLAUTHD /usr/share/doc/cyrus-sasl-2.1.28      &&
install -v -m644  doc/legacy/*.html        /usr/share/doc/cyrus-sasl-2.1.28/html &&
install -v -dm700 /var/lib/sasl

Command Explanations

--with-dbpath=/var/lib/sasl/sasldb2: This switch forces the sasldb database to be created in /var/lib/sasl instead of /etc.

--with-saslauthd=/var/run/saslauthd: This switch forces saslauthd to use the FHS compliant directory /var/run/saslauthd for variable run-time data.

--enable-auth-sasldb: This switch enables SASLDB authentication backend.

--with-dblib=gdbm: This switch forces GDBM to be used instead of Berkeley DB.

--with-ldap: This switch enables the OpenLDAP support.

--enable-ldapdb: This switch enables the LDAPDB authentication backend.

--enable-login: This option enables unsupported LOGIN authentication.

--enable-ntlm: This option enables unsupported NTLM authentication.

install -v -m644 ...: These commands install documentation which is not installed by the make install command.

install -v -m700 -d /var/lib/sasl: This directory must exist when starting saslauthd or using the sasldb plugin. If you're not going to be running the daemon or using the plugins, you may omit the creation of this directory.

Configuring Cyrus SASL

Config Files

/etc/saslauthd.conf (for saslauthd LDAP configuration) and /etc/sasl2/Appname.conf (where "Appname" is the application defined name of the application)

Configuration Information

See https://www.cyrusimap.org/sasl/sasl/sysadmin.html for information on what to include in the application configuration files.

See file:///usr/share/doc/cyrus-sasl-2.1.28/LDAP_SASLAUTHD for configuring saslauthd with OpenLDAP.

See https://www.cyrusimap.org/sasl/sasl/gssapi.html#gssapi for configuring saslauthd with Kerberos.

Init Script

If you need to run the saslauthd daemon at system startup, install the /etc/rc.d/init.d/saslauthd init script included in the blfs-bootscripts-20230101 package using the following command:

make install-saslauthd

Note

You'll need to modify /etc/sysconfig/saslauthd and modify the AUTHMECH parameter with your desired authentication mechanism.

Contents

Installed Programs: pluginviewer, saslauthd, sasldblistusers2, saslpasswd2 and testsaslauthd
Installed Library: libsasl2.so
Installed Directories: /usr/include/sasl, /usr/lib/sasl2, /usr/share/doc/cyrus-sasl-2.1.28 and /var/lib/sasl

Short Descriptions

pluginviewer

is used to list loadable SASL plugins and their properties

saslauthd

is the SASL authentication server

sasldblistusers2

is used to list the users in the SASL password database sasldb2

saslpasswd2

is used to set and delete a user's SASL password and mechanism specific secrets in the SASL password database sasldb2

testsaslauthd

is a test utility for the SASL authentication server

libsasl2.so

is a general purpose authentication library for server and client applications

GnuPG-2.4.0

Introduction to GnuPG

The GnuPG package is GNU's tool for secure communication and data storage. It can be used to encrypt data and to create digital signatures. It includes an advanced key management facility and is compliant with the proposed OpenPGP Internet standard as described in RFC2440 and the S/MIME standard as described by several RFCs. GnuPG 2 is the stable version of GnuPG integrating support for OpenPGP and S/MIME.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

GnuPG 2 Dependencies

Required

libassuan-2.5.5, libgcrypt-1.10.1, libksba-1.6.3, and npth-1.6

Recommended
Optional

cURL-7.88.1, Fuse-3.13.1, ImageMagick-7.1.0-61 (for the convert utility, used for generating the documentation), libusb-1.0.26, an MTA, OpenLDAP-2.6.4, SQLite-3.40.1, texlive-20220321 (or install-tl-unx), fig2dev (for generating documentation), and GNU adns

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/gnupg2

Installation of GnuPG

Install GnuPG by running the following commands:

mkdir build &&
cd    build &&

../configure --prefix=/usr           \
             --localstatedir=/var    \
             --sysconfdir=/etc       \
             --docdir=/usr/share/doc/gnupg-2.4.0 &&
make &&

makeinfo --html --no-split -I doc -o doc/gnupg_nochunks.html ../doc/gnupg.texi &&
makeinfo --plaintext       -I doc -o doc/gnupg.txt           ../doc/gnupg.texi &&
make -C doc html

If you have texlive-20220321 installed and you wish to create documentation in alternate formats, issue the following commands (fig2dev is needed for the ps format):

make -C doc pdf ps

To test the results, issue: make check.

Now, as the root user:

make install &&

install -v -m755 -d /usr/share/doc/gnupg-2.4.0/html            &&
install -v -m644    doc/gnupg_nochunks.html \
                    /usr/share/doc/gnupg-2.4.0/html/gnupg.html &&
install -v -m644    ../doc/*.texi doc/gnupg.txt \
                    /usr/share/doc/gnupg-2.4.0 &&
install -v -m644    doc/gnupg.html/* \
                    /usr/share/doc/gnupg-2.4.0/html

If you created alternate formats of the documentation, install them using the following command as the root user:

install -v -m644 doc/gnupg.{pdf,dvi,ps} \
                 /usr/share/doc/gnupg-2.4.0

Command Explanations

mkdir build && cd build: the Gnupg2 developers recommend to build the package in a dedicated directory.

--docdir=/usr/share/doc/gnupg-2.4.0: This switch changes the default docdir to /usr/share/doc/gnupg-2.4.0.

--enable-all-tests: This switch allows more tests to be run with make check.

--enable-g13: This switch enables building the g13 program.

Contents

Installed Programs: addgnupghome, applygnupgdefaults, dirmngr, dirmngr-client, g13 (optional), gpg-agent, gpg-card, gpg-connect-agent, gpg, gpgconf, gpgparsemail, gpgscm, gpgsm, gpgsplit, gpgtar, gpgv, gpg-wks-client, gpg-wks-server, kbxutil, and watchgnupg
Installed Libraries: None
Installed Directories: /usr/share/doc/gnupg-2.4.0 and /usr/share/gnupg

Short Descriptions

addgnupghome

is used to create and populate a user's ~/.gnupg directories

applygnupgdefaults

is a wrapper script used to run gpgconf with the --apply-defaults parameter on all user's GnuPG home directories

dirmngr

is a tool that takes care of accessing the OpenPGP keyservers

dirmngr-client

is a tool to contact a running dirmngr and test whether a certificate has been revoked

g13

is a tool to create, mount or unmount an encrypted file system container (optional)

gpg-agent

is a daemon used to manage secret (private) keys independently from any protocol. It is used as a backend for gpg and gpgsm as well as for a couple of other utilities

gpg-card

is a tool to manage smart cards and tokens

gpg-connect-agent

is a utility used to communicate with a running gpg-agent

gpg

is the OpenPGP part of the GNU Privacy Guard (GnuPG). It is a tool used to provide digital encryption and signing services using the OpenPGP standard

gpgconf

is a utility used to automatically and reasonably safely query and modify configuration files in the ~/.gnupg home directory. It is designed not to be invoked manually by the user, but automatically by graphical user interfaces

gpgparsemail

is a utility currently only useful for debugging. Run it with --help for usage information

gpgscm

executes the given scheme program or spawns an interactive shell

gpgsm

is a tool similar to gpg used to provide digital encryption and signing services on X.509 certificates and the CMS protocol. It is mainly used as a backend for S/MIME mail processing

gpgsplit

splits an OpenPGP message into packets

gpgtar

is a tool to encrypt or sign files into an archive

gpgv

is a verify only version of gpg

gpg-wks-client

is a client for the Web Key Service protocol

gpg-wks-server

provides a server for the Web Key Service protocol

kbxutil

is used to list, export and import Keybox data

watchgnupg

is used to listen to a Unix Domain socket created by any of the GnuPG tools

GnuTLS-3.8.0

Introduction to GnuTLS

The GnuTLS package contains libraries and userspace tools which provide a secure layer over a reliable transport layer. Currently the GnuTLS library implements the proposed standards by the IETF's TLS working group. Quoting from the TLS 1.3 protocol specification :

TLS allows client/server applications to communicate over the Internet in a way that is designed to prevent eavesdropping, tampering, and message forgery.

GnuTLS provides support for TLS 1.3, TLS 1.2, TLS 1.1, TLS 1.0, and (optionally) SSL 3.0 protocols. It also supports TLS extensions, including server name and max record size. Additionally, the library supports authentication using the SRP protocol, X.509 certificates, and OpenPGP keys, along with support for the TLS Pre-Shared-Keys (PSK) extension, the Inner Application (TLS/IA) extension, and X.509 and OpenPGP certificate handling.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

GnuTLS Dependencies

Required

Nettle-3.8.1

Recommended
Optional

Brotli-1.0.9, Doxygen-1.9.6, GTK-Doc-1.33.2, libidn-1.41 or libidn2-2.3.4, libseccomp-2.5.4, Net-tools-2.10 (used during the test suite), texlive-20220321 or install-tl-unx, Unbound-1.17.1 (to build the DANE library), Valgrind-3.20.0 (used during the test suite), autogen, cmocka and datefudge (used during the test suite if the DANE library is built), and Trousers (Trusted Platform Module support)

Note

Note that if you do not install libtasn1-4.19.0, a version shipped in the GnuTLS tarball will be used instead.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/gnutls

Installation of GnuTLS

Install GnuTLS by running the following commands:

./configure --prefix=/usr \
            --docdir=/usr/share/doc/gnutls-3.8.0 \
            --with-default-trust-store-pkcs11="pkcs11:" &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--with-default-trust-store-pkcs11="pkcs11:": This switch tells gnutls to use the PKCS #11 trust store as the default trust. Omit this switch if p11-kit-0.24.1 is not installed.

--with-default-trust-store-file=/etc/pki/tls/certs/ca-bundle.crt: This switch tells configure where to find the legacy CA certificate bundle and to use it instead of PKCS #11 module by default. Use this if p11-kit-0.24.1 is not installed.

--enable-gtk-doc: Use this parameter if GTK-Doc is installed and you wish to rebuild and install the API documentation.

--enable-openssl-compatibility: Use this switch if you wish to build the OpenSSL compatibility library.

--without-p11-kit: use this switch if you have not installed p11-kit.

--with-included-unistring: uses the bundled version of libunistring, instead of the system one. Use this switch if you have not installed libunistring-1.1.

Contents

Installed Programs: certtool, danetool, gnutls-cli, gnutls-cli-debug, gnutls-serv, ocsptool, p11tool, psktool, and srptool
Installed Libraries: libgnutls.so, libgnutls-dane.so, libgnutlsxx.so, libgnutls-openssl.so (optional), and /usr/lib/guile/3.0/extensions/guile-gnutls-v-2.so
Installed Directories: /usr/include/gnutls, /usr/lib/guile/3.0/site-ccache/gnutls, /usr/share/guile/site/3.0/gnutls, and /usr/share/doc/gnutls-3.8.0

Short Descriptions

certtool

is used to generate X.509 certificates, certificate requests, and private keys

danetool

is a tool used to generate and check DNS resource records for the DANE protocol

gnutls-cli

is a simple client program to set up a TLS connection to some other computer

gnutls-cli-debug

is a simple client program to set up a TLS connection to some other computer and produces very verbose progress results

gnutls-serv

is a simple server program that listens to incoming TLS connections

ocsptool

is a program that can parse and print information about OCSP requests/responses, generate requests and verify responses

p11tool

is a program that allows handling data from PKCS #11 smart cards and security modules

psktool

is a simple program that generates random keys for use with TLS-PSK

srptool

is a simple program that emulates the programs in the Stanford SRP (Secure Remote Password) libraries using GnuTLS

libgnutls.so

contains the core API functions and X.509 certificate API functions

GPGME-1.18.0

Introduction to GPGME

The GPGME package is a C library that allows cryptography support to be added to a program. It is designed to make access to public key crypto engines like GnuPG or GpgSM easier for applications. GPGME provides a high-level crypto API for encryption, decryption, signing, signature verification and key management.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

GPGME Dependencies

Required

libassuan-2.5.5

Optional

Doxygen-1.9.6 and Graphviz-7.1.0 (for API documentation), GnuPG-2.4.0 (required if Qt or SWIG are installed; used during the test suite), Clisp-2.49, Qt-5.15.8, and/or SWIG-4.1.1 (for language bindings)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/gpgme

Installation of GPGME

First, fix an issue building with Python 3.11 installed:

sed -e 's/3\.9/3.11/'                    \
    -e 's/:3/:4/'                        \
    -i configure

Apply a patch to fix build failure with SWIG and libgpg-error-1.46 or later:

patch -Np1 -i ../gpgme-1.18.0-gpg_error_1_46-1.patch

Install GPGME by running the following commands:

./configure --prefix=/usr --disable-gpg-test &&
make

To test the results, you should have GnuPG-2.4.0 installed and remove the --disable-gpg-test above. Issue: make -k check.

Now, as the root user:

make install

Command Explanations

--disable-gpg-test: if this parameter is not passed to configure, the test programs are built during make stage, which requires GnuPG-2.4.0. This parameter is not needed if GnuPG-2.4.0 is installed.

Contents

Installed Program: gpgme-json, and gpgme-tool
Installed Libraries: libgpgme, libgpgmepp.so, and libqgpgme.so
Installed Directory: /usr/include/{gpgme++,qgpgme,QGpgME}, /usr/lib/cmake/{Gpgmepp,QGpgme}. /usr/lib/python{2.7,3.9}/site-packages/gpg, and /usr/share/common-lisp/source/gpgme

Short Descriptions

gpgme-json

outputs GPGME commands in JSON format

gpgme-tool

is an assuan server exposing GPGME operations, such as printing fingerprints and keyids with keyservers

libgpgme.so

contains the GPGME API functions

libgpgmepp.so

contains the C++ GPGME API functions

libqgpgme.so

contains API functions for handling GPG operations in Qt applications

iptables-1.8.9

Introduction to iptables

iptables is a userspace command line program used to configure the Linux 2.4 and later kernel packet filtering ruleset.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

iptables Dependencies

Optional

libpcap-1.10.3 (required for nfsypproxy support), bpf-utils (required for Berkeley Packet Filter support), libnfnetlink (required for connlabel support), libnetfilter_conntrack (required for connlabel support), and nftables

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/iptables

Kernel Configuration

A firewall in Linux is accomplished through the netfilter interface. To use iptables to configure netfilter, the following kernel configuration parameters are required:

[*] Networking support  --->                                          [CONFIG_NET]
      Networking Options  --->
        [*] Network packet filtering framework (Netfilter) --->       [CONFIG_NETFILTER]
          [*] Advanced netfilter configuration                        [CONFIG_NETFILTER_ADVANCED]
          Core Netfilter Configuration --->
            <*/M> Netfilter connection tracking support               [CONFIG_NF_CONNTRACK]
            <*/M> Netfilter Xtables support (required for ip_tables)  [CONFIG_NETFILTER_XTABLES]
            <*/M> LOG target support                                  [CONFIG_NETFILTER_XT_TARGET_LOG]
          IP: Netfilter Configuration --->
            <*/M> IP tables support (required for filtering/masq/NAT) [CONFIG_IP_NF_IPTABLES]

Include any connection tracking protocols that will be used, as well as any protocols that you wish to use for match support under the "Core Netfilter Configuration" section. The above options are enough for running Creating a Personal Firewall With iptables below.

Installation of iptables

Note

The installation below does not include building some specialized extension libraries which require the raw headers in the Linux source code. If you wish to build the additional extensions (if you aren't sure, then you probably don't), you can look at the INSTALL file to see an example of how to change the KERNEL_DIR= parameter to point at the Linux source code. Note that if you upgrade the kernel version, you may also need to recompile iptables and that the BLFS team has not tested using the raw kernel headers.

Install iptables by running the following commands:

./configure --prefix=/usr      \
            --disable-nftables \
            --enable-libipq    &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Command Explanations

--disable-nftables: This switch disables building nftables compatibility.

--enable-libipq: This switch enables building of libipq.so which can be used by some packages outside of BLFS.

--enable-nfsynproxy: This switch enables installation of nfsynproxy SYNPROXY configuration tool.

Configuring iptables

Note

In the following example configurations, LAN1 is used for the internal LAN interface, and WAN1 is used for the external interface connected to the Internet. You will need to replace these values with appropriate interface names for your system.

Personal Firewall

A Personal Firewall is designed to let you access all the services offered on the Internet while keeping your computer secure and your data private.

Below is a slightly modified version of Rusty Russell's recommendation from the Linux 2.4 Packet Filtering HOWTO. It is still applicable to the Linux 5.x kernels.

cat > /etc/rc.d/rc.iptables << "EOF"
#!/bin/sh

# Begin rc.iptables

# Insert connection-tracking modules
# (not needed if built into the kernel)
modprobe nf_conntrack
modprobe xt_LOG

# Enable broadcast echo Protection
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts

# Disable Source Routed Packets
echo 0 > /proc/sys/net/ipv4/conf/all/accept_source_route
echo 0 > /proc/sys/net/ipv4/conf/default/accept_source_route

# Enable TCP SYN Cookie Protection
echo 1 > /proc/sys/net/ipv4/tcp_syncookies

# Disable ICMP Redirect Acceptance
echo 0 > /proc/sys/net/ipv4/conf/default/accept_redirects

# Do not send Redirect Messages
echo 0 > /proc/sys/net/ipv4/conf/all/send_redirects
echo 0 > /proc/sys/net/ipv4/conf/default/send_redirects

# Drop Spoofed Packets coming in on an interface, where responses
# would result in the reply going out a different interface.
echo 1 > /proc/sys/net/ipv4/conf/all/rp_filter
echo 1 > /proc/sys/net/ipv4/conf/default/rp_filter

# Log packets with impossible addresses.
echo 1 > /proc/sys/net/ipv4/conf/all/log_martians
echo 1 > /proc/sys/net/ipv4/conf/default/log_martians

# be verbose on dynamic ip-addresses  (not needed in case of static IP)
echo 2 > /proc/sys/net/ipv4/ip_dynaddr

# disable Explicit Congestion Notification
# too many routers are still ignorant
echo 0 > /proc/sys/net/ipv4/tcp_ecn

# Set a known state
iptables -P INPUT   DROP
iptables -P FORWARD DROP
iptables -P OUTPUT  DROP

# These lines are here in case rules are already in place and the
# script is ever rerun on the fly. We want to remove all rules and
# pre-existing user defined chains before we implement new rules.
iptables -F
iptables -X
iptables -Z

iptables -t nat -F

# Allow local-only connections
iptables -A INPUT  -i lo -j ACCEPT

# Free output on any interface to any ip for any service
# (equal to -P ACCEPT)
iptables -A OUTPUT -j ACCEPT

# Permit answers on already established connections
# and permit new connections related to established ones
# (e.g. port mode ftp)
iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT

# Log everything else.
iptables -A INPUT -j LOG --log-prefix "FIREWALL:INPUT "

# End $rc_base/rc.iptables
EOF
chmod 700 /etc/rc.d/rc.iptables

This script is quite simple, it drops all traffic coming into your computer that wasn't initiated from your computer, but as long as you are simply surfing the Internet you are unlikely to exceed its limits.

If you frequently encounter certain delays at accessing FTP servers, take a look at BusyBox with iptables example number 4.

Even if you have daemons or services running on your system, these will be inaccessible everywhere but from your computer itself. If you want to allow access to services on your machine, such as ssh or ping, take a look at Creating a BusyBox With iptables.

Masquerading Router

A Network Firewall has two interfaces, one connected to an intranet, in this example LAN1, and one connected to the Internet, here WAN1. To provide the maximum security for the firewall itself, make sure that there are no unnecessary servers running on it such as X11. As a general principle, the firewall itself should not access any untrusted service (think of a remote server giving answers that makes a daemon on your system crash, or even worse, that implements a worm via a buffer-overflow).

cat > /etc/rc.d/rc.iptables << "EOF"
#!/bin/sh

# Begin rc.iptables

echo
echo "You're using the example configuration for a setup of a firewall"
echo "from Beyond Linux From Scratch."
echo "This example is far from being complete, it is only meant"
echo "to be a reference."
echo "Firewall security is a complex issue, that exceeds the scope"
echo "of the configuration rules below."
echo "You can find additional information"
echo "about firewalls in Chapter 4 of the BLFS book."
echo "https://www.linuxfromscratch.org/blfs"
echo

# Insert iptables modules (not needed if built into the kernel).

modprobe nf_conntrack
modprobe nf_conntrack_ftp
modprobe xt_conntrack
modprobe xt_LOG
modprobe xt_state

# Enable broadcast echo Protection
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts

# Disable Source Routed Packets
echo 0 > /proc/sys/net/ipv4/conf/all/accept_source_route

# Enable TCP SYN Cookie Protection
echo 1 > /proc/sys/net/ipv4/tcp_syncookies

# Disable ICMP Redirect Acceptance
echo 0 > /proc/sys/net/ipv4/conf/all/accept_redirects

# Don't send Redirect Messages
echo 0 > /proc/sys/net/ipv4/conf/default/send_redirects

# Drop Spoofed Packets coming in on an interface where responses
# would result in the reply going out a different interface.
echo 1 > /proc/sys/net/ipv4/conf/default/rp_filter

# Log packets with impossible addresses.
echo 1 > /proc/sys/net/ipv4/conf/all/log_martians

# Be verbose on dynamic ip-addresses  (not needed in case of static IP)
echo 2 > /proc/sys/net/ipv4/ip_dynaddr

# Disable Explicit Congestion Notification
# Too many routers are still ignorant
echo 0 > /proc/sys/net/ipv4/tcp_ecn

# Set a known state
iptables -P INPUT   DROP
iptables -P FORWARD DROP
iptables -P OUTPUT  DROP

# These lines are here in case rules are already in place and the
# script is ever rerun on the fly. We want to remove all rules and
# pre-existing user defined chains before we implement new rules.
iptables -F
iptables -X
iptables -Z

iptables -t nat -F

# Allow local connections
iptables -A INPUT  -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT

# Allow forwarding if the initiated on the intranet
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD ! -i WAN1 -m conntrack --ctstate NEW       -j ACCEPT

# Do masquerading
# (not needed if intranet is not using private ip-addresses)
iptables -t nat -A POSTROUTING -o WAN1 -j MASQUERADE

# Log everything for debugging
# (last of all rules, but before policy rules)
iptables -A INPUT   -j LOG --log-prefix "FIREWALL:INPUT "
iptables -A FORWARD -j LOG --log-prefix "FIREWALL:FORWARD "
iptables -A OUTPUT  -j LOG --log-prefix "FIREWALL:OUTPUT "

# Enable IP Forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward
EOF
chmod 700 /etc/rc.d/rc.iptables

With this script your intranet should be reasonably secure against external attacks. No one should be able to setup a new connection to any internal service and, if it's masqueraded, makes your intranet invisible to the Internet. Furthermore, your firewall should be relatively safe because there are no services running that a cracker could attack.

BusyBox

This scenario isn't too different from the Creating a Masquerading Router With iptables, but additionally offers some services to your intranet. Examples of this can be when you want to administer your firewall from another host on your intranet or use it as a proxy or a name server.

Note

Outlining specifically how to protect a server that offers services on the Internet goes far beyond the scope of this document. See the references in the section called “Extra Information” for more information.

Be cautious. Every service you have enabled makes your setup more complex and your firewall less secure. You are exposed to the risks of misconfigured services or running a service with an exploitable bug. A firewall should generally not run any extra services. See the introduction to the Creating a Masquerading Router With iptables for some more details.

If you want to add services such as internal Samba or name servers that do not need to access the Internet themselves, the additional statements are quite simple and should still be acceptable from a security standpoint. Just add the following lines into the script before the logging rules.

iptables -A INPUT  -i ! WAN1  -j ACCEPT
iptables -A OUTPUT -o ! WAN1  -j ACCEPT

If daemons, such as squid, have to access the Internet themselves, you could open OUTPUT generally and restrict INPUT.

iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -j ACCEPT

However, it is generally not advisable to leave OUTPUT unrestricted. You lose any control over trojans who would like to "call home", and a bit of redundancy in case you've (mis-)configured a service so that it broadcasts its existence to the world.

To accomplish this, you should restrict INPUT and OUTPUT on all ports except those that it's absolutely necessary to have open. Which ports you have to open depends on your needs: mostly you will find them by looking for failed accesses in your log files.

Have a Look at the Following Examples:

  • Squid is caching the web:

    iptables -A OUTPUT -p tcp --dport 80 -j ACCEPT
    iptables -A INPUT  -p tcp --sport 80 -m conntrack --ctstate ESTABLISHED \
      -j ACCEPT
  • Your caching name server (e.g., named) does its lookups via UDP:

    iptables -A OUTPUT -p udp --dport 53 -j ACCEPT
  • You want to be able to ping your computer to ensure it's still alive:

    iptables -A INPUT  -p icmp -m icmp --icmp-type echo-request -j ACCEPT
    iptables -A OUTPUT -p icmp -m icmp --icmp-type echo-reply   -j ACCEPT
  • If you are frequently accessing FTP servers or enjoy chatting, you might notice delays because some implementations of these daemons query an identd daemon on your system to obtain usernames. Although there's really little harm in this, having an identd running is not recommended because many security experts feel the service gives out too much additional information.

    To avoid these delays you could reject the requests with a 'tcp-reset' response:

    iptables -A INPUT  -p tcp --dport 113 -j REJECT --reject-with tcp-reset
  • To log and drop invalid packets (packets that came in after netfilter's timeout or some types of network scans) insert these rules at the top of the chain:

    iptables -I INPUT 0 -p tcp -m conntrack --ctstate INVALID \
      -j LOG --log-prefix "FIREWALL:INVALID "
    iptables -I INPUT 1 -p tcp -m conntrack --ctstate INVALID -j DROP
  • Anything coming from the outside should not have a private address, this is a common attack called IP-spoofing:

    iptables -A INPUT -i WAN1 -s 10.0.0.0/8     -j DROP
    iptables -A INPUT -i WAN1 -s 172.16.0.0/12  -j DROP
    iptables -A INPUT -i WAN1 -s 192.168.0.0/16 -j DROP

    There are other addresses that you may also want to drop: 0.0.0.0/8, 127.0.0.0/8, 224.0.0.0/3 (multicast and experimental), 169.254.0.0/16 (Link Local Networks), and 192.0.2.0/24 (IANA defined test network).

  • If your firewall is a DHCP client, you need to allow those packets:

    iptables -A INPUT  -i WAN1 -p udp -s 0.0.0.0 --sport 67 \
       -d 255.255.255.255 --dport 68 -j ACCEPT
  • To simplify debugging and be fair to anyone who'd like to access a service you have disabled, purposely or by mistake, you could REJECT those packets that are dropped.

    Obviously this must be done directly after logging as the very last lines before the packets are dropped by policy:

    iptables -A INPUT -j REJECT

These are only examples to show you some of the capabilities of the firewall code in Linux. Have a look at the man page of iptables. There you will find much more information. The port numbers needed for this can be found in /etc/services, in case you didn't find them by trial and error in your log file.

Boot Script

To set up the iptables firewall at boot, install the /etc/rc.d/init.d/iptables init script included in the blfs-bootscripts-20230101 package.

make install-iptables

Contents

Installed Programs: ip6tables, ip6tables-apply, ip6tables-legacy, ip6tables-legacy-restore, ip6tables-legacy-save, ip6tables-restore, ip6tables-save, iptables, iptables-apply, iptables-legacy, iptables-legacy-restore, iptables-legacy-apply, iptables-restore, iptables-save, iptables-xml, nfsynproxy (optional), and xtables-multi
Installed Libraries: libip4tc.so, libip6tc.so, libipq.so, libiptc.so, and libxtables.so
Installed Directories: /lib/xtables and /usr/include/libiptc

Short Descriptions

iptables

is used to set up, maintain, and inspect the tables of IP packet filter rules in the Linux kernel

iptables-apply

is a safer way to update iptables remotely

iptables-legacy

is used to interact with iptables using the legacy command set

iptables-legacy-restore

is used to restore a set of legacy iptables rules

iptables-legacy-save

is used to save a set of legacy iptables rules

iptables-restore

is used to restore IP Tables from data specified on STDIN. Use I/O redirection provided by your shell to read from a file

iptables-save

is used to dump the contents of an IP Table in easily parseable format to STDOUT. Use I/O-redirection provided by your shell to write to a file

iptables-xml

is used to convert the output of iptables-save to an XML format. Using the iptables.xslt stylesheet converts the XML back to the format of iptables-restore

ip6tables*

are a set of commands for IPV6 that parallel the iptables commands above

nfsynproxy

(optional) configuration tool. SYNPROXY target makes handling of large SYN floods possible without the large performance penalties imposed by the connection tracking in such cases

xtables-multi

is a binary that behaves according to the name it is called by

Setting Up a Network Firewall

Introduction to Firewall Creation

The purpose of a firewall is to protect a computer or a network against malicious access. In a perfect world every daemon or service, on every machine, is perfectly configured and immune to security flaws, and all users are trusted implicitly to use the equipment as intended. However, this is rarely, if ever, the case. Daemons may be misconfigured, or updates may not have been applied for known exploits against essential services. Additionally, you may wish to choose which services are accessible by certain machines or users, or you may wish to limit which machines or applications are allowed external access. Alternatively, you simply may not trust some of your applications or users. For these reasons, a carefully designed firewall should be an essential part of system security.

While a firewall can greatly limit the scope of the above issues, do not assume that having a firewall makes careful configuration redundant, or that any negligent misconfiguration is harmless. A firewall does not prevent the exploitation of any service you offer outside of it. Despite having a firewall, you need to keep applications and daemons properly configured and up to date.

Meaning of the Word "Firewall"

The word firewall can have several different meanings.

Personal Firewall

This is a hardware device or software program, intended to secure a home or desktop computer connected to the Internet. This type of firewall is highly relevant for users who do not know how their computers might be accessed via the Internet or how to disable that access, especially if they are always online and connected via broadband links.

An example configuration for a personal firewall is provided at Creating a Personal Firewall With iptables.

Masquerading Router

This is a system placed between the Internet and an intranet. To minimize the risk of compromising the firewall itself, it should generally have only one role—that of protecting the intranet. Although not completely risk-free, the tasks of doing the routing and IP masquerading (rewriting IP headers of the packets it routes from clients with private IP addresses onto the Internet so that they seem to come from the firewall itself) are commonly considered relatively secure.

An example configuration for a masquerading firewall is provided at Creating a Masquerading Router With iptables.

BusyBox

This is often an old computer you may have retired and nearly forgotten, performing masquerading or routing functions, but offering non-firewall services such as a web-cache or mail. This may be used for home networks, but is not to be considered as secure as a firewall only machine because the combination of server and router/firewall on one machine raises the complexity of the setup.

An example configuration for a BusyBox is provided at Creating a BusyBox With iptables.

Firewall with a Demilitarized Zone

This type of firewall performs masquerading or routing, but grants public access to some branch of your network that is physically separated from your regular intranet and is essentially a separate network with direct Internet access. The servers on this network are those which must be easily accessible from both the Internet and intranet. The firewall protects both networks. This type of firewall has a minimum of three network interfaces.

Packetfilter

This type of firewall does routing or masquerading but does not maintain a state table of ongoing communication streams. It is fast but quite limited in its ability to block undesired packets without blocking desired packets.

Conclusion

Caution

The example configurations provided for iptables-1.8.9 are not intended to be a complete guide to securing systems. Firewalling is a complex issue that requires careful configuration. The configurations provided by BLFS are intended only to give examples of how a firewall works. They are not intended to fit any particular configuration and may not provide complete protection from an attack.

BLFS provides an utility to manage the kernel Netfilter interface, iptables-1.8.9. It has been around since early 2.4 kernels, and has been the standard since. This is likely the set of tools that will be most familiar to existing admins. Other tools have been developed more recently, see the list of further readings below for more details. Here you will find a list of URLs that contain comprehensive information about building firewalls and further securing your system.

libcap-2.67 with PAM

Introduction to libcap with PAM

The libcap package was installed in LFS, but if Linux-PAM support is desired, the PAM module must be built (after installation of Linux-PAM).

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libcap Dependencies

Required

Linux-PAM-1.5.2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libcap

Installation of libcap

Note

If you are upgrading libcap from a previous version, use the instructions in LFS libcap page to upgrade libcap. If Linux-PAM-1.5.2 has been built, the PAM module will automatically be built too.

Install libcap by running the following commands:

make -C pam_cap

This package does not come with a test suite.

Now, as the root user:

install -v -m755 pam_cap/pam_cap.so /usr/lib/security &&
install -v -m644 pam_cap/capability.conf /etc/security

Configuring Libcap

In order to allow Linux-PAM to grant privileges based on POSIX capabilities, you need to add the libcap module to the beginning of the /etc/pam.d/system-auth file. Make the required edits with the following commands:

mv -v /etc/pam.d/system-auth{,.bak} &&
cat > /etc/pam.d/system-auth << "EOF" &&
# Begin /etc/pam.d/system-auth

auth      optional    pam_cap.so
EOF
tail -n +3 /etc/pam.d/system-auth.bak >> /etc/pam.d/system-auth

Additionally, you'll need to modify the /etc/security/capability.conf file to grant necessary privileges to users, and utilize the setcap utility to set capabilities on specific utilities as needed. See man 8 setcap and man 3 cap_from_text for additional information.

Contents

Installed Programs: None
Installed Library: pam_cap.so
Installed Directories: None

Linux-PAM-1.5.2

Introduction to Linux PAM

The Linux PAM package contains Pluggable Authentication Modules used by the local system administrator to control how application programs authenticate users.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

Optional Documentation

Linux PAM Dependencies

Optional

Berkeley DB-5.3.28, libnsl-2.0.0, libtirpc-1.3.3, libaudit, and Prelude

Optional (To Rebuild the Documentation)

docbook-xml-4.5, docbook-xsl-nons-1.79.2, fop-2.8, libxslt-1.1.37 and either Lynx-2.8.9rel.1 or W3m

Note

Shadow-4.13 must be reinstalled and reconfigured after installing and configuring Linux PAM.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/linux-pam

Installation of Linux PAM

First, prevent the installation of an unneeded systemd file:

sed -e /service_DATA/d \
    -i modules/pam_namespace/Makefile.am &&
autoreconf

If you downloaded the documentation, unpack the tarball by issuing the following command.

tar -xf ../Linux-PAM-1.5.2-docs.tar.xz --strip-components=1

If you want to regenerate the documentation yourself, fix the configure script so it will detect lynx:

sed -e 's/dummy elinks/dummy lynx/'                                    \
    -e 's/-no-numbering -no-references/-force-html -nonumbers -stdin/' \
    -i configure

Compile and link Linux PAM by running the following commands:

./configure --prefix=/usr                        \
            --sbindir=/usr/sbin                  \
            --sysconfdir=/etc                    \
            --libdir=/usr/lib                    \
            --enable-securedir=/usr/lib/security \
            --docdir=/usr/share/doc/Linux-PAM-1.5.2 &&
make

To test the results, a suitable /etc/pam.d/other configuration file must exist.

Reinstallation or Upgrade of Linux PAM

If you have a system with Linux PAM installed and working, be careful when modifying the files in /etc/pam.d, since your system may become totally unusable. If you want to run the tests, you do not need to create another /etc/pam.d/other file. The existing file can be used for the tests.

You should also be aware that make install overwrites the configuration files in /etc/security as well as /etc/environment. If you have modified those files, be sure to back them up.

For a first-time installation, create a configuration file by issuing the following commands as the root user:

install -v -m755 -d /etc/pam.d &&

cat > /etc/pam.d/other << "EOF"
auth     required       pam_deny.so
account  required       pam_deny.so
password required       pam_deny.so
session  required       pam_deny.so
EOF

Now run the tests by issuing make check. Be sure the tests produced no errors before continuing the installation. Note that the tests are very long. Redirect the output to a log file, so you can inspect it thoroughly.

For a first-time installation, remove the configuration file created earlier by issuing the following command as the root user:

rm -fv /etc/pam.d/other

Now, as the root user:

make install &&
chmod -v 4755 /usr/sbin/unix_chkpwd

Command Explanations

--enable-securedir=/usr/lib/security: This switch sets the installation location for the PAM modules.

--disable-regenerate-docu : If the needed dependencies (docbook-xml-4.5, docbook-xsl-nons-1.79.2, libxslt-1.1.37, and Lynx-2.8.9rel.1 or W3m) are installed, the manual pages, and the html and text documentation files, are generated and installed. Furthermore, if fop-2.8 is installed, the PDF documentation is generated and installed. Use this switch if you do not want to rebuild the documentation.

chmod -v 4755 /usr/sbin/unix_chkpwd: The setuid bit for the unix_chkpwd helper program must be turned on, so that non-root processes can access the shadow file.

Configuring Linux-PAM

Configuration Files

/etc/security/* and /etc/pam.d/*

Configuration Information

Configuration information is placed in /etc/pam.d/. Here is a sample file:

# Begin /etc/pam.d/other

auth            required        pam_unix.so     nullok
account         required        pam_unix.so
session         required        pam_unix.so
password        required        pam_unix.so     nullok

# End /etc/pam.d/other

Now create some generic configuration files. As the root user:

install -vdm755 /etc/pam.d &&
cat > /etc/pam.d/system-account << "EOF" &&
# Begin /etc/pam.d/system-account

account   required    pam_unix.so

# End /etc/pam.d/system-account
EOF

cat > /etc/pam.d/system-auth << "EOF" &&
# Begin /etc/pam.d/system-auth

auth      required    pam_unix.so

# End /etc/pam.d/system-auth
EOF

cat > /etc/pam.d/system-session << "EOF" &&
# Begin /etc/pam.d/system-session

session   required    pam_unix.so

# End /etc/pam.d/system-session
EOF

cat > /etc/pam.d/system-password << "EOF"
# Begin /etc/pam.d/system-password

# use sha512 hash for encryption, use shadow, and try to use any previously
# defined authentication token (chosen password) set by any prior module.
# Use the same number of rounds as shadow.
password  required    pam_unix.so       sha512 shadow try_first_pass \
                                        rounds=500000

# End /etc/pam.d/system-password
EOF

If you wish to enable strong password support, install libpwquality-1.4.5, and follow the instructions on that page to configure the pam_pwquality PAM module with strong password support.

Next, add a restrictive /etc/pam.d/other configuration file. With this file, programs that are PAM aware will not run unless a configuration file specifically for that application exists.

cat > /etc/pam.d/other << "EOF"
# Begin /etc/pam.d/other

auth        required        pam_warn.so
auth        required        pam_deny.so
account     required        pam_warn.so
account     required        pam_deny.so
password    required        pam_warn.so
password    required        pam_deny.so
session     required        pam_warn.so
session     required        pam_deny.so

# End /etc/pam.d/other
EOF

The PAM man page (man pam) provides a good starting point to learn about the several fields, and allowable entries. The Linux-PAM System Administrators' Guide is recommended for additional information.

Important

You should now reinstall the Shadow-4.13 package .

Contents

Installed Program: faillock, mkhomedir_helper, pam_namespace_helper, pam_timestamp_check, pwhistory_helper, unix_chkpwd and unix_update
Installed Libraries: libpam.so, libpamc.so and libpam_misc.so
Installed Directories: /etc/security, /usr/lib/security, /usr/include/security and /usr/share/doc/Linux-PAM-1.5.2

Short Descriptions

faillock

displays and modifies the authentication failure record files

mkhomedir_helper

is a helper binary that creates home directories

pam_namespace_helper

is a helper program used to configure a private namespace for a user session

pwhistory_helper

is a helper program that transfers password hashes from passwd or shadow to opasswd

pam_timestamp_check

is used to check if the default timestamp is valid

unix_chkpwd

is a helper binary that verifies the password of the current user

unix_update

is a helper binary that updates the password of a given user

libpam.so

provides the interfaces between applications and the PAM modules

liboauth-1.0.3

Introduction to liboauth

liboauth is a collection of POSIX-C functions implementing the OAuth Core RFC 5849 standard. Liboauth provides functions to escape and encode parameters according to OAuth specification and offers high-level functionality to sign requests or verify OAuth signatures as well as perform HTTP requests.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

liboauth Dependencies

Required

cURL-7.88.1

Optional

nss-3.88.1 and Doxygen-1.9.6 (to build documentation)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/liboauth

Installation of liboauth

Apply a patch for the current version of openssl:

patch -Np1 -i ../liboauth-1.0.3-openssl-1.1.0-3.patch

Install liboauth by running the following commands:

./configure --prefix=/usr --disable-static &&
make

If you wish to build the documentation (needs Doxygen-1.9.6), issue:

make dox

To test the results, issue: make check.

Now, as the root user:

make install

If you have previously built the documentation, install it by running the following commands as the root user:

install -v -dm755 /usr/share/doc/liboauth-1.0.3 &&
cp -rv doc/html/* /usr/share/doc/liboauth-1.0.3

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

--enable-nss: Use this switch if you want to use Mozilla NSS instead of OpenSSL.

Contents

Installed Programs: None
Installed Libraries: liboauth.so
Installed Directories: /usr/share/doc/liboauth-1.0.3

Short Descriptions

liboauth.so

provides functions to escape and encode strings according to OAuth specifications and offers high-level functionality built on top to sign requests or verify signatures using either NSS or OpenSSL for calculating the hash/signatures

libpwquality-1.4.5

Introduction to libpwquality

The libpwquality package provides common functions for password quality checking and also scoring them based on their apparent randomness. The library also provides a function for generating random passwords with good pronounceability.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libpwquality Dependencies

Required

CrackLib-2.9.8

Recommended

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libpwquality

Installation of libpwquality

Install libpwquality by running the following commands:

./configure --prefix=/usr                      \
            --disable-static                   \
            --with-securedir=/usr/lib/security \
            --with-python-binary=python3       &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Command Explanations

--with-python-binary=python3: This parameter gives the location of the Python binary. The default is python, and requires Python-2.7.18.

Configuring libpwquality

libpwquality is intended to be a functional replacement for the now-obsolete pam_cracklib.so PAM module. To configure the system to use the pam_pwquality module, execute the following commands as the root user:

mv /etc/pam.d/system-password{,.orig} &&
cat > /etc/pam.d/system-password << "EOF"
# Begin /etc/pam.d/system-password

# check new passwords for strength (man pam_pwquality)
password  required    pam_pwquality.so   authtok_type=UNIX retry=1 difok=1 \
                                         minlen=8 dcredit=0 ucredit=0 \
                                         lcredit=0 ocredit=0 minclass=1 \
                                         maxrepeat=0 maxsequence=0 \
                                         maxclassrepeat=0 gecoscheck=0 \
                                         dictcheck=1 usercheck=1 \
                                         enforcing=1 badwords="" \
                                         dictpath=/usr/lib/cracklib/pw_dict
# use sha512 hash for encryption, use shadow, and use the
# authentication token (chosen password) set by pam_pwquality
# above (or any previous modules). Also set the number of crypt rounds
# to the value used in shadow.
password  required    pam_unix.so        sha512 shadow use_authtok \
                                         rounds=500000

# End /etc/pam.d/system-password
EOF

Contents

Installed Programs: pwscore and pwmake
Installed Libraries: pam_pwquality.so and libpwquality.so
Installed Directories: None

Short Descriptions

pwmake

is a simple configurable tool for generating random and relatively easily pronounceable passwords

pwscore

is a simple tool for checking quality of a password

libpwquality.so

contains API functions for checking the password quality

pam_pwquality.so

is a Linux PAM module used to perform password quality checking

MIT Kerberos V5-1.20.1

Introduction to MIT Kerberos V5

MIT Kerberos V5 is a free implementation of Kerberos 5. Kerberos is a network authentication protocol. It centralizes the authentication database and uses kerberized applications to work with servers or services that support Kerberos allowing single logins and encrypted communication over internal networks or the Internet.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

  • Download (HTTP): https://kerberos.org/dist/krb5/1.20/krb5-1.20.1.tar.gz

  • Download MD5 sum: 73f5780e7b587ccd8b8cfc10c965a686

  • Download size: 8.3 MB

  • Estimated disk space required: 94 MB (add 14 MB for tests)

  • Estimated build time: 0.3 SBU (Using parallelism=4; add 5.8 SBU for tests)

MIT Kerberos V5 Dependencies

Optional

BIND Utilities-9.18.12, GnuPG-2.4.0 (to authenticate the package), keyutils-1.6.1, OpenLDAP-2.6.4, Valgrind-3.20.0 (used during the test suite), yasm-1.3.0, libedit, cmocka, kdcproxy, pyrad, and resolv_wrapper

Note

Some sort of time synchronization facility on your system (like ntp-4.2.8p15) is required since Kerberos won't authenticate if there is a time difference between a kerberized client and the KDC server.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/mitkrb

Installation of MIT Kerberos V5

Build MIT Kerberos V5 by running the following commands:

cd src &&

sed -i -e '/eq 0/{N;s/12 //}'    plugins/kdb/db2/libdb2/test/run.test &&
sed -i '/t_kadm5.py/d'           lib/kadm5/Makefile.in                &&

./configure --prefix=/usr            \
            --sysconfdir=/etc        \
            --localstatedir=/var/lib \
            --runstatedir=/run       \
            --with-system-et         \
            --with-system-ss         \
            --with-system-verto=no   \
            --enable-dns-for-realm &&
make

To test the build, issue as the root user: make -k -j1 check. Some tests may fail with the latest version of dejagnu and glibc. Some tests may hang for a long time and fail if the system is not connected to a network.

Now, as the root user:

make install &&

install -v -dm755 /usr/share/doc/krb5-1.20.1 &&
cp -vfr ../doc/*  /usr/share/doc/krb5-1.20.1

Command Explanations

The two sed commands remove tests that are known to fail.

--localstatedir=/var/lib: This option is used so that the Kerberos variable runtime data is located in /var/lib instead of /usr/var.

--runstatedir=/run: This option is used so that the Kerberos runtime state information is located in /run instead of the deprecated /var/run.

--with-system-et: This switch causes the build to use the system-installed versions of the error-table support software.

--with-system-ss: This switch causes the build to use the system-installed versions of the subsystem command-line interface software.

--with-system-verto=no: This switch fixes a bug in the package: it does not recognize its own verto library installed previously. This is not a problem, if reinstalling the same version, but if you are updating, the old library is used as system's one, instead of installing the new version.

--enable-dns-for-realm: This switch allows realms to be resolved using the DNS server.

--with-ldap: Use this switch if you want to compile the OpenLDAP database backend module.

Configuring MIT Kerberos V5

Config Files

/etc/krb5.conf and /var/lib/krb5kdc/kdc.conf

Configuration Information

Kerberos Configuration

Tip

You should consider installing some sort of password checking dictionary so that you can configure the installation to only accept strong passwords. A suitable dictionary to use is shown in the CrackLib-2.9.8 instructions. Note that only one file can be used, but you can concatenate many files into one. The configuration file shown below assumes you have installed a dictionary to /usr/share/dict/words.

Create the Kerberos configuration file with the following commands issued by the root user:

cat > /etc/krb5.conf << "EOF"
# Begin /etc/krb5.conf

[libdefaults]
    default_realm = <EXAMPLE.ORG>
    encrypt = true

[realms]
    <EXAMPLE.ORG> = {
        kdc = <belgarath.example.org>
        admin_server = <belgarath.example.org>
        dict_file = /usr/share/dict/words
    }

[domain_realm]
    .<example.org> = <EXAMPLE.ORG>

[logging]
    kdc = SYSLOG:INFO:AUTH
    admin_server = SYSLOG:INFO:AUTH
    default = SYSLOG:DEBUG:DAEMON

# End /etc/krb5.conf
EOF

You will need to substitute your domain and proper hostname for the occurrences of the <belgarath> and <example.org> names.

default_realm should be the name of your domain changed to ALL CAPS. This isn't required, but both Heimdal and MIT recommend it.

encrypt = true provides encryption of all traffic between kerberized clients and servers. It's not necessary and can be left off. If you leave it off, you can encrypt all traffic from the client to the server using a switch on the client program instead.

The [realms] parameters tell the client programs where to look for the KDC authentication services.

The [domain_realm] section maps a domain to a realm.

Create the KDC database:

kdb5_util create -r <EXAMPLE.ORG> -s

Now you should populate the database with principals (users). For now, just use your regular login name or root.

kadmin.local
kadmin.local: add_policy dict-only
kadmin.local: addprinc -policy dict-only <loginname>

The KDC server and any machine running kerberized server daemons must have a host key installed:

kadmin.local: addprinc -randkey host/<belgarath.example.org>

After choosing the defaults when prompted, you will have to export the data to a keytab file:

kadmin.local: ktadd host/<belgarath.example.org>

This should have created a file in /etc named krb5.keytab (Kerberos 5). This file should have 600 (root rw only) permissions. Keeping the keytab files from public access is crucial to the overall security of the Kerberos installation.

Exit the kadmin program (use quit or exit) and return back to the shell prompt. Start the KDC daemon manually, just to test out the installation:

/usr/sbin/krb5kdc

Attempt to get a ticket with the following command:

kinit <loginname>

You will be prompted for the password you created. After you get your ticket, you can list it with the following command:

klist

Information about the ticket should be displayed on the screen.

To test the functionality of the keytab file, issue the following command as the root user:

ktutil
ktutil: rkt /etc/krb5.keytab
ktutil: l

This should dump a list of the host principal, along with the encryption methods used to access the principal.

Create an empty ACL file that can be modified later:

touch /var/lib/krb5kdc/kadm5.acl

At this point, if everything has been successful so far, you can feel fairly confident in the installation and configuration of the package.

Additional Information

For additional information consult the documentation for krb5-1.20.1 on which the above instructions are based.

Init Script

If you want to start Kerberos services at boot, install the /etc/rc.d/init.d/krb5 init script included in the blfs-bootscripts-20230101 package using the following command:

make install-krb5

Contents

Installed Programs: gss-client, gss-server, k5srvutil, kadmin, kadmin.local, kadmind, kdb5_ldap_util (optional), kdb5_util, kdestroy, kinit, klist, kpasswd, kprop, kpropd, kproplog, krb5-config, krb5-send-pr, krb5kdc, ksu, kswitch, ktutil, kvno, sclient, sim_client, sim_server, sserver, uuclient, and uuserver
Installed Libraries: libgssapi_krb5.so, libgssrpc.so, libk5crypto.so, libkadm5clnt_mit.so, libkadm5clnt.so, libkadm5srv_mit.so, libkadm5srv.so, libkdb_ldap.so (optional), libkdb5.so, libkrad.so, libkrb5.so, libkrb5support.so, libverto.so, and some plugins under the /usr/lib/krb5 tree
Installed Directories: /usr/include/{gssapi,gssrpc,kadm5,krb5}, /usr/lib/krb5, /usr/share/{doc/krb5-1.20.1,examples/krb5}, /var/lib/krb5kdc, and /run/krb5kdc

Short Descriptions

gss-client

is a GSSAPI test client

gss-server

is a GSSAPI test server

k5srvutil

is a host keytable manipulation utility

kadmin

is an utility used to make modifications to the Kerberos database

kadmin.local

is an utility similar to kadmin, but if the database is db2, the local client kadmin.local, is intended to run directly on the master KDC without Kerberos authentication

kadmind

is a server for administrative access to a Kerberos database

kdb5_ldap_util (optional)

allows an administrator to manage realms, Kerberos services and ticket policies

kdb5_util

is the KDC database utility

kdestroy

removes the current set of tickets

kinit

is used to authenticate to the Kerberos server as a principal and acquire a ticket granting ticket that can later be used to obtain tickets for other services

klist

reads and displays the current tickets in the credential cache

kpasswd

is a program for changing Kerberos 5 passwords

kprop

takes a principal database in a specified format and converts it into a stream of database records

kpropd

receives a database sent by kprop and writes it as a local database

kproplog

displays the contents of the KDC database update log to standard output

krb5-config

gives information on how to link programs against libraries

krb5kdc

is the Kerberos 5 server

krb5-send-pr

sends a problem report (PR) to a central support site

ksu

is the super user program using Kerberos protocol. Requires a properly configured /etc/shells and ~/.k5login containing principals authorized to become super users

kswitch

makes the specified credential cache the primary cache for the collection, if a cache collection is available

ktutil

is a program for managing Kerberos keytabs

kvno

prints keyversion numbers of Kerberos principals

sclient

is used to contact a sample server and authenticate to it using Kerberos 5 tickets, then display the server's response

sim_client

is a simple UDP-based sample client program, for demonstration

sim_server

is a simple UDP-based server application, for demonstration

sserver

is the sample Kerberos 5 server

uuclient

is another sample client

uuserver

is another sample server

libgssapi_krb5.so

contains the Generic Security Service Application Programming Interface (GSSAPI) functions which provides security services to callers in a generic fashion, supportable with a range of underlying mechanisms and technologies and hence allowing source-level portability of applications to different environments

libkadm5clnt.so

contains the administrative authentication and password checking functions required by Kerberos 5 client-side programs

libkadm5srv.so

contains the administrative authentication and password checking functions required by Kerberos 5 servers

libkdb5.so

is a Kerberos 5 authentication/authorization database access library

libkrad.so

contains the internal support library for RADIUS functionality

libkrb5.so

is an all-purpose Kerberos 5 library

Nettle-3.8.1

Introduction to Nettle

The Nettle package contains a low-level cryptographic library that is designed to fit easily in many contexts.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Nettle Dependencies

Optional

Valgrind-3.20.0 (optional for the tests)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/nettle

Installation of Nettle

Install Nettle by running the following commands:

./configure --prefix=/usr --disable-static &&
make

To test the results, issue: make check.

Now, as the root user:

make install &&
chmod   -v   755 /usr/lib/lib{hogweed,nettle}.so &&
install -v -m755 -d /usr/share/doc/nettle-3.8.1 &&
install -v -m644 nettle.html /usr/share/doc/nettle-3.8.1

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: nettle-hash, nettle-lfib-stream, nettle-pbkdf2, pkcs1-conv and sexp-conv
Installed Libraries: libhogweed.so and libnettle.so
Installed Directory: /usr/include/nettle and /usr/share/doc/nettle-3.8.1

Short Descriptions

nettle-hash

calculates a hash value using a specified algorithm

nettle-lfib-stream

outputs a sequence of pseudorandom (non-cryptographic) bytes, using Knuth's lagged fibonacci generator. The stream is useful for testing, but should not be used to generate cryptographic keys or anything else that needs real randomness

nettle-pbkdf2

is a password-based key derivation function that takes a password or a passphrase as input and returns a strengthened password, which is protected against pre-computation attacks by using salting and other expensive computations.

pkcs1-conv

converts private and public RSA keys from PKCS #1 format to sexp format

sexp-conv

converts an s-expression to a different encoding

NSS-3.88.1

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.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

NSS Dependencies

Required

NSPR-4.35

Recommended

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/nss

Installation of NSS

Install NSS by running the following commands:

patch -Np1 -i ../nss-3.88.1-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 ../

Note

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.

  • The tests take an extremely 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      &&
chmod -v 644                                  /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.

NSS_DISABLE_GTESTS=1: 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.

Configuring NSS

If p11-kit-0.24.1 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 list 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

Additionally, for dependent applications that do not use the internal database (/usr/lib/libnssckbi.so), the /usr/sbin/make-ca script included on the make-ca-1.12 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: certutil, nss-config, and pk12util
Installed Libraries: 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
Installed Directories: /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

nss-config

is used to determine the NSS library settings of the installed NSS libraries

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

OpenSSH-9.2p1

Introduction to OpenSSH

The OpenSSH package contains ssh clients and the sshd daemon. This is useful for encrypting authentication and subsequent traffic over a network. The ssh and scp commands are secure implementations of telnet and rcp respectively.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

OpenSSH Dependencies

Optional

GDB-13.1 (for tests), Linux-PAM-1.5.2, a graphical environment, MIT Kerberos V5-1.20.1, Which-2.21 (for tests), libedit, LibreSSL Portable, OpenSC, and libsectok

Optional Runtime (Used only to gather entropy)

Net-tools-2.10, and Sysstat-12.7.2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/OpenSSH

Installation of OpenSSH

OpenSSH runs as two processes when connecting to other computers. The first process is a privileged process and controls the issuance of privileges as necessary. The second process communicates with the network. Additional installation steps are necessary to set up the proper environment, which are performed by issuing the following commands as the root user:

install  -v -m700 -d /var/lib/sshd &&
chown    -v root:sys /var/lib/sshd &&

groupadd -g 50 sshd        &&
useradd  -c 'sshd PrivSep' \
         -d /var/lib/sshd  \
         -g sshd           \
         -s /bin/false     \
         -u 50 sshd

Install OpenSSH by running the following commands:

./configure --prefix=/usr                            \
            --sysconfdir=/etc/ssh                    \
            --with-privsep-path=/var/lib/sshd        \
            --with-default-path=/usr/bin             \
            --with-superuser-path=/usr/sbin:/usr/bin \
            --with-pid-dir=/run                      &&
make

The test suite requires an installed copy of scp to complete the multiplexing tests. To run the test suite, first copy the scp program to /usr/bin, making sure that you backup any existing copy first.

To test the results, issue: make -j1 tests.

Now, as the root user:

make install &&
install -v -m755    contrib/ssh-copy-id /usr/bin     &&

install -v -m644    contrib/ssh-copy-id.1 \
                    /usr/share/man/man1              &&
install -v -m755 -d /usr/share/doc/openssh-9.2p1     &&
install -v -m644    INSTALL LICENCE OVERVIEW README* \
                    /usr/share/doc/openssh-9.2p1

Command Explanations

--sysconfdir=/etc/ssh: This prevents the configuration files from being installed in /usr/etc.

--with-default-path=/usr/bin and --with-superuser-path=/usr/sbin:/usr/bin: These set PATH consistent with LFS and BLFS Shadow package.

--with-pid-dir=/run: This prevents OpenSSH from referring to deprecated /var/run.

--with-pam: This parameter enables Linux-PAM support in the build.

--with-xauth=/usr/bin/xauth: Set the default location for the xauth binary for X authentication. Change the location if xauth will be installed to a different path. This can also be controlled from sshd_config with the XAuthLocation keyword. You can omit this switch if Xorg is already installed.

--with-kerberos5=/usr: This option is used to include Kerberos 5 support in the build.

--with-libedit: This option enables line editing and history features for sftp.

Configuring OpenSSH

Config Files

~/.ssh/*, /etc/ssh/ssh_config, and /etc/ssh/sshd_config

There are no required changes to any of these files. However, you may wish to view the /etc/ssh/ files and make any changes appropriate for the security of your system. One recommended change is that you disable root login via ssh. Execute the following command as the root user to disable root login via ssh:

echo "PermitRootLogin no" >> /etc/ssh/sshd_config

If you want to be able to log in without typing in your password, first create ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub with ssh-keygen and then copy ~/.ssh/id_rsa.pub to ~/.ssh/authorized_keys on the remote computer that you want to log into. You'll need to change REMOTE_USERNAME and REMOTE_HOSTNAME for the username and hostname of the remote computer and you'll also need to enter your password for the ssh-copy-id command to succeed:

ssh-keygen &&
ssh-copy-id -i ~/.ssh/id_rsa.pub REMOTE_USERNAME@REMOTE_HOSTNAME

Once you've got passwordless logins working it's actually more secure than logging in with a password (as the private key is much longer than most people's passwords). If you would like to now disable password logins, as the root user:

echo "PasswordAuthentication no" >> /etc/ssh/sshd_config &&
echo "KbdInteractiveAuthentication no" >> /etc/ssh/sshd_config

If you added Linux-PAM support and you want ssh to use it then you will need to add a configuration file for sshd and enable use of LinuxPAM. Note, ssh only uses PAM to check passwords, if you've disabled password logins these commands are not needed. If you want to use PAM, issue the following commands as the root user:

sed 's@d/login@d/sshd@g' /etc/pam.d/login > /etc/pam.d/sshd &&
chmod 644 /etc/pam.d/sshd &&
echo "UsePAM yes" >> /etc/ssh/sshd_config

Additional configuration information can be found in the man pages for sshd, ssh and ssh-agent.

Boot Script

To start the SSH server at system boot, install the /etc/rc.d/init.d/sshd init script included in the blfs-bootscripts-20230101 package.

make install-sshd

Contents

Installed Programs: scp, sftp, ssh, ssh-add, ssh-agent, ssh-copy-id, ssh-keygen, ssh-keyscan, and sshd
Installed Libraries: None
Installed Directories: /etc/ssh, /usr/share/doc/openssh-9.2p1, and /var/lib/sshd

Short Descriptions

scp

is a file copy program that acts like rcp except it uses an encrypted protocol

sftp

is an FTP-like program that works over the SSH1 and SSH2 protocols

ssh

is an rlogin/rsh-like client program except it uses an encrypted protocol

sshd

is a daemon that listens for ssh login requests

ssh-add

is a tool which adds keys to the ssh-agent

ssh-agent

is an authentication agent that can store private keys

ssh-copy-id

is a script that enables logins on remote machines using local keys

ssh-keygen

is a key generation tool

ssh-keyscan

is a utility for gathering public host keys from a number of hosts

p11-kit-0.24.1

Introduction to p11-kit

The p11-kit package provides a way to load and enumerate PKCS #11 (a Cryptographic Token Interface Standard) modules.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

p11-kit Dependencies

Recommended
Optional

GTK-Doc-1.33.2, libxslt-1.1.37, and nss-3.88.1 (runtime)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/p11-kit

Installation of p11-kit

Prepare the distribution specific anchor hook:

sed '20,$ d' -i trust/trust-extract-compat &&
cat >> trust/trust-extract-compat << "EOF"
# Copy existing anchor modifications to /etc/ssl/local
/usr/libexec/make-ca/copy-trust-modifications

# Update trust stores
/usr/sbin/make-ca -r
EOF

Install p11-kit by running the following commands:

mkdir p11-build &&
cd    p11-build &&

meson --prefix=/usr       \
      --buildtype=release \
      -Dtrust_paths=/etc/pki/anchors &&
ninja

To test the results, issue: ninja test.

Now, as the root user:

ninja install &&
ln -sfv /usr/libexec/p11-kit/trust-extract-compat \
        /usr/bin/update-ca-certificates

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

-Dtrust_paths=/etc/pki/anchors: this switch sets the location of trusted certificates used by libp11-kit.so.

-Dhash_impl=freebl: Use this switch if you want to use the Freebl library from NSS for SHA1 and MD5 hashing.

-Dgtk_doc=true: Use this switch if you have installed GTK-Doc-1.33.2 and libxslt-1.1.37 and wish to rebuild the documentation and generate manual pages.

Configuring p11-kit

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 list provided by /usr/lib/libnssckbi.so. As the root user, execute the following commands:

ln -sfv ./pkcs11/p11-kit-trust.so /usr/lib/libnssckbi.so

Contents

Installed Programs: p11-kit, trust, and update-ca-certificates
Installed Libraries: libp11-kit.so and p11-kit-proxy.so
Installed Directories: /etc/pkcs11, /usr/include/p11-kit-1, /usr/lib/pkcs11, /usr/libexec/p11-kit, /usr/share/gtk-doc/html/p11-kit, and /usr/share/p11-kit

Short Descriptions

p11-kit

is a command line tool that can be used to perform operations on PKCS#11 modules configured on the system

trust

is a command line tool to examine and modify the shared trust policy store

update-ca-certificates

is a command line tool to both extract local certificates from an updated anchor store, and regenerate all anchors and certificate stores on the system. This is done unconditionally on BLFS using the --force and --get flags to make-ca and should likely not be used for automated updates

libp11-kit.so

contains functions used to coordinate initialization and finalization of any PKCS#11 module

p11-kit-proxy.so

is the PKCS#11 proxy module

Polkit-122

Introduction to Polkit

Polkit is a toolkit for defining and handling authorizations. It is used for allowing unprivileged processes to communicate with privileged processes.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Polkit Dependencies

Required

GLib-2.74.5 and duktape-2.7.0

Recommended

Note

Since elogind uses PAM to register user sessions, it is a good idea to build Polkit with PAM support so elogind can track Polkit sessions.

Optional

GTK-Doc-1.33.2, JS-102.8.0 (can be used in place of duktape), and dbusmock-0.28.7 (for tests)

Optional Runtime Dependencies

One polkit authentication agent for using polkit in the graphical environment: polkit-kde-agent in Plasma-5.26.5 for KDE, the agent built in gnome-shell-43.3 for GNOME3, polkit-gnome-0.105 for XFCE, and lxpolkit in LXSession-0.5.5 for LXDE

Note

If libxslt-1.1.37 is installed, then docbook-xml-4.5 and docbook-xsl-nons-1.79.2 are required. If you have installed libxslt-1.1.37, but you do not want to install any of the DocBook packages mentioned, you will need to use -Dman=false in the instructions below.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/polkit

Installation of Polkit

There should be a dedicated user and group to take control of the polkitd daemon after it is started. Issue the following commands as the root user:

groupadd -fg 27 polkitd &&
useradd -c "PolicyKit Daemon Owner" -d /etc/polkit-1 -u 27 \
        -g polkitd -s /bin/false polkitd

Install Polkit by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr                 \
      --buildtype=release           \
      -Dman=true                    \
      -Dsession_tracking=libelogind \
      -Dsystemdsystemunitdir=/tmp   \
      -Dtests=true                  \
      -Djs_engine=duktape           \
      ..                            &&
ninja

To test the results, first ensure that the system D-Bus daemon is running, and both D-Bus Python-1.3.2 and dbusmock-0.28.7 are installed. Then run meson test -t3.

Now, as the root user:

ninja install &&
rm -v /tmp/*.service

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

-Dtests=true: This switch allows to run the test suite of this package. As Polkit is used for authorizations, its integrity can affect system security. So it's recommended to run the test suite building this package.

-Djs_engine=duktape: This switch allows using the duktape-2.7.0 JavaScript engine. Replace with -Djs_engine=mozjs for using the JS-102.8.0 JavaScript engine.

-Dauthfw=shadow: This switch enables the package to use the Shadow rather than the Linux PAM Authentication framework. Use it if you have not installed Linux PAM.

-Dintrospection=false: Use this option if you are certain that you do not need gobject-introspection files for polkit, or do not have gobject-introspection installed.

-Dman=false: Use this option to disable generating and installing manual pages. This is useful if libxslt is not installed.

-Dexamples=true: Use this option to build the example programs.

-Dgtk_doc=true: Use this option to enable building and installing the API documentation.

Configuring Polkit

PAM Configuration

Note

If you did not build Polkit with Linux PAM support, you can skip this section.

If you have built Polkit with Linux PAM support, you need to modify the default PAM configuration file which was installed by default to get Polkit to work correctly with BLFS. Issue the following commands as the root user to create the configuration file for Linux PAM:

cat > /etc/pam.d/polkit-1 << "EOF"
# Begin /etc/pam.d/polkit-1

auth     include        system-auth
account  include        system-account
password include        system-password
session  include        system-session

# End /etc/pam.d/polkit-1
EOF

Contents

Installed Programs: pkaction, pkcheck, pkexec, pkttyagent, and polkitd
Installed Libraries: libpolkit-agent-1.so and libpolkit-gobject-1.so
Installed Directories: /etc/polkit-1, /usr/include/polkit-1, /usr/lib/polkit-1, /usr/share/gtk-doc/html/polkit-1, and /usr/share/polkit-1

Short Descriptions

pkaction

is used to obtain information about registered PolicyKit actions

pkcheck

is used to check whether a process is authorized for action

pkexec

allows an authorized user to execute a command as another user

pkttyagent

is used to start a textual authentication agent for the subject

polkitd

provides the org.freedesktop.PolicyKit1 D-Bus service on the system message bus

libpolkit-agent-1.so

contains the Polkit authentication agent API functions

libpolkit-gobject-1.so

contains the Polkit authorization API functions

polkit-gnome-0.105

Introduction to Polkit GNOME

The Polkit GNOME package provides an Authentication Agent for Polkit that integrates well with the GNOME Desktop environment.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

Polkit GNOME Dependencies

Required

AccountsService-22.08.8, GTK+-3.24.36, and Polkit-122

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/polkit-gnome

Installation of Polkit GNOME

First, apply some fixes that allow for the proper user icon to be used, as well as some security fixes:

patch -Np1 -i ../polkit-gnome-0.105-consolidated_fixes-1.patch

Install Polkit GNOME by running the following commands:

./configure --prefix=/usr &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Configuring Polkit GNOME

Automatic Startup

For the authentication framework to work, polkit-gnome-authentification-agent-1 needs to be started. However, make install did not install a startup file for the Polkit GNOME so you have to create it by yourself.

Issue the following commands as the root user to create a startup file for Polkit GNOME:

mkdir -p /etc/xdg/autostart &&
cat > /etc/xdg/autostart/polkit-gnome-authentication-agent-1.desktop << "EOF"
[Desktop Entry]
Name=PolicyKit Authentication Agent
Comment=PolicyKit Authentication Agent
Exec=/usr/libexec/polkit-gnome-authentication-agent-1
Terminal=false
Type=Application
Categories=
NoDisplay=true
OnlyShowIn=GNOME;XFCE;Unity;
AutostartCondition=GNOME3 unless-session gnome
EOF

Contents

Installed Program: polkit-gnome-authentication-agent-1
Installed Libraries: None
Installed Directory: None

Short Descriptions

polkit-gnome-authentication-agent-1

is the Polkit authentication agent

Shadow-4.13

Introduction to Shadow

Shadow was indeed installed in LFS and there is no reason to reinstall it unless you installed CrackLib or Linux-PAM after your LFS system was completed. If you have installed CrackLib after LFS, then reinstalling Shadow will enable strong password support. If you have installed Linux-PAM, reinstalling Shadow will allow programs such as login and su to utilize PAM.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Shadow Dependencies

Required

Linux-PAM-1.5.2 or CrackLib-2.9.8

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/shadow

Installation of Shadow

Important

The installation commands shown below are for installations where Linux-PAM has been installed and Shadow is being reinstalled to support the Linux-PAM installation.

If you are reinstalling Shadow to provide strong password support using the CrackLib library without using Linux-PAM, ensure you add the --with-libcrack parameter to the configure script below and also issue the following command:

sed -i 's@DICTPATH.*@DICTPATH\t/lib/cracklib/pw_dict@' etc/login.defs

Reinstall Shadow by running the following commands:

sed -i 's/groups$(EXEEXT) //' src/Makefile.in          &&

find man -name Makefile.in -exec sed -i 's/groups\.1 / /'   {} \; &&
find man -name Makefile.in -exec sed -i 's/getspnam\.3 / /' {} \; &&
find man -name Makefile.in -exec sed -i 's/passwd\.5 / /'   {} \; &&

sed -e 's@#ENCRYPT_METHOD DES@ENCRYPT_METHOD SHA512@' \
    -e 's@#\(SHA_CRYPT_..._ROUNDS 5000\)@\100@'       \
    -e 's@/var/spool/mail@/var/mail@'                 \
    -e '/PATH=/{s@/sbin:@@;s@/bin:@@}'                \
    -i etc/login.defs                                 &&

./configure --sysconfdir=/etc               \
            --disable-static                \
            --with-group-name-max-length=32 &&
make

This package does not come with a test suite.

Now, as the root user:

make exec_prefix=/usr install

The man pages were installed in LFS, but if reinstallation is desired, run (as the root user):

make -C man install-man

Command Explanations

sed -i 's/groups$(EXEEXT) //' src/Makefile.in: This sed is used to suppress the installation of the groups program as the version from the Coreutils package installed during LFS is preferred.

find man -name Makefile.in -exec ... {} \;: The first command is used to suppress the installation of the groups man pages so the existing ones installed from the Coreutils package are not replaced. The two other commands prevent installation of manual pages that are already installed by Man-pages in LFS.

sed -e 's@#ENCRYPT_METHOD DES@ENCRYPT_METHOD SHA512@' -e 's@#\(SHA_CRYPT_..._ROUNDS 5000\)@\100@' -e 's@/var/spool/mail@/var/mail@' -e '/PATH=/{s@/sbin:@@;s@/bin:@@}' -i etc/login.defs: Instead of using the default 'DES' method, this command modifies the installation to use the more secure 'SHA512' method of hashing passwords, which also allows passwords longer than eight characters. The number of rounds is also increased to prevent brute force password attacks. The command also changes the obsolete /var/spool/mail location for user mailboxes that Shadow uses by default to the /var/mail location. It also changes the default path to be consistent with that set in LFS.

--with-group-name-max-length=32: The maximum user name is 32 characters. Make the maximum group name the same.

Configuring Linux-PAM to Work with Shadow

Note

The rest of this page is devoted to configuring Shadow to work properly with Linux-PAM. If you do not have Linux-PAM installed, and you reinstalled Shadow to support strong passwords via the CrackLib library, no further configuration is required.

Config Files

/etc/pam.d/* or alternatively /etc/pam.conf, /etc/login.defs and /etc/security/*

Configuration Information

Configuring your system to use Linux-PAM can be a complex task. The information below will provide a basic setup so that Shadow's login and password functionality will work effectively with Linux-PAM. Review the information and links on the Linux-PAM-1.5.2 page for further configuration information. For information specific to integrating Shadow, Linux-PAM and libpwquality, you can visit the following link:

Configuring /etc/login.defs

The login program currently performs many functions which Linux-PAM modules should now handle. The following sed command will comment out the appropriate lines in /etc/login.defs, and stop login from performing these functions (a backup file named /etc/login.defs.orig is also created to preserve the original file's contents). Issue the following commands as the root user:

install -v -m644 /etc/login.defs /etc/login.defs.orig &&
for FUNCTION in FAIL_DELAY               \
                FAILLOG_ENAB             \
                LASTLOG_ENAB             \
                MAIL_CHECK_ENAB          \
                OBSCURE_CHECKS_ENAB      \
                PORTTIME_CHECKS_ENAB     \
                QUOTAS_ENAB              \
                CONSOLE MOTD_FILE        \
                FTMP_FILE NOLOGINS_FILE  \
                ENV_HZ PASS_MIN_LEN      \
                SU_WHEEL_ONLY            \
                CRACKLIB_DICTPATH        \
                PASS_CHANGE_TRIES        \
                PASS_ALWAYS_WARN         \
                CHFN_AUTH ENCRYPT_METHOD \
                ENVIRON_FILE
do
    sed -i "s/^${FUNCTION}/# &/" /etc/login.defs
done
Configuring the /etc/pam.d/ Files

As mentioned previously in the Linux-PAM instructions, Linux-PAM has two supported methods for configuration. The commands below assume that you've chosen to use a directory based configuration, where each program has its own configuration file. You can optionally use a single /etc/pam.conf configuration file by using the text from the files below, and supplying the program name as an additional first field for each line.

As the root user, create the following Linux-PAM configuration files in the /etc/pam.d/ directory (or add the contents to the /etc/pam.conf file) using the following commands:

'login'
cat > /etc/pam.d/login << "EOF"
# Begin /etc/pam.d/login

# Set failure delay before next prompt to 3 seconds
auth      optional    pam_faildelay.so  delay=3000000

# Check to make sure that the user is allowed to login
auth      requisite   pam_nologin.so

# Check to make sure that root is allowed to login
# Disabled by default. You will need to create /etc/securetty
# file for this module to function. See man 5 securetty.
#auth      required    pam_securetty.so

# Additional group memberships - disabled by default
#auth      optional    pam_group.so

# include system auth settings
auth      include     system-auth

# check access for the user
account   required    pam_access.so

# include system account settings
account   include     system-account

# Set default environment variables for the user
session   required    pam_env.so

# Set resource limits for the user
session   required    pam_limits.so

# Display date of last login - Disabled by default
#session   optional    pam_lastlog.so

# Display the message of the day - Disabled by default
#session   optional    pam_motd.so

# Check user's mail - Disabled by default
#session   optional    pam_mail.so      standard quiet

# include system session and password settings
session   include     system-session
password  include     system-password

# End /etc/pam.d/login
EOF
'passwd'
cat > /etc/pam.d/passwd << "EOF"
# Begin /etc/pam.d/passwd

password  include     system-password

# End /etc/pam.d/passwd
EOF
'su'
cat > /etc/pam.d/su << "EOF"
# Begin /etc/pam.d/su

# always allow root
auth      sufficient  pam_rootok.so

# Allow users in the wheel group to execute su without a password
# disabled by default
#auth      sufficient  pam_wheel.so trust use_uid

# include system auth settings
auth      include     system-auth

# limit su to users in the wheel group
# disabled by default
#auth      required    pam_wheel.so use_uid

# include system account settings
account   include     system-account

# Set default environment variables for the service user
session   required    pam_env.so

# include system session settings
session   include     system-session

# End /etc/pam.d/su
EOF
'chpasswd' and 'newusers'
cat > /etc/pam.d/chpasswd << "EOF"
# Begin /etc/pam.d/chpasswd

# always allow root
auth      sufficient  pam_rootok.so

# include system auth and account settings
auth      include     system-auth
account   include     system-account
password  include     system-password

# End /etc/pam.d/chpasswd
EOF

sed -e s/chpasswd/newusers/ /etc/pam.d/chpasswd >/etc/pam.d/newusers
'chage'
cat > /etc/pam.d/chage << "EOF"
# Begin /etc/pam.d/chage

# always allow root
auth      sufficient  pam_rootok.so

# include system auth and account settings
auth      include     system-auth
account   include     system-account

# End /etc/pam.d/chage
EOF
Other shadow utilities
for PROGRAM in chfn chgpasswd chsh groupadd groupdel \
               groupmems groupmod useradd userdel usermod
do
    install -v -m644 /etc/pam.d/chage /etc/pam.d/${PROGRAM}
    sed -i "s/chage/$PROGRAM/" /etc/pam.d/${PROGRAM}
done

Warning

At this point, you should do a simple test to see if Shadow is working as expected. Open another terminal and log in as root, and then run login and login as another user. If you do not see any errors, then all is well and you should proceed with the rest of the configuration. If you did receive errors, stop now and double check the above configuration files manually. Any error is the sign of an error in the above procedure. You can also run the test suite from the Linux-PAM package to assist you in determining the problem. If you cannot find and fix the error, you should recompile Shadow adding the --without-libpam switch to the configure command in the above instructions (also move the /etc/login.defs.orig backup file to /etc/login.defs). If you fail to do this and the errors remain, you will be unable to log into your system.

Configuring Login Access

Instead of using the /etc/login.access file for controlling access to the system, Linux-PAM uses the pam_access.so module along with the /etc/security/access.conf file. Rename the /etc/login.access file using the following command:

if [ -f /etc/login.access ]; then mv -v /etc/login.access{,.NOUSE}; fi
Configuring Resource Limits

Instead of using the /etc/limits file for limiting usage of system resources, Linux-PAM uses the pam_limits.so module along with the /etc/security/limits.conf file. Rename the /etc/limits file using the following command:

if [ -f /etc/limits ]; then mv -v /etc/limits{,.NOUSE}; fi

Caution

Be sure to test the login capabilities of the system before logging out. Errors in the configuration can cause a permanent lockout requiring a boot from an external source to correct the problem.

Contents

A list of the installed files, along with their short descriptions can be found at ../../../../lfs/view/11.3/chapter08/shadow.html#contents-shadow.

ssh-askpass-9.2p1

Introduction to ssh-askpass

The ssh-askpass is a generic executable name for many packages, with similar names, that provide a interactive X service to grab password for packages requiring administrative privileges to be run. It prompts the user with a window box where the necessary password can be inserted. Here, we choose Damien Miller's package distributed in the OpenSSH tarball.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

ssh-askpass Dependencies

Required

GTK+-3.24.36, Sudo-1.9.13p1 (runtime), Xorg Libraries, and a graphical environment (runtime)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/ssh-askpass

Installation of ssh-askpass

Install ssh-askpass by running the following commands:

cd contrib &&
make gnome-ssh-askpass3

Now, as the root user:

install -v -d -m755                    /usr/libexec/openssh/contrib  &&
install -v -m755    gnome-ssh-askpass3 /usr/libexec/openssh/contrib  &&
ln -sv -f contrib/gnome-ssh-askpass3   /usr/libexec/openssh/ssh-askpass

The use of /usr/libexec/openssh/contrib and a symlink is justified by the eventual necessity of a different program for that service.

Configuring ssh-askpass

Configuration Information

As the root user, configure Sudo-1.9.13p1 to use ssh-askpass:

cat >> /etc/sudo.conf << "EOF" &&
# Path to askpass helper program
Path askpass /usr/libexec/openssh/ssh-askpass
EOF
chmod -v 0644 /etc/sudo.conf

If a given graphical <application> requires administrative privileges, use sudo -A <application> from an x-terminal, from a Window Manager menu and/or replace "Exec=<application> ..." by "Exec=sudo -A <application> ..." in the <application>.desktop file.

Contents

Installed Programs: gnome-ssh-askpass3, ssh-askpass (symlink to gnome-ssh-askpass3)
Installed Library: None
Installed Directory: /usr/libexec/openssh/contrib

stunnel-5.68

Introduction to stunnel

The stunnel package contains a program that allows you to encrypt arbitrary TCP connections inside SSL (Secure Sockets Layer) so you can easily communicate with clients over secure channels. stunnel can also be used to tunnel PPP over network sockets without changes to the server package source code.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

stunnel Dependencies

Optional

libnsl-2.0.0, netcat (required for tests), tcpwrappers, and TOR

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/stunnel

Installation of stunnel

The stunnel daemon will be run in a chroot jail by an unprivileged user. Create the new user and group using the following commands as the root user:

groupadd -g 51 stunnel &&
useradd -c "stunnel Daemon" -d /var/lib/stunnel \
        -g stunnel -s /bin/false -u 51 stunnel

Note

A signed SSL Certificate and a Private Key is necessary to run the stunnel daemon. After the package is installed, there are instructions to generate them. However, if you own or have already created a signed SSL Certificate you wish to use, copy it to /etc/stunnel/stunnel.pem before starting the build (ensure only root has read and write access). The .pem file must be formatted as shown below:

-----BEGIN PRIVATE KEY-----
<many encrypted lines of private key>
-----END PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
<many encrypted lines of certificate>
-----END CERTIFICATE-----
-----BEGIN DH PARAMETERS-----
<encrypted lines of dh parms>
-----END DH PARAMETERS-----

Install stunnel by running the following commands:

./configure --prefix=/usr        \
            --sysconfdir=/etc    \
            --localstatedir=/var \
            --disable-systemd    &&
make

If you have installed the optional netcat application, the regression tests can be run with make check.

Now, as the root user:

make docdir=/usr/share/doc/stunnel-5.68 install

If you do not already have a signed SSL Certificate and Private Key, create the stunnel.pem file in the /etc/stunnel directory using the command below. You will be prompted to enter the necessary information. Ensure you reply to the

Common Name (FQDN of your server) [localhost]:

prompt with the name or IP address you will be using to access the service(s).

To generate a certificate, as the root user, issue:

make cert

Command Explanations

--disable-systemd: This switch disables systemd socket activation support which is not available in BLFS.

make docdir=... install: This command installs the package and changes the documentation installation directory to standard naming conventions.

Configuring stunnel

Config Files

/etc/stunnel/stunnel.conf

Configuration Information

As the root user, create the directory used for the .pid file created when the stunnel daemon starts:

install -v -m750 -o stunnel -g stunnel -d /var/lib/stunnel/run &&
chown stunnel:stunnel /var/lib/stunnel

Next, create a basic /etc/stunnel/stunnel.conf configuration file using the following commands as the root user:

cat > /etc/stunnel/stunnel.conf << "EOF"
; File: /etc/stunnel/stunnel.conf

; Note: The pid and output locations are relative to the chroot location.

pid    = /run/stunnel.pid
chroot = /var/lib/stunnel
client = no
setuid = stunnel
setgid = stunnel
cert   = /etc/stunnel/stunnel.pem

;debug = 7
;output = stunnel.log

;[https]
;accept  = 443
;connect = 80
;; "TIMEOUTclose = 0" is a workaround for a design flaw in Microsoft SSL
;; Microsoft implementations do not use SSL close-notify alert and thus
;; they are vulnerable to truncation attacks
;TIMEOUTclose = 0

EOF

Finally, add the service(s) you wish to encrypt to the configuration file. The format is as follows:

[<service>]
accept  = <hostname:portnumber>
connect = <hostname:portnumber>

For a full explanation of the commands and syntax used in the configuration file, issue man stunnel.

Boot Script

To automatically start the stunnel daemon when the system is booted, install the /etc/rc.d/init.d/stunnel bootscript from the blfs-bootscripts-20230101 package.

make install-stunnel

Contents

Installed Programs: stunnel and stunnel3
Installed Library: libstunnel.so
Installed Directories: /{etc,lib,var/lib}/stunnel and /usr/share/doc/stunnel-5.68

Short Descriptions

stunnel

is a program designed to work as an SSL encryption wrapper between remote clients and local or remote servers

stunnel3

is a Perl wrapper script to use stunnel 3.x syntax with stunnel 4.05 or later

libstunnel.so

contains the API functions required by stunnel

Sudo-1.9.13p1

Introduction to Sudo

The Sudo package allows a system administrator to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while logging the commands and arguments.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Sudo Dependencies

Optional

Linux-PAM-1.5.2, MIT Kerberos V5-1.20.1, OpenLDAP-2.6.4, MTA (that provides a sendmail command), AFS, FWTK, and Opie

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/sudo

Installation of Sudo

Install Sudo by running the following commands:

./configure --prefix=/usr              \
            --libexecdir=/usr/lib      \
            --with-secure-path         \
            --with-all-insults         \
            --with-env-editor          \
            --docdir=/usr/share/doc/sudo-1.9.13p1 \
            --with-passprompt="[sudo] password for %p: " &&
make

To test the results, issue: env LC_ALL=C make check 2>&1 | tee make-check.log. Check the results with grep failed make-check.log.

Now, as the root user:

make install &&
ln -sfv libsudo_util.so.0.0.0 /usr/lib/sudo/libsudo_util.so.0

Command Explanations

--libexecdir=/usr/lib: This switch controls where private programs are installed. Everything in that directory is a library, so they belong under /usr/lib instead of /usr/libexec.

--with-secure-path: This switch transparently adds /sbin and /usr/sbin directories to the PATH environment variable.

--with-all-insults: This switch includes all the sudo insult sets.

--with-env-editor: This switch enables use of the environment variable EDITOR for visudo.

--with-passprompt: This switch sets the password prompt. The %p will be expanded to the name of the user whose password is being requested.

--without-pam: This switch avoids building Linux-PAM support when Linux-PAM is installed on the system.

Note

There are many options to sudo's configure command. Check the configure --help output for a complete list.

ln -sfv libsudo_util...: Works around a bug in the installation process, which links to the previously installed version (if there is one) instead of the new one.

Configuring Sudo

Config File

/etc/sudoers

Configuration Information

The sudoers file can be quite complicated. It is composed of two types of entries: aliases (basically variables) and user specifications (which specify who may run what). The installation installs a default configuration that has no privileges installed for any user.

A couple of common configuration changes are to set the path for the super user and to allow members of the wheel group to execute all commands after providing their own credientials. Use the following commands to create the /etc/sudoers.d/00-sudo configuration file as the root user:

cat > /etc/sudoers.d/00-sudo << "EOF"
Defaults secure_path="/usr/sbin:/usr/bin"
%wheel ALL=(ALL) ALL
EOF

Note

In very simple installations where there is only one user, it may be easier to just edit the /etc/sudoers file directly. In that case, the secure_path entry may not be needed and using sudo -E ... can import the non-privileged user's full environment into the privileged session.

The files in the /etc/sudoers.d directory are parsed in sorted lexical order. Be careful that entries in an added file do not overwrite previous entries.

For details, see man sudoers.

Note

The Sudo developers highly recommend using the visudo program to edit the sudoers file. This will provide basic sanity checking like syntax parsing and file permission to avoid some possible mistakes that could lead to a vulnerable configuration.

If PAM is installed on the system, Sudo is built with PAM support. In that case, issue the following command as the root user to create the PAM configuration file:

cat > /etc/pam.d/sudo << "EOF"
# Begin /etc/pam.d/sudo

# include the default auth settings
auth      include     system-auth

# include the default account settings
account   include     system-account

# Set default environment variables for the service user
session   required    pam_env.so

# include system session defaults
session   include     system-session

# End /etc/pam.d/sudo
EOF
chmod 644 /etc/pam.d/sudo

Contents

Installed Programs: cvtsudoers, sudo, sudo_logsrvd, sudo_sendlog, sudoedit (symlink), sudoreplay, and visudo
Installed Libraries: audit_json.so, group_file.so, libsudo_util.so, sample_approval.so, sudoers.so, sudo_noexec.so, and system_group.so
Installed Directories: /etc/sudoers.d, /usr/lib/sudo, /usr/share/doc/sudo-1.9.13p1, and /var/lib/sudo

Short Descriptions

cvtsudoers

converts between sudoers file formats

sudo

executes a command as another user as permitted by the /etc/sudoers configuration file

sudo_logsrvd

is a sudo event and I/O log server

sudo_sendlog

sends sudo I/O logs to the log server

sudoedit

is a symlink to sudo that implies the -e option to invoke an editor as another user

sudoreplay

is used to play back or list the output logs created by sudo

visudo

allows for safer editing of the sudoers file

Tripwire-2.4.3.7

Introduction to Tripwire

The Tripwire package contains programs used to verify the integrity of the files on a given system.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Tripwire Dependencies

Optional

An MTA

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/tripwire

Installation of Tripwire

Compile Tripwire by running the following commands:

sed -e '/^CLOBBER/s/false/true/'         \
    -e 's|TWDB="${prefix}|TWDB="/var|'   \
    -e '/TWMAN/ s|${prefix}|/usr/share|' \
    -e '/TWDOCS/s|${prefix}/doc/tripwire|/usr/share/doc/tripwire-2.4.3.7|' \
    -i installer/install.cfg                               &&

find . -name Makefile.am | xargs                           \
    sed -i 's/^[[:alpha:]_]*_HEADERS.*=/noinst_HEADERS =/' &&

sed '/dist/d' -i man/man?/Makefile.am                      &&
autoreconf -fi                                             &&

./configure --prefix=/usr --sysconfdir=/etc/tripwire       &&
make CPPFLAGS=-std=c++11

Note

The default configuration is to use a local MTA. If you don't have an MTA installed and have no wish to install one, modify install/install.cfg to use an SMTP server instead. Otherwise the install will fail.

This package does not come with a test suite.

Now, as the root user:

make install &&
cp -v policy/*.txt /usr/share/doc/tripwire-2.4.3.7

Note

During make install, several questions are asked, including passwords. If you want to make a script, you have to apply a sed before running make install:

sed -i -e 's@installer/install.sh@& -n -s <site-password> -l <local-password>@' Makefile

Of course, you should do this with dummy passwords and change them later.

Another issue when scripting is that the installer exits when the standard input is not a terminal. You may disable this behavior with the following sed:

sed '/-t 0/,+3d' -i installer/install.sh

Command Explanations

sed ... installer/install.cfg: This command tells the package to install the program database and reports in /var/lib/tripwire and sets the proper location for man pages and documentation.

find ..., sed ..., and autoreconf -fi: The build system is unusable as is, and has to be modified for the build to succeed.

CPPFLAGS=-std=c++11: Setting the C++ preprocessor flags to version 11 is necessary to prevent a conflict with the default version which is c++17 in recent version of gcc.

make install: This command creates the Tripwire security keys as well as installing the binaries. There are two keys: a site key and a local key which are stored in /etc/tripwire/.

cp -v policy/*.txt /usr/doc/tripwire-2.4.3.7: This command installs the tripwire sample policy files with the other tripwire documentation.i

Configuring Tripwire

Config Files

/etc/tripwire/*

Configuration Information

Tripwire uses a policy file to determine which files are integrity checked. The default policy file (/etc/tripwire/twpol.txt) is for a default installation and will need to be updated for your system.

Policy files should be tailored to each individual distribution and/or installation. Some example policy files can be found in /usr/share/doc/tripwire/.

If desired, copy the policy file you'd like to try into /etc/tripwire/ instead of using the default policy file, twpol.txt. It is, however, recommended that you edit your policy file. Get ideas from the examples above and read /usr/share/doc/tripwire/policyguide.txt for additional information. twpol.txt is a good policy file for learning about Tripwire as it will note any changes to the file system and can even be used as an annoying way of keeping track of changes for uninstallation of software.

After your policy file has been edited to your satisfaction you may begin the configuration steps (perform as the root) user:

twadmin --create-polfile --site-keyfile /etc/tripwire/site.key \
    /etc/tripwire/twpol.txt &&
tripwire --init

Depending on your system and the contents of the policy file, the initialization phase above can take a relatively long time.

Usage Information

Tripwire will identify file changes in the critical system files specified in the policy file. Using Tripwire while making frequent changes to these directories will flag all these changes. It is most useful after a system has reached a configuration that the user considers stable.

To use Tripwire after creating a policy file to run a report, use the following command:

tripwire --check > /etc/tripwire/report.txt

View the output to check the integrity of your files. An automatic integrity report can be produced by using a cron facility to schedule the runs.

Reports are stored in binary and, if desired, encrypted. View reports, as the root user, with:

twprint --print-report -r /var/lib/tripwire/report/<report-name.twr>

After you run an integrity check, you should examine the report (or email) and then modify the Tripwire database to reflect the changed files on your system. This is so that Tripwire will not continually notify you hat files you intentionally changed are a security violation. To do this you must first ls -l /var/lib/tripwire/report/ and note the name of the newest file which starts with your system name as presented by the command uname -n and ends in .twr. These files were created during report creation and the most current one is needed to update the Tripwire database of your system. As the root user, type in the following command making the appropriate report name:

tripwire --update --twrfile /var/lib/tripwire/report/<report-name.twr>

You will be placed into Vim with a copy of the report in front of you. If all the changes were good, then just type :wq and after entering your local key, the database will be updated. If there are files which you still want to be warned about, remove the 'x' before the filename in the report and type :wq.

Changing the Policy File

If you are unhappy with your policy file and would like to modify it or use a new one, modify the policy file and then execute the following commands as the root user:

twadmin --create-polfile /etc/tripwire/twpol.txt &&
tripwire --init

Contents

Installed Programs: siggen, tripwire, twadmin, and twprint
Installed Libraries: None
Installed Directories: /etc/tripwire, /var/lib/tripwire, and /usr/share/doc/tripwire-2.4.3.7

Short Descriptions

siggen

is a signature gathering utility that displays the hash function values for the specified files

tripwire

is the main file integrity checking program

twadmin

administrative and utility tool used to perform certain administrative functions related to Tripwire files and configuration options

twprint

prints Tripwire database and report files in clear text format

volume_key-0.3.12

Introduction to volume_key

The volume_key package provides a library for manipulating storage volume encryption keys and storing them separately from volumes to handle forgotten passphrases.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

volume_key Dependencies

Required

cryptsetup-2.4.3, GLib-2.74.5, GnuPG-2.4.0, GPGME-1.18.0, and nss-3.88.1

Recommended

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/volume_key

Installation of volume_key

Note

This package expands to the directory volume_key-volume_key-0.3.12.

Tell the building system how to locate GPGME and GnuPG correctly:

sed -e '/AM_PATH_GPGME/iAM_PATH_GPG_ERROR' \
    -e 's/gpg2/gpg/' -i configure.ac

Install volume_key by running the following commands:

autoreconf -fiv              &&
./configure --prefix=/usr    \
            --without-python &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--without-python: This parameter prevents building the Python 2 bindings, if Python-2.7.18 is installed.

--without-python3: Use this option if you do not want to build the Python 3 bindings. In this case, SWIG-4.1.1 is not needed.

Contents

Installed Program: volume_key
Installed Library: libvolume_key.so
Installed Directory: /usr/include/volume_key

Short Descriptions

volume_key

manages encrypted volume keys and passphrases

volume_key.so

contains API functions for managing encrypted volume keys

Chapter 5. File Systems and Disk Management

Journaling file systems reduce the time needed to recover a file system that was not unmounted properly. While this can be extremely important in reducing downtime for servers, it has also become popular for desktop environments. This chapter contains other journaling file systems you can use instead of the default LFS extended file system (ext2/3/4). It also provides introductory material on managing disk arrays.

About initramfs

The only purpose of an initramfs is to mount the root filesystem. The initramfs is a complete set of directories that you would find on a normal root filesystem. It is bundled into a single cpio archive and compressed with one of several compression algorithms.

At boot time, the boot loader loads the kernel and the initramfs image into memory and starts the kernel. The kernel checks for the presence of the initramfs and, if found, mounts it as / and runs /init. The init program is typically a shell script. Note that the boot process takes longer, possibly significantly longer, if an initramfs is used.

For most distributions, kernel modules are the biggest reason to have an initramfs. In a general distribution, there are many unknowns such as file system types and disk layouts. In a way, this is the opposite of LFS where the system capabilities and layout are known and a custom kernel is normally built. In this situation, an initramfs is rarely needed.

There are only four primary reasons to have an initramfs in the LFS environment: loading the rootfs from a network, loading it from an LVM logical volume, having an encrypted rootfs where a password is required, or for the convenience of specifying the rootfs as a LABEL or UUID. Anything else usually means that the kernel was not configured properly.

Building an initramfs

If you do decide to build an initramfs, the following scripts will provide a basis to do it. The scripts will allow specifying a rootfs via partition UUID or partition LABEL or a rootfs on an LVM logical volume. They do not support an encrypted root file system or mounting the rootfs over a network card. For a more complete capability see the LFS Hints or dracut.

To install these scripts, run the following commands as the root user:

cat > /usr/sbin/mkinitramfs << "EOF"
#!/bin/bash
# This file based in part on the mkinitramfs script for the LFS LiveCD
# written by Alexander E. Patrakov and Jeremy Huntwork.

copy()
{
  local file

  if [ "$2" = "lib" ]; then
    file=$(PATH=/usr/lib type -p $1)
  else
    file=$(type -p $1)
  fi

  if [ -n "$file" ] ; then
    cp $file $WDIR/usr/$2
  else
    echo "Missing required file: $1 for directory $2"
    rm -rf $WDIR
    exit 1
  fi
}

if [ -z $1 ] ; then
  INITRAMFS_FILE=initrd.img-no-kmods
else
  KERNEL_VERSION=$1
  INITRAMFS_FILE=initrd.img-$KERNEL_VERSION
fi

if [ -n "$KERNEL_VERSION" ] && [ ! -d "/usr/lib/modules/$1" ] ; then
  echo "No modules directory named $1"
  exit 1
fi

printf "Creating $INITRAMFS_FILE... "

binfiles="sh cat cp dd killall ls mkdir mknod mount "
binfiles="$binfiles umount sed sleep ln rm uname"
binfiles="$binfiles readlink basename"

# Systemd installs udevadm in /bin. Other udev implementations have it in /sbin
if [ -x /usr/bin/udevadm ] ; then binfiles="$binfiles udevadm"; fi

sbinfiles="modprobe blkid switch_root"

# Optional files and locations
for f in mdadm mdmon udevd udevadm; do
  if [ -x /usr/sbin/$f ] ; then sbinfiles="$sbinfiles $f"; fi
done

# Add lvm if present (cannot be done with the others because it
# also needs dmsetup
if [ -x /usr/sbin/lvm ] ; then sbinfiles="$sbinfiles lvm dmsetup"; fi

unsorted=$(mktemp /tmp/unsorted.XXXXXXXXXX)

DATADIR=/usr/share/mkinitramfs
INITIN=init.in

# Create a temporary working directory
WDIR=$(mktemp -d /tmp/initrd-work.XXXXXXXXXX)

# Create base directory structure
mkdir -p $WDIR/{dev,run,sys,proc,usr/{bin,lib/{firmware,modules},sbin}}
mkdir -p $WDIR/etc/{modprobe.d,udev/rules.d}
touch $WDIR/etc/modprobe.d/modprobe.conf
ln -s usr/bin  $WDIR/bin
ln -s usr/lib  $WDIR/lib
ln -s usr/sbin $WDIR/sbin
ln -s lib      $WDIR/lib64

# Create necessary device nodes
mknod -m 640 $WDIR/dev/console c 5 1
mknod -m 664 $WDIR/dev/null    c 1 3

# Install the udev configuration files
if [ -f /etc/udev/udev.conf ]; then
  cp /etc/udev/udev.conf $WDIR/etc/udev/udev.conf
fi

for file in $(find /etc/udev/rules.d/ -type f) ; do
  cp $file $WDIR/etc/udev/rules.d
done

# Install any firmware present
cp -a /usr/lib/firmware $WDIR/usr/lib

# Copy the RAID configuration file if present
if [ -f /etc/mdadm.conf ] ; then
  cp /etc/mdadm.conf $WDIR/etc
fi

# Install the init file
install -m0755 $DATADIR/$INITIN $WDIR/init

if [  -n "$KERNEL_VERSION" ] ; then
  if [ -x /usr/bin/kmod ] ; then
    binfiles="$binfiles kmod"
  else
    binfiles="$binfiles lsmod"
    sbinfiles="$sbinfiles insmod"
  fi
fi

# Install basic binaries
for f in $binfiles ; do
  ldd /usr/bin/$f | sed "s/\t//" | cut -d " " -f1 >> $unsorted
  copy /usr/bin/$f bin
done

for f in $sbinfiles ; do
  ldd /usr/sbin/$f | sed "s/\t//" | cut -d " " -f1 >> $unsorted
  copy $f sbin
done

# Add udevd libraries if not in /usr/sbin
if [ -x /usr/lib/udev/udevd ] ; then
  ldd /usr/lib/udev/udevd | sed "s/\t//" | cut -d " " -f1 >> $unsorted
elif [ -x /usr/lib/systemd/systemd-udevd ] ; then
  ldd /usr/lib/systemd/systemd-udevd | sed "s/\t//" | cut -d " " -f1 >> $unsorted
fi

# Add module symlinks if appropriate
if [ -n "$KERNEL_VERSION" ] && [ -x /usr/bin/kmod ] ; then
  ln -s kmod $WDIR/usr/bin/lsmod
  ln -s kmod $WDIR/usr/bin/insmod
fi

# Add lvm symlinks if appropriate
# Also copy the lvm.conf file
if  [ -x /usr/sbin/lvm ] ; then
  ln -s lvm $WDIR/usr/sbin/lvchange
  ln -s lvm $WDIR/usr/sbin/lvrename
  ln -s lvm $WDIR/usr/sbin/lvextend
  ln -s lvm $WDIR/usr/sbin/lvcreate
  ln -s lvm $WDIR/usr/sbin/lvdisplay
  ln -s lvm $WDIR/usr/sbin/lvscan

  ln -s lvm $WDIR/usr/sbin/pvchange
  ln -s lvm $WDIR/usr/sbin/pvck
  ln -s lvm $WDIR/usr/sbin/pvcreate
  ln -s lvm $WDIR/usr/sbin/pvdisplay
  ln -s lvm $WDIR/usr/sbin/pvscan

  ln -s lvm $WDIR/usr/sbin/vgchange
  ln -s lvm $WDIR/usr/sbin/vgcreate
  ln -s lvm $WDIR/usr/sbin/vgscan
  ln -s lvm $WDIR/usr/sbin/vgrename
  ln -s lvm $WDIR/usr/sbin/vgck
  # Conf file(s)
  cp -a /etc/lvm $WDIR/etc
fi

# Install libraries
sort $unsorted | uniq | while read library ; do
# linux-vdso and linux-gate are pseudo libraries and do not correspond to a file
# libsystemd-shared is in /lib/systemd, so it is not found by copy, and
# it is copied below anyway
  if [[ "$library" == linux-vdso.so.1 ]] ||
     [[ "$library" == linux-gate.so.1 ]] ||
     [[ "$library" == libsystemd-shared* ]]; then
    continue
  fi

  copy $library lib
done

if [ -d /usr/lib/udev ]; then
  cp -a /usr/lib/udev $WDIR/usr/lib
fi
if [ -d /usr/lib/systemd ]; then
  cp -a /usr/lib/systemd $WDIR/usr/lib
fi
if [ -d /usr/lib/elogind ]; then
  cp -a /usr/lib/elogind $WDIR/usr/lib
fi

# Install the kernel modules if requested
if [ -n "$KERNEL_VERSION" ]; then
  find \
     /usr/lib/modules/$KERNEL_VERSION/kernel/{crypto,fs,lib}                      \
     /usr/lib/modules/$KERNEL_VERSION/kernel/drivers/{block,ata,nvme,md,firewire} \
     /usr/lib/modules/$KERNEL_VERSION/kernel/drivers/{scsi,message,pcmcia,virtio} \
     /usr/lib/modules/$KERNEL_VERSION/kernel/drivers/usb/{host,storage}           \
     -type f 2> /dev/null | cpio --make-directories -p --quiet $WDIR

  cp /usr/lib/modules/$KERNEL_VERSION/modules.{builtin,order} \
            $WDIR/usr/lib/modules/$KERNEL_VERSION
  if [ -f /usr/lib/modules/$KERNEL_VERSION/modules.builtin.modinfo ]; then
    cp /usr/lib/modules/$KERNEL_VERSION/modules.builtin.modinfo \
            $WDIR/usr/lib/modules/$KERNEL_VERSION
  fi

  depmod -b $WDIR $KERNEL_VERSION
fi

( cd $WDIR ; find . | cpio -o -H newc --quiet | gzip -9 ) > $INITRAMFS_FILE

# Prepare early loading of microcode if available
if ls /usr/lib/firmware/intel-ucode/* >/dev/null 2>&1 ||
   ls /usr/lib/firmware/amd-ucode/*   >/dev/null 2>&1; then

# first empty WDIR to reuse it
  rm -r $WDIR/*

  DSTDIR=$WDIR/kernel/x86/microcode
  mkdir -p $DSTDIR

  if [ -d /usr/lib/firmware/amd-ucode ]; then
    cat /usr/lib/firmware/amd-ucode/microcode_amd*.bin > $DSTDIR/AuthenticAMD.bin
  fi

  if [ -d /usr/lib/firmware/intel-ucode ]; then
    cat /usr/lib/firmware/intel-ucode/* > $DSTDIR/GenuineIntel.bin
  fi

  ( cd $WDIR; find . | cpio -o -H newc --quiet ) > microcode.img
  cat microcode.img $INITRAMFS_FILE > tmpfile
  mv tmpfile $INITRAMFS_FILE
  rm microcode.img
fi

# Remove the temporary directories and files
rm -rf $WDIR $unsorted
printf "done.\n"

EOF

chmod 0755 /usr/sbin/mkinitramfs
mkdir -p /usr/share/mkinitramfs &&
cat > /usr/share/mkinitramfs/init.in << "EOF"
#!/bin/sh

PATH=/usr/bin:/usr/sbin
export PATH

problem()
{
   printf "Encountered a problem!\n\nDropping you to a shell.\n\n"
   sh
}

no_device()
{
   printf "The device %s, which is supposed to contain the\n" $1
   printf "root file system, does not exist.\n"
   printf "Please fix this problem and exit this shell.\n\n"
}

no_mount()
{
   printf "Could not mount device %s\n" $1
   printf "Sleeping forever. Please reboot and fix the kernel command line.\n\n"
   printf "Maybe the device is formatted with an unsupported file system?\n\n"
   printf "Or maybe filesystem type autodetection went wrong, in which case\n"
   printf "you should add the rootfstype=... parameter to the kernel command line.\n\n"
   printf "Available partitions:\n"
}

do_mount_root()
{
   mkdir /.root
   [ -n "$rootflags" ] && rootflags="$rootflags,"
   rootflags="$rootflags$ro"

   case "$root" in
      /dev/*    ) device=$root ;;
      UUID=*    ) eval $root; device="/dev/disk/by-uuid/$UUID" ;;
      PARTUUID=*) eval $root; device="/dev/disk/by-partuuid/$PARTUUID" ;;
      LABEL=*   ) eval $root; device="/dev/disk/by-label/$LABEL" ;;
      ""        ) echo "No root device specified." ; problem ;;
   esac

   while [ ! -b "$device" ] ; do
       no_device $device
       problem
   done

   if ! mount -n -t "$rootfstype" -o "$rootflags" "$device" /.root ; then
       no_mount $device
       cat /proc/partitions
       while true ; do sleep 10000 ; done
   else
       echo "Successfully mounted device $root"
   fi
}

do_try_resume()
{
   case "$resume" in
      UUID=* ) eval $resume; resume="/dev/disk/by-uuid/$UUID"  ;;
      LABEL=*) eval $resume; resume="/dev/disk/by-label/$LABEL" ;;
   esac

   if $noresume || ! [ -b "$resume" ]; then return; fi

   ls -lH "$resume" | ( read x x x x maj min x
       echo -n ${maj%,}:$min > /sys/power/resume )
}

init=/sbin/init
root=
rootdelay=
rootfstype=auto
ro="ro"
rootflags=
device=
resume=
noresume=false

mount -n -t devtmpfs devtmpfs /dev
mount -n -t proc     proc     /proc
mount -n -t sysfs    sysfs    /sys
mount -n -t tmpfs    tmpfs    /run

read -r cmdline < /proc/cmdline

for param in $cmdline ; do
  case $param in
    init=*      ) init=${param#init=}             ;;
    root=*      ) root=${param#root=}             ;;
    rootdelay=* ) rootdelay=${param#rootdelay=}   ;;
    rootfstype=*) rootfstype=${param#rootfstype=} ;;
    rootflags=* ) rootflags=${param#rootflags=}   ;;
    resume=*    ) resume=${param#resume=}         ;;
    noresume    ) noresume=true                   ;;
    ro          ) ro="ro"                         ;;
    rw          ) ro="rw"                         ;;
  esac
done

# udevd location depends on version
if [ -x /sbin/udevd ]; then
  UDEVD=/sbin/udevd
elif [ -x /lib/udev/udevd ]; then
  UDEVD=/lib/udev/udevd
elif [ -x /lib/systemd/systemd-udevd ]; then
  UDEVD=/lib/systemd/systemd-udevd
else
  echo "Cannot find udevd nor systemd-udevd"
  problem
fi

${UDEVD} --daemon --resolve-names=never
udevadm trigger
udevadm settle

if [ -f /etc/mdadm.conf ] ; then mdadm -As                       ; fi
if [ -x /sbin/vgchange  ] ; then /sbin/vgchange -a y > /dev/null ; fi
if [ -n "$rootdelay"    ] ; then sleep "$rootdelay"              ; fi

do_try_resume # This function will not return if resuming from disk
do_mount_root

killall -w ${UDEVD##*/}

exec switch_root /.root "$init" "$@"

EOF

Using an initramfs

Required Runtime Dependency

cpio-2.13

Other Runtime Dependencies

LVM2-2.03.18 and/or mdadm-4.2 must be installed before generating the initramfs, if the system partition uses them.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/initramfs

To build an initramfs, run the following as the root user:

mkinitramfs [KERNEL VERSION]

The optional argument is the directory where the appropriate kernel modules are located. This must be a subdirectory of /lib/modules. If no modules are specified, then the initramfs is named initrd.img-no-kmods. If a kernel version is specified, the initrd is named initrd.img-$KERNEL_VERSION and is only appropriate for the specific kernel specified. The output file will be placed in the current directory.

If early loading of microcode is needed (see the section called “Microcode updates for CPUs”), you can install the appropriate blob or container in /lib/firmware. It will be automatically added to the initrd when running mkinitramfs.

After generating the initrd, copy it to the /boot directory.

Now edit /boot/grub/grub.cfg and add a new menuentry. Below are several examples.

# Generic initramfs and root fs identified by UUID
menuentry "LFS Dev (LFS-7.0-Feb14) initrd, Linux 3.0.4"
{
  linux  /vmlinuz-3.0.4-lfs-20120214 root=UUID=54b934a9-302d-415e-ac11-4988408eb0a8 ro
  initrd /initrd.img-no-kmods
}
# Generic initramfs and root fs on LVM partition
menuentry "LFS Dev (LFS-7.0-Feb18) initrd lvm, Linux 3.0.4"
{
  linux  /vmlinuz-3.0.4-lfs-20120218 root=/dev/mapper/myroot ro
  initrd /initrd.img-no-kmods
}
# Specific initramfs and root fs identified by LABEL
menuentry "LFS Dev (LFS-7.1-Feb20) initrd label, Linux 3.2.6"
{
  linux  /vmlinuz-3.2.6-lfs71-120220 root=LABEL=lfs71 ro
  initrd /initrd.img-3.2.6-lfs71-120220
}

Finally, reboot the system and select the desired system.

btrfs-progs-6.1.3

Introduction to btrfs-progs

The btrfs-progs package contains administration and debugging tools for the B-tree file system (btrfs).

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Btrfs-progs Dependencies

Required

LZO-2.10

Recommended
Optional

LVM2-2.03.18 (dmsetup is used in tests), reiserfsprogs-3.6.27 (for tests), and sphinx-6.1.3 (required to build documentation),

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/btrfs-progs

Kernel Configuration

Enable the following option in the kernel configuration and recompile the kernel:

File systems --->
  <*/M> Btrfs filesystem support [CONFIG_BTRFS_FS]

In addition to the above and to the options required for LVM2-2.03.18 and reiserfsprogs-3.6.27, the following options must be enabled for running tests:

File systems  --->
  [*]   Btrfs POSIX Access Control Lists      [CONFIG_BTRFS_FS_POSIX_ACL]
  [*]   ReiserFS extended attributes          [CONFIG_REISERFS_FS_XATTR]
  [*]     ReiserFS POSIX Access Control Lists [CONFIG_REISERFS_FS_POSIX_ACL]

Installation of btrfs-progs

Install btrfs-progs by running the following commands:

./configure --prefix=/usr --disable-documentation &&
make

Note

Some tests require grep built with perl regular expressions. To obtain this, rebuild grep with the LFS Chapter 8 instructions after installing pcre2-10.42.

Before running tests, build a support program:

make fssum

To test the results, issue (as the root user):

pushd tests
   ./fsck-tests.sh
   ./mkfs-tests.sh
   ./cli-tests.sh
   ./convert-tests.sh
   ./misc-tests.sh
   ./fuzz-tests.sh
popd

Note

If the above mentioned kernel options are not enabled, some tests fail, and prevent all the remaining tests to run because the test disk image is not cleanly unmounted.

The mkfs test 025-zoned-parallel is known to fail.

Install the package as the root user:

make install

Command Explanations

--disable-documentation: This option is needed if the recommended dependencies are not installed.

Contents

Installed Programs: btrfs, btrfs-convert, btrfs-find-root, btrfs-image, btrfs-map-logical, btrfs-select-super, btrfsck (link to btrfs), btrfstune, fsck.btrfs, and mkfs.btrfs
Installed Libraries: libbtrfs.so and libbtrfsutil.so
Installed Directories: /usr/include/btrfs

Short Descriptions

btrfs

is the main interface into btrfs filesystem operations

btrfs-convert

converts from an ext2/3/4 or reiserfs filesystem to btrfs

btrfs-find-root

is a filter to find btrfs root

btrfs-map-logical

maps btrfs logical extent to physical extent

btrfs-select-super

overwrites the primary superblock with a backup copy

btrfstune

tunes various filesystem parameters

fsck.btrfs

does nothing, but is present for consistency with fstab

mkfs.btrfs

creates a btrfs file system

dosfstools-4.2

Introduction to dosfstools

The dosfstools package contains various utilities for use with the FAT family of file systems.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/dosfstools

Kernel Configuration

Enable the following option in the kernel configuration and recompile the kernel:

File systems --->
  <DOS/FAT/EXFAT/NT Filesystems --->
    <*/M> MSDOS fs support             [CONFIG_MSDOS_FS]
    <*/M> VFAT (Windows-95) fs support [CONFIG_VFAT_FS]

Installation of dosfstools

Install dosfstools by running the following commands:

./configure --prefix=/usr            \
            --enable-compat-symlinks \
            --mandir=/usr/share/man  \
            --docdir=/usr/share/doc/dosfstools-4.2 &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Command Explanations

--enable-compat-symlinks: This switch creates the dosfsck, dosfslabel, fsck.msdos, fsck.vfat, mkdosfs, mkfs.msdos, and mkfs.vfat symlinks required by some programs.

Contents

Installed Programs: fatlabel, fsck.fat, and mkfs.fat

Short Descriptions

fatlabel

sets or gets a MS-DOS filesystem label from a given device

fsck.fat

checks and repairs MS-DOS filesystems

mkfs.fat

creates an MS-DOS filesystem under Linux

Fuse-3.13.1

Introduction to Fuse

FUSE (Filesystem in Userspace) is a simple interface for userspace programs to export a virtual filesystem to the Linux kernel. Fuse also aims to provide a secure method for non privileged users to create and mount their own filesystem implementations.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Fuse Dependencies

Optional

Doxygen-1.9.6 (to rebuild the API documentation) and pytest-7.2.1 (required for tests)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/fuse

Kernel Configuration

Enable the following options in the kernel configuration and recompile the kernel if necessary:

File systems  --->
  <*/M> FUSE (Filesystem in Userspace) support [CONFIG_FUSE_FS]

Character devices in userspace should be enabled too for running the tests:

File systems  --->
  <*/M> FUSE (Filesystem in Userspace) support  [CONFIG_FUSE_FS]
  <*/M>   Character device in Userspace support [CONFIG_CUSE]

Installation of Fuse

Install Fuse by running the following commands:

sed -i '/^udev/,$ s/^/#/' util/meson.build &&

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release .. &&
ninja

The API documentation is included in the package, but if you have Doxygen-1.9.6 installed and wish to rebuild it, issue:

pushd .. &&
  doxygen doc/Doxyfile &&
popd

To test the results, run (as the root user):

python3 -m pytest test/

The pytest-7.2.1 Python module is required for the tests. One test named test_cuse will fail if the CONFIG_CUSE configuration item was not enabled when the kernel was built. Two tests, test_ctests.py and test_examples.py will produce a warning because a deprecated Python module is used.

Now, as the root user:

ninja install                  &&
chmod u+s /usr/bin/fusermount3 &&

cd ..                          &&
install -v -m755 -d /usr/share/doc/fuse-3.13.1 &&
install -v -m644    doc/{README.NFS,kernel.txt} \
                    /usr/share/doc/fuse-3.13.1 &&
cp -Rv doc/html     /usr/share/doc/fuse-3.13.1

Command Explanations

sed ... util/meson.build: This command disables the installation of a boot script and udev rule that are not needed.

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

Configuring fuse

Config Files

Some options regarding mount policy can be set in the file /etc/fuse.conf. To install the file run the following command as the root user:

cat > /etc/fuse.conf << "EOF"
# Set the maximum number of FUSE mounts allowed to non-root users.
# The default is 1000.
#
#mount_max = 1000

# Allow non-root users to specify the 'allow_other' or 'allow_root'
# mount options.
#
#user_allow_other
EOF

Additional information about the meaning of the configuration options are found in the man page.

Contents

Installed Programs: fusermount3 and mount.fuse3
Installed Libraries: libfuse3.so
Installed Directory: /usr/include/fuse3 and /usr/share/doc/fuse-3.13.1

Short Descriptions

fusermount3

is a suid root program to mount and unmount Fuse filesystems

mount.fuse3

is the command mount calls to mount a Fuse filesystem

libfuse3.so

contains the FUSE API functions

jfsutils-1.1.15

Introduction to jfsutils

The jfsutils package contains administration and debugging tools for the jfs file system.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/jfs

Kernel Configuration

Enable the following option in the kernel configuration and recompile the kernel:

File systems  --->
  <*/M> JFS filesystem support [CONFIG_JFS_FS]

Installation of jfsutils

First, fix some issues exposed by GCC 10 and later:

patch -Np1 -i ../jfsutils-1.1.15-gcc10_fix-1.patch

Install jfsutils by running the following commands:

sed -i "/unistd.h/a#include <sys/types.h>"    fscklog/extract.c &&
sed -i "/ioctl.h/a#include <sys/sysmacros.h>" libfs/devices.c   &&

./configure &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Command Explanations

sed ...: Fixes building with glibc 2.28.

Contents

Installed Programs: fsck.jfs, jfs_debugfs, jfs_fsck, jfs_fscklog, jfs_logdump, jfs_mkfs, jfs_tune, mkfs.jfs
Installed Libraries: None
Installed Directories: None

Short Descriptions

fsck.jfs

is used to replay the JFS transaction log, check a JFS formatted device for errors, and fix any errors found

jfs_fsck

is a hard link to fsck.jfs

mkfs.jfs

constructs an JFS file system

jfs_mkfs

is a hard link to mkfs.jfs

jfs_debugfs

is a program which can be used to perform various low-level actions on a JFS formatted device

jfs_fscklog

extracts a JFS fsck service log into a file and/or formats and displays the extracted file

jfs_logdump

dumps the contents of the journal log from the specified JFS formatted device into output file ./jfslog.dmp

jfs_tune

adjusts tunable file system parameters on JFS file systems

LVM2-2.03.18

Introduction to LVM2

The LVM2 package is a set of tools that manage logical partitions. It allows spanning of file systems across multiple physical disks and disk partitions and provides for dynamic growing or shrinking of logical partitions, mirroring and low storage footprint snapshots.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

LVM2 Dependencies

Required

libaio-0.3.113

Optional

mdadm-4.2, reiserfsprogs-3.6.27, Valgrind-3.20.0, Which-2.21, xfsprogs-6.1.1 (all five may be used, but are not required, for tests), thin-provisioning-tools, and vdo

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/lvm2

Kernel Configuration

Enable the following options in the kernel configuration and recompile the kernel:

Note

There are several other Device Mapper options in the kernel beyond those listed below. In order to get reasonable results if running the regression tests, all must be enabled either internally or as a module. The tests will all time out if Magic SysRq key is not enabled.

Device Drivers --->
  [*] Multiple devices driver support (RAID and LVM) ---> [CONFIG_MD]
    <*/M>   Device mapper support                         [CONFIG_BLK_DEV_DM]
    <*/M>   Crypt target support                          [CONFIG_DM_CRYPT]
    <*/M>   Snapshot target                               [CONFIG_DM_SNAPSHOT]
    <*/M>   Thin provisioning target                      [CONFIG_DM_THIN_PROVISIONING]
    <*/M>   Cache target (EXPERIMENTAL)                   [CONFIG_DM_CACHE]
    <*/M>   Mirror target                                 [CONFIG_DM_MIRROR]
    <*/M>   Zero target                                   [CONFIG_DM_ZERO]
    <*/M>   I/O delaying target                           [CONFIG_DM_DELAY]
  [*] Block devices --->
    <*/M>   RAM block device support                      [CONFIG_BLK_DEV_RAM]
Kernel hacking --->
  Generic Kernel Debugging Instruments --->
    [*] Magic SysRq key                                   [CONFIG_MAGIC_SYSRQ]

Installation of LVM2

Install LVM2 by running the following commands:

PATH+=:/usr/sbin                \
./configure --prefix=/usr       \
            --enable-cmdlib     \
            --enable-pkgconfig  \
            --enable-udev_sync  &&
make

The tests use udev for logical volume synchronization, so the LVM udev rules and some utilities need to be installed before running the tests. If you are installing LVM2 for the first time, and do not want to install the full package before running the tests, the minimal set of utilities can be installed by running the following instructions as the root user:

make -C tools install_tools_dynamic &&
make -C udev  install               &&
make -C libdm install

To test the results, issue, as the root user:

LC_ALL=en_US.UTF-8 make check_local

Some tests may hang. In this case they can be skipped by adding S=<testname> to the make command. Other targets are available and can be listed with make -C test help. The test timings are very dependent on the speed of the disk(s), and on the number of enabled kernel options.

The tests do not implement the expected fail possibility, and a small number of test failures is expected by upstream. More failures may happen because some kernel options are missing. For example, the lack of the dm-delay device mapper target explains some failures. Some tests may fail if there is insufficient free space available in the partition with the /tmp directory. At least one test fails if 16 TB is not available. Some tests are flagged warned if thin-provisioning-tools are not installed. A workaround is to add the following flags to configure:

     --with-thin-check=    \
     --with-thin-dump=     \
     --with-thin-repair=   \
     --with-thin-restore=  \
     --with-cache-check=   \
     --with-cache-dump=    \
     --with-cache-repair=  \
     --with-cache-restore= \

Some tests may hang. They can be removed if necessary, for example: rm test/shell/lvconvert-raid-reshape.sh. The tests generate a lot of kernel messages, which may clutter your terminal. You can disable them by issuing dmesg -D before running the tests (do not forget to issue dmesg -E when tests are done).

Note

The checks create device nodes in the /tmp directory. The tests will fail if /tmp is mounted with the nodev option.

Now, as the root user:

make install
rm -fv /usr/lib/udev/rules.d/69-dm-lvm.rules

Command Explanations

PATH+=:/usr/sbin: The path must contain /usr/sbin for proper system tool detection by the configure script. This instruction ensures that PATH is properly set even if you build as an unprivileged user.

--enable-cmdlib: This switch enables building of the shared command library. It is required when building the event daemon.

--enable-pkgconfig: This switch enables installation of pkg-config support files.

--enable-udev_sync: This switch enables synchronisation with Udev processing.

--enable-dmeventd: This switch enables building of the Device Mapper event daemon.

rm .../69-dm-lvm.rules: Under certain circumstances, this udev rule calls systemd-run, which is not available on sysv. It performs actions that are done by another boot script anyway, so it is not needed.

Contents

Installed Programs: blkdeactivate, dmeventd (optional), dmsetup, fsadm, lvm, lvmdump, and lvm_import_vdo. There are also numerous symbolic links to lvm that implement specific functionalities
Installed Libraries: libdevmapper.so and liblvm2cmd.so; optional: libdevmapper-event.so, libdevmapper-event-lvm2.so, libdevmapper-event-lvm2mirror.so, libdevmapper-event-lvm2raid.so, libdevmapper-event-lvm2snapshot.so, libdevmapper-event-lvm2thin.so, and libdevmapper-event-lvm2vdo.so
Installed Directories: /etc/lvm and /usr/lib/device-mapper (optional)

Short Descriptions

blkdeactivate

is a utility to deactivate block devices

dmeventd

(optional) is the Device Mapper event daemon

dmsetup

is a low level logical volume management tool

fsadm

is a utility used to resize or check filesystem on a device

lvm

provides the command-line tools for LVM2. Commands are implemented via symbolic links to this program to manage physical devices (pv*), volume groups (vg*) and logical volumes (lv*)

lvmdump

is a tool used to dump various information concerning LVM2

vgimportclone

is used to import a duplicated VG (e.g. hardware snapshot)

libdevmapper.so

contains the Device Mapper API functions

About Logical Volume Management (LVM)

LVM manages disk drives. It allows multiple drives and partitions to be combined into larger volume groups, assists in making backups through a snapshot, and allows for dynamic volume resizing. It can also provide mirroring similar to a RAID 1 array.

A complete discussion of LVM is beyond the scope of this introduction, but basic concepts are presented below.

To run any of the commands presented here, the LVM2-2.03.18 package must be installed. All commands must be run as the root user.

Management of disks with lvm is accomplished using the following concepts:

physical volumes

These are physical disks or partitions such as /dev/sda3 or /dev/sdb.

volume groups

These are named groups of physical volumes that can be manipulated by the administrator. The number of physical volumes that make up a volume group is arbitrary. Physical volumes can be dynamically added or removed from a volume group.

logical volumes

Volume groups may be subdivided into logical volumes. Each logical volume can then be individually formatted as if it were a regular Linux partition. Logical volumes may be dynamically resized by the administrator according to need.

To give a concrete example, suppose that you have two 2 TB disks. Also suppose a really large amount of space is required for a very large database, mounted on /srv/mysql. This is what the initial set of partitions would look like:

Partition  Use    Size      Partition Type
/dev/sda1  /boot  100MB     83 (Linux)
/dev/sda2  /       10GB     83 (Linux)
/dev/sda3  swap     2GB     82 (Swap)
/dev/sda4  LVM    remainder 8e (LVM)
/dev/sdb1  swap     2GB     82 (Swap)
/dev/sdb2  LVM    remainder 8e (LVM)

First initialize the physical volumes:

pvcreate /dev/sda4 /dev/sdb2

Note

A full disk can be used as part of a physical volume, but beware that the pvcreate command will destroy any partition information on that disk.

Next create a volume group named lfs-lvm:

vgcreate lfs-lvm /dev/sda4  /dev/sdb2

The status of the volume group can be checked by running the command vgscan. Now create the logical volumes. Since there is about 3900 GB available, leave about 900 GB free for expansion. Note that the logical volume named mysql is larger than any physical disk.

lvcreate --name mysql --size 2500G lfs-lvm
lvcreate --name home  --size  500G lfs-lvm

Finally the logical volumes can be formatted and mounted. In this example, the jfs file system (jfsutils-1.1.15) is used for demonstration purposes.

mkfs -t ext4 /dev/lfs-lvm/home
mkfs -t jfs  /dev/lfs-lvm/mysql
mount /dev/lfs-lvm/home /home
mkdir -p /srv/mysql
mount /dev/lfs-lvm/mysql /srv/mysql

It may be needed to activate those logical volumes, for them to appear in /dev. They can all be activated at the same time by issuing, as the root user:

vgchange -a y

The LFS boot scripts automatically make these logical volumes available to the system in the udev script. Edit the /etc/fstab file as required to automatically mount them.

A LVM logical volume can host a root filesystem, but requires the use of an initramfs (initial RAM file system). The initramfs proposed in the section called “About initramfs” allows to pass the lvm volume in the root= switch of the kernel command line.

For more information about LVM, see the LVM HOWTO and the lvm man pages. A good in-depth guide is available from RedHat®, although it makes sometimes reference to proprietary tools.

About RAID

The storage technology known as RAID (Redundant Array of Independent Disks) combines multiple physical disks into a logical unit. The drives can generally be combined to provide data redundancy or to extend the size of logical units beyond the capability of the physical disks or both. The technology also allows for providing hardware maintenance without powering down the system.

The types of RAID organization are described in the RAID Wiki.

Note that while RAID provides protection against disk failures, it is not a substitute for backups. A file deleted is still deleted on all the disks of a RAID array. Modern backups are generally done via rsync-3.2.7.

There are three major types of RAID implementation: Hardware RAID, BIOS-based RAID, and Software RAID.

Hardware RAID

Hardware based RAID provides capability through proprietary hardware and data layouts. The control and configuration is generally done via firmware in conjunction with executable programs made available by the device manufacturer. The capabilities are generally supplied via a PCI card, although there are some instances of RAID components integrated in to the motherboard. Hardware RAID may also be available in a stand-alone enclosure.

One advantage of hardware-based RAID is that the drives are offered to the operating system as a logical drive and no operating system dependent configuration is needed.

Disadvantages include difficulties in transferring drives from one system to another, updating firmware, or replacing failed RAID hardware.

BIOS-based RAID

Some computers offer a hardware-like RAID implementation in the system BIOS. Sometime this is referred to as 'fake' RAID as the capabilities are generally incorporated into firmware without any hardware acceleration.

The advantages and disadvantages of BIOS-based RAID are generally the same as hardware RAID with the additional disadvantage that there is no hardware acceleration.

In some cases, BIOS-based RAID firmware is enabled by default (e.g. some DELL systems). If software RAID is desired, this option must be explicitly disabled in the BIOS.

Software RAID

Software based RAID is the most flexible form of RAID. It is easy to install and update and provides full capability on all or part of any drives available to the system. In BLFS, the RAID software is found in mdadm-4.2.

Configuring a RAID device is straightforward using mdadm. Generally devices are created in the /dev directory as /dev/mdx where x is an integer.

The first step in creating a RAID array is to use partitioning software such as fdisk or parted-3.5 to define the partitions needed for the array. Usually, there will be one partition on each drive participating in the RAID array, but that is not strictly necessary. For this example, there will be four disk drives: /dev/sda, /dev/sdb, /dev/sdc, and /dev/sdd. They will be partitioned as follows:

Partition Size     Type                Use
sda1:     100 MB   fd Linux raid auto  /boot    (RAID 1) /dev/md0
sda2:      10 GB   fd Linux raid auto  /        (RAID 1) /dev/md1
sda3:       2 GB   83 Linux swap       swap
sda4      300 GB   fd Linux raid auto  /home    (RAID 5) /dev/md2

sdb1:     100 MB   fd Linux raid auto  /boot    (RAID 1) /dev/md0
sdb2:      10 GB   fd Linux raid auto  /        (RAID 1) /dev/md1
sdb3:       2 GB   83 Linux swap       swap
sdb4      300 GB   fd Linux raid auto  /home    (RAID 5) /dev/md2

sdc1:      12 GB   fd Linux raid auto  /usr/src (RAID 0) /dev/md3
sdc2:     300 GB   fd Linux raid auto  /home    (RAID 5) /dev/md2

sdd1:      12 GB   fd Linux raid auto  /usr/src (RAID 0) /dev/md3
sdd2:     300 GB   fd Linux raid auto  /home    (RAID 5) /dev/md2 

In this arrangement, a separate boot partition is created as the first small RAID array and a root filesystem as the secong RAID array, both mirrored. The third partition is a large (about 1TB) array for the /home directory. This provides an ability to stripe data across multiple devices, improving speed for both reading and writing large files. Finally, a fourth array is created that concatenates two partitions into a larger device.

Note

All mdadm commands must be run as the root user.

To create these RAID arrays the commands are:

/sbin/mdadm -Cv /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1
/sbin/mdadm -Cv /dev/md1 --level=1 --raid-devices=2 /dev/sda2 /dev/sdb2
/sbin/mdadm -Cv /dev/md3 --level=0 --raid-devices=2 /dev/sdc1 /dev/sdd1
/sbin/mdadm -Cv /dev/md2 --level=5 --raid-devices=4 \
        /dev/sda4 /dev/sdb4 /dev/sdc2 /dev/sdd2 

The devices created can be examined by device. For example, to see the details of /dev/md1, use /sbin/mdadm --detail /dev/md1:

        Version : 1.2
  Creation Time : Tue Feb  7 17:08:45 2012
     Raid Level : raid1
     Array Size : 10484664 (10.00 GiB 10.74 GB)
  Used Dev Size : 10484664 (10.00 GiB 10.74 GB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

    Update Time : Tue Feb  7 23:11:53 2012
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           Name : core2-blfs:0  (local to host core2-blfs)
           UUID : fcb944a4:9054aeb2:d987d8fe:a89121f8
         Events : 17

    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       1       8       17        1      active sync   /dev/sdb1

From this point, the partitions can be formatted with the filesystem of choice (e.g. ext3, ext4, xfsprogs-6.1.1, reiserfsprogs-3.6.27, etc). The formatted partitions can then be mounted. The /etc/fstab file can use the devices created for mounting at boot time and the linux command line in /boot/grub/grub.cfg can specify root=/dev/md1.

Note

The swap devices should be specified in the /etc/fstab file as normal. The kernel normally stripes swap data across multiple swap files and should not be made part of a RAID array.

For further options and management details of RAID devices, refer to man mdadm.

Additional details for monitoring RAID arrays and dealing with problems can be found at the Linux RAID Wiki.

mdadm-4.2

Introduction to mdadm

The mdadm package contains administration tools for software RAID.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

mdadm Dependencies

Optional

A MTA

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/mdadm

Caution

Kernel versions in series 4.1 through 4.4.1 have a broken RAID implementation. Use a kernel with version at or above 4.4.2.

Kernel Configuration

Enable the following options in the kernel configuration and recompile the kernel, if necessary. Only the RAID types desired are required.

Device Drivers --->
  [*] Multiple devices driver support (RAID and LVM) ---> [CONFIG_MD]
    <*> RAID support                                      [CONFIG_BLK_DEV_MD]
    [*]   Autodetect RAID arrays during kernel boot       [CONFIG_MD_AUTODETECT]
    <*/M>  Linear (append) mode                           [CONFIG_MD_LINEAR]
    <*/M>  RAID-0 (striping) mode                         [CONFIG_MD_RAID0]
    <*/M>  RAID-1 (mirroring) mode                        [CONFIG_MD_RAID1]
    <*/M>  RAID-10 (mirrored striping) mode               [CONFIG_MD_RAID10]
    <*/M>  RAID-4/RAID-5/RAID-6 mode                      [CONFIG_MD_RAID456]

Installation of mdadm

Build mdadm by running the following command:

make

This package does not come with a working test suite.

Now, as the root user:

make BINDIR=/usr/sbin install

Command Explanations

make everything: This optional target creates extra programs, particularly a statically-linked version of mdadm. This needs to be manually installed.

--keep-going: Run the tests to the end, even if one or more tests fail.

--logdir=test-logs: Defines the directory where test logs are saved.

--save-logs: Instructs the test suite to save the logs.

--tests=<test1,test2,...>: Optional comma separated list of tests to be executed (all tests, if this option is not passed).

Contents

Installed Programs: mdadm and mdmon
Installed Libraries: None
Installed Directory: None

Short Descriptions

mdadm

manages MD devices aka Linux Software RAID

mdmon

monitors MD external metadata arrays

ntfs-3g-2022.10.3

Introduction to Ntfs-3g

Note

A new read-write driver for NTFS, called NTFS3, has been added into the Linux kernel since the 5.15 release. The performance of NTFS3 is much better than ntfs-3g. To enable NTFS3, enable the following options in the kernel configuration and recompile the kernel if necessary:

File systems  --->
  <*/M> NTFS Read-Write file system support [CONFIG_NTFS3_FS]

To ensure the mount command uses NTFS3 for ntfs partitions, create a wrapper script:

cat > /usr/sbin/mount.ntfs << "EOF" &&
#!/bin/sh
exec mount -t ntfs3 "$@"
EOF
chmod -v 755 /usr/sbin/mount.ntfs

With the kernel support available, ntfs-3g is only needed if you need the utilities from it (for example, to create NTFS filesystems).

The Ntfs-3g package contains a stable, read-write open source driver for NTFS partitions. NTFS partitions are used by most Microsoft operating systems. Ntfs-3g allows you to mount NTFS partitions in read-write mode from your Linux system. It uses the FUSE kernel module to be able to implement NTFS support in userspace. The package also contains various utilities useful for manipulating NTFS partitions.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Ntfs-3g Dependencies

Optional

fuse 2.x (this disables user mounts)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/ntfs-3g

Kernel Configuration

Enable the following options in the kernel configuration and recompile the kernel if necessary:

File systems  --->
  <*/M> FUSE (Filesystem in Userspace) support [CONFIG_FUSE_FS]

Installation of Ntfs-3g

Install Ntfs-3g by running the following commands:

./configure --prefix=/usr        \
            --disable-static     \
            --with-fuse=internal \
            --docdir=/usr/share/doc/ntfs-3g-2022.10.3 &&
make

This package does not come with a test suite.

Now, as the root user:

make install &&

It's recommended to use the in-kernel NTFS3 driver for mounting NTFS filesystems, instead of ntfs-3g (see the note at the start of this page). However, if you want to use ntfs-3g to mount the NTFS filesystems anyway, create a symlink for the mount command:

ln -sv ../bin/ntfs-3g /usr/sbin/mount.ntfs &&
ln -sv ntfs-3g.8 /usr/share/man/man8/mount.ntfs.8

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

--with-fuse=internal: This switch dynamically forces ntfs-3g to use an internal copy of the fuse-2.x library. This is required if you wish to allow users to mount NTFS partitions.

--disable-ntfsprogs: Disables installation of various utilities used to manipulate NTFS partitions.

chmod -v 4755 /usr/bin/ntfs-3g: Making mount.ntfs setuid root allows non root users to mount NTFS partitions.

Using Ntfs-3g

To mount a Windows partition at boot time, put a line like this in /etc/fstab:

              /dev/sda1 /mnt/windows auto defaults 0 0

To allow users to mount a usb stick with an NTFS filesystem on it, put a line similar to this (change sdc1 to whatever a usb stick would be on your system) in /etc/fstab:

              /dev/sdc1 /mnt/usb auto user,noauto,umask=0,utf8 0 0

In order for a user to be able to mount the usb stick, they will need to be able to write to /mnt/usb, so as the root user:

chmod -v 777 /mnt/usb

Contents

Installed Programs: lowntfs-3g, mkfs.ntfs, mkntfs, mount.lowntfs-3g, mount.ntfs, mount.ntfs-3g, ntfs-3g, ntfs-3g.probe, ntfscat, ntfsclone, ntfscluster, ntfscmp, ntfscp, ntfsfix, ntfsinfo, ntfslabel, ntfsls, ntfsresize and ntfsundelete
Installed Library: libntfs-3g.so
Installed Directories: /usr/include/ntfs-3g and /usr/share/doc/ntfs-3g

Short Descriptions

lowntfs-3g

is similar to ntfs-3g but uses the Fuse low-level interface

mkfs.ntfs

is a symlink to mkntfs

mkntfs

creates an NTFS file system

mount.lowntfs-3g

is a symlink to lowntfs-3g

mount.ntfs

mounts an NTFS filesystem

mount.ntfs-3g

is a symbolic link to ntfs-3g

ntfs-3g

is an NTFS driver, which can create, remove, rename, move files, directories, hard links, and streams. It can also read and write files, including streams, sparse files and transparently compressed files. It can also handle special files like symbolic links, devices, and FIFOs; moreover it provides standard management of file ownership and permissions, including POSIX ACLs

ntfs-3g.probe

tests if an NTFS volume is mountable read only or read-write, and exits with a status value accordingly. The volume can be a block device or image file

ntfscluster

identifies files in a specified region of an NTFS volume

ntfscp

copies a file to an NTFS volume

ntfsfix

fixes common errors and forces Windows to check an NTFS partition

ntfsls

lists directory contents on an NTFS filesystem

ntfscat

prints NTFS files and streams on the standard output

ntfsclone

clones an NTFS filesystem

ntfscmp

compares two NTFS filesystems and shows the differences

ntfsinfo

dumps a file's attributes

ntfslabel

displays or changes the label on an ntfs file system

ntfsresize

resizes an NTFS filesystem without data loss

ntfsundelete

recovers a deleted file from an NTFS volume

libntfs-3g.so

contains the Ntfs-3g API functions

gptfdisk-1.0.9

Introduction to gptfdisk

The gptfdisk package is a set of programs for creation and maintenance of GUID Partition Table (GPT) disk drives. A GPT partitioned disk is required for drives greater than 2 TB and is a modern replacement for legacy PC-BIOS partitioned disk drives that use a Master Boot Record (MBR). The main program, gdisk, has an interface similar to the classic fdisk program.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

gptfdisk Dependencies

Required

popt-1.19

Optional

ICU-72.1

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/gptdisk

Installation of gptfdisk

The gptfdisk package comes with a rudimentary Makefile. First we update it to provide a simple build and install interface and fix the location of a header file as well fixing an issue introduced by a recent version of popt. Install gptfdisk by running the following commands:

patch -Np1 -i ../gptfdisk-1.0.9-convenience-1.patch &&
sed -i 's|ncursesw/||' gptcurses.cc &&
sed -i 's|sbin|usr/sbin|' Makefile &&
sed -i '/UUID_H/s/^.*$/#if defined (_UUID_UUID_H) || defined (_UL_LIBUUID_UUID_H)/' guid.cc &&
sed -i "/device =/s/= \(.*\);/= strdup(\1);/" gptcl.cc &&

make

To test the results, issue: make test.

Now, as the root user:

make install

Command Explanations

patch -Np1 ...: This patch modifies the Makefile file so that it provides an install target.

Contents

Installed Programs: cgdisk, gdisk, fixparts, and sgdisk

Short Descriptions

cgdisk

is an ncurses-based tool for manipulating GPT partitions

gdisk

is an interactive text-mode tool for manipulating GPT partitions

fixparts

repairs mis-formatted MBR based disk partitions

sgdisk

is a partition manipulation program for GPT partitions similar to sfdisk

parted-3.5

Introduction to parted

The Parted package is a disk partitioning and partition resizing tool.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Parted Dependencies

Recommended
Optional

dosfstools-4.2, Pth-2.0.7, texlive-20220321 (or install-tl-unx), and Digest::CRC (for tests)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/parted

Optional Kernel Configuration for Tests

About 20 % more tests are run if the following kernel module is built:

Device Drivers --->
  SCSI device support --->
    [*]  SCSI low-level drivers --->                 [CONFIG_SCSI_LOW_LEVEL]
      <M> SCSI debugging host and device simulator   [CONFIG_SCSI_DEBUG]

Installation of parted

Install Parted by running the following commands:

./configure --prefix=/usr --disable-static &&
make &&

make -C doc html                                       &&
makeinfo --html      -o doc/html       doc/parted.texi &&
makeinfo --plaintext -o doc/parted.txt doc/parted.texi

If you have texlive-20220321 installed and wish to create PDF and Postscript documentation issue the following commands:

texi2pdf             -o doc/parted.pdf doc/parted.texi &&
texi2dvi             -o doc/parted.dvi doc/parted.texi &&
dvips                -o doc/parted.ps  doc/parted.dvi

To test the results, issue, as the root user:

make check

Note

Many tests are skipped if not run as the root user.

Now, as the root user:

make install &&
install -v -m755 -d /usr/share/doc/parted-3.5/html &&
install -v -m644    doc/html/* \
                    /usr/share/doc/parted-3.5/html &&
install -v -m644    doc/{FAT,API,parted.{txt,html}} \
                    /usr/share/doc/parted-3.5

Install the optional PDF and Postscript documentation by issuing the following command as the root user:

install -v -m644 doc/FAT doc/API doc/parted.{pdf,ps,dvi} \
                    /usr/share/doc/parted-3.5

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

--disable-device-mapper: This option disables device mapper support. Add this parameter if you have not installed LVM2.

Contents

Installed Programs: parted and partprobe
Installed Libraries: libparted.so and libparted-fs-resize.so
Installed Directories: /usr/include/parted and /usr/share/doc/parted-3.5

Short Descriptions

parted

is a partition manipulation program

partprobe

informs the OS of partition table changes

libparted.so

contains the Parted API functions

reiserfsprogs-3.6.27

Introduction to reiserfsprogs

The reiserfsprogs package contains various utilities for use with the Reiser file system.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/reiser

Kernel Configuration

Enable the following option in the kernel configuration and recompile the kernel:

File systems --->
  <*/M> Reiserfs support [CONFIG_REISERFS_FS]

Installation of reiserfsprogs

Install reiserfsprogs by running the following commands:

sed -i '/parse_time.h/i #define _GNU_SOURCE' lib/parse_time.c &&
autoreconf -fiv           &&

./configure --prefix=/usr &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Command Explanations

sed ...: Ensure a variable is defined for use with recent include files.

Contents

Installed Programs: debugreiserfs, mkreiserfs, reiserfsck, reiserfstune, and resize_reiserfs
Installed Library: libreiserfscore.so
Installed Directory: /usr/include/reiserfs

Short Descriptions

debugreiserfs

can sometimes help to solve problems with ReiserFS file systems. If it is called without options, it prints the super block of any ReiserFS file system found on the device

mkreiserfs

creates a ReiserFS file system

reiserfsck

is used to check or repair a ReiserFS file system

reiserfstune

is used for tuning the ReiserFS journal. WARNING: Don't use this utility without first reading the man page thoroughly

resize_reiserfs

is used to resize an unmounted ReiserFS file system

smartmontools-7.3

Introduction to smartmontools

The smartmontools package contains utility programs (smartctl, smartd) to control/monitor storage systems using the Self-Monitoring, Analysis and Reporting Technology System (S.M.A.R.T.) built into most modern ATA and SCSI disks.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

smartmontools Dependencies

Optional (runtime)

cURL-7.88.1 or Lynx-2.8.9rel.1 or Wget-1.21.3 (download tools), and GnuPG-2.4.0 (encrypted hard disks)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/smartmontools

Installation of smartmontools

Install smartmontools by running the following commands:

./configure --prefix=/usr           \
            --sysconfdir=/etc       \
            --with-initscriptdir=no \
            --with-libsystemd=no    \
            --docdir=/usr/share/doc/smartmontools-7.3 &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Command Explanations

--with-initscriptdir=no: This switch suppresses the default initialization script. See below for the BLFS script.

--with-libsystemd=no: This switch disables support for the sd-notify notification system provided by systemd.

Configuring smartmontools

Config File

/etc/smartd.conf

Configuration Information

See the embedded comments in /etc/smartd.conf for detailed instructions on customizing the smartd daemon.

Boot Script

If you want the smartd daemon to start automatically when the system is booted, install the /etc/rc.d/init.d/smartd init script included in the blfs-bootscripts-20230101 package.

make install-smartd

Contents

Installed Programs: smartctl, smartd, and update-smart-drivedb
Installed Libraries: None
Installed Directories: /usr/share/smartmontools, /usr/share/doc/smartmontools-7.3, and /etc/smartd_warning.d

Short Descriptions

smartctl

is the control and monitor utility for SMART Disks

smartd

is the SMART disk monitoring daemon

update-smart-drivedb

is the update tool for the smartmontools drive database

sshfs-3.7.3

Introduction to Sshfs

The Sshfs package contains a filesystem client based on the SSH File Transfer Protocol. This is useful for mounting a remote computer that you have ssh access to as a local filesystem. This allows you to drag and drop files or run shell commands on the remote files as if they were on your local computer.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Sshfs Dependencies

Required

Fuse-3.13.1, GLib-2.74.5, and OpenSSH-9.2p1.

Optional

docutils-0.19 (required to build the man page)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/sshfs

Installation of Sshfs

Install Sshfs by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release .. &&
ninja

This package does not come with a test suite.

Now, as the root user:

ninja install

Using Sshfs

To mount an ssh server you need to be able to log into the server. For example, to mount your remote home folder to the local ~/examplepath (the directory must exist and you must have permissions to write to it):

sshfs example.com:/home/userid ~/examplepath

When you've finished work and want to unmount it again:

fusermount3 -u ~/example

You can also mount an sshfs filesystem at boot by adding an entry similar to the following in the /etc/fstab file:

[email protected]:/path /media/path fuse.sshfs _netdev,IdentityFile=/home/userid/.ssh/id_rsa 0 0

See man 1 sshfs and man 8 mount.fuse3 for all available mount options.

Contents

Installed Program: sshfs
Installed Libraries: None
Installed Directories: None

Short Descriptions

sshfs

mounts an ssh server as a local file system

xfsprogs-6.1.1

Introduction to xfsprogs

The xfsprogs package contains administration and debugging tools for the XFS file system.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

xfsprogs Dependencies

Required

inih-56 and liburcu-0.14.0

Optional

ICU-72.1 (for unicode name scanning in xfs_scrub)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/xfs

Kernel Configuration

Enable the following options in the kernel configuration and recompile the kernel:

File systems --->
  <*/M> XFS filesystem support [CONFIG_XFS_FS]

Installation of xfsprogs

Install xfsprogs by running the following commands:

make DEBUG=-DNDEBUG     \
     INSTALL_USER=root  \
     INSTALL_GROUP=root

This package does not come with a test suite.

Now, as the root user:

make PKG_DOC_DIR=/usr/share/doc/xfsprogs-6.1.1 install     &&
make PKG_DOC_DIR=/usr/share/doc/xfsprogs-6.1.1 install-dev &&

rm -rfv /usr/lib/libhandle.{a,la}

Command Explanations

make DEBUG=-DNDEBUG: Turns off debugging symbols.

INSTALL_USER=root INSTALL_GROUP=root: This sets the owner and group of the installed files.

OPTIMIZER="...": Adding this parameter to the end of the make command overrides the default optimization settings.

Contents

Installed Programs: fsck.xfs, mkfs.xfs, xfs_admin, xfs_bmap, xfs_copy, xfs_db, xfs_estimate, xfs_freeze, xfs_fsr, xfs_growfs, xfs_info, xfs_io, xfs_logprint, xfs_mdrestore, xfs_metadump, xfs_mkfile, xfs_ncheck, xfs_quota, xfs_repair, xfs_rtcp, xfs_scrub, xfs_scrub_all, and xfs_spaceman
Installed Libraries: libhandle.so
Installed Directories: /usr/include/xfs, /usr/lib/xfsprogs, /usr/share/xfsprogs, and /usr/share/doc/xfsprogs-6.1.1

Short Descriptions

fsck.xfs

simply exits with a zero status, since XFS partitions are checked at mount time

mkfs.xfs

constructs an XFS file system

xfs_admin

changes the parameters of an XFS file system

xfs_bmap

prints block mapping for an XFS file

xfs_copy

copies the contents of an XFS file system to one or more targets in parallel

xfs_estimate

for each directory argument, estimates the space that directory would take if it were copied to an XFS filesystem (does not cross mount points)

xfs_db

is used to debug an XFS file system

xfs_freeze

suspends access to an XFS file system

xfs_fsr

applicable only to XFS filesystems, improves the organization of mounted filesystems, the reorganization algorithm operates on one file at a time, compacting or otherwise improving the layout of the file extents (contiguous blocks of file data)

xfs_growfs

expands an XFS file system

xfs_info

is equivalent to invoking xfs_growfs, but specifying that no change to the file system is to be made

xfs_io

is a debugging tool like xfs_db, but is aimed at examining the regular file I/O path rather than the raw XFS volume itself

xfs_logprint

prints the log of an XFS file system

xfs_mdrestore

restores an XFS metadump image to a filesystem image

xfs_metadump

copies XFS filesystem metadata to a file

xfs_mkfile

creates an XFS file, padded with zeroes by default

xfs_ncheck

generates pathnames from inode numbers for an XFS file system

xfs_quota

is a utility for reporting and editing various aspects of filesystem quotas

xfs_repair

repairs corrupt or damaged XFS file systems

xfs_rtcp

copies a file to the real-time partition on an XFS file system

xfs_scrub

checks and repairs the contents of a mounted XFS file system

xfs_scrub_all

scrubs all mounted XFS file systems

xfs_spaceman

reports and controls free space usage in an XFS file system

libhandle.so

contains XFS-specific functions that provide a way to perform certain filesystem operations without using a file descriptor to access filesystem objects

Packages for UEFI Boot

efivar-38

Introduction to efivar

The efivar package provides tools and libraries to manipulate EFI variables.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

efivar Dependencies

Required

mandoc-1.14.6

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/efivar

Installation of efivar

First, fix an issue in Makefile causing the package to be rebuilt during installation:

sed '/prep :/a\\ttouch prep' -i src/Makefile

Note

This package cannot function properly on a 32-bit system with a 64-bit UEFI implementation. Don't install this package (or efibootmgr) on 32-bit system unless you are absolutely sure you have a 32-bit UEFI implementation, which is very rare in practice.

If building this package on a 32-bit system, apply a patch:

[ $(getconf LONG_BIT) = 64 ] || patch -Np1 -i ../efivar-38-i686-1.patch

Build efivar with the following commands:

make

The test suite of this package is dangerous. Running it may trigger firmware bugs and make your system unusable without using some special hardware to reprogram the firmware.

Now, as the root user:

make install LIBDIR=/usr/lib

Command Explanations

LIBDIR=/usr/lib: This option overrides the default library directory of the package (/usr/lib64, which is not used by LFS.)

Contents

Installed Programs: efisecdb and efivar
Installed Libraries: libefiboot.so, libefisec.so, and libefivar.so
Installed Directories: /usr/include/efivar

Short Descriptions

efisecdb

is an utility for managing UEFI signature lists

efivar

is a tool to manipulate UEFI variables

libefiboot.so

is a library used by efibootmgr

libefisec.so

is a library for managing UEFI signature lists

libefivar.so

is a library for the manipulation of EFI variables

efibootmgr-18

Introduction to efibootmgr

The efibootmgr package provides tools and libraries to manipulate EFI variables.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

efibootmgr Dependencies

Required

efivar-38 and popt-1.19

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/efibootmgr

Installation of efibootmgr

Build efibootmgr with the following commands:

make EFIDIR=LFS EFI_LOADER=grubx64.efi

This package does not have a test suite.

Now, as the root user:

make install EFIDIR=LFS

Command Explanations

EFIDIR=LFS: This option specifies the distro's subdirectory name under /boot/efi/EFI. The building system of this package needs it to be set explicitly.

EFI_LOADER=grubx64.efi: This option specifies the name of the default EFI boot loader. It is set to match the EFI boot loader provided by GRUB .

Contents

Installed Programs: efibootdump and efibootmgr

Short Descriptions

efibootdump

is a tool to display individual UEFI boot options, from a file or an UEFI variable

efibootmgr

is a tool to manipulate the UEFI Boot Manager

GRUB-2.06 for EFI

Introduction to GRUB

The GRUB package provides GRand Unified Bootloader. In this page it will be built with UEFI support, which is not enabled for GRUB built in LFS.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

Unicode font data used to display GRUB menu

GCC (only needed if building on 32-bit LFS)

GRUB Dependencies

Recommended
Optional

LVM2-2.03.18

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/grub-efi

Installation of GRUB

First, install font data as the root user:

mkdir -pv /usr/share/fonts/unifont &&
gunzip -c ../unifont-15.0.01.pcf.gz > /usr/share/fonts/unifont/unifont.pcf

Warning

Unset any environment variables which may affect the build:

unset {C,CPP,CXX,LD}FLAGS

Don't try tuning this package with custom compilation flags: this package is a bootloader, with low-level operations in the source code which is likely to be broken by some aggressive optimizations.

Fix an issue causing grub-install to fail when the /boot partition (or the root partition if /boot is not a separate partition) is created by e2fsprogs-1.47.0 or later:

patch -Np1 -i ../grub-2.06-upstream_fixes-1.patch

If you are running a 32-bit LFS, prepare a 64-bit compiler:

case $(uname -m) in i?86 )
    tar xf ../gcc-12.2.0.tar.xz
    mkdir gcc-12.2.0/build
    pushd gcc-12.2.0/build
        ../configure --prefix=$PWD/../../x86_64-gcc \
                     --target=x86_64-linux-gnu      \
                     --with-system-zlib             \
                     --enable-languages=c,c++       \
                     --with-ld=/usr/bin/ld
        make all-gcc
        make install-gcc
    popd
    export TARGET_CC=$PWD/x86_64-gcc/bin/x86_64-linux-gnu-gcc
esac

Build GRUB with the following commands:

./configure --prefix=/usr        \
            --sysconfdir=/etc    \
            --disable-efiemu     \
            --enable-grub-mkfont \
            --with-platform=efi  \
            --target=x86_64      \
            --disable-werror     &&
unset TARGET_CC &&
make

This package does not have a test suite providing meaningful results.

Now, as the root user:

make install &&
mv -v /etc/bash_completion.d/grub /usr/share/bash-completion/completions

Command Explanations

--enable-grub-mkfont: Build the tool named grub-mkfont to generate the font file for the boot loader from the font data we've installed.

Warning

If the recommended dependency FreeType-2.13.0 is not installed, it is possible to omit this option and build GRUB. However, if grub-mkfont is not built, or the unicode font data is not available at the time GRUB is built, GRUB won't install any font for the boot loader. The GRUB boot menu will be displayed using a coarse font and the early stage of kernel initialization will be in blind mode — you can't see any kernel messages before the graphics card driver is initialized. It will be very difficult to diagnose some boot issues, especially if the graphics driver is built as module.

--with-platform=efi: Ensures building GRUB with EFI enabled.

--target=x86_64: Ensures building GRUB for x86_64 even if building on a 32-bit LFS system. Most EFI firmwares on x86_64 does not support 32-bit bootloaders.

--target=i386: A few 32-bit x86 platforms have EFI support. And, some x86_64 platforms have a 32-bit EFI implementation, but they are very old and rare. Use this instead of --target=x86_64 if you are absolutely sure that LFS is running on such a system.

Configuring GRUB

Using GRUB to make the LFS system bootable on UEFI platform will be discussed in Using GRUB to Set Up the Boot Process with UEFI.

Contents

See the page for GRUB in LFS book.

Using GRUB to Set Up the Boot Process with UEFI

Turn Off Secure Boot

BLFS does not have the essential packages to support Secure Boot. To set up the boot process with GRUB and UEFI in BLFS, Secure Boot must be turned off from the configuration interface of the firmware. Read the documentation provided by the manufacturer of your system to find out how.

Create an Emergency Boot Disk

Ensure that an emergency boot disk is ready to rescue the system in case the system becomes un-bootable. To make an emergency boot disk with GRUB for an EFI based system, find a spare USB flash drive and create a vfat file system on it. Install dosfstools-4.2 first, then as the root user:

Warning

The following command will erase all directories and files in the partition. Make sure your USB flash drive contains no data which will be needed, and change sdx1 to the device node corresponding to the first partition of the USB flash drive. Be careful not to overwrite your hard drive with a typo!

mkfs.vfat /dev/sdx1

Still as the root user, use the fdisk utility to set the first partition of the USB flash drive to be an EFI system partition (change sdx to the device node corresponding to your USB flash drive):

fdisk /dev/sdx

Welcome to fdisk (util-linux 2.38.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): t
Partition number (1-9, default 9): 1
Partition type or alias (type L to list all): uefi
Changed type of partition 'Linux filesystem' to 'EFI System'.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

Still as the root user, create a mount point for the EFI partition on the USB flash drive and mount it:

mkdir -pv /mnt/rescue &&
mount -v -t vfat /dev/sdx1 /mnt/rescue

Install GRUB for EFI on the partition:

grub-install --target=x86_64-efi --removable --efi-directory=/mnt/rescue --boot-directory=/mnt/rescue

Unmount the partition:

umount /mnt/rescue

Now the USB flash drive can be used as an emergency boot disk on any x86-64 UEFI platform. It will boot the system and show the GRUB shell. Then you can type commands to boot your operating system from the hard drive. To learn how to select the boot device, read the manual of your motherboard or laptop.

Kernel Configuration for UEFI support

Enable the following options in the kernel configuration and recompile the kernel if necessary:

Processor type and features --->
  [*] EFI runtime service support                               [CONFIG_EFI]
  [*]   EFI stub support                                        [CONFIG_EFI_STUB]
Enable the block layer --->
  Partition Types --->
    [*] Advanced partition selection                            [CONFIG_PARTITION_ADVANCED]
    [*] EFI GUID Partition support                              [CONFIG_EFI_PARTITION]
Device Drivers --->
  Firmware Drivers --->
    [*] Mark VGA/VBE/EFI FB as generic system framebuffer       [CONFIG_SYSFB_SIMPLEFB]
  Graphics support --->
    <*> Direct Rendering Manager                                [CONFIG_DRM]
    [*] Enable legacy fbdev support for your modesetting driver [CONFIG_DRM_FBDEV_EMULATION]
    <*> Simple framebuffer driver                               [CONFIG_DRM_SIMPLEDRM]
    Frame buffer Devices --->
      <*> Support for frame buffer devices --->                 [CONFIG_FB]
    Console display driver support --->
      [*] Framebuffer Console support                           [CONFIG_FRAMEBUFFER_CONSOLE]
File systems --->
  <DOS/FAT/EXFAT/NT Filesystems --->
    <*/M> VFAT (Windows-95) fs support                          [CONFIG_VFAT_FS]
  Pseudo filesystems --->
    <*/M> EFI Variable filesystem                               [CONFIG_EFIVAR_FS]

The meaning of the configuration options:

CONFIG_EFI_STUB

On EFI systems, GRUB boots the Linux kernel by invoking the EFI firmware to load it as an EFI application. So, EFI stub is needed to wrap the kernel as an EFI application.

CONFIG_SYSFB_SIMPLEFB, CONFIG_DRM, CONFIG_DRM_FBDEV_EMULATION, CONFIG_DRM_SIMPLEDRM, CONFIG_FB, and CONFIG_FRAMEBUFFER_CONSOLE

The combination of these options provides the Linux console support on top of the UEFI framebuffer. To allow the kernel to print debug messages at an early boot stage, they shouldn't be built as kernel modules unless an initramfs will be used.

Find or Create the EFI System Partition

On EFI based systems, the bootloaders are installed in a special FAT32 partition called an EFI System Partition (ESP). If your system supports EFI, and a recent version of some Linux distribution or Windows is pre-installed, it's likely that the ESP has already been created. As the root user, list all the partitions on your hard drive (replace sda with the device corresponding to the appropriate hard drive):

fdisk -l /dev/sda

The Type column of the ESP should be EFI System.

If the system or the hard drive is new, or it's the first installation of a UEFI-booted OS on the system, the ESP may not exist. In that case, create a new partition, make a vfat file system on it, and set the partition type to EFI system. See the instructions for the emergency boot device above as a reference.

Warning

Some (old) UEFI implementations may require the ESP to be the first partition on the disk.

Now, as the root user, create the mount point for the ESP, and mount it (replace sda1 with the device node corresponding to the ESP):

mkdir -pv /boot/efi &&
mount -v -t vfat /dev/sda1 /boot/efi

Add an entry for the ESP in /etc/fstab, so it will be mounted automatically during system boot:

cat >> /etc/fstab << EOF
/dev/sda1 /boot/efi vfat defaults 0 1
EOF

Minimal Boot Configuration with GRUB and EFI

On UEFI based systems, GRUB works by installing an EFI application (a special kind of executable) into the ESP. The EFI firmware will search boot loaders in EFI applications from boot entries recorded in EFI variables, and additionally a hardcoded path EFI/BOOT/BOOTX64.EFI. Normally, a boot loader should be installed into a custom path and the path should be recorded in the EFI variables. The use of the hardcoded path should be avoided if possible. However, in some cases we have to use the hardcoded path:

  • The system is not booted with EFI yet, making EFI variables inaccessible.

  • The EFI firmware is 64-bit but the LFS system is 32-bit, making EFI variables inaccessible because the kernel cannot invoke EFI runtime services with a different virtual address length.

  • LFS is built for a Live USB, so we cannot rely on EFI variables, which are stored in NVRAM or EEPROM on the local machine.

  • You are unable or unwilling to install the efibootmgr for manipulating boot entries in EFI variables.

In these cases, follow these instructions to install the GRUB EFI application into the hardcoded path and make a minimal boot configuration. Otherwise it's better to skip ahead and set up the boot configuration normally.

To install GRUB with the EFI application in the hardcoded path EFI/BOOT/BOOTX64.EFI, first ensure the boot partition is mounted at /boot and the ESP is mounted at /boot/efi. Then, as the root user, run the command:

Note

This command will overwrite /boot/efi/EFI/BOOT/BOOTX64.EFI. It may break a bootloader already installed there. Back it up if you are not sure.

grub-install --target=x86_64-efi --removable

This command will install the GRUB EFI application into the hardcoded path /boot/efi/EFI/BOOT/BOOTX64.EFI, so the EFI firmware can find and load it. The remaining GRUB files are installed in the /boot/grub directory and will be loaded by BOOTX64.EFI during system boot.

Note

The EFI firmware usually prefers the EFI applications with a path stored in EFI variables to the EFI application at the hardcoded path. So you may need to invoke the boot selection menu or firmware setting interface to select the newly installed GRUB manually on the next boot. Read the manual of your motherboard or laptop to learn how.

If you've followed the instructions in this section and set up a minimal boot configuration, now skip ahead to Creating the GRUB Configuration File.

Mount the EFI Variable File System

The installation of GRUB on a UEFI platform requires that the EFI Variable file system, efivarfs, is mounted. As the root user, mount it if it's not already mounted:

mountpoint /sys/firmware/efi/efivars || mount -v -t efivarfs efivarfs /sys/firmware/efi/efivars

Now add an entry for the efivarfs in /etc/fstab so it will be mounted automatically during system boot:

cat >> /etc/fstab << EOF
efivarfs /sys/firmware/efi/efivars efivarfs defaults 0 0
EOF

Warning

If the system is not booted with UEFI, the directory /sys/firmware/efi will be missing. In this case you should boot the system in UEFI mode with the emergency boot disk or using a minimal boot configuration created as above, then mount efivarfs and continue.

Setting Up the Configuration

On UEFI based systems, GRUB works by installing an EFI application (a special kind of executable) into /boot/efi/EFI/[id]/grubx64.efi, where /boot/efi is the mount point of the ESP, and [id] is replaced with an identifier specified in the grub-install command line. GRUB will create an entry in the EFI variables containing the path EFI/[id]/grubx64.efi so the EFI firmware can find grubx64.efi and load it.

grubx64.efi is very lightweight (136 KB with GRUB-2.06) so it will not use much space in the ESP. A typical ESP size is 100 MB (for Windows boot manager, which uses about 50 MB in the ESP). Once grubx64.efi has been loaded by the firmware, it will load GRUB modules from the boot partition. The default location is /boot/grub.

As the root user, install the GRUB files into /boot/efi/EFI/LFS/grubx64.efi and /boot/grub. Then set up the boot entry in the EFI variables:

grub-install --bootloader-id=LFS --recheck

If the installation is successful, the output should be:

Installing for x86_64-efi platform.
Installation finished. No error reported.

Issue the efibootmgr | cut -f 1 command to recheck the EFI boot configuration. An example of the output is:

BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0005,0000,0002,0001,0003,0004
Boot0000* ARCH
Boot0001* UEFI:CD/DVD Drive
Boot0002* Windows Boot Manager
Boot0003* UEFI:Removable Device
Boot0004* UEFI:Network Device
Boot0005* LFS

Note that 0005 is the first in the BootOrder, and Boot0005 is LFS. This means that on the next boot, the version of GRUB installed by LFS will be used to boot the system.

Creating the GRUB Configuration File

Generate /boot/grub/grub.cfg to configure the boot menu of GRUB:

cat > /boot/grub/grub.cfg << EOF
# Begin /boot/grub/grub.cfg
set default=0
set timeout=5

insmod part_gpt
insmod ext2
set root=(hd0,2)

if loadfont /boot/grub/fonts/unicode.pf2; then
  set gfxmode=auto
  insmod all_video
  terminal_output gfxterm
fi

menuentry "GNU/Linux, Linux 6.1.11-lfs-11.3"  {
  linux   /boot/vmlinuz-6.1.11-lfs-11.3 root=/dev/sda2 ro
}

menuentry "Firmware Setup" {
  fwsetup
}
EOF

(hd0,2), sda2, and 6.1.11-lfs-11.3 must match your configuration.

Note

From GRUB's perspective, the files are relative to the partitions used. If you used a separate /boot partition, remove /boot from the above paths (to kernel and to unicode.pf2). You will also need to change the "set root" line to point to the boot partition.

The Firmware Setup entry can be used to enter the configuration interface provided by the firmware (sometimes called BIOS configuration).

Dual-booting with Windows

Add a menu entry for Windows into grub.cfg:

cat >> /boot/grub/grub.cfg << EOF
# Begin Windows addition

menuentry "Windows 11" {
  insmod fat
  insmod chain
  set root=(hd0,1)
  chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
EOF

(hd0,1) should be replaced with the GRUB designated name for the ESP. The chainloader directive can be used to tell GRUB to run another EFI executable, in this case the Windows Boot Manager. You may put more usable tools in EFI executable format (for example, an EFI shell) into the ESP and create GRUB entries for them, as well.

Chapter 6. Editors

This chapter is referenced in the LFS book for those wishing to use other editors on their LFS system. You're also shown how some LFS installed programs benefit from being recompiled after GUI libraries have been installed.

Bluefish-2.2.12

Introduction to Bluefish

Bluefish is a GTK+ text editor targeted towards programmers and web designers, with many options to write websites, scripts and programming code. Bluefish supports many programming and markup languages, and it focuses on editing dynamic and interactive websites.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Bluefish Dependencies

Required

GTK+-2.24.33 or GTK+-3.24.36 (If both are installed, configure defaults to using GTK+ 3)

Recommended
Optional

enchant-2.3.3 (for spell checking), Gucharmap-15.0.2, PCRE-8.45 and Jing

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/bluefish

Installation of Bluefish

Install Bluefish by running the following commands:

./configure --prefix=/usr --docdir=/usr/share/doc/bluefish-2.2.12 &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Note

This package installs icon files into the /usr/share/icons/hicolor hierarchy and desktop files into the /usr/share/applications hierarchy. You can improve system performance and memory usage by updating /usr/share/icons/hicolor/icon-theme.cache and /usr/share/applications/mimeinfo.cache. To perform the update you must have desktop-file-utils-0.26 (for the desktop cache) and issue the following commands as the root user:

gtk-update-icon-cache -t -f --include-image-data /usr/share/icons/hicolor &&
update-desktop-database

Contents

Installed Program: bluefish
Installed Libraries: several under /usr/lib/bluefish/
Installed Directories: /usr/lib/bluefish, /usr/share/bluefish, /usr/share/doc/bluefish-2.2.12, and /usr/share/xml/bluefish

Short Descriptions

bluefish

is a GTK+ text editor for markup and programming

Ed-1.19

Introduction to Ed

Ed is a line-oriented text editor. It is used to create, display, modify and otherwise manipulate text files, both interactively and via shell scripts. Ed isn't something which many people use. It's described here because it can be used by the patch program if you encounter an ed-based patch file. This happens rarely because diff-based patches are preferred these days.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Ed Dependencies

Required to uncompress the tarball

libarchive-3.6.2 (for bsdtar)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/ed

Installation of Ed

Install Ed by running the following commands:

./configure --prefix=/usr &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Contents

Installed Programs: ed and red
Installed Libraries: None
Installed Directories: None

Short Descriptions

ed

is a line-oriented text editor

red

is a restricted ed—it can only edit files in the current directory and cannot execute shell commands

Emacs-28.2

Introduction to Emacs

The Emacs package contains an extensible, customizable, self-documenting real-time display editor.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Emacs Dependencies

Recommended
Optional

a graphical environment, alsa-lib-1.2.8, Cairo-1.17.6, dbus-1.14.6, GConf-3.2.6, gobject-introspection-1.74.0, gsettings-desktop-schemas-43.0, GPM-1.20.7, GTK+-2.24.33 or GTK+-3.24.36, ImageMagick-7.1.0-61, Little CMS-2.14, libjpeg-turbo-2.1.5.1, libpng-1.6.39, librsvg-2.54.5, libxml2-2.10.3, MIT Kerberos V5-1.20.1, Valgrind-3.20.0, intlfonts, libungif, libotf, and m17n-lib - to correctly display such complex scripts as Indic and Khmer, and also for scripts that require Arabic shaping support (Arabic and Farsi), mailutils, and libXaw3d

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/emacs

Installation of Emacs

Install Emacs by running the following commands:

./configure --prefix=/usr &&
make

This package does not come with a test suite. If make succeeds, you can test the result by running src/emacs -Q, which is the program that will be installed, with its auxiliary files. This should start and display the application opening screen.

Now, as the root user:

make install &&
chown -v -R root:root /usr/share/emacs/28.2 &&
rm -vf /usr/lib/systemd/user/emacs.service

Note

This package installs icon files into the /usr/share/icons/hicolor hierarchy and you can improve system performance and memory usage by updating /usr/share/icons/hicolor/index.theme. To perform the update you must have GTK+-2.24.33 or GTK+-3.24.36 installed and issue the following command as the root user:

gtk-update-icon-cache -qtf /usr/share/icons/hicolor

Command Explanations

--with-imagemagick: Use this if you have installed ImageMagick-7.1.0-61 and wish to link against it.

--with-gif=no: Use this if you have not installed giflib-5.2.1 or libungif.

--with-tiff=no: Use this if you have not installed libtiff-4.5.0.

--with-gnutls=no: Use this if you have not installed GnuTLS-3.8.0.

--without-harfbuzz: Use this if you have not installed HarfBuzz-7.0.0.

--with-json=no: Use this if you have not installed jansson-2.14.

Contents

Installed Programs: ctags, ebrowse, emacs (symlink), emacs-28.2, emacsclient, and etags
Installed Libraries: None
Installed Directories: /usr/libexec/emacs and /usr/share/emacs

Short Descriptions

ctags

creates cross-reference tagfile database files for source code

ebrowse

permits browsing of C++ class hierarchies from within emacs

emacs

is an editor

emacsclient

attaches an emacs session to an already running emacsserver instance

etags

is another program to generate source code cross-reference tagfiles

Gedit-44.2

Introduction to Gedit

The Gedit package contains a lightweight UTF-8 text editor for the GNOME Desktop.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Gedit Dependencies

Required

git-2.39.2, gsettings-desktop-schemas-43.0, gtksourceview4-4.8.4, itstool-2.0.7, libpeas-1.34.0, and tepl-6.4.0

Recommended
Optional

GTK-Doc-1.33.2, Vala-0.56.4, and zeitgeist

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/gedit

Installation of Gedit

Install Gedit by running the following commands:

mkdir gedit-build &&
cd    gedit-build &&

meson setup --prefix=/usr       \
            --buildtype=release \
            -Dgtk_doc=false     \
            .. &&
ninja

To test the results, issue: ninja test.

Now, as the root user:

ninja install

Note

If you installed the package to your system using a DESTDIR method, /usr/share/glib-2.0/schemas/gschemas.compiled was not updated/created. Create (or update) the file using the following command as the root user:

glib-compile-schemas /usr/share/glib-2.0/schemas

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

-Dgtk_doc=false: This switch disables generating the API documentation. Omit this switch if you have GTK-Doc-1.33.2 installed and wish to generate the API documentation.

Contents

Installed Program: gedit
Installed Libraries: libgedit-44.so
Installed Directories: /usr/include/gedit-44 and /usr/{lib,share,share/help/*}/gedit

Short Descriptions

gedit

is a lightweight text editor integrated with the GNOME Desktop

JOE-4.6

Introduction to JOE

JOE (Joe's own editor) is a small text editor capable of emulating WordStar, Pico, and Emacs.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/joe

Installation of JOE

Install JOE by running the following commands:

./configure --prefix=/usr     \
            --sysconfdir=/etc \
            --docdir=/usr/share/doc/joe-4.6 &&
make

This package does not come with a test suite.

Now, as the root user:

make install &&

install -vm 755 joe/util/{stringify,termidx,uniproc} /usr/bin

Configuring JOE

Config Files

/etc/joe/jmacsrc, /etc/joe/joerc, /etc/joe/jpicorc, /etc/joe/jstarrc, /etc/joe/rjoerc, and ~/.joerc

Contents

Installed Programs: jmacs, joe, jpico, jstar, rjoe, stringify, termidx, and uniproc
Installed Libraries: None
Installed Directories: /etc/joe, /usr/share/joe, and /usr/share/doc/joe-4.6

Short Descriptions

jmacs

is a symbolic link to joe used to launch Emacs emulation mode

joe

is a small text editor capable of emulating WordStar, Pico, and Emacs

jpico

is a symbolic link to joe used to launch Pico emulation mode

jstar

is a symbolic link to joe used to launch WordStar emulation mode

rjoe

is a symbolic link to joe that restricts JOE to editing only files which are specified on the command-line

stringify

is a program used by joe to convert rc and .jsf files into a C file (see /usr/share/doc/joe-4.6/util/README)

termidx

is a program used by joe to generate the termcap index file (see /usr/share/doc/joe-4.6/util/README)

uniproc

is a program used by joe to generate joe's unicode database file unicat.c from Blocks.txt CaseFolding.txt EastAsianWidth.txt and UnicodeData.txt (find them at /usr/share/doc/joe-4.6/util; see usr/share/doc/joe-4.6/util/README)

Kate-22.12.2

Introduction to Kate

The Kate package contains an advanced KF5 based graphical text editor.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Kate Dependencies

Required

KDE Frameworks-5.103.0

Optional

libgit2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/kate5

Installation of Kate

Install Kate by running the following commands:

mkdir build &&
cd    build &&

cmake -DCMAKE_INSTALL_PREFIX=$KF5_PREFIX  \
      -DCMAKE_BUILD_TYPE=Release          \
      -DBUILD_TESTING=OFF                 \
      -Wno-dev .. &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Contents

Installed Programs: kate and kwrite
Installed Libraries: Several plugins under $KF5_PREFIX/lib/plugins
Installed Directories: $KF5_PREFIX/lib/plugins/ktexteditor, $KF5_PREFIX/lib/plugins/plasma/dataengine, $KF5_PREFIX/share/doc/HTML/*/{kate,katepart,kwrite}, $KF5_PREFIX/share/{kateproject,katexmltools}, and $KF5_PREFIX/share/plasma/plasmoids/org.kde.plasma.katesessions

Short Descriptions

kate

is an advanced text editor for kde

kwrite

is a text editor for KDE, that is a light version of kate

Mousepad-0.5.10

Introduction to Mousepad

Mousepad is a simple GTK+ 3 text editor for the Xfce desktop environment.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Mousepad Dependencies

Required

gtksourceview4-4.8.4

Optional

DConf-0.40.0 (runtime) and dbus-glib-0.112

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/mousepad

Installation of Mousepad

Install Mousepad by running the following commands:

./configure --prefix=/usr --enable-keyfile-settings &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Command Explanations

--enable-keyfile-settings: Use the GSettings keyfile backend rather than the default DConf-0.40.0.

Contents

Installed Program: mousepad
Installed Libraries: None
Installed Directories: None

Short Descriptions

mousepad

is a simple GTK+ 3 text editor

Nano-7.2

Introduction to Nano

The Nano package contains a small, simple text editor which aims to replace Pico, the default editor in the Pine package.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/Nano

Installation of Nano

Install Nano by running the following commands:

./configure --prefix=/usr     \
            --sysconfdir=/etc \
            --enable-utf8     \
            --docdir=/usr/share/doc/nano-7.2 &&
make

This package does not come with a test suite.

Now, as the root user:

make install &&
install -v -m644 doc/{nano.html,sample.nanorc} /usr/share/doc/nano-7.2

Command Explanations

--enable-utf8: This switch enables unicode support in Nano.

Configuring nano

Config Files

/etc/nanorc and ~/.nanorc

Configuration Information

Example configuration (create as a system-wide /etc/nanorc or a personal ~/.nanorc file)

set autoindent
set constantshow
set fill 72
set historylog
set multibuffer
set nohelp
set positionlog
set quickblank
set regexp

Check the sample.nanorc file in the installed documentation directory. It includes color configurations and has some documentation included in the comments.

Syntax highlighting is provided for several file types, in /usr/share/nano/ directory. E.g., for shell scripts, you can insert include /usr/share/nano/sh.nanorc in the personal or global configuration file. If you wish highlighting for all supported files, use include /usr/share/nano/*.nanorc. This include does not descend into the extra directory. Move required files one level up.

Contents

Installed Programs: nano and rnano (symlink)
Installed Libraries: None
Installed Directories: /usr/share/nano and /usr/share/doc/nano-7.2

Short Descriptions

nano

is a small, simple text editor which aims to replace Pico, the default editor in the Pine package

rnano

is a restricted mode for nano

Vim-9.0.1273

Introduction to Vim

The Vim package, which is an abbreviation for VI IMproved, contains a vi clone with extra features as compared to the original vi.

The default LFS instructions install vim as a part of the base system. If you would prefer to link vim against X, you should recompile vim to enable GUI mode. There is no need for special instructions since X support is automatically detected.

Note

The version of vim changes daily. To get the latest version, go to https://github.com/vim/vim/releases.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Vim Dependencies

Recommended
Optional

GPM-1.20.7, Lua-5.4.4, rsync-3.2.7, and Ruby-3.2.1

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/vim

Installation of Vim

Note

If you recompile Vim to link against X and your X libraries are not on the root partition, you will no longer have an editor for use in emergencies. You may choose to install an additional editor, not link Vim against X, or move the current vim executable to the /bin directory under a different name such as vi.

Install Vim by running the following commands:

Note

If you intend to run the tests and have not installed Xorg in /usr, append LDFLAGS='-L$XORG_PREFIX/lib' to the configure line below.

echo '#define SYS_VIMRC_FILE  "/etc/vimrc"' >>  src/feature.h &&
echo '#define SYS_GVIMRC_FILE "/etc/gvimrc"' >> src/feature.h &&

./configure --prefix=/usr        \
            --with-features=huge \
            --enable-gui=gtk3    \
            --with-tlib=ncursesw &&
make

Note

If the global configuration file /etc/vimrc references the VIMRUNTIME environment variable, some tests may complain about being unable to find the corresponding directory and wait for user input. If this is the case, this file should be saved and removed before running the tests.

To test the results, issue: make -j1 test. Even if one of the tests fails to produce the file test.out in src/testdir, the remaining tests will still be executed. If all goes well, the log will report ALL DONE. Some tests labelled as flaky may fail occasionally and can be ignored. The tests are known to fail if the output is redirected to a file, and also if they are run in a 'screen' session.

Note

Some color tests expect to be executed under the xterm terminal emulator.

Now, as the root user:

make install

By default, Vim's documentation is installed in /usr/share/vim. The following symlink allows the documentation to be accessed via /usr/share/doc/vim-9.0.1273, making it consistent with the location of documentation for other packages:

ln -snfv ../vim/vim90/doc /usr/share/doc/vim-9.0.1273

If you wish to update the runtime files, issue the following command (requires rsync-3.2.7):

rsync -avzcP --exclude="/dos/" --exclude="/spell/" \
    ftp.nluug.nl::Vim/runtime/ ./runtime/

To install the runtime files and regenerate the tags file, as the root user issue:

make -C src installruntime &&
vim -c ":helptags /usr/share/doc/vim-9.0.1273" -c ":q"

Command Explanations

--with-features=huge: This switch enables all the additional features available in Vim, including support for multibyte characters.

--with-tlib=ncursesw: This switch forces Vim to link against the libncursesw library.

--enable-gui=no: This will prevent compilation of the GUI. Vim will still link against X, so that some features such as the client-server model or the x11-selection (clipboard) are still available.

--without-x: If you prefer not to link Vim against X, use this switch.

--enable-luainterp, --enable-perlinterp, --enable-python3interp=dynamic, --enable-tclinterp --with-tclsh=tclsh, --enable-rubyinterp: These options include the Lua, Perl, Python3, Tcl, or Ruby interpreters that allow using other application code in vim scripts. All the --enable-... options can accept =dynamic to dynamically load the interpreter when needed. This is required for Python 3 to prevent segmentation faults. For tcl, it is necessary to indicate the name of the tclsh executable, since configure only searches versioned names with old versions.

Configuring Vim

Config Files

/etc/vimrc and ~/.vimrc

Configuration Information

Vim has an integrated spell checker which you can enable by issuing the following in a vim window:

:setlocal spell spelllang=ru

This setting will enable spell checking for the Russian language for the current session.

By default, Vim only installs spell files for the English language. If a spell file is not available for a language, then Vim will call the $VIMRUNTIME/plugin/spellfile.vim plugin and will try to obtain the *.spl and optionally *.sug from the vim ftp server, by using the $VIMRUNTIME/plugin/netrwPlugin.vim plugin.

Alternatively you can manually download the *.spl and *.sug files from: ftp://ftp.vim.org/pub/vim/runtime/spell/ and save them to ~/.vim/spell or in /usr/share/vim/vim90/spell/.

To find out what's new in Vim-9.0.1273 issue the following command:

:help version-9.0.1273

For additional information on setting up Vim configuration files, see The vimrc Files and https://vim.fandom.com/wiki/Example_vimrc.

Contents

A list of the reinstalled files, along with their short descriptions can be found in the LFS Vim Installation Instructions.

Installed Programs: gview, gvim, gvimdiff, gvimtutor, rgview, and rgvim
Installed Libraries: None
Installed Directory: /usr/share/vim

Short Descriptions

gview

starts gvim in read-only mode

gvim

is the editor that runs under X and includes a GUI

gvimdiff

edits two or three versions of a file with gvim and shows the differences

gvimtutor

teaches the basic keys and commands of gvim

rgview

is a restricted version of gview

rgvim

is a restricted version of gvim

Chapter 7. Shells

We are all familiar with the Bourne Again SHell, but there are two other user interfaces that are considered useful modern shells – the Berkeley Unix C shell and the Korn shell. This chapter installs packages compatible with these additional shell types.

Dash-0.5.12

Introduction to Dash

Dash is a POSIX compliant shell. It can be installed as /bin/sh or as the default shell for either root or a second user with a userid of 0. It depends on fewer libraries than the Bash shell and is therefore less likely to be affected by an upgrade problem or disk failure. Dash is also useful for checking that a script is completely compatible with POSIX syntax.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Dash Dependencies

Optional

libedit (command line editor library)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/dash

Installation of Dash

Install Dash by running the following commands:

./configure --bindir=/bin --mandir=/usr/share/man &&
make

This package does not come with a test suite.

Now, as the root user:

make install

If you would like to make dash the default sh, recreate the /bin/sh symlink as the root user:

Note

If you create the symbolic link from dash to sh, you will need to reset the link to bash to build LFS.

ln -svf dash /bin/sh

Command Explanations

--bindir=/bin: This parameter places the dash binary into the root filesystem.

--with-libedit: To compile Dash with libedit support.

Configuring Dash

Config Files

Dash sources /etc/profile and ~/.profile

Configuration Information

Update /etc/shells to include the Dash shell by issuing the following command as the root user:

cat >> /etc/shells << "EOF"
/bin/dash
EOF

Contents

Installed Program: dash
Installed Libraries: None
Installed Directories: None

Short Description

dash

is a POSIX compliant shell

Tcsh-6.24.07

Introduction to Tcsh

The Tcsh package contains an enhanced but completely compatible version of the Berkeley Unix C shell (csh). This is useful as an alternative shell for those who prefer C syntax to that of the bash shell, and also because some programs require the C shell in order to perform installation tasks.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/tcsh

Installation of Tcsh

Install Tcsh by running the following commands:

./configure --prefix=/usr &&
make

To test the results, issue: make check.

Now, as the root user:

make install install.man &&

ln -v -sf tcsh   /bin/csh &&
ln -v -sf tcsh.1 /usr/share/man/man1/csh.1

Command Explanations

ln -v -sf tcsh /bin/csh: The FHS states that if there is a C shell installed, there should be a symlink from /bin/csh to it. This creates that symlink.

Configuring Tcsh

Config Files

There are numerous configuration files for the C shell. Examples of these are /etc/csh.cshrc, /etc/csh.login, /etc/csh.logout, ~/.tcshrc, ~/.cshrc, ~/.history, ~/.cshdirs, ~/.login, and ~/.logout. More information on these files can be found in the tcsh(1) man page.

Configuration Information

Update /etc/shells to include the C shell program names (as the root user):

cat >> /etc/shells << "EOF"
/bin/tcsh
/bin/csh
EOF

The following ~/.cshrc provides two alternative colour prompts and coloured ls output. If you prefer a global modification, issue the command as the root user, replacing ~/.cshrc by /etc/csh.cshrc.

cat > ~/.cshrc << "EOF"
# Original at:
# https://www.cs.umd.edu/~srhuang/teaching/code_snippets/prompt_color.tcsh.html

# Modified by the BLFS Development Team.

# Add these lines to your ~/.cshrc (or to /etc/csh.cshrc).

# Colors!
set     red="%{\033[1;31m%}"
set   green="%{\033[0;32m%}"
set  yellow="%{\033[1;33m%}"
set    blue="%{\033[1;34m%}"
set magenta="%{\033[1;35m%}"
set    cyan="%{\033[1;36m%}"
set   white="%{\033[0;37m%}"
set     end="%{\033[0m%}" # This is needed at the end...

# Setting the actual prompt.  Two separate versions for you to try, pick
# whichever one you like better, and change the colors as you want.
# Just don't mess with the ${end} guy in either line...  Comment out or
# delete the prompt you don't use.

set prompt="${green}%n${blue}@%m ${white}%~ ${green}%%${end} "
set prompt="[${green}%n${blue}@%m ${white}%~ ]${end} "

# This was not in the original URL above
# Provides coloured ls
alias ls ls --color=always

# Clean up after ourselves...
unset red green yellow blue magenta cyan yellow white end
EOF

Contents

Installed Program: tcsh
Installed Libraries: None
Installed Directory: None

Short Descriptions

tcsh

is an enhanced but completely compatible version of the Berkeley Unix C shell, csh. It is usable as both an interactive shell and a script processor

zsh-5.9

Introduction to zsh

The zsh package contains a command interpreter (shell) usable as an interactive login shell and as a shell script command processor. Of the standard shells, zsh most closely resembles ksh but includes many enhancements.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

  • Download (HTTP): https://www.zsh.org/pub/zsh-5.9.tar.xz

  • Download MD5 sum: 182e37ca3fe3fa6a44f69ad462c5c30e

  • Download size: 3.2 MB

  • Estimated disk space required: 48 MB (includes documentation and tests)

  • Estimated build time: 1.6 SBU (Using parallelism=4; includes documentation and tests)

Additional Downloads

Note

When there is a new zsh release, the old files shown above are moved to a new server directory: https://www.zsh.org/pub/old/.

zsh Dependencies

Optional

PCRE-8.45 and Valgrind-3.20.0

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/zsh

Installation of zsh

If you downloaded the optional documentation, unpack it with the following command:

tar --strip-components=1 -xvf ../zsh-5.9-doc.tar.xz

Install zsh by running the following commands:

./configure --prefix=/usr            \
            --sysconfdir=/etc/zsh    \
            --enable-etcdir=/etc/zsh \
            --enable-cap             \
            --enable-gdbm                             &&
make                                                  &&

makeinfo  Doc/zsh.texi --plaintext -o Doc/zsh.txt     &&
makeinfo  Doc/zsh.texi --html      -o Doc/html        &&
makeinfo  Doc/zsh.texi --html --no-split --no-headers -o Doc/zsh.html

If you have texlive-20220321 installed, you can build PDF format of the documentation by issuing the following command:

texi2pdf  Doc/zsh.texi -o Doc/zsh.pdf

To test the results, issue: make check.

Now, as the root user:

make install                              &&
make infodir=/usr/share/info install.info &&

install -v -m755 -d                 /usr/share/doc/zsh-5.9/html &&
install -v -m644 Doc/html/*         /usr/share/doc/zsh-5.9/html &&
install -v -m644 Doc/zsh.{html,txt} /usr/share/doc/zsh-5.9

If you downloaded the optional documentation, install it by issuing the following commands as the root user:

make htmldir=/usr/share/doc/zsh-5.9/html install.html &&
install -v -m644 Doc/zsh.dvi /usr/share/doc/zsh-5.9

If you built the PDF format of the documentation, install it by issuing the following command as the root user:

install -v -m644 Doc/zsh.pdf /usr/share/doc/zsh-5.9

Command Explanations

--sysconfdir=/etc/zsh and --enable-etcdir=/etc/zsh: These parameters are used so that all the zsh configuration files are consolidated into the /etc/zsh directory. Omit these parameters if you wish to retain historical compatibility by having all the files located in the /etc directory.

--enable-cap: This option enables POSIX capabilities.

--enable-gdbm: This option enables the use of the GDBM library.

--enable-pcre: This option allows zsh to use the PCRE regular expression library in shell builtins.

Configuring zsh

Config Files

There are a whole host of configuration files for zsh including /etc/zsh/zshenv, /etc/zsh/zprofile, /etc/zsh/zshrc, /etc/zsh/zlogin and /etc/zsh/zlogout. You can find more information on these in the zsh(1) and related manual pages.

The first time zsh is executed, you will be prompted by messages asking several questions. The answers will be used to create a ~/.zshrc file. If you wish to run these questions again, run zsh /usr/share/zsh/5.9/functions/zsh-newuser-install -f.

There are several built-in advanced prompts. In the zsh shell, start advanced prompt support with autoload -U promptinit, then promptinit. Available prompt names are listed with prompt -l. Select a particular one with prompt <prompt-name>. Display all available prompts with prompt -p. Except for the list and display commands above, you can insert the other ones in ~/.zshrc to be automatically executed at shell start, with the prompt you chose.

Configuration Information

Update /etc/shells to include the zsh shell program names (as the root user):

cat >> /etc/shells << "EOF"
/bin/zsh
EOF

Contents

Installed Programs: zsh and zsh-5.9 (hardlinked to each other)
Installed Libraries: Numerous plugin helper modules under /usr/lib/zsh/5.9/
Installed Directories: /usr/{lib,share}/zsh and /usr/share/doc/zsh-5.9

Short Description

zsh

is a shell which has command-line editing, built-in spelling correction, programmable command completion, shell functions (with autoloading), a history mechanism, and a host of other features

Chapter 8. Virtualization

Virtualization allows running a complete operating system, or virtual machine (VM), within another operating environment as a task. There are several commercial and open source environments that either emulate another processor or utilize the hardware virtualization features of the host processor.

qemu-7.2.0

Introduction to qemu

qemu is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V).

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

  • Download (HTTP): https://download.qemu.org/qemu-7.2.0.tar.xz

  • Download MD5 sum: 7630d6a9eba7ab2bcb9979d6d24c2697

  • Download size: 117 MB

  • Estimated disk space required: 2.1 GB

  • Estimated build time: 1.3 SBU (add 2.0 SBU for tests, both using parallelism=4)

Qemu Dependencies

Required

GLib-2.74.5, and a graphical environment

Recommended
Optional

Depending on the sound system, various packages in ALSA-1.2.7, Python-3.11.2, PulseAudio-16.1, BlueZ-5.66, cURL-7.88.1, Cyrus SASL-2.1.28, GnuTLS-3.8.0, GTK+-2.24.33, GTK+-3.24.36, libusb-1.0.26, libgcrypt-1.10.1, libssh2-1.10.0, LZO-2.10, Nettle-3.8.1, Mesa-22.3.5, SDL-1.2.15, VTE-0.70.3 or Vte-0.28.2, and libcacard

Optional (for building the documentation)

sphinx_rtd_theme-1.2.0

Note

This optional dependencies list is not comprehensive. See the output of ./configure --help for a more complete list.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/qemu

KVM Prerequisites

Before building qemu, check to see if your processor supports Virtualization Technology (VT):

grep -E '^flags.*(vmx|svm)' /proc/cpuinfo

If you get any output, you have VT technology (vmx for Intel processors and svm for AMD processors). You then need to go into your system BIOS and ensure it is enabled. After enabling, reboot back to your LFS instance.

Kernel Configuration

Enable the following options in the kernel configuration and recompile the kernel if necessary:

[*] Virtualization:  --->                                             [CONFIG_VIRTUALIZATION]
  <*/M>   Kernel-based Virtual Machine (KVM) support [CONFIG_KVM]
  <*/M>     KVM for Intel (and compatible) processors support         [CONFIG_KVM_INTEL]
  <*/M>     KVM for AMD processors support                            [CONFIG_KVM_AMD]

The Intel or AMD settings are not both required, but the one matching your system processor is required.

To use the bridge network device, as explained below, check that bridge-utils-1.7.1 is installed and the following options in the kernel configuration are enabled:

[*] Networking support  --->                         [CONFIG_NET]
  Networking options  --->
    <*/M> 802.1d Ethernet Bridging                   [CONFIG_BRIDGE]
Device Drivers  --->
  [*] Network device support  --->                   [CONFIG_NETDEVICES]
    <*/M>    Universal TUN/TAP device driver support [CONFIG_TUN]

Installation of qemu

As the root user, add any users that might use the KVM device to that group:

usermod -a -G kvm <username>

Install qemu by running the following commands:

Note

Qemu is capable of running many targets. The build process is also capable of building multiple targets at one time in a comma delimited list assigned to --target-list. Run ./configure --help to get a complete list of available targets.

if [ $(uname -m) = i686 ]; then
   QEMU_ARCH=i386-softmmu
else
   QEMU_ARCH=x86_64-softmmu
fi


mkdir -vp build &&
cd        build &&

../configure --prefix=/usr               \
             --sysconfdir=/etc           \
             --localstatedir=/var        \
             --target-list=$QEMU_ARCH    \
             --audio-drv-list=alsa       \
             --disable-pa                \
             --docdir=/usr/share/doc/qemu-7.2.0 &&

unset QEMU_ARCH &&

make

qemu uses ninja as a subprocess when building. To run the tests, issue: ninja test.

Now, as the root user:

make install

You will also need to add an Udev rule so that the KVM device gets correct permissions. As the root user, issue:

cat > /lib/udev/rules.d/65-kvm.rules << "EOF"
KERNEL=="kvm", GROUP="kvm", MODE="0660"
EOF

Change the permissions and ownership of a helper script, which is needed when using the bridge network device (see below). Again as the root user, issue:

chgrp kvm  /usr/libexec/qemu-bridge-helper &&
chmod 4750 /usr/libexec/qemu-bridge-helper

Note

For convenience you may want to create a symbolic link to run the installed program. For instance (as the root user):

ln -sv qemu-system-`uname -m` /usr/bin/qemu

Command Explanations

--audio-drv-list=alsa --disable-pa: This switch sets the audio driver to ALSA. See below for enabling other audio drivers.

--audio-drv-list=pa --disable-alsa: This switch sets the audio driver to pulseaudio. For other drivers see the --audio-drv-list choices in the output of ./configure --help. The default audio driver is OSS. To enable support for both alsa and pulseaudio, use --audio-drv-list=alsa,pa.

Using Qemu

Since using qemu means using a virtual computer, the steps to set up the virtual machine are in close analogy with those to set up a real computer. You'll need to decide about CPU, memory, disk, USB devices, network card(s), screen size, etc. Once the hardware is decided, you'll have for example to choose how to connect the machine to internet, and/or to install an OS. In the following, we show basic ways of performing those steps. But qemu is much more than this, and it is strongly advised to read the qemu documentation in /usr/share/doc/qemu-7.2.0/qemu-doc.html.

Note

It is standard practice to name the computer running qemu host and the emulated machine running under qemu the guest. We'll use those notations in the following.

Note

The following instructions assume the optional symbolic link, qemu, has been created. Additionally, qemu should be run in a graphical environment. But it is possible to use qemu headless or through SSH. See the documentation for the various possibilities.

Disk

A virtual disk may be set up in the following way:

VDISK_SIZE=50G
VDISK_FILENAME=vdisk.img
qemu-img create -f qcow2 $VDISK_FILENAME $VDISK_SIZE

The virtual disk size and filename should be adjusted as desired. The actual size of the file will be less than specified, but will expand as needed, so it is safe to put a high value.

Operating System

To install an operating system, download an iso image from your preferred Linux distribution. For the purposes of this example, we'll use Fedora-16-x86_64-Live-LXDE.iso in the current directory. Run the following:

qemu -enable-kvm                           \
     -drive file=$VDISK_FILENAME           \
     -cdrom Fedora-16-x86_64-Live-LXDE.iso \
     -boot d                               \
     -m 1G

Follow the normal installation procedures for the chosen distribution. The -boot option specifies the boot order of drives as a string of drive letters. Valid drive letters are: a, b (floppy 1 and 2), c (first hard disk), d (first CD-ROM). The -m option is the amount of memory to use for the virtual machine. The choice depends on the load of the host. Modern distributions should be comfortable with 1GB. The -enable-kvm option allows hardware acceleration. Without this switch, the emulation is much slower.

Defining the virtual hardware

The virtual machine hardware is defined by the qemu command line. An example command is given below:

qemu -enable-kvm                     \
     -smp 4                          \
     -cpu host                       \
     -m 1G                           \
     -drive file=$VDISK_FILENAME     \
     -cdrom grub-img.iso             \
     -boot order=c,once=d,menu=on    \
     -net nic,netdev=net0            \
     -netdev user,id=net0            \
     -device ac97                    \
     -vga std                        \
     -serial mon:stdio               \
     -name "fedora-16"

Meaning of the command line options

-enable-kvm: enable full KVM virtualization support. On some hardware, it may be necessary to add the undocumented -machine smm=off option in order to enable KVM.

-smp <N>: enable symmetric multiprocessing with <N> CPUs.

-cpu <model>: simulate CPU <model>. the list of supported models can be obtained with -cpu help.

-drive file=<filename>: defines a virtual disk whose image is stored in <filename>.

-cdrom grub-img.iso: defines an iso formatted file to use as a cdrom. Here we use a grub rescue disk, which may turn handy when something goes wrong at boot time.

-boot order=c,once=d,menu=on: defines the boot order for the virtual BIOS.

-net nic,netdev=<netid>: defines a network card connected to the network device with id <netid>.

-netdev user,id=<netid>: defines the network user device. This is a virtual local network with addresses 10.0.2.0/24, where the host has address 10.0.2.2 and acts as a gateway to internet, and with a name server at address 10.0.2.3, and an smb server at address 10.0.2.4. A builtin DHCP server can allocate addresses between 10.0.2.15 and 10.0.2.31.

-soundhw <model>: defines the soundcard model. The list may be obtained with -soundhw help.

-vga <type>: defines the type of VGA card to emulate. For -vga std, if you are building a Linux kernel for the guest, it's recommended to enable CONFIG_DRM_BOCHS (as a part of the kernel or a kernel module) to drive all the features of the emulated VGA card, and CONFIG_FB to display the Linux console on it. The other <type> values are not tested by the editors and may require additional dependencies.

-serial mon:stdio: sends the serial port of the guest (/dev/ttyS0 on linux guests), multiplexed with the qemu monitor, to the standard input and output of the qemu process.

-name <name>: sets the name of the guest. This name is displayed in the guest window caption. It may be useful if you run several guests at the same time.

-pflash /usr/share/qemu/edk2-x86_64-code.fd: Load a pre-built EDK2 UEFI firmware, instead of the default PC BIOS. Use this option if you want to boot the guest OS with UEFI.

-drive file=<filename>,if=virtio: Provide Virtio interface to the guest kernel for accessing the disk image, instead of simulating a real disk hardware. This can improve disk I/O performance, but it requires a Virtio driver in guest kernel. Use it instead of a plain -drive if the guest kernel supports Virtio. To build a Linux kernel with Virtio support for the guest, use make defconfig && make kvm_guest.config to create an initial kernel configuration with the Virtio drives enabled, then make your customization. And, if the guest kernel is Linux, the virtual disks using Virtio interface will be named vdx in the devtmpfs, instead of sdx.

-net nic,netdev=net0,model=virtio-net-pci: Provide Virtio interface to the guest kernel for accessing the network interface, instead of simulating a real network interface card. This can improve network I/O performance, but it requires a Virtio driver in guest kernel. Use it instead of a plain -net if the guest kernel supports Virtio.

Controlling the Emulated Display

It may happen that the guest window displayed by qemu does not correspond to the full capability of the emulated VGA card. For example, the vmware card is 1600x900 capable, but only 1024x768 is displayed by default. A suitable Xorg configuration on the guest allows to use the full size (Note that the Xorg video driver to use is Xorg VMware Driver-13.4.0):

cat > /usr/share/X11/xorg.conf.d/20-vmware.conf << "EOF"
Section         "Monitor"
  Identifier    "Monitor0"
  # cvt 1600 900
  # 1600x900 59.95 Hz (CVT 1.44M9) hsync: 55.99 kHz; pclk: 118.25 MHz
  Modeline      "1600x900"  118.25  1600 1696 1856 2112  900 903 908 934 -hsync +vsync
  Option        "PreferredMode" "1600x900"
  HorizSync     1-200
  VertRefresh   1-200
EndSection

Section         "Device"
  Identifier    "VMware SVGA II Adapter"
  Option        "Monitor" "default"
  Driver        "vmware"
EndSection

Section         "Screen"
  Identifier    "Default Screen"
  Device        "VMware SVGA II Adapter"
  Monitor       "Monitor0"

  SubSection    "Display"
    Depth       24
    Modes       "1600x900" "1440x900" "1366x768" "1280x720" "800x480"
  EndSubSection

EndSection
EOF

New sizes will be available besides the native ones. You need to restart X in order to have the new sizes available.

Networking

The above solution for networking allows the guest to access the local network through the host (and possibly to access internet through the local routers), but the converse is not true. Not even the host can access the guest, unless port forwarding is enabled. And in the case several guests are running, they cannot communicate with each other. Other network devices can be used for this purpose. For example, there is the socket device, which allows several guests to share a common virtual network. In the following, we describe in more details how to set up the bridge device, which allows the guests to appear as if connected to the local network. All the commands below should be run as the root user.

Set up bridging with bridge-utils-1.7.1. Only the physical interface(s) should be set up at boot. The virtual interface(s) will be added as needed when qemu is started.

Set up a required configuration file:

install -vdm 755 /etc/qemu &&
echo allow br0 > /etc/qemu/bridge.conf

In the qemu command line above, replace the switch -netdev user,... with -netdev bridge,....

Contents

Installed Programs: elf2dmp, qemu (symlink), qemu-edid, qemu-ga, qemu-img, qemu-io, qemu-keymap, qemu-nbd, qemu-pr-helper, qemu-storage-daemon, and qemu-system-<arch>
Installed Library: None
Installed Directories: /usr/share/qemu and /usr/share/doc/qemu-7.2.0 (optional)

Short Description

elf2dmp

Converts files from elf to dmp format

qemu-edid

is a test tool for the qemu EDID generator

qemu-ga

implements support for QMP (QEMU Monitor Protocol) commands and events that terminate and originate respectively within the guest using an agent built as part of QEMU

qemu-img

provides commands to manage QEMU disk images

qemu-io

is a diagnostic and manipulation program for (virtual) memory media. It is still at an early stage of development

qemu-keymap

generates qemu reverse keymaps from xkb keymaps, which can be used with the qemu "-k" command line switch

qemu-nbd

exports Qemu disk images using the QEMU Disk Network Block Device (NBD) protocol

qemu-pr-helper

Implements the persistent reservation helper for QEMU

qemu-storage-daemon

allows to modify disk images using the QEMU Monitor Protocol (QMP) without running a VM

qemu-system-x86_64

is the QEMU PC System emulator

Part III. General Libraries and Utilities

Chapter 9. General Libraries

Libraries contain code which is often required by more than one program. This has the advantage that each program doesn't need to duplicate code (and risk introducing bugs), it just has to call functions from the libraries installed on the system. The most obvious example of a set of libraries is Glibc which is installed during the LFS book. This contains all of the C library functions which programs use.

There are two types of libraries: static and shared. Shared libraries (usually libXXX.so) are loaded into memory from the shared copy at runtime (hence the name). Static libraries ( libXXX.a) are actually linked into the program executable file itself, thus making the program file larger. Quite often, you will find both static and shared copies of the same library on your system.

Generally, you only need to install libraries when you are installing software that needs the functionality they supply. In the BLFS book, each package is presented with a list of (known) dependencies. Thus, you can figure out which libraries you need to have before installing that program. If you are installing something without using BLFS instructions, usually the README or INSTALL file will contain details of the program's requirements.

There are certain libraries which nearly everyone will need at some point. In this chapter these and some others are listed and it is explained why you may want to install them.

Apr-1.7.2

Introduction to Apr

The Apache Portable Runtime (APR) is a supporting library for the Apache web server. It provides a set of application programming interfaces (APIs) that map to the underlying Operating System (OS). Where the OS doesn't support a particular function, APR will provide an emulation. Thus programmers can use the APR to make a program portable across different platforms.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/apr

Installation of Apr

Fix an issue checking a location in a script template:

sed -e '/^case "$0"/s;$0;$(readlink -f $0);' \
    -i apr-config.in

Install Apr by running the following commands:

./configure --prefix=/usr    \
            --disable-static \
            --with-installbuilddir=/usr/share/apr-1/build &&
make

To test the results, issue: make test.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Program: apr-1-config
Installed Library: libapr-1.so
Installed Directories: /usr/include/apr-1 and /usr/share/apr-1

Short Descriptions

apr-1-config

is a shell script used to retrieve information about the apr library in the system. It is typically used to compile and link against the library

libapr-1.so

is the Apache Portable Runtime library

Apr-Util-1.6.3

Introduction to Apr Util

The Apache Portable Runtime Utility Library provides a predictable and consistent interface to underlying client library interfaces. This application programming interface assures predictable if not identical behavior regardless of which libraries are available on a given platform.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Apr Util Dependencies

Required

Apr-1.7.2

Optional

Berkeley DB-5.3.28, FreeTDS, MariaDB-10.6.12 or MySQL, OpenLDAP-2.6.4, PostgreSQL-15.2, SQLite-3.40.1 and unixODBC-2.3.11

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/apr-util

Installation of Apr Util

Install Apr Util by running the following commands:

./configure --prefix=/usr       \
            --with-apr=/usr     \
            --with-gdbm=/usr    \
            --with-openssl=/usr \
            --with-crypto &&
make

To test the results, issue: make -j1 test. One test, testdbm, is known to fail.

Now, as the root user:

make install

Command Explanations

--with-gdbm=/usr: This switch enables the apr_dbm_gdbm-1.so plugin.

--with-openssl=/usr --with-crypto: These switches enable the apr_crypto_openssl-1.so plugin.

--with-berkeley-db=/usr: If you have installed Berkeley DB-5.3.28, use this switch to compile the apr_dbm_db-1.so plugin.

--with-ldap: If you have installed OpenLDAP-2.6.4, use this switch to compile the apr_ldap.so plugin.

Contents

Installed Program: apu-1-config
Installed Library: libaprutil-1.so
Installed Directory: /usr/lib/apr-util-1

Short Descriptions

apu-1-config

is an APR-util script designed to allow easy command line access to APR-util configuration parameters

libaprutil-1.so

contains functions that provide a predictable and consistent interface to underlying client library interfaces

Aspell-0.60.8

Introduction to Aspell

The Aspell package contains an interactive spell checking program and the Aspell libraries. Aspell can either be used as a library or as an independent spell checker.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

You'll need to download at least one dictionary. The link below will take you to a page containing links to dictionaries in many languages.

Aspell Dependencies

Required

Which-2.21 (for the dictionaries)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/aspell

Installation of Aspell

Install Aspell by running the following commands:

./configure --prefix=/usr &&
make

This package does not come with a test suite.

Now, as the root user:

make install &&
ln -svfn aspell-0.60 /usr/lib/aspell &&

install -v -m755 -d /usr/share/doc/aspell-0.60.8/aspell{,-dev}.html &&

install -v -m644 manual/aspell.html/* \
    /usr/share/doc/aspell-0.60.8/aspell.html &&

install -v -m644 manual/aspell-dev.html/* \
    /usr/share/doc/aspell-0.60.8/aspell-dev.html

If you do not plan to install Ispell, then copy the wrapper script ispell:

install -v -m 755 scripts/ispell /usr/bin/

If you do not plan to install Spell, then copy the wrapper script spell:

install -v -m 755 scripts/spell /usr/bin/

Command Explanations

ln -svfn aspell-0.60 /usr/lib/aspell: This command is useful for configuration of other applications, such as enchant-2.3.3.

Configuring Aspell

Configuration Information

After Aspell is installed, you must set up at least one dictionary. Install one or more dictionaries by running the following commands:

./configure &&
make

Now, as the root user:

make install

Contents

Installed Programs: aspell, aspell-import, precat, preunzip, prezip, prezip-bin, pspell-config, run-with-aspell, word-list-compress and optionally, ispell and spell.
Installed Libraries: libaspell.so and libpspell.so
Installed Directories: /usr/include/pspell and /usr/lib/aspell-0.60

Short Descriptions

aspell

is a utility that can function as an ispell -a replacement, as an independent spell checker, as a test utility to test out Aspell features, and as a utility for managing dictionaries

ispell

is a wrapper around aspell to invoke it in ispell compatible mode

spell

is a wrapper around aspell to invoke it in spell compatible mode

aspell-import

imports old personal dictionaries into Aspell

precat

decompresses a prezipped file to stdout

preunzip

decompresses a prezipped file

prezip

is a prefix delta compressor, used to compress sorted word lists or other similar text files

prezip-bin

is called by the various wrapper scripts to perform the actual compressing and decompressing

pspell-config

displays information about the libpspell installation, mostly for use in build scripts

run-with-aspell

is a script to help use Aspell as an ispell replacement

word-list-compress

compresses or decompresses sorted word lists for use with the Aspell spell checker

libaspell.so

contains spell checking API functions

libpspell.so

is an interface to the libaspell library. All the spell checking functionality is now in libaspell but this library is included for backward compatibility

Boost-1.81.0

Introduction to Boost

Boost provides a set of free peer-reviewed portable C++ source libraries. It includes libraries for linear algebra, pseudorandom number generation, multithreading, image processing, regular expressions and unit testing.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Boost Dependencies

Recommended
Optional

ICU-72.1 and Open MPI

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/boost

Installation of Boost

A change in this version of boost breaks the few packages which use the phoenix module when compiled with current GCC. In BLFS, that affects LibreOffice-7.5.0.3. Fix this with the following command:

sed -i '/#include.*phoenix.*tuple.hpp.*/d' \
  boost/phoenix/stl.hpp

This package can be built with several jobs running in parallel. In the instructions below, <N> stands for the number of jobs. Install Boost by running the following commands:

./bootstrap.sh --prefix=/usr --with-python=python3 &&
./b2 stage -j<N> threading=multi link=shared

To run the Boost.Build's regression test, issue pushd tools/build/test; python3 test_all.py; popd. With python-3.10.x all 168 tests should pass. With Python-3.11.2, 20 tests fail for undetermined reasons.

To run every library's regression tests, issue pushd status; ../b2; popd. A few tests may fail. They take a very long time (over 119 SBU at -j4) and use a very large amount of disk space (46 GB). You should use the -jN switch to speed them up.

Note

Boost installs many versioned directories in /usr/lib/cmake. If a new version of Boost is installed over a previous version, the older cmake directories need to be explicitly removed. To do this, run as the root user:

rm -rf /usr/lib/cmake/[Bb]oost*

before installing the new version.

Now, as the root user:

./b2 install threading=multi link=shared

Command Explanations

sed -i '/#include ...: This removes the inclusion of boost/phoenix/stl/tuple.hpp from this header-only library, allowing applications which use it to link using recent C++. An alternative is to edit /usr/include/boost/phoenix/stl.hpp if this version of boost has already been installed without this sed.

threading=multi: This parameter ensures that Boost is built with multithreading support.

link=shared: This parameter ensures that only shared libraries are created, except for libboost_exception and libboost_test_exec_monitor which are created as static. Most people will not need the static libraries, and most programs using Boost only use the headers. Omit this parameter if you do need static libraries.

--with-python=python3: This switch ensures Python3 is used if Python2 is installed.

-jN: This switch may be added to the b2 command lines, to run up to N processes in parallel.

Contents

Installed Programs: None
Installed Libraries: libboost_atomic.so, libboost_chrono.so, libboost_container.so, libboost_context.so, libboost_contract.so, libboost_coroutine.so, libboost_date_time.so, libboost_exception.a, libboost_fiber.so, libboost_filesystem.so, libboost_graph.so, libboost_iostreams.so, libboost_json.so, libboost_locale.so, libboost_log_setup.so, libboost_log.so, libboost_math_c99.so, libboost_math_c99f.so, libboost_math_c99l.so, libboost_math_tr1.so, libboost_math_tr1f.so, libboost_math_tr1l.so, libboost_nowide.so, libboost_numpy39.so, libboost_prg_exec_monitor.so, libboost_program_options.so, libboost_python311.so, libboost_random.so, libboost_regex.so, libboost_serialization.so, libboost_stacktrace_addr2line.so, libboost_stacktrace_basic.so, libboost_stacktrace_noop.so, libboost_system.so, libboost_test_exec_monitor.a, libboost_thread.so, libboost_timer.so, libboost_type_erasure.so, libboost_unit_test_framework.so, libboost_wave.so, and libboost_wserialization.so
Installed Directory: /usr/include/boost

brotli-1.0.9

Introduction to Brotli

Brotli provides a general-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling. Its libraries are particularly used for WOFF2 fonts on webpages.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Brotli Dependencies

Required

CMake-3.25.2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/brotli

Installation of Brotli

At first, fix an issue in pkg-config files:

sed -i '[email protected].@@' scripts/*.pc.in

Install brotli by running the following commands:

mkdir out &&
cd    out &&

cmake -DCMAKE_INSTALL_PREFIX=/usr \
      -DCMAKE_BUILD_TYPE=Release  \
      ..  &&
make

To test the results, issue: make test.

Now, as the root user:

make install &&
cd ..

If desired, build and install the Python3 bindings as the root user:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD &&
pip3 install --no-index --find-links dist --no-cache-dir --no-user Brotli

Contents

Installed Programs: brotli
Installed Libraries: libbrotlicommon{-static.a,.so}, libbrotlidec{,-static.a,.so}, and libbrotlienc{,-static.a,.so}
Installed Directory: /usr/include/brotli /usr/lib/python3.11/site-packages/Brotli-1.0.9.dist-info

Short Descriptions

brotli

can compress or decompress files, or test the integrity of compressed files

libbrotlicommon{-static.a,.so}

is the Brotli common dictionary library

libbrotlidec{-static.a,.so}

is the Brotli decoder library

libbrotlienc{-static.a,.so}

is the Brotli common encoder library

CLucene-2.3.3.4

Introduction to CLucene

CLucene is a C++ version of Lucene, a high performance text search engine.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

CLucene Dependencies

Required

CMake-3.25.2

Recommended

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/clucene

Installation of CLucene

Install CLucene by running the following commands:

patch -Np1 -i ../clucene-2.3.3.4-contribs_lib-1.patch &&

sed -i '/Misc.h/a #include <ctime>' src/core/CLucene/document/DateTools.cpp &&

mkdir build &&
cd    build &&

cmake -DCMAKE_INSTALL_PREFIX=/usr \
      -DBUILD_CONTRIBS_LIB=ON .. &&
make

Now, as the root user:

make install

Command Explanations

-DBUILD_CONTRIBS_LIB=ON: This cmake variable enables building the CLucene contribs library necessary for running applications that use language specific text analyzers like LibreOffice for example.

Contents

Installed Programs: None
Installed Libraries: libclucene-contribs-lib.so, libclucene-core.so, and libclucene-shared.so
Installed Directories: /usr/include/CLucene and /usr/lib/CLuceneConfig.cmake

dbus-glib-0.112

Introduction to D-Bus GLib

The D-Bus GLib package contains GLib interfaces to the D-Bus API.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

D-Bus GLib Dependencies

Required

dbus-1.14.6 and GLib-2.74.5

Optional

GTK-Doc-1.33.2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/dbus-glib

Installation of D-Bus GLib

Install D-Bus GLib by running the following commands:

./configure --prefix=/usr     \
            --sysconfdir=/etc \
            --disable-static &&
make

To test the results, issue: make check. Note that more comprehensive tests can be run by following the same method used in D-Bus instructions, which requires building the package twice.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

--enable-gtk-doc: Use this parameter if GTK-Doc is installed and you wish to rebuild and install the API documentation.

Contents

Installed Program: dbus-binding-tool
Installed Library: libdbus-glib-1.so
Installed Directories: /usr/share/gtk-doc/html/dbus-glib

Short Descriptions

dbus-binding-tool

is a tool used to interface with the D-Bus API

libdbus-glib-1.so

contains GLib interface functions to the D-Bus API

Double-conversion-3.2.1

Introduction to Double-conversion

The Double-conversion package contains a library that facilitates binary-to-decimal and decimal-to-binary routines for IEEE doubles.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Double-conversion Dependencies

Required

CMake-3.25.2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/double-conversion

Installation of Double-conversion

Install Double-conversion by running the following commands:

mkdir build &&
cd    build &&

cmake -DCMAKE_INSTALL_PREFIX=/usr \
      -DBUILD_SHARED_LIBS=ON      \
      -DBUILD_TESTING=ON          \
      ..                          &&
make

To test the results, issue: make test.

Now, as the root user:

make install

Command Explanations

-DBUILD_SHARED_LIBS=ON: This switch forces cmake to build a shared version of the library instead of the static version.

-DBUILD_TESTING=ON: This switch builds the test programs.

Contents

Installed Programs: None
Installed Libraries: libdouble-conversion.so
Installed Directories: /usr/include/double-conversion

Short Descriptions

libdouble-conversion.so

provides binary-to-decimal and decimal-to-binary routines for IEEE doubles

duktape-2.7.0

Introduction to duktape

duktape is an embeddable Javascript engine, with a focus on portability and compact footprint.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

  • Download (HTTP): https://duktape.org/duktape-2.7.0.tar.xz

  • Download MD5 sum: b3200b02ab80125b694bae887d7c1ca6

  • Download size: 1003 KB

  • Estimated disk space required: 25 MB

  • Estimated build time: 0.3 SBU

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/duktape

Installation of duktape

Install duktape by running the following commands:

sed -i 's/-Os/-O2/' Makefile.sharedlibrary
make -f Makefile.sharedlibrary INSTALL_PREFIX=/usr

Now, as the root user:

make -f Makefile.sharedlibrary INSTALL_PREFIX=/usr install

Contents

Installed Programs: None
Installed Libraries: libduktape.so and libduktaped.so
Installed Directories: None

Short Descriptions

libduktape.so

is an embeddable Javascript engine

enchant-2.3.3

Introduction to enchant

The enchant package provides a generic interface into various existing spell checking libraries.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

enchant Dependencies

Required

GLib-2.74.5

Recommended
Optional

dbus-glib-0.112, Doxygen-1.9.6, Hspell, Hunspell, Nuspell, Voikko, and unittest-cpp (required for tests)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/enchant

Installation of enchant

Install enchant by running the following commands:

./configure --prefix=/usr --disable-static &&
make

To run tests, unittest-cpp must be installed and the --enable-relocatable option passed to configure above. If these conditions are present, the tests may be run with make check.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Configuring enchant

Config Files

~/.enchant and /usr/share/enchant/enchant.ordering

Configuration Information

You can test your installation and configuration by creating a test file and running the following commands (you can replace the en_GB dictionary by any other downloaded when installing Aspell-0.60.8):

cat > /tmp/test-enchant.txt << "EOF"
Tel me more abot linux
Ther ar so many commads
EOF

enchant-2 -d en_GB -l /tmp/test-enchant.txt &&
enchant-2 -d en_GB -a /tmp/test-enchant.txt

You will see a list of the misspelled words followed by a list of alternatives for them.

See more details in the enchant manual page.

Contents

Installed Programs: enchant-2 and enchant-lsmod-2
Installed Libraries: libenchant-2.so
Installed Directories: /usr/include/enchant-2, /usr/lib/enchant-2, and /usr/share/enchant

Short Descriptions

enchant-2

is a spellchecker

enchant-lsmod-2

lists available backends, languages, and dictionaries

libenchant-2.so

contains spell checking interface API functions

Exempi-2.6.3

Introduction to Exempi

Exempi is an implementation of XMP (Adobe's Extensible Metadata Platform).

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Exempi Dependencies

Required

Boost-1.81.0

Optional

Valgrind-3.20.0

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/exempi

Installation of Exempi

If you intend to run the regression tests, first remove a test that depends on an apparently proprietary Adobe SDK:

sed -i -r '/^\s?testadobesdk/d' exempi/Makefile.am &&
autoreconf -fiv

Install Exempi by running the following commands:

./configure --prefix=/usr --disable-static &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Program: exempi
Installed Library: libexempi.so
Installed Directory: /usr/include/exempi-2.0

Short Descriptions

exempi

is a command line tool to manipulate XMP metadata

libexempi.so

is a library used to parse XMP metadata

fftw-3.3.10

Introduction to fftw

FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST).

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/fftw

Installation of fftw

Note

We build fftw three times for different libraries in different numerical precisions: the default double precision floating point, the older 32-bit (single precision) version named float which sacrifices precision for speed, and the long double which offers increased precision at the cost of slower execution.

The first build is for double precision arithmetic. Install fftw by running the following commands:

./configure --prefix=/usr    \
            --enable-shared  \
            --disable-static \
            --enable-threads \
            --enable-sse2    \
            --enable-avx     \
            --enable-avx2    &&
make

To test the results, issue: make check. On 32-bit systems, the tests can take substantially longer than they would on 64-bit machines.

Now, as the root user:

make install

Now build single precision:

make clean &&

./configure --prefix=/usr    \
            --enable-shared  \
            --disable-static \
            --enable-threads \
            --enable-sse2    \
            --enable-avx     \
            --enable-avx2    \
            --enable-float   &&
make

As the root user:

make install

Finally, build long double precision:

make clean &&

./configure --prefix=/usr    \
            --enable-shared  \
            --disable-static \
            --enable-threads \
            --enable-long-double &&
make

As the root user:

make install

Command Explanations

--enable-shared --disable-static: Use shared libs instead of static libs.

--enable-threads: This enables libfftw3_threads.so to be compiled. It is used by e.g. the gimp plugin from G'MIC.

--enable-{sse2,avx,avx2}: These enables building the optimized routines using SSE2, AVX, and AVX2 instructions. FFTW will check if these routines can be really used on the current CPU when the FFTW library is loaded, so a FFTW build with these routines enabled can still run on a CPU without SSE2, AVX, or AVX512. These options are not compatible with --enable-long-double.

--enable-float: This enables building the library that uses single precision floating point arithmetic. It is faster but less precise than the default double precision library. The library will be called libfftw3f.so needed by PulseAudio-16.1.

--enable-long-double: This enables building the library that uses higher precision long-double floating point arithmetic. The library will be called libfftw3l.so.

--enable-avx512: This enables building the optimized routines using AVX512F instructions. FFTW will check if these routines can be really used on the current CPU when the FFTW library is loaded, so a FFTW build with these routines enabled can still run on a CPU without AVX512F. Use this option if the FFTW build will be used on a CPU with AVX512F. This option is not compatible with --enable-long-double.

Contents

Installed Programs: fftw-wisdom and fftw-wisdom-to-conf
Installed Libraries: libfftw3.so, libfftw3_threads.so, libfftw3f.so, libfftw3f_threads.so, libfftw3l.so and libfftw3l_threads.so
Installed Directories: None

Short Descriptions

fftw-wisdom

is a utility to generate FFTW wisdom files, which contain saved information about how to optimally compute (Fourier) transforms of various sizes

fftw-wisdom-to-conf

is a utility to generate C configuration routines from FFTW wisdom files, where the latter contain saved information about how to optimally compute (Fourier) transforms of various sizes

libfftw3.so

is the Fast Fourier Transform library

libfftw3_threads.so

is the threaded Fast Fourier Transform library

libfftw3f.so

is the single-precision Fast Fourier Transform library, described as float for historic reasons

libfftw3f_threads.so

is the threaded single-precision Fast Fourier Transform library

libfftw3l.so

is the long double Fast Fourier Transform library

libfftw3l_threads.so

is the threaded long double Fast Fourier Transform library

GLib-2.74.5

Introduction to GLib

The GLib package contains low-level libraries useful for providing data structure handling for C, portability wrappers and interfaces for such runtime functionality as an event loop, threads, dynamic loading and an object system.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

GLib Dependencies

Recommended
Optional

dbus-1.14.6 (for some tests), Fuse-3.13.1 and bindfs (both needed for one test), GDB-13.1 (for bindings), docbook-xml-4.5, docbook-xsl-nons-1.79.2, GTK-Doc-1.33.2 (to build API documentation), glib-networking-2.74.0 (for some tests, but this is a circular dependency), and sysprof-3.46.0

Additional Runtime Dependencies

Quoted directly from the INSTALL file: Some of the mimetype-related functionality in GIO requires the update-mime-database and update-desktop-database utilities, which are part of shared-mime-info-2.2 and desktop-file-utils-0.26, respectively. These two utilities are also needed for some tests.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/glib2

Installation of GLib

If desired, apply the optional patch. In many cases, applications that use this library, either directly or indirectly via other libraries such as GTK+-3.24.36, output numerous warnings when run from the command line. This patch enables the use of an environment variable, GLIB_LOG_LEVEL, that suppresses unwanted messages. The value of the variable is a digit that corresponds to:

1 Alert
2 Critical
3 Error
4 Warning
5 Notice

For instance export GLIB_LOG_LEVEL=4 will skip output of Warning and Notice messages (and Info/Debug messages if they are turned on). If GLIB_LOG_LEVEL is not defined, normal message output will not be affected.

patch -Np1 -i ../glib-2.74.5-skip_warnings-1.patch

Warning

If a previous version of glib is installed, move the headers out of the way so that later packages do not encounter conflicts:

if [ -e /usr/include/glib-2.0 ]; then
    rm -rf /usr/include/glib-2.0.old &&
    mv -vf /usr/include/glib-2.0{,.old}
fi

Install GLib by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr       \
      --buildtype=release \
      -Dman=true          \
      ..                  &&
ninja

Note

If libxslt-1.1.37 is installed, the above command may indicate several (about 33) errors that start with "Error: no ID for constraint linkend:" when generating the man pages. These are harmless.

The GLib test suite requires desktop-file-utils for some tests. However, desktop-file-utils requires GLib in order to compile; therefore, you must first install GLib and then run the test suite.

Now, as the root user:

ninja install &&

mkdir -p /usr/share/doc/glib-2.74.5 &&
cp -r ../docs/reference/{gio,glib,gobject} /usr/share/doc/glib-2.74.5

You should now install desktop-file-utils-0.26 and shared-mime-info-2.2 and proceed to run the test suite.

Warning

Do not run the test suite as root or some tests will fail unexpectedly and leave some non-FHS-compliant directories in the /usr hierarchy.

To test the results, after having installed the package, issue: LC_ALL=C ninja test as a non-root user. One test named glib:glib / error is known to fail.

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

-Dman=true: This switch causes the build to create and install the package man pages.

-Dgtk_doc=true: This switch causes the build to create and install the API documentation.

Contents

Installed Programs: gapplication, gdbus, gdbus-codegen, gio, gio-querymodules, glib-compile-resources, glib-compile-schemas, glib-genmarshal, glib-gettextize, glib-mkenums, gobject-query, gresource, gsettings, gtester, and gtester-report
Installed Libraries: libgio-2.0.so, libglib-2.0.so, libgmodule-2.0.so, libgobject-2.0.so, and libgthread-2.0.so
Installed Directories: /usr/include/gio-unix-2.0, /usr/include/glib-2.0, /usr/lib/glib-2.0, /usr/share/glib-2.0, /usr/share/doc/glib-2.74.5, and /usr/share/gtk-doc/html/{gio,glib,gobject} (optional)

Short Descriptions

gapplication

can be used to start applications and to send messages to already-running instances of other applications

gdbus

is a simple tool used for working with D-Bus objects

gdbus-codegen

is used to generate code and/or documentation for one or more D-Bus interfaces

gio

is a utility that makes many GIO features available from the command line

gio-querymodules

is used to create a giomodule.cache file in the listed directories. This file lists the implemented extension points for each module that has been found

glib-compile-resources

is used to read the resource description from a file and the files that it references to create a binary resource bundle that is suitable for use with the GResource API

glib-compile-schemas

is used to compile all the GSettings XML schema files in a directory into a binary file with the name gschemas.compiled that can be used by GSettings

glib-genmarshal

is a C code marshaller generation utility for GLib closures

glib-gettextize

is a variant of the gettext internationalization utility

glib-mkenums

is a C language enum description generation utility

gobject-query

is a small utility that draws a tree of types

gresource

offers a simple command line interface to GResource

gsettings

offers a simple command line interface to GSettings

gtester

is a test running utility

gtester-report

is a test report formatting utility

GLib libraries

contain low-level core libraries for the GIMP Toolkit

GLibmm-2.66.5

Introduction to GLibmm

The GLibmm package is a set of C++ bindings for GLib.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

GLibmm Dependencies

Required

GLib-2.74.5 and libsigc++-2.12.0

Optional

Doxygen-1.9.6, glib-networking-2.74.0 (for tests), GnuTLS-3.8.0 (for tests), libxslt-1.1.37, and mm-common

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/glibmm

Installation of GLibmm

Install GLibmm by running the following commands:

mkdir bld &&
cd    bld &&

meson --prefix=/usr --buildtype=release .. &&
ninja

To test the results, issue: ninja test.

Now, as the root user:

ninja install

Contents

Installed Programs: None
Installed Libraries: libgiomm-2.4.so, libglibmm-2.4.so and libglibmm_generate_extra_defs-2.4.so
Installed Directories: /usr/lib/g{io,lib}mm-2.4 and /usr/include/g{io,lib}mm-2.4

Short Descriptions

libgiomm-2.4.so

contains the GIO API classes

libglibmm-2.4.so

contains the GLib API classes

GMime-3.2.7

Introduction to GMime

The GMime package contains a set of utilities for parsing and creating messages using the Multipurpose Internet Mail Extension (MIME) as defined by the applicable RFCs. See the GMime web site for the RFCs resourced. This is useful as it provides an API which adheres to the MIME specification as closely as possible while also providing programmers with an extremely easy to use interface to the API functions.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

GMime Dependencies

Required

GLib-2.74.5 and libgpg-error-1.46

Recommended
Optional

DocBook-utils-0.6.14, GPGME-1.18.0, GTK-Doc-1.33.2, libnsl-2.0.0, Vala-0.56.4, and Gtk# (requires Mono)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/gmime

Installation of GMime

Install GMime by running the following commands:

./configure --prefix=/usr --disable-static &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

--enable-gtk-doc: Use this parameter if GTK-Doc is installed and you wish to rebuild and install the API documentation.

Contents

Installed Programs: None
Installed Library: libgmime-3.0.so
Installed Directories: /usr/include/gmime-3.0 and /usr/share/gtk-doc/html/gmime-3.0

Short Descriptions

libgmime-3.0.so

contains API functions used by programs that need to comply to the MIME standards

gobject-introspection-1.74.0

Introduction to GObject Introspection

The GObject Introspection is used to describe the program APIs and collect them in a uniform, machine readable format.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

GObject Introspection Dependencies

Required

GLib-2.74.5

Optional

Cairo-1.17.6 (required for the tests), Gjs-1.74.1 (to satisfy one test), GTK-Doc-1.33.2, Mako-1.2.4, and Markdown-3.4.1

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/gobject-introspection

Installation of GObject Introspection

Install GObject Introspection by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release .. &&
ninja

To test the results, issue: ninja test.

Now, as the root user:

ninja install

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

-Dgtk_doc=true: Build and install the documentation.

-Dcairo=enabled: Use cairo for tests.

-Ddoctool=enabled: Install g-ir-doc-tool and run related tests. You must have Mako-1.2.4 and Markdown-3.4.1 installed in order to install this utility.

Contents

Installed Program: g-ir-annotation-tool, g-ir-compiler, g-ir-doc-tool, g-ir-generate, g-ir-inspect, and g-ir-scanner
Installed Libraries: libgirepository-1.0.so and _giscanner.cpython-311-<arch>-linux-gnu.so
Installed Directories: /usr/include/gobject-introspection-1.0, /usr/lib/girepository-1.0, /usr/lib/gobject-introspection, /usr/share/gir-1.0, and /usr/share/gobject-introspection-1.0

Short Descriptions

g-ir-annotation-tool

creates or extracts annotation data from GI typelibs

g-ir-compiler

converts one or more GIR files into one or more typelib

g-ir-doc-tool

generates Mallard files that can be viewed with yelp or rendered to HTML with yelp-build from yelp-tools

g-ir-inspect

is a utility that gives information about a GI typelib

g-ir-generate

is a GIR generator that uses the repository API

g-ir-scanner

is a tool which generates GIR XML files by parsing headers and introspecting GObject based libraries

libgirepository-1.0.so

provides an API to access the typelib metadata

Gsl-2.7.1

Introduction to Gsl

The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. It provides a wide range of mathematical routines such as random number generators, special functions and least-squares fitting.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Gsl Dependencies

Optional

sphinx_rtd_theme-1.2.0

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/gsl

Installation of Gsl

Install Gsl by running the following commands:

./configure --prefix=/usr --disable-static &&
make

If you have sphinx_rtd_theme-1.2.0 installed, build the documentation with:

make html

To test the results, issue: make check.

Now, as the root user:

make install

If you built the documentation, install it (as root) with:

mkdir                   /usr/share/doc/gsl-2.7.1 &&
cp -R doc/_build/html/* /usr/share/doc/gsl-2.7.1

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: gsl-config, gsl-histogram, and gsl-randist
Installed Libraries: libgslcblas.so and libgsl.so
Installed Directory: /usr/include/gsl and /usr/share/doc/gsl-2.7.1

Short Descriptions

gsl-config

is a shell script to get the version number and compiler flags of the installed Gsl library

gsl-histogram

is a demonstration program for the GNU Scientific Library that computes a histogram from data taken from stdin

gsl-randist

is a demonstration program for the GNU Scientific Library that generates random samples from various distributions

libgslcblas.so

contains functions that implement a C interface to Basic Linear Algebra Subprograms

libgsl.so

contains functions that provide a collection of numerical routines for scientific computing

gspell-1.12.0

Introduction to gspell

The gspell package provides a flexible API to add spell checking to a GTK+ application.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

gspell Dependencies

Required

enchant-2.3.3, ICU-72.1, and GTK+-3.24.36

Optional

gobject-introspection-1.74.0, GTK-Doc-1.33.2, Vala-0.56.4, and Valgrind-3.20.0

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/gspell

Installation of gspell

Install gspell by running the following commands:

./configure --prefix=/usr &&
make

To test the results, issue: make check. The tests must be run in an X session. One test, test-checker, is known to fail if the external package Hunspell is not installed.

Now, as the root user:

make install

Contents

Installed Programs: gspell-app1
Installed Libraries: libgspell-1.so
Installed Directories: /usr/include/gspell-1 and /usr/share/gtk-doc/html/gspell-1.0

Short Descriptions

gspell-app1

checks the spelling of a text entered in a window

libgspell-1.so

is the gspell API library

ICU-72.1

Introduction to ICU

The International Components for Unicode (ICU) package is a mature, widely used set of C/C++ libraries providing Unicode and Globalization support for software applications. ICU is widely portable and gives applications the same results on all platforms.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

ICU Dependencies

Optional

LLVM-15.0.7 (with Clang), and Doxygen-1.9.6 (for documentation)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/icu

Installation of ICU

Note

This package expands to the directory icu.

Note

If clang++ is available, it will be used in the mistaken belief that g++ might not support C++11, even though configure has tested for that. If using g++ there will be an unnecessary warning at the end of configure. Building with g++ also takes longer than the estimated SBU shown.

Install ICU by running the following commands:

cd source                                    &&

./configure --prefix=/usr                    &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Contents

Installed Programs: derb, escapesrc, genbrk, genccode, gencfu, gencmn, gencnval, gendict, gennorm2, genrb, gensprep, icu-config, icuexportdata, icuinfo, icupkg, makeconv, pkgdata, and uconv
Installed Libraries: libicudata.so, libicui18n.so, libicuio.so, libicutest.so, libicutu.so, and libicuuc.so
Installed Directories: /usr/include/unicode, /usr/lib/icu, and /usr/share/icu

Short Descriptions

derb

disassembles a resource bundle

escapesrc

converts \u escaped characters into unicode characters

genbrk

compiles ICU break iteration rules source files into binary data files

genccode

generates C or platform specific assembly code from an ICU data file

gencfu

reads in Unicode confusable character definitions and writes out the binary data

gencmn

generates an ICU memory-mappable data file

gencnval

compiles the converter's aliases file

gendict

compiles word lists into ICU string trie dictionaries

gennorm2

builds binary data files with Unicode normalization data

genrb

compiles a resource bundle

gensprep

compiles StringPrep data from filtered RFC 3454 files

icu-config

outputs ICU build options

icuinfo

outputs configuration information about the current ICU

icupkg

extracts or modifies an ICU .dat archive

makeconv

compiles a converter table

pkgdata

packages data for use by ICU

uconv

converts data from one encoding to another

libicudata.so

is the data library

libicui18n.so

is the internationalization (i18n) library

libicuio.so

is the ICU I/O (unicode stdio) library

libicutest.so

is the test library

libicutu.so

is the tool utility library

libicuuc.so

is the common library

inih-56

Introduction to inih

This package is a simple .INI file parser written in C.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/inih

Installation of inih

Install inih by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release .. &&
ninja

This package does not come with a test suite.

Now, as the root user:

ninja install

Contents

Installed Program: None
Installed Libraries: libinih.so, libINIReader.so
Installed Directories: None

Intel-gmmlib-22.3.4

Introduction to Intel-gmmlib

The Intel-gmmlib package contains the Intel Graphics Memory Management Library, which provides device specific memory and buffer management functions for the Intel Media Driver for VAAPI and the Intel Graphics Computer Runtime for OpenCL (TM).

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Note

The tarball intel-gmmlib-22.3.4.tar.gz will extract to the directory gmmlib-intel-gmmlib-22.3.4.

Intel-gmmlib Dependencies

Required

CMake-3.25.2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/intel-gmmlib

Installation of Intel-gmmlib

Install Intel-gmmlib by running the following commands:

mkdir build &&
cd    build &&

cmake -DCMAKE_INSTALL_PREFIX=/usr   \
      -DBUILD_TYPE=Release          \
      -Wno-dev ..                   &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Contents

Installed Programs: None
Installed Libraries: libigdgmm.so
Installed Directories: /usr/include/igdgmm

Short Descriptions

libigdgmm.so

contains functions that provide Memory Management functions for Intel Graphics Drivers

Jansson-2.14

Introduction to Jansson

The Jansson package contains a library used to encode, decode, and manipulate JSON data.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/jansson

Installation of Jansson

First fix one of the tests:

sed -e "/DT/s;| sort;| sed 's/@@libjansson.*//' &;" \
    -i test/suites/api/check-exports

Install jansson by running the following commands:

./configure --prefix=/usr --disable-static &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Contents

Installed Programs: None
Installed Library: libjansson.so
Installed Directories: None

Short Descriptions

libjansson.so

contains an API for encoding, decoding, and manipulating JSON data

JS-102.8.0

Introduction to JS

JS (also referred as SpiderMonkey) is Mozilla's JavaScript and WebAssembly Engine, written in C++ and Rust. In BLFS, the source code of JS is taken from Firefox.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

JS102 Dependencies

Required

ICU-72.1, rustc-1.67.1, and Which-2.21

Recommended

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/js102

Installation of JS

Note

Unlike most other packages in BLFS, the instructions below require you to untar firefox-102.8.0esr.tar.xz and change into the firefox-102.8.0 folder.

Extracting the tarball will reset the permissions of the current directory to 0755 if you have permission to do that. If you do this in a directory where the sticky bit is set, such as /tmp it will end with error messages:

tar: .: Cannot utime: Operation not permitted
tar: .: Cannot change mode to rwxr-xr-t: Operation not permitted
tar: Exiting with failure status due to previous errors

This does finish with non-zero status, but it does NOT mean there is a real problem. Do not untar as the root user in a directory where the sticky bit is set - that will unset it.

Install JS by running the following commands:

Note

If you are compiling this package in chroot you must do two things. First, as the root user, ensure that /dev/shm is mounted. If you do not do this, the Python configuration will fail with a traceback report referencing /usr/lib/pythonN.N/multiprocessing/synchronize.py. Run:

mountpoint -q /dev/shm || mount -t tmpfs devshm /dev/shm

Second, either as the root user export the $SHELL environment variable using export SHELL=/bin/sh or else prepend SHELL=/bin/sh when running the configure command.

Compiling the C++ code respects $MAKEFLAGS and defaults to 'j1', the rust code will use all processors.

First remove an obsolete flag in python code, that has been removed in python-3.11:

grep -rl \"rU\" | xargs sed -i 's/"rU"/"r"/'

Then run:

mkdir obj &&
cd    obj &&

sh ../js/src/configure.in --prefix=/usr            \
                          --with-intl-api          \
                          --with-system-zlib       \
                          --with-system-icu        \
                          --disable-jemalloc       \
                          --disable-debug-symbols  \
                          --enable-readline        &&
make

To run the JS test suite, issue: make -C js/src check-jstests JSTESTS_EXTRA_ARGS="--timeout 300 --wpt=disabled". It's recommended to redirect the output into a log. Because we are building with system ICU, more than one hundred tests (out of a total of more than 50,000) are known to fail.

To run the JIT test suite, issue: make -C js/src check-jit-test JITTEST_EXTRA_ARGS="--timeout 300".

Caution

An issue in the installation process causes any running program which links to JS102 shared library (for example, GNOME Shell) to crash if JS102 is upgraded or reinstalled. To work around this issue, remove the old version of the JS102 shared library before installation:

rm -fv /usr/lib/libmozjs-102.so

Now, as the root user:

make install &&
rm -v /usr/lib/libjs_static.ajs &&
sed -i '/@NSPR_CFLAGS@/d' /usr/bin/js102-config

Command Explanations

sh ../js/src/configure.in: configure.in is actually a shell script, but the executable bit is not set in its permission mode so it's needed to explicitly run it with sh.

--with-intl-api: This enables the internationalization functions required by Gjs.

--with-system-*: These parameters allow the build system to use system versions of the above libraries. These are required for stability.

--enable-readline: This switch enables Readline support in the JS shell.

--disable-jemalloc: This switch disables the internal memory allocator used in JS102. jemalloc is only intended for the Firefox browser environment. For other applications using JS102, the application may crash as items allocated in the jemalloc allocator are freed on the system (glibc) allocator.

--disable-debug-symbols: Don't generate debug symbols since they are very large and most users won't need it. Remove it if you want to debug JS102.

rm -v /usr/lib/libjs_static.ajs: Remove a large static library which is not used by any BLFS package.

sed -i '/@NSPR_CFLAGS@/d' /usr/bin/js102-config: Prevent js102-config from using buggy CFLAGS.

CC=gcc CXX=g++: BLFS used to prefer to use gcc and g++ instead of upstream's defaults of the clang programs. With the release of gcc-12 the build takes longer with gcc and g++, primarily because of extra warnings, and is bigger. Pass these environment variables to the configure script if you wish to continue to use gcc, g++ (by exporting them and unset them after the installation, or simply prepending them before the sh ../js/src/configure.in command). If you are building on a 32-bit system, also see below.

CXXFLAGS="-msse2 -mfpmath=sse": Use SSE2 instead of 387 for double-precision floating-point operations. It's needed by GCC to satisfy the expectations of upstream (Mozilla) developers with floating-point arithmetic. Use it if you are building this package on a 32-bit system with GCC (if Clang is not installed or GCC is explicitly specified). Note that this will cause JS to crash on a processor without SSE2 capability. If you are running the system on such an old processor, Clang is strictly needed. This setting is not needed on 64-bit systems because all 64-bit x86 processors support SSE2 and the 64-bit compilers (both Clang and GCC) use SSE2 by default.

Contents

Installed Programs: js102 and js102-config
Installed Libraries: libmozjs-102.so
Installed Directories: /usr/include/mozjs-102

Short Descriptions

js102

provides a command line interface to the JavaScript engine

js102-config

is used to find the JS compiler and linker flags

libmozjs-102.so

contains the Mozilla JavaScript API functions

JSON-C-0.16

Introduction to JSON-C

The JSON-C implements a reference counting object model that allows you to easily construct JSON objects in C, output them as JSON formatted strings and parse JSON formatted strings back into the C representation of JSON objects.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

JSON-C Dependencies

Required

CMake-3.25.2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/json-c

Installation of JSON-C

Install JSON-C by running the following commands:

mkdir build &&
cd    build &&

cmake -DCMAKE_INSTALL_PREFIX=/usr \
      -DCMAKE_BUILD_TYPE=Release \
      -DBUILD_STATIC_LIBS=OFF    \
      .. &&
make

To test the results, issue: make test.

Now, as the root user:

make install

Command Explanations

-DCMAKE_BUILD_TYPE=Release: This switch is used to apply a higher level of compiler optimizations.

Contents

Installed Programs: None
Installed Libraries: libjson-c.so
Installed Directories: /usr/include/json-c

Short Descriptions

libjson-c.so

contains the JSON-C API functions

JSON-GLib-1.6.6

Introduction to JSON GLib

The JSON GLib package is a library providing serialization and deserialization support for the JavaScript Object Notation (JSON) format described by RFC 4627.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

JSON-GLib Dependencies

Required

GLib-2.74.5

Optional (Required if building GNOME)

gobject-introspection-1.74.0

Optional

GTK-Doc-1.33.2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/json-glib

Installation of JSON GLib

Install JSON GLib by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release .. &&
ninja

To test the results, issue: ninja test.

Now, as the root user:

ninja install

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

Contents

Installed Programs: json-glib-format and json-glib-validate
Installed Library: libjson-glib-1.0.so
Installed Directories: /usr/{include,share/installed-tests}/json-glib-1.0, /usr/libexec/installed-tests/json-glib-1.6.6, and /usr/share/gtk-doc/html/json-glib

Short Descriptions

json-glib-format

is a simple command line interface to format JSON data

json-glib-validate

is a simple command line interface to validate JSON data

libjson-glib-1.0.so

contains the JSON GLib API functions

keyutils-1.6.1

Introduction to keyutils

Keyutils is a set of utilities for managing the key retention facility in the kernel, which can be used by filesystems, block devices and more to gain and retain the authorization and encryption keys required to perform secure operations.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

keyutils Dependencies

Required

MIT Kerberos V5-1.20.1

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/keyutils

Installation of keyutils

Install keyutils by running the following commands:

sed -i 's:$(LIBDIR)/$(PKGCONFIG_DIR):/usr/lib/pkgconfig:' Makefile &&
make

To test the results, issue, as the root user:

make -k test

Note that several tests will fail if certain uncommon kernel options were not used when the kernel was built. These include CONFIG_BIG_KEYS, CONFIG_KEY_DH_OPERATIONS, and CONFIG_CRYPTO_DH.

Now, as the root user:

make NO_ARLIB=1 LIBDIR=/usr/lib BINDIR=/usr/bin SBINDIR=/usr/sbin install

Command Explanations

sed ... Makefile: This command ensures the pkgconfig file is placed in the correct directory.

NO_ARLIB=1: This make flag disables installing the static library.

Configuring keyutils

Config Files

/etc/request-key.conf and /etc/request-key.d/*

Contents

Installed Programs: keyctl, key.dns_resolver, and request-key
Installed Library: libkeyutils.so
Installed Directory: /etc/request-key.d and /usr/share/keyutils

Short Descriptions

keyctl

controls the key management facility with a variety of subcommands

key.dns_resolver

is invoked by request-key on behalf of the kernel when kernel services (such as NFS, CIFS and AFS) need to perform a hostname lookup and the kernel does not have the key cached. It is not ordinarily intended to be called directly

request-key

is invoked by the kernel when the kernel is asked for a key that it doesn't have immediately available. The kernel creates a temporary key and then calls out to this program to instantiate it. It is not intended to be called directly

libkeyutils.so

contains the keyutils library API instantiation

libaio-0.3.113

Introduction to libaio

The libaio package is an asynchronous I/O facility ("async I/O", or "aio") that has a richer API and capability set than the simple POSIX async I/O facility. This library, libaio, provides the Linux-native API for async I/O. The POSIX async I/O facility requires this library in order to provide kernel-accelerated async I/O capabilities, as do applications which require the Linux-native async I/O API.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libaio

Installation of libaio

First, disable the installation of the static library:

sed -i '/install.*libaio.a/s/^/#/' src/Makefile

Build libaio by running the following command:

make

If you want to run the test suite, fix an issue with Glibc-2.34 or later:

sed 's/-Werror//' -i harness/Makefile

To test the results, issue: make partcheck.

Now, install the package as the root user:

make install

Contents

Installed Programs: None
Installed Library: libaio.so
Installed Directories: None

Short Descriptions

libaio.so

is the libaio library

libarchive-3.6.2

Introduction to libarchive

The libarchive library provides a single interface for reading/writing various compression formats.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libarchive Dependencies

Optional

libxml2-2.10.3, LZO-2.10, and Nettle-3.8.1

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libarchive

Installation of libarchive

Install libarchive by running the following commands:

./configure --prefix=/usr --disable-static &&
make

To test the results, issue: LC_ALL=C make check.

Now, as the root user:

make install

Remove an invalid entry in /usr/lib/pkgconfig/libarchive.pc:

sed -i "s/iconv //" /usr/lib/pkgconfig/libarchive.pc

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

--without-xml2: This switch sets expat for xar archive format support instead of preferred libxml2 if both packages are installed.

--without-nettle: This switch sets OpenSSL for crypto support instead of preferred Nettle if both packages are installed.

Contents

Installed Programs: bsdcat, bsdcpio, and bsdtar
Installed Libraries: libarchive.so
Installed Directories: None

Short Descriptions

bsdcat

expands files to standard output

bsdcpio

is a tool similar to cpio

bsdtar

is a tool similar to GNU tar

libarchive.so

is a library that can create and read several streaming archive formats

libassuan-2.5.5

Introduction to libassuan

The libassuan package contains an inter process communication library used by some of the other GnuPG related packages. libassuan's primary use is to allow a client to interact with a non-persistent server. libassuan is not, however, limited to use with GnuPG servers and clients. It was designed to be flexible enough to meet the demands of many transaction based environments with non-persistent servers.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libassuan Dependencies

Required

libgpg-error-1.46

Optional

texlive-20220321 (or install-tl-unx)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libassuan

Installation of libassuan

Install libassuan by running the following commands:

./configure --prefix=/usr &&
make                      &&

make -C doc html                                                       &&
makeinfo --html --no-split -o doc/assuan_nochunks.html doc/assuan.texi &&
makeinfo --plaintext       -o doc/assuan.txt           doc/assuan.texi

The above commands build the documentation in html and plaintext formats. If you wish to build alternate formats of the documentation, you must have texlive-20220321 installed and issue the following commands:

make -C doc pdf ps

To test the results, issue: make check.

Now, as the root user:

make install &&

install -v -dm755   /usr/share/doc/libassuan-2.5.5/html &&
install -v -m644 doc/assuan.html/* \
                    /usr/share/doc/libassuan-2.5.5/html &&
install -v -m644 doc/assuan_nochunks.html \
                    /usr/share/doc/libassuan-2.5.5      &&
install -v -m644 doc/assuan.{txt,texi} \
                    /usr/share/doc/libassuan-2.5.5

If you built alternate formats of the documentation, install them by running the following commands as the root user:

install -v -m644  doc/assuan.{pdf,ps,dvi} \
                  /usr/share/doc/libassuan-2.5.5

Contents

Installed Program: libassuan-config
Installed Library: libassuan.so
Installed Directory: /usr/share/doc/libassuan-2.5.5

Short Descriptions

libassuan-config

is a libassuan build information script

libassuan.so

is an inter process communication library which implements the Assuan protocol

libatasmart-0.19

Introduction to libatasmart

The libatasmart package is a disk reporting library. It only supports a subset of the ATA S.M.A.R.T. functionality.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libatasmart

Installation of libatasmart

Install libatasmart by running the following commands:

./configure --prefix=/usr --disable-static &&
make

This package does not come with a test suite.

Now, as the root user:

make docdir=/usr/share/doc/libatasmart-0.19 install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: skdump and sktest
Installed Library: libatasmart.so
Installed Directory: /usr/share/doc/libatasmart-0.19

Short Descriptions

skdump

is a utility that reports on the status of the disk

sktest

is a utility to issue disks tests

libatasmart.so

contains the ATA S.M.A.R.T API functions

libatomic_ops-7.6.14

Introduction to libatomic_ops

libatomic_ops provides implementations for atomic memory update operations on a number of architectures. This allows direct use of these in reasonably portable code. Unlike earlier similar packages, this one explicitly considers memory barrier semantics, and allows the construction of code that involves minimum overhead across a variety of architectures.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libatomic_ops

Installation of libatomic_ops

Install libatomic_ops by running the following commands:

./configure --prefix=/usr    \
            --enable-shared  \
            --disable-static \
            --docdir=/usr/share/doc/libatomic_ops-7.6.14 &&
make

To check the results, issue make check.

Now, as the root user:

make install

Command Explanations

--enable-shared: This switch enables building of the libatomic_ops shared libraries.

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: None
Installed Libraries: libatomic_ops.so and libatomic_ops_gpl.so
Installed Directory: /usr/include/libatomic_ops and /usr/share/doc/libatomic_ops-7.6.14

Short Descriptions

libatomic_ops.so

contains functions for atomic memory operations

libblockdev-2.28

Introduction to libblockdev

libblockdev is a C library supporting GObject Introspection for manipulation of block devices. It has a plugin-based architecture where each technology (like LVM, Btrfs, MD RAID, Swap,...) is implemented in a separate plugin, possibly with multiple implementations (e.g. using LVM CLI or the new LVM DBus API).

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libblockdev Dependencies

Required

gobject-introspection-1.74.0, libbytesize-2.7, libyaml-0.2.5, parted-3.5, and volume_key-0.3.12

Optional

btrfs-progs-6.1.3, GTK-Doc-1.33.2, mdadm-4.2, dmraid, bcachefs, and ndctl

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libblockdev

Installation of libblockdev

Install libblockdev by running the following commands:

./configure --prefix=/usr     \
            --sysconfdir=/etc \
            --with-python3    \
            --without-gtk-doc \
            --without-nvdimm  \
            --without-dm      &&
make

This package does not come with a working test suite.

Now, as the root user:

make install

Contents

Installed Programs: lvm-cache-stats
Installed Libraries: libbd_btrfs.so, libbd_crypto.so, libbd_fs.so, libbd_kbd.so, libbd_loop.so, libbd_lvm.so, libbd_lvm-dbus.so, libbd_mdraid.so, libbd_mpath.so, libbd_part.so, libbd_part_err.so, libbd_swap.so, libbd_utils.so, libbd_vdo.so, and libblockdev.so
Installed Directories: /etc/libblockdev, /usr/include/blockdev, and /usr/share/gtk-doc/html/libblockdev

Short Descriptions

lvm-cache-stats

prints statistics on caches on LVM Logical Volumes

libbytesize-2.7

Introduction to libbytesize

The libbytesize package is a library which facilitates the common operations with sizes in bytes.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libbytesize Dependencies

Required

pcre2-10.42 and Pygments-2.14.0

Recommended
Optional

GTK-Doc-1.33.2, pocketlint (python module for one test), and polib (python module for one test)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libbytesize

Installation of libbytesize

Install libbytesize by running the following commands:

./configure --prefix=/usr &&
make

If you have the optional python modules installed, the regression tests can be run with: make check.

Now, as the root user:

make install

Contents

Installed Programs: bscalc
Installed Library: libbytesize.so
Installed Directories: /usr/include/bytesize and /usr/lib/python3.11/site-packages/bytesize

Short Descriptions

bscalc

converts from a larger unit, such as MB or TB, back to a value in bytes

libbytesize.so

contains functions used to handle common read/write operations with sizes in bytes

libcloudproviders-0.3.1

Introduction to libcloudproviders

The libcloudproviders package contains a library which provides a DBus API that allows cloud storage sync clients to expose their services.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libcloudproviders Dependencies

Required

gobject-introspection-1.74.0 and Vala-0.56.4

Optional

GTK-Doc-1.33.2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libcloudproviders

Installation of libcloudproviders

Install libcloudproviders by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release .. &&
ninja

This package does not come with a test suite.

Now, as the root user:

ninja install

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

-Denable-gtk-doc: Use this switch if you have GTK-Doc-1.33.2 installed and wish to generate the API documentation.

Contents

Installed Programs: None
Installed Libraries: libcloudproviders.so
Installed Directories: /usr/include/cloudproviders

Short Descriptions

libcloudproviders.so

contains functions that provide a DBus API to allow cloud storage sync clients to expose their services

libdaemon-0.14

Introduction to libdaemon

The libdaemon package is a lightweight C library that eases the writing of UNIX daemons.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libdaemon Dependencies

Optional

Doxygen-1.9.6 and Lynx-2.8.9rel.1

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libdaemon

Installation of libdaemon

Install libdaemon by running the following commands:

./configure --prefix=/usr --disable-static &&
make

If you have Doxygen installed and wish to build the API documentation, issue the following command:

make -C doc doxygen

This package does not come with a test suite.

Now, as the root user:

make docdir=/usr/share/doc/libdaemon-0.14 install

If you built the API documentation, install it using the following commands as the root user:

install -v -m755 -d /usr/share/doc/libdaemon-0.14/reference/html &&
install -v -m644 doc/reference/html/* /usr/share/doc/libdaemon-0.14/reference/html &&
install -v -m644 doc/reference/man/man3/* /usr/share/man/man3

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: None
Installed Library: libdaemon.so
Installed Directories: /usr/include/libdaemon and /usr/share/doc/libdaemon-0.14

Short Descriptions

libdaemon.so

contains the libdaemon API functions

libgcrypt-1.10.1

Introduction to libgcrypt

The libgcrypt package contains a general purpose crypto library based on the code used in GnuPG. The library provides a high level interface to cryptographic building blocks using an extendable and flexible API.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libgcrypt Dependencies

Required

libgpg-error-1.46

Optional

Pth-2.0.7 and texlive-20220321 (or install-tl-unx)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libgcrypt

Installation of libgcrypt

Install libgcrypt by running the following commands:

./configure --prefix=/usr &&
make                      &&

make -C doc html                                                       &&
makeinfo --html --no-split -o doc/gcrypt_nochunks.html doc/gcrypt.texi &&
makeinfo --plaintext       -o doc/gcrypt.txt           doc/gcrypt.texi

The above commands build the documentation in html and plaintext formats. If you wish to build alternate formats of the documentation, you need texlive-20220321 (or install-tl-unx). Issue the following command:

make -C doc pdf

To test the results, issue: make check.

Now, as the root user:

make install &&
install -v -dm755   /usr/share/doc/libgcrypt-1.10.1 &&
install -v -m644    README doc/{README.apichanges,fips*,libgcrypt*} \
                    /usr/share/doc/libgcrypt-1.10.1 &&

install -v -dm755   /usr/share/doc/libgcrypt-1.10.1/html &&
install -v -m644 doc/gcrypt.html/* \
                    /usr/share/doc/libgcrypt-1.10.1/html &&
install -v -m644 doc/gcrypt_nochunks.html \
                    /usr/share/doc/libgcrypt-1.10.1      &&
install -v -m644 doc/gcrypt.{txt,texi} \
                    /usr/share/doc/libgcrypt-1.10.1

If you built alternate formats of the documentation, install them by issuing the following command as the root user:

install -v -m644 doc/gcrypt.{pdf,ps,dvi} \
                    /usr/share/doc/libgcrypt-1.10.1

Command Explanations

--with-capabilities: This option enables libcap2 support. Note that this breaks cryptsetup-2.4.3

Contents

Installed Programs: dumpsexp, hmac256, libgcrypt-config, and mpicalc
Installed Library: libgcrypt.so
Installed Directory: /usr/share/doc/libgcrypt-1.10.1

Short Descriptions

dumpsexp

is a debug tool for S-expressions

hmac256

is a standalone HMAC-SHA-256 implementation used to compute an HMAC-SHA-256 authentication code

libgcrypt-config

determines the compile and linker flags that should be used to compile and link programs that use libgcrypt

mpicalc

is a RPN (Reverse Polish Notation) calculator

libgcrypt.so

contains the cryptographic API functions

libgpg-error-1.46

Introduction to libgpg-error

The libgpg-error package contains a library that defines common error values for all GnuPG components.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libgpg-error

Installation of libgpg-error

Install libgpg-error by running the following commands:

./configure --prefix=/usr &&
make

To test the results, issue: make check.

Now, as the root user:

make install &&
install -v -m644 -D README /usr/share/doc/libgpg-error-1.46/README

Contents

Installed Programs: gpg-error, gpgrt-config, and yat2m
Installed Library: libgpg-error.so
Installed Directories: /usr/share/common-lisp/source/gpg-error, /usr/share/libgpg-error, and /usr/share/doc/libgpg-error-1.46

Short Descriptions

gpg-error

is used to determine libgpg-error error codes

gpgrt-config

is a pkg-config style tool for querying the information about installed version of libgpg-error

yat2m

extracts man pages from a Texinfo source

libgpg-error.so

contains the libgpg-error API functions

libgrss-0.7.0

Introduction to libgrss

The libgrss package contains a library designed to manipulate RSS and Atom feeds.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

libgrss Dependencies

Required

libsoup-2.74.3

Recommended

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libgrss

Installation of libgrss

Install libgrss by running the following commands:

patch -Np1 -i ../libgrss-0.7.0-bugfixes-2.patch &&
autoreconf -fv &&
./configure --prefix=/usr --disable-static &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

--enable-gtk-doc: Use this parameter if GTK-Doc is installed and you wish to rebuild and install the API documentation.

Contents

Installed Programs: None
Installed Library: libgrss.so
Installed Directories: /usr/include/libgrss and /usr/share/doc/libgrss-0.7.0

Short Descriptions

libgrss.so

provides API functions for handling RSS feeds

libgsf-1.14.50

Introduction to libgsf

The libgsf package contains a library used for providing an extensible input/output abstraction layer for structured file formats.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libgsf Dependencies

Required

GLib-2.74.5 and libxml2-2.10.3

Recommended
Optional

gobject-introspection-1.74.0 and GTK-Doc-1.33.2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libgsf

Installation of libgsf

Install libgsf by running the following commands:

./configure --prefix=/usr --disable-static &&
make

To test the results, issue: make check. Two tests, t1004-zip-zip64.pl and t1005-zip-nonseekable.pl are known to fail.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

--enable-gtk-doc: Use this parameter if GTK-Doc is installed and you wish to rebuild and install the API documentation.

Contents

Installed Programs: gsf, gsf-office-thumbnailer, and gsf-vba-dump
Installed Library: libgsf-1.so
Installed Directories: /usr/include/libgsf-1, /usr/share/gtk-doc/html/gsf and /usr/share/thumbnailers

Short Descriptions

gsf

is a simple archive utility, somewhat similar to tar(1)

gsf-office-thumbnailer

is used internally by GNOME applications such as Nautilus to generate thumbnails of several types of office application files

gsf-vba-dump

is used to extract Visual Basic for Applications macros from files

libgsf-1.so

contains the libgsf API functions

libgudev-237

Introduction to libgudev

The libgudev package contains GObject bindings for libudev.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Required

GLib-2.74.5

Optional

gobject-introspection-1.74.0 (for gir-data, needed for GNOME), GTK-Doc-1.33.2, and umockdev-0.17.16 (for testing)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libgudev

Installation of libgudev

Install libgudev by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release .. &&
ninja

To test the results, issue: ninja test.

Now, as the root user:

ninja install

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

-Dgtk_doc=true: Use this option if GTK-Doc is installed and you wish to build and install the API documentation.

Contents

Installed Program: None
Installed Libraries: libgudev-1.0.so
Installed Directories: /usr/include/gudev-1.0 and /usr/share/gtk-doc/html/gudev

Short Descriptions

libgudev-1.0.so

is a GObject-based wrapper library for libudev

libgusb-0.4.5

Introduction to libgusb

The libgusb package contains the GObject wrappers for libusb-1.0 that makes it easy to do asynchronous control, bulk and interrupt transfers with proper cancellation and integration into a mainloop.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libgusb Dependencies

Required

JSON-GLib-1.6.6 and libusb-1.0.26

Recommended
Optional

Gi-DocGen-2023.1

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libgusb

Installation of libgusb

Install libgusb by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release -Ddocs=false .. &&
ninja

If you have Gi-DocGen-2023.1 installed and wish to build the API documentation for this package, issue:

sed "/output: 'libgusb'/s/'\$/-0.4.5'/" -i ../docs/meson.build &&
meson configure -Ddocs=true                                    &&
ninja

To test the results, issue: ninja test.

Now, as the root user:

ninja install

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

-Ddocs=false: Allow building this package without Gi-DocGen-2023.1 installed. If you have Gi-DocGen-2023.1 installed and you wish to rebuild and install the API documentation, a meson configure command will reset this option.

Contents

Installed Programs: gusbcmd
Installed Library: libgusb.so
Installed Directories: /usr/include/gusb-1 and /usr/share/doc/libgusb-0.4.5 (if gi-docgen is used)

Short Descriptions

gusbcmd

is a debugging tool for the libgusb library

libgusb.so

contains the libgusb API functions

libical-3.0.16

Introduction to libical

The libical package contains an implementation of the iCalendar protocols and data formats.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libical Dependencies

Required

CMake-3.25.2

Recommended
Optional

Berkeley DB-5.3.28, Doxygen-1.9.6 (for the API documentation), Graphviz-7.1.0 (for the API documentation), GTK-Doc-1.33.2 (for the API documentation), ICU-72.1, and PyGObject-3.42.2 (for some tests)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libical

Installation of libical

Install libical by running the following commands:

Note

This package may occasionally fail when building with multiple processors. See Using Multiple Processors for more information.

mkdir build &&
cd    build &&

cmake -DCMAKE_INSTALL_PREFIX=/usr  \
      -DCMAKE_BUILD_TYPE=Release   \
      -DSHARED_ONLY=yes            \
      -DICAL_BUILD_DOCS=false      \
      -DGOBJECT_INTROSPECTION=true \
      -DICAL_GLIB_VAPI=true        \
      .. &&
make -j1

If you have Doxygen-1.9.6, Graphviz-7.1.0, and GTK-Doc-1.33.2 installed and wish to build the API documentation, you should remove the -DICAL_BUILD_DOCS=false switch and issue:

make docs

To test the results, issue: make test.

Now, as the root user:

make install

If you have built the API documentation, install by issuing, as root user:

install -vdm755 /usr/share/doc/libical-3.0.16/html &&
cp -vr apidocs/html/* /usr/share/doc/libical-3.0.16/html

Command Explanations

-DCMAKE_BUILD_TYPE=Release: This switch is used to apply higher level of the compiler optimizations.

-DSHARED_ONLY=yes: This switch is used in order to only build the shared libraries.

-DICAL_BUILD_DOCS=false: This switch prevents building the GTK documentation. Remove if you want to build the documentation.

-DGOBJECT_INTROSPECTION=true: This switch is used to generate GObject metadata bindings.

-DICAL_GLIB_VAPI=true: This switch is used in order to build bindings for Vala-0.56.4.

-DUSE_BUILTIN_TZDATA=yes: This switch is used in order to build using your own timezone data.

Contents

Installed Programs: None
Installed Libraries: libical_cxx.so, libical.so, libical-glib.so, libicalss_cxx.so, libicalss.so, and libicalvcal.so
Installed Directory: /usr/include/libical, /usr/include/libical-glib, /usr/lib/cmake/LibIcal, /usr/libexec/libical, /usr/share/gtk-doc/html/libical-glib (optional), and /usr/share/doc/libical-3.0.16/html

Short Descriptions

libical.so

contains the libical API functions

libical_cxx.so

contains the libical C++ bindings

libical-glib.so

contains the libical glib bindings

libicalss.so

is a library that allows you to store iCal component data to disk in a variety of ways

libicalss_cxx.so

contains the libicalss C++ bindings

libicalvcal.so

is a vCard/vCalendar C interface

libidn-1.41

Introduction to libidn

libidn is a package designed for internationalized string handling based on the Stringprep, Punycode and IDNA specifications defined by the Internet Engineering Task Force (IETF) Internationalized Domain Names (IDN) working group, used for internationalized domain names. This is useful for converting data from the system's native representation into UTF-8, transforming Unicode strings into ASCII strings, allowing applications to use certain ASCII name labels (beginning with a special prefix) to represent non-ASCII name labels, and converting entire domain names to and from the ASCII Compatible Encoding (ACE) form.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libidn Dependencies

Optional

Pth-2.0.7, Emacs-28.2, GTK-Doc-1.33.2, OpenJDK-19.0.2, Valgrind-3.20.0, and Mono

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libidn

Installation of libidn

Install libidn by running the following commands:

./configure --prefix=/usr --disable-static &&
make

To test the results, run:

pushd tests  &&
  make check &&
popd 

Now, as the root user:

make install &&

find doc -name "Makefile*" -delete            &&
rm -rf -v doc/{gdoc,idn.1,stamp-vti,man,texi} &&
mkdir -v       /usr/share/doc/libidn-1.41     &&
cp -r -v doc/* /usr/share/doc/libidn-1.41

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

--enable-gtk-doc: Use this parameter if GTK-Doc is installed and you wish to rebuild and install the API documentation.

--enable-java: Use this switch to enable building the Java implementation of libidn. Note that OpenJDK-19.0.2 must be installed to use this option.

Contents

Installed Program: idn
Installed Library: libidn.so
Installed Directories: /usr/share/doc/libidn-1.41 and /usr/share/gtk-doc/html/libidn

Short Descriptions

idn

is a command line interface to the internationalized domain name library

libidn.so

contains a generic Stringprep implementation that does Unicode 3.2 NFKC normalization, mapping and prohibition of characters, and bidirectional character handling. Profiles for Nameprep, iSCSI, SASL and XMPP are included as well as support for Punycode and ASCII Compatible Encoding (ACE) via IDNA. A mechanism to define Top-Level Domain (TLD) specific validation tables, and to compare strings against those tables, as well as default tables for some TLDs are included

libidn2-2.3.4

Introduction to libidn2

libidn2 is a package designed for internationalized string handling based on standards from the Internet Engineering Task Force (IETF)'s IDN working group, designed for internationalized domain names.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libidn2 Dependencies

Required

libunistring-1.1

Optional

git-2.39.2 and GTK-Doc-1.33.2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libidn2

Installation of libidn2

Install libidn2 by running the following commands:

./configure --prefix=/usr --disable-static &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

--enable-gtk-doc: Use this parameter if GTK-Doc is installed and you wish to rebuild and install the API documentation.

Contents

Installed Program: idn2
Installed Library: libidn2.so
Installed Directory: /usr/share/gtk-doc/html/libidn2

Short Descriptions

idn2

is a command line interface to the internationalized domain library

libidn2.so

contains a generic Stringprep implementation used for internationalized string handling

libiodbc-3.52.15

Introduction to libiodbc

libiodbc is an API to ODBC compatible databases.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libiodbc Dependencies

Recommended

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libiodbc

Installation of libiodbc

Install libiodbc by running the following commands:

./configure --prefix=/usr                   \
            --with-iodbc-inidir=/etc/iodbc  \
            --includedir=/usr/include/iodbc \
            --disable-libodbc               \
            --disable-static                &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Command Explanations

--with-iodbc-inidir=/etc/iodbc: libiodbc will install configuration files in this directory.

--includedir=/usr/include/iodbc: This installs the interface headers to a private directory to avoid a conflict with headers installed by unixODBC.

--disable-libodbc: This prevents the installation of the libodbc.so symbolic link to avoid a conflict with unixODBC.

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: iodbc-config, iodbctest, iodbctestw, and iodbcadm-gtk
Installed Libraries: libdrvproxy.so, libiodbc.so, libiodbcinst.so, and libiodbcadm.so
Installed Directory: /usr/include/iodbc, /usr/share/libiodbc, and /etc/iodbc

Short Descriptions

iodbc-config

is a utility for retrieving the installation options of libiodbc

iodbctest{,w}

are interactive SQL processors

iodbcadm-gtk

is a graphical administration utility

libksba-1.6.3

Introduction to Libksba

The Libksba package contains a library used to make X.509 certificates as well as making the CMS (Cryptographic Message Syntax) easily accessible by other applications. Both specifications are building blocks of S/MIME and TLS. The library does not rely on another cryptographic library but provides hooks for easy integration with Libgcrypt.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Libksba Dependencies

Required

libgpg-error-1.46

Optional

Valgrind-3.20.0

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libksba

Installation of Libksba

Install Libksba by running the following commands:

./configure --prefix=/usr &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Contents

Installed Program: None
Installed Library: libksba.so
Installed Directory: None

Short Descriptions

libksba.{so,a}

contains the cryptographic API functions

liblinear-245

Introduction to liblinear

This package provides a library for learning linear classifiers for large scale applications. It supports Support Vector Machines (SVM) with L2 and L1 loss, logistic regression, multi class classification and also Linear Programming Machines (L1-regularized SVMs). Its computational complexity scales linearly with the number of training examples making it one of the fastest SVM solvers around.

This package is known to build and work properly using an LFS 11.3 platform.

Note

After updating this package from liblinear-1.96 or earlier, you need to reinstall Nmap-7.93, in order to link to the new library.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/liblinear

Installation of liblinear

Install liblinear by running the following commands:

make lib

This package does not come with a test suite.

Now, as the root user:

install -vm644 linear.h /usr/include &&
install -vm755 liblinear.so.5 /usr/lib &&
ln -sfv liblinear.so.5 /usr/lib/liblinear.so

Contents

Installed Programs: None
Installed Library: liblinear.so
Installed Directories: None

Short Descriptions

liblinear.so

is a large linear classification library

libmbim-1.26.4

Introduction to libmbim

The libmbim package contains a GLib-based library for talking to WWAN modems and devices which speak the Mobile Interface Broadband Model (MBIM) protocol.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libmbim Dependencies

Recommended
Optional

GTK-Doc-1.33.2 and help2man

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libmbim

Installation of libmbim

Install libmbim by running the following commands:

./configure --prefix=/usr --disable-static &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

--enable-gtk-doc: Use this parameter if GTK-Doc is installed and you wish to rebuild and install the API documentation.

Contents

Installed Programs: mbimcli and mbim-network
Installed Libraries: libmbim-glib.so
Installed Directories: /usr/include/libmbim-glib and /usr/share/gtk-doc/html/libmbim-glib

Short Descriptions

mbimcli

is an utility used to control MBIM devices

mbim-network

is an utility used for simple network management of MBIM devices

libmbim-glib.so

contains API functions for talking to WWAN modems and devices which speak the Mobile Interface Broadband Model (MBIM) protocol

libpaper-1.1.24+nmu5

Introduction to libpaper

This package is intended to provide a simple way for applications to take actions based on a system or user-specified paper size.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libpaper

Installation of libpaper

Install libpaper by running the following commands:

autoreconf -fi                &&
./configure --prefix=/usr     \
            --sysconfdir=/etc \
            --disable-static &&
make

This package does not come with a test suite.

Now, as the root user:

make install &&
mkdir -vp /etc/libpaper.d

The /etc/libpaper.d directory contains scripts to run after the paper size has been changed. This package puts no scripts here, but other packages may. If the fcron package has not been installed, create the run-parts script as shown in the Fcron Configuration Information section.

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

mkdir -pv /etc/libpaper.d: libpaper expects that packages will install files into this directory.

Configuring libpaper

Configuration Information

Create /etc/papersize to set the default system paper size. Issue the following command as the root user to set this to 'A4' (libpaper prefers the lowercase form). You may wish to use a different size, such as letter.

cat > /etc/papersize << "EOF"
a4
EOF

Contents

Installed Programs: paperconf, paperconfig, run-parts
Installed Library: libpaper.so
Installed Directories: /etc/libpaper.d

Short Descriptions

paperconf

prints paper configuration information

paperconfig

configures the system default paper size

libpaper.so

contains functions for interrogating the paper library

libportal-0.6

Introduction to libportal

The libportal package provides a library that contains GIO-style async APIs for most Flatpak portals.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libportal Dependencies

Required

gobject-introspection-1.74.0

Recommended
Optional

Gi-DocGen-2023.1 and Vala-0.56.4

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libportal

Installation of libportal

Warning

If a previous version of libportal is installed, move the headers out of the way so that later packages do not encounter conflicts (as the root user):

if [ -e /usr/include/libportal ]; then
    rm -rf /usr/include/libportal.old &&
    mv -vf /usr/include/libportal{,.old}
fi

Install libportal by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release -Ddocs=false .. &&
ninja

If you have Gi-DocGen-2023.1 installed and wish to build the API documentation for this package, issue:

sed "/output/s/-1/-0.6/" -i ../doc/meson.build &&
meson configure -Ddocs=true                    &&
ninja

This package does not come with a test suite.

Now, as the root user:

ninja install

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

-Ddocs=false: Allow building this package without Gi-DocGen-2023.1 installed. If you have Gi-DocGen-2023.1 installed and you wish to rebuild and install the API documentation, a meson configure command will reset this option.

-Dbackends=gtk3,gtk4,qt5: This switch allows you to set the available backends. You can use it to disable the dependency on gtk-3, gtk-4, or qt-5. Most applications that use libportal will use either gtk-4 or gtk-3. The default is to build all three backends.

Contents

Installed Programs: None
Installed Libraries: libportal.so, libportal-gtk3.so, libportal-gtk4.so, and libportal-qt5.so
Installed Directories: /usr/include/libportal and /usr/share/gtk-doc/html/libportal

Short Descriptions

libportal.so

provides GIO-style async APIs for most Flatpak portals

libportal-gtk3.so

provides GTK+-3 specific functions for interacting with Flatpak portals.

libportal-gtk4.so

provides GTK-4 specific functions for interacting with Flatpak portals.

libportal-qt5.so

provides Qt5 specific functions for interacting with Flatpak portals.

libptytty-2.0

Introduction to libptytty

The libptytty package provides a library that allows for OS independent and secure pty/tty and utmp/wtmp/lastlog handling.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libptytty Dependencies

Required

CMake-3.25.2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libptytty

Installation of libptytty

Install libptytty by running the following commands:

mkdir build &&
cd    build &&

cmake -DCMAKE_INSTALL_PREFIX=/usr     \
      -DCMAKE_BUILD_TYPE=Release      \
      -DPT_UTMP_FILE:STRING=/run/utmp \
      .. &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Contents

Installed Programs: None
Installed Libraries: libptytty.so
Installed Directories: None

Short Descriptions

libptytty.so

provides for OS independent and secure pty/tty and utmp/wtmp/lastlog handling

libqalculate-4.5.1

Introduction to libqalculate

The libqalculate package contains a library that provides functions for a multi-purpose calculator.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libqalculate Dependencies

Required

cURL-7.88.1, ICU-72.1, and libxml2-2.10.3

Optional

Doxygen-1.9.6

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libqalculate

Installation of libqalculate

Install libqalculate by running the following commands:

./configure --prefix=/usr    \
            --disable-static \
            --docdir=/usr/share/doc/libqalculate-4.5.1 &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: qalc
Installed Library: libqalculate.so
Installed Directories: /usr/include/libqalculate, /usr/share/doc/libqalculate-4.5.1, and /usr/share/qalculate

Short Descriptions

qalc

is a powerful and easy to use command line calculator

libqalculate.so

contains the libqalculate API functions

libqmi-1.30.8

Introduction to libqmi

The libqmi package contains a GLib-based library for talking to WWAN modems and devices which speak the Qualcomm MSM Interface (QMI) protocol.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libqmi Dependencies

Required

GLib-2.74.5 and libgudev-237

Recommended
Optional

GTK-Doc-1.33.2, help2man, and libqrtr-glib

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libqmi

Installation of libqmi

Install libqmi by running the following commands:

PYTHON=python3 ./configure --prefix=/usr --disable-static &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

--enable-gtk-doc: Use this parameter if GTK-Doc is installed and you wish to rebuild and install the API documentation.

--disable-mbim-qmux: This switch disables support for using a MBIM control device for QMI messages. Use this switch if you did not install libmbim.

Contents

Installed Programs: qmicli, qmi-firmware-update, and qmi-network
Installed Libraries: libqmi-glib.so
Installed Directories: /usr/include/libqmi-glib and /usr/share/gtk-doc/html/libqmi-glib

Short Descriptions

qmicli

is an utility used to control QMI devices

qmi-firmware-update

is an utility used to perform firmware updates on QMI devices

qmi-network

is an utility used for simple network management of QMI devices

libqmi-glib.so

contains API functions for talking to WWAN modems and devices which speak the Qualcomm MSM Interface (QMI) protocol

libseccomp-2.5.4

Introduction to libseccomp

The libseccomp package provides an easy to use and platform independent interface to the Linux kernel's syscall filtering mechanism.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libseccomp Dependencies

Optional

Which-2.21 (needed for tests), Valgrind-3.20.0, and LCOV

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libseccomp

Installation of libseccomp

Install libseccomp by running the following commands:

./configure --prefix=/usr --disable-static &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Program: scmp_sys_resolver
Installed Library: libseccomp.so
Installed Directories: None

Short Descriptions

scmp_sys_resolver

is used to resolve system calls for applications

libseccomp.so

contains API functions for translating syscalls

libsigc++-2.12.0

Introduction to libsigc++

The libsigc++ package implements a typesafe callback system for standard C++.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libsigc++ Dependencies

Recommended
Optional

DocBook-utils-0.6.14, docbook-xml-5.0, Doxygen-1.9.6, and mm-common

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libsigc++

Installation of libsigc++

Install libsigc++ by running the following commands:

mkdir bld &&
cd    bld &&

meson setup --prefix=/usr --buildtype=release .. &&
ninja

To test the results, issue: ninja test.

Now, as the root user:

ninja install

Command Explanations

-Dbuild-documentation=true: Use this switch if Doxygen-1.9.6 is installed and you wish to build and install the API documentation.

Contents

Installed Programs: None
Installed Library: libsigc-2.0.so
Installed Directories: /usr/{include,lib}/sigc++-2.0 and /usr/share/{devhelp/books,doc}/libsigc++-2.0 (if the documentation is enabled)

Short Descriptions

libsigc-2.0.so

contains the libsigc++ API functions

libsigsegv-2.14

Introduction to libsigsegv

libsigsegv is a library for handling page faults in user mode. A page fault occurs when a program tries to access to a region of memory that is currently not available. Catching and handling a page fault is a useful technique for implementing pageable virtual memory, memory-mapped access to persistent databases, generational garbage collectors, stack overflow handlers, and distributed shared memory.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libsigsegv

Installation of libsigsegv

Install libsigsegv by running the following commands:

./configure --prefix=/usr   \
            --enable-shared \
            --disable-static &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--enable-shared: This switch ensures that shared libraries are compiled.

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: None
Installed Library: libsigsegv.so
Installed Directories: None

Short Descriptions

libsigsegv.so

is a library for handling page faults in user mode

libssh2-1.10.0

Introduction to libssh2

Libssh2 package is a client-side C library implementing the SSH2 protocol.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

libssh2 Dependencies

Optional

GnuPG-2.4.0, libgcrypt-1.10.1, and OpenSSH-9.2p1 (all three are required for the test suite)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libssh2

Installation of libssh2

Apply a patch to fix incompatibility with recent OpenSSH releases:

patch -Np1 -i ../libssh2-1.10.0-upstream_fix-1.patch

Install libssh2 by running the following commands:

./configure --prefix=/usr --disable-static &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: None
Installed Library: libssh2.so
Installed Directories: None

Short Descriptions

libssh2.so

contains functions to use the SSH2 protocol

libstatgrab-0.92.1

Introduction to libstatgrab

This is a library that provides cross platform access to statistics about the system on which it's run. It's written in C and presents a selection of useful interfaces which can be used to access key system statistics. The current list of statistics includes CPU usage, memory utilisation, disk usage, process counts, network traffic, disk I/O, and more.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libstatgrab

Installation of libstatgrab

Install libstatgrab by running the following commands:

./configure --prefix=/usr   \
            --disable-static \
            --docdir=/usr/share/doc/libstatgrab-0.92.1 &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: saidar, statgrab, statgrab-make-mrtg-config, and statgrab-make-mrtg-index
Installed Library: libstatgrab.so
Installed Directories: /usr/share/doc/libstatgrab-0.92.1

Short Descriptions

saidar

is a curses-based tool for viewing system statistics

statgrab

is a sysctl-style interface to system statistics

statgrab-make-mrtg-config

generates MRTG configuration

statgrab-make-mrtg-index

generates an XHTML index page from MRTG configuration files or stdin

libstatgrab.so

contains the libstatgrab API functions

libtasn1-4.19.0

Introduction to libtasn1

libtasn1 is a highly portable C library that encodes and decodes DER/BER data following an ASN.1 schema.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libtasn1 Dependencies

Optional

GTK-Doc-1.33.2 and Valgrind-3.20.0

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libtasn1

Installation of libtasn1

Install libtasn1 by running the following commands:

./configure --prefix=/usr --disable-static &&
make

To test the results, issue: make check.

Now, as the root user:

make install

If you did not pass the --enable-gtk-doc parameter to the configure script, you can install the API documentation using the following command as the root user:

make -C doc/reference install-data-local

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

--enable-gtk-doc: This parameter is normally used if GTK-Doc is installed and you wish to rebuild and install the API documentation. It is broken for this package due to the use of a long deprecated gtk-doc program that is no longer available.

Contents

Installed Programs: asn1Coding, asn1Decoding and asn1Parser
Installed Library: libtasn1.so
Installed Directory: /usr/share/gtk-doc/html/libtasn1

Short Descriptions

asn1Coding

is an ASN.1 DER encoder

asn1Decoding

is an ASN.1 DER decoder

asn1Parser

is an ASN.1 syntax tree generator for libtasn1

libtasn1.so

is a library for Abstract Syntax Notation One (ASN.1) and Distinguish Encoding Rules (DER) manipulation

libunique-1.1.6

Introduction to libunique

The libunique package contains a library for writing single instance applications.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

libunique Dependencies

Required

GTK+-2.24.33, also GTK-Doc-1.33.2 (for autoreconf)

Optional

gobject-introspection-1.74.0

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libunique

Installation of libunique

Install libunique by running the following commands:

patch -Np1 -i ../libunique-1.1.6-upstream_fixes-1.patch &&
autoreconf -fi &&

./configure --prefix=/usr  \
            --disable-dbus \
            --disable-static &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Command Explanations

--disable-dbus: This switch disables D-Bus backend in favor of the GDBus backend.

--disable-static: This switch prevents installation of static versions of the libraries.

--enable-gtk-doc: Use this parameter if GTK-Doc is installed and you wish to rebuild and install the API documentation.

Contents

Installed Programs: None
Installed Library: libunique-1.0.so
Installed Directories: /usr/include/unique-1.0 and /usr/share/gtk-doc/html/unique

Short Descriptions

libunique-1.0.so

contains the libunique API functions for single instance support

libunistring-1.1

Introduction to libunistring

libunistring is a library that provides functions for manipulating Unicode strings and for manipulating C strings according to the Unicode standard.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libunistring Dependencies

Optional

texlive-20220321 (or install-tl-unx) (to rebuild the documentation)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libunistring

Installation of libunistring

Install libunistring by running the following commands:

./configure --prefix=/usr    \
            --disable-static \
            --docdir=/usr/share/doc/libunistring-1.1 &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: None
Installed Libraries: libunistring.so
Installed Directory: /usr/include/unistring and /usr/share/doc/libunistring-1.1

Short Descriptions

libunistring.so

provides the unicode string library API

libunwind-1.6.2

Introduction to libunwind

The libunwind package contains a portable and efficient C programming interface (API) to determine the call-chain of a program. The API additionally provides the means to manipulate the preserved (callee-saved) state of each call-frame and to resume execution at any point in the call-chain (non-local goto). The API supports both local (same-process) and remote (across-process) operation.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libunwind Dependencies

Optional

texlive-20220321 (for latex2man)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libunwind

Installation of libunwind

Install libunwind by running the following commands:

./configure --prefix=/usr --disable-static &&
make

To test the results, issue: make check. Two tests, run-coredump-unwind and run-coredump-unwind-mdi are known to fail.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: None
Installed Libraries: libunwind.so, libunwind-coredump.so, libunwind-generic.so, libunwind-ptrace.so, libunwind-setjmp.so, and libunwind-x86_64.so
Installed Directories: None

liburcu-0.14.0

Introduction to liburcu

The userspace-rcu package provides a set of userspace RCU (read-copy-update) libraries. These data synchronization libraries provide read-side access which scales linearly with the number of cores. It does so by allowing multiples copies of a given data structure to live at the same time, and by monitoring the data structure accesses to detect grace periods after which memory reclamation is possible.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/liburcu

Installation of liburcu

Install liburcu by running the following commands:

./configure --prefix=/usr    \
            --disable-static \
            --docdir=/usr/share/doc/liburcu-0.14.0 &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Contents

Installed Programs: None
Installed Libraries: liburcu.so, liburcu-bp.so, liburcu-cds.so, liburcu-common.so, liburcu-mb.so, liburcu-memb.so, liburcu-qsbr.so, and liburcu-signal.so
Installed Directories: /usr/include/urcu and /usr/share/doc/liburcu-0.14.0

libusb-1.0.26

Introduction to libusb

The libusb package contains a library used by some applications for USB device access.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libusb Dependencies

Optional

Doxygen-1.9.6

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libusb

Installation of libusb

Install libusb by running the following commands:

./configure --prefix=/usr --disable-static &&
make

If Doxygen is installed and you wish to build the API documentation, issue the following commands:

pushd doc                &&
  doxygen -u doxygen.cfg &&
  make docs              &&
popd

This package does not come with a test suite.

Now, as the root user:

make install

If you built the API documentation, install it using the following commands as the root user:

install -v -d -m755 /usr/share/doc/libusb-1.0.26/apidocs &&
install -v -m644    doc/api-1.0/* \
                    /usr/share/doc/libusb-1.0.26/apidocs

Configuring Libusb

To access raw USB devices (those not treated as a disk by the mass-storage driver), appropriate support must be available in the kernel. Check your kernel configuration:

Device Drivers --->
  [*] USB support --->                   [CONFIG_USB_SUPPORT]
    <*/M> Support for Host-side USB      [CONFIG_USB]
    (Select any USB hardware device drivers you may need on the same page)

For more details on setting up USB devices, see the section called “USB Device Issues”.

Contents

Installed Programs: None
Installed Library: libusb-1.0.so
Installed Directories: /usr/include/libusb-1.0 and /usr/share/doc/libusb-1.0.26

Short Descriptions

libusb-1.0.so

contains API functions used for accessing USB hardware

libuv-1.44.2

Introduction to libuv

The libuv package is a multi-platform support library with a focus on asynchronous I/O.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libuv

Installation of libuv

Install libuv by running the following commands:

Caution

The sh autogen.sh command below fails if the ACLOCAL environment variable is set as specified in Xorg-7. If it is used, ACLOCAL needs to be unset for this package and then reset for other packages.

sh autogen.sh                              &&
./configure --prefix=/usr --disable-static &&
make 

If you want to run the tests, run: make check as a non-root user.

Now, as the root user:

make install

Contents

Installed Programs: None
Installed Library: libuv.so
Installed Directory: /usr/include/uv

Short Descriptions

libuv.so

contains API functions for asynchronous I/O operations

libxkbcommon-1.5.0

Introduction to libxkbcommon

libxkbcommon is a keymap compiler and support library which processes a reduced subset of keymaps as defined by the XKB specification.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libxkbcommon Dependencies

Required

xkeyboard-config-2.38 (runtime)

Recommended
Optional

Doxygen-1.9.6

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libxkbcommon

Installation of libxkbcommon

Install libxkbcommon by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr       \
      --buildtype=release \
      -Denable-docs=false .. &&
ninja

To test the results, issue: ninja test.

Now, as the root user:

ninja install

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

-Denable-docs=false: This switch disables documentation generation. Remove it if Doxygen-1.9.6 is installed.

mv -v /usr/share/doc/libxkbcommon{,-1.5.0}: If you removed -Denable-docs=false, use this command to install the documentation in a versioned directory.

Contents

Installed Programs: xkbcli
Installed Libraries: libxkbcommon.so, libxkbcommon-x11.so, and libxkbregistry.so
Installed Directories: /usr/include/xkbcommon, /usr/libexec/xkbcommon, and /usr/share/doc/libxkbcommon-1.5.0

Short Descriptions

xkbcli

provides a debugger and compiler for XKB keymaps

libxkbcommon.so

contains the libxkbcommon API functions

libxkbcommon-x11.so

contains the libxkbcommon X11 specific API functions

libxkbregistry.so

contains a list of available XKB models, layouts, and variants for a given ruleset

libxml2-2.10.3

Introduction to libxml2

The libxml2 package contains libraries and utilities used for parsing XML files.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

libxml2 Dependencies

Optional

ICU-72.1 (see below) and Valgrind-3.20.0 (may be used in the tests)

Note

The old Python2 module can be built after libxml2.so has been installed, see libxml2-2.10.3 python2 module.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libxml2

Installation of libxml2

Install libxml2 by running the following commands:

./configure --prefix=/usr           \
            --sysconfdir=/etc       \
            --disable-static        \
            --with-history          \
            PYTHON=/usr/bin/python3 \
            --docdir=/usr/share/doc/libxml2-2.10.3 &&
make

If you downloaded the test suite, issue the following command:

tar xf ../xmlts20130923.tar.gz

To test the results, issue: make check > check.log. A summary of the results can be obtained with grep -E '^Total|expected' check.log. If Valgrind-3.20.0 is installed and you want to check for memory leaks, replace check with check-valgrind.

Note

The tests use http://localhost/ to test parsing of external entities. If the machine where you run the tests serves as a web site, the tests may hang, depending on the content of the file served. It is therefore recommended to shut down the server during the tests, as the root user:

/etc/init.d/httpd stop

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

--with-history: This switch enables Readline support when running xmlcatalog or xmllint in shell mode.

PYTHON=/usr/bin/python3: Allows building the libxml2 module with Python3 instead of Python2.

--with-icu: Add this switch if you have built ICU-72.1, for better unicode support.

Contents

Installed Programs: xml2-config, xmlcatalog, and xmllint
Installed Libraries: libxml2.so
Installed Directories: /usr/include/libxml2, /usr/lib/cmake/libxml2, /usr/share/doc/libxml2-2.10.3, and /usr/share/gtk-doc/html/libxml2

Short Descriptions

xml2-config

determines the compile and linker flags that should be used to compile and link programs that use libxml2

xmlcatalog

is used to monitor and manipulate XML and SGML catalogs

xmllint

parses XML files and outputs reports (based upon options) to detect errors in XML coding

libxml2.so

provides functions for programs to parse files that use the XML format

libxslt-1.1.37

Introduction to libxslt

The libxslt package contains XSLT libraries used for extending libxml2 libraries to support XSLT files.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libxslt Dependencies

Required

libxml2-2.10.3

Recommended (at runtime)

Note

Although it is not a direct dependency, many applications using libxslt will expect docbook-xml-4.5 and docbook-xsl-nons-1.79.2 to be present.

Optional

libgcrypt-1.10.1

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libxslt

Installation of libxslt

Install libxslt by running the following commands:

./configure --prefix=/usr                          \
            --disable-static                       \
            --docdir=/usr/share/doc/libxslt-1.1.37 \
            PYTHON=/usr/bin/python3 &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: xslt-config and xsltproc
Installed Libraries: libexslt.so, libxslt.so and optionally, libxsltmod.so Python module
Installed Directories: /usr/include/libexslt, /usr/include/libxslt, /usr/lib/libxslt-plugins, /usr/share/doc/libxslt-1.1.37, and /usr/share/doc/libxslt-python-1.1.37

Short Descriptions

xslt-config

is used to find out the pre-processor, linking and compiling flags necessary to use the libxslt libraries in 3rd-party programs

xsltproc

is used to apply XSLT stylesheets to XML documents

libexslt.so

is used to provide extensions to XSLT functions

libxslt.so

provides extensions to the libxml2 libraries to parse files that use the XSLT format

libwacom-2.6.0

Introduction to libwacom

The libwacom package contains a library used to identify wacom tablets and their model-specific features.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libwacom Dependencies

Required

libgudev-237

Recommended
Optional

Doxygen-1.9.6, git-2.39.2, librsvg-2.54.5, Valgrind-3.20.0 (optional for some tests), and pytest-7.2.1 with python-libevdev and pyudev

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libwacom

Installation of libwacom

Install libwacom by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release -Dtests=disabled .. &&
ninja

To test the results, issue: ninja test. To run additional tests, install pytest-7.2.1, python-libevdev, and pyudev, then remove the "-Dtests=disabled" option from the meson line above.

Now, as the root user:

ninja install

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

-Dtests=disabled: This parameter disables some of the more advanced tests because they require pytest-7.2.1 and other two Python modules beyond the scope of BLFS to work properly.

Contents

Installed Programs: libwacom-list-devices, libwacom-list-local-devices, libwacom-show-stylus, and libwacom-update-db
Installed Libraries: libwacom.so
Installed Directories: /usr/include/libwacom-1.0 and /usr/share/libwacom

Short Descriptions

libwacom-list-devices

lists all tablet devices that are supported by libwacom

libwacom-list-local-devices

lists tablet devices that are connected to the system

libwacom-show-stylus

lists tablet stylus IDs

libwacom-update-db

updates the system according to the current set of tablet data files

libwacom.so

contains functions used for accessing Wacom information

libwpe-1.14.1

Introduction to libwpe

The libwpe package contains a general purpose library for WPE WebKit and the WPE Renderer.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libwpe Dependencies

Required

libxkbcommon-1.5.0 and Mesa-22.3.5

Optional

hotdoc

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libwpe

Installation of libwpe

Install libwpe by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release .. &&
ninja

This package does not come with a test suite.

Now, as the root user:

ninja install

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

Contents

Installed Programs: None
Installed Libraries: libwpe-1.0.so
Installed Directories: /usr/include/wpe-1.0

Short Descriptions

libwpe-1.0.so

contains functions that provide a general purpose library for WPEWebKit and the WPE Renderer

libyaml-0.2.5

Introduction to libyaml

The yaml package contains a C library for parsing and emitting YAML (YAML Ain't Markup Language) code.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libyaml Dependencies

Optional

Doxygen-1.9.6

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libyaml

Installation of libyaml

Install libyaml by running the following commands:

./configure --prefix=/usr --disable-static &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: None
Installed Libraries: libyaml.so
Installed Directories: None

Short Descriptions

libyaml.so

contains API functions for parsing and emitting YAML code

LZO-2.10

Introduction to LZO

LZO is a data compression library which is suitable for data decompression and compression in real-time. This means it favors speed over compression ratio.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/lzo

Installation of LZO

Install LZO by running the following commands:

./configure --prefix=/usr                    \
            --enable-shared                  \
            --disable-static                 \
            --docdir=/usr/share/doc/lzo-2.10 &&
make

To test the results, issue: make check. All the checks should pass. Now issue make test to run the full suite of tests.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: None
Installed Libraries: liblzo2.so
Installed Directories: /usr/include/lzo and /usr/share/doc/lzo

Short Descriptions

liblzo2.so

is a data compression and decompression library

mtdev-1.1.6

Introduction to mtdev

The mtdev package contains Multitouch Protocol Translation Library which is used to transform all variants of kernel MT (Multitouch) events to the slotted type B protocol.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/mtdev

Installation of mtdev

Install mtdev by running the following commands:

./configure --prefix=/usr --disable-static &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Program: mtdev-test
Installed Library: libmtdev.so
Installed Directories: None

Short Descriptions

mtdev-test

is a tool to test libmtdev

libmtdev.so

contains Multitouch Protocol Translation API functions

Node.js-18.14.1

Introduction to Node.js

Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

  • Download (HTTP): https://nodejs.org/dist/v18.14.1/node-v18.14.1.tar.xz

  • Download MD5 sum: 09aaaa219c453d6d5307641cc41b76e1

  • Download size: 40 MB

  • Estimated disk space required: 962 MB (add 34 MB for tests)

  • Estimated build time: 15 SBU (add 4.2 SBU for tests: both using parallelism=4 and 4 CPUs online, parts of the tests will use all online CPUs)

Node.js Dependencies

Required

Which-2.21

Recommended
Optional

http-parser and npm (an internal copy of npm will be installed if not present)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/nodejs

Installation of Node.js

Build Node.js by running the following commands:

./configure --prefix=/usr          \
            --shared-cares         \
            --shared-libuv         \
            --shared-openssl       \
            --shared-nghttp2       \
            --shared-zlib          \
            --with-intl=system-icu &&
make

To test the results, issue: make test-only. One test is known to fail.

Now, as the root user:

make install &&
ln -sf node /usr/share/doc/node-18.14.1

Command Explanations

--with-intl=system-icu: use the system version of icu. Other values are full-icu (to build a local, full icu library) and small-icu (to build a local, minimal icu library).

--shared-{cares,libuv,nghttp2,openssl,zlib}: use the system installed libraries instead of local copies.

--without-npm: do not build npm (use if you'd like to build a separate npm later).

--shared-http-parser: use the system installed library instead of a local copy.

Contents

Installed Programs: corepack, node, npm, and npx
Installed Library: None
Installed Directories: /usr/include/node, /usr/lib/node_modules/{corepack,npm}, /usr/share/doc/{node,node-18.14.1}, and /usr/share/systemtap/tapset

Short Descriptions

corepack

is an experimental tool to help with managing versions of package managers.

node

is the server-side JavaScript runtime

npm

is the Node.js package manager

/usr/lib/node_modules/npm/

is the installation root for Node.js executables and libraries

npth-1.6

Introduction to NPth

The NPth package contains a very portable POSIX/ANSI-C based library for Unix platforms which provides non-preemptive priority-based scheduling for multiple threads of execution (multithreading) inside event-driven applications. All threads run in the same address space of the server application, but each thread has its own individual program-counter, run-time stack, signal mask and errno variable.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/npth

Installation of NPth

Install NPth by running the following commands:

./configure --prefix=/usr &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Contents

Installed Program: npth-config
Installed Library: libnpth.so
Installed Directory: None

Short Descriptions

npth-config

is a utility used to configure and build applications based on the npth library. It can be used to query the C compiler and linker flags which are required to correctly compile and link the application against the npth library

libnpth.so

contains the API functions used by the New Portable Threads Library

NSPR-4.35

Introduction to NSPR

Netscape Portable Runtime (NSPR) provides a platform-neutral API for system level and libc like functions.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/nspr

Installation of NSPR

Install NSPR by running the following commands:

cd nspr                                                     &&
sed -ri '/^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). For further details, see the User Notes for nss at https://wiki.linuxfromscratch.org/blfs/wiki/nss

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.

$([ $(uname -m) = x86_64 ] && echo --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.

Contents

Installed Programs: nspr-config
Installed Libraries: libnspr4.so, libplc4.so, and libplds4.so
Installed Directories: /usr/include/nspr

Short Descriptions

nspr-config

provides compiler and linker options to other packages that use NSPR

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

libplc4.so

contains functions that implement many of the features offered by libnspr4

libplds4.so

contains functions that provide data structures

PCRE-8.45

Introduction to PCRE

The PCRE package contains Perl Compatible Regular Expression libraries. These are useful for implementing regular expression pattern matching using the same syntax and semantics as Perl 5.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

PCRE Dependencies

Optional

Valgrind-3.20.0

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/pcre

Installation of PCRE

Install PCRE by running the following commands:

./configure --prefix=/usr                     \
            --docdir=/usr/share/doc/pcre-8.45 \
            --enable-unicode-properties       \
            --enable-pcre16                   \
            --enable-pcre32                   \
            --enable-pcregrep-libz            \
            --enable-pcregrep-libbz2          \
            --enable-pcretest-libreadline     \
            --disable-static                 &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--enable-unicode-properties: This switch enables Unicode properties support and includes the code for handling UTF-8/16/32 character strings in the library. You need this switch if you are going to build GLib-2.74.5.

--enable-pcre16: This switch enables 16 bit character support.

--enable-pcre32: This switch enables 32 bit character support.

--enable-pcregrep-libz: This switch adds support to pcregrep to read .gz compressed files.

--enable-pcregrep-libbz2: This switch adds support to pcregrep to read .bz2 compressed files.

--enable-pcretest-libreadline: This switch adds line editing and history features to pcretest program.

--disable-static: This switch prevents installation of static versions of the libraries.

--enable-jit: this option enables Just-in-time compiling, which can greatly speed up pattern matching.

Contents

Installed Programs: pcregrep, pcretest, and pcre-config
Installed Libraries: libpcre.so, libpcre16.so, libpcre32.so, libpcrecpp.so and libpcreposix.so
Installed Directory: /usr/share/doc/pcre-8.45

Short Descriptions

pcregrep

is a grep that understands Perl compatible regular expressions

pcretest

can test a Perl compatible regular expression

pcre-config

is used during the compile process of programs linking to the PCRE libraries

PCRE2-10.42

Introduction to PCRE2

The PCRE2 package contains a new generation of the Perl Compatible Regular Expression libraries. These are useful for implementing regular expression pattern matching using the same syntax and semantics as Perl.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

PCRE2 Dependencies

Optional

Valgrind-3.20.0 and libedit

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/pcre2

Installation of PCRE2

Install PCRE2 by running the following commands:

./configure --prefix=/usr                       \
            --docdir=/usr/share/doc/pcre2-10.42 \
            --enable-unicode                    \
            --enable-jit                        \
            --enable-pcre2-16                   \
            --enable-pcre2-32                   \
            --enable-pcre2grep-libz             \
            --enable-pcre2grep-libbz2           \
            --enable-pcre2test-libreadline      \
            --disable-static                    &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--enable-unicode: This switch enables Unicode support and includes the functions for handling UTF-8/16/32 character strings in the library.

--enable-pcre2-16: This switch enables 16 bit character support.

--enable-pcre2-32: This switch enables 32 bit character support.

--enable-pcre2grep-libz: This switch adds support for reading .gz compressed files to pcre2grep.

--enable-pcre2grep-libbz2: This switch adds support for reading .bz2 compressed files to pcre2grep.

--enable-pcre2test-libreadline: This switch adds line editing and history features to the pcre2test program.

--disable-static: This switch prevents installation of static versions of the libraries.

--enable-jit: this option enables Just-in-time compiling, which can greatly speed up pattern matching.

Contents

Installed Programs: pcre2-config, pcre2grep, and pcre2test.
Installed Libraries: libpcre2-8.so, libpcre2-16.so, libpcre2-32.so, and libpcre2-posix.so
Installed Directory: /usr/share/doc/pcre2-10.42

Short Descriptions

pcre2grep

is a version of grep that understands Perl compatible regular expressions.

pcre2test

can test a Perl compatible regular expression.

pcre2-config

outputs compilation information to programs linking against the PCRE2 libraries

Popt-1.19

Introduction to Popt

The popt package contains the popt libraries which are used by some programs to parse command-line options.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

popt Dependencies

Optional

Doxygen-1.9.6 (for generating documentation)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/popt

Installation of Popt

Install popt by running the following commands:

./configure --prefix=/usr --disable-static &&
make

If you have Doxygen-1.9.6 installed and wish to build the API documentation, issue:

sed -i 's@\./@src/@' Doxyfile &&
doxygen

To test the results, issue: make check.

Now, as the root user:

make install

If you built the API documentation, install it using the following commands issued by the root user:

install -v -m755 -d /usr/share/doc/popt-1.19 &&
install -v -m644 doxygen/html/* /usr/share/doc/popt-1.19

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: None
Installed Library: libpopt.so
Installed Directories: /usr/share/doc/popt-1.19

Short Descriptions

libpopt.so

is used to parse command-line options

Pth-2.0.7

Introduction to Pth

The Pth package contains a very portable POSIX/ANSI-C based library for Unix platforms which provides non-preemptive priority-based scheduling for multiple threads of execution (multithreading) inside event-driven applications. All threads run in the same address space of the server application, but each thread has its own individual program-counter, run-time stack, signal mask and errno variable.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Pth Dependencies

Optional

GCC-12.2.0 (for gfortran) and libnsl-2.0.0

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/pth

Installation of Pth

Caution

Don't add the --enable-pthread parameter to the configure command below else you will overwrite the pthread library and interface header installed by the Glibc package in LFS.

Install Pth by running the following commands:

sed -i 's#$(LOBJS): Makefile#$(LOBJS): pth_p.h Makefile#' Makefile.in &&
./configure --prefix=/usr           \
            --disable-static        \
            --mandir=/usr/share/man &&
make

To test the results, issue: make test.

Now, as the root user:

make install &&
install -v -m755 -d /usr/share/doc/pth-2.0.7 &&
install -v -m644    README PORTING SUPPORT TESTS \
                    /usr/share/doc/pth-2.0.7

Command Explanations

sed -i 's#$(LOBJS) ...: This sed fixes a race condition in the Makefile. It allows running make with multiple jobs (e.g., make -j4).

--disable-static: This switch prevents installation of static versions of the libraries.

--mandir=/usr/share/man: This switch puts the man pages in /usr/share/man instead of /usr/man.

Contents

Installed Program: pth-config
Installed Library: libpth.so
Installed Directory: /usr/share/doc/pth-2.0.7

Short Descriptions

pth-config

is a utility used to configure and build applications based on the pth(3) library. It can be used to query the C compiler and linker flags which are required to correctly compile and link the application against the pth(3) library

libpth.so

contains the API functions used by the GNU Portable Threads Library

Qca-2.3.5

Introduction to Qca

Qca aims to provide a straightforward and cross-platform crypto API, using Qt datatypes and conventions. Qca separates the API from the implementation, using plugins known as Providers.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Qca Dependencies

Required

make-ca-1.12, CMake-3.25.2, Qt-5.15.8, and Which-2.21

Optional

Cyrus SASL-2.1.28, GnuPG-2.4.0, libgcrypt-1.10.1, libgpg-error-1.46, nss-3.88.1, NSPR-4.35, p11-kit-0.24.1, Doxygen-1.9.6, Which-2.21, and Botan

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/qca

Installation of Qca

Fix the location of the CA certificates:

sed -i '[email protected]@certs/ca-bundle.crt@' CMakeLists.txt

Install Qca by running the following commands:

mkdir build &&
cd    build &&

cmake -DCMAKE_INSTALL_PREFIX=$QT5DIR            \
      -DCMAKE_BUILD_TYPE=Release                \
      -DQCA_MAN_INSTALL_DIR:PATH=/usr/share/man \
      .. &&
make

To test the results, issue make test.

Now, as the root user:

make install

Command Explanations

-DCMAKE_BUILD_TYPE=Release: This switch is used to apply a higher level of compiler optimizations.

-DQCA_MAN_INSTALL_DIR:PATH=/usr/share/man: Install the qca man page in the normal location.

Contents

Installed Programs: mozcerts-qt5 and qcatool-qt5
Installed Libraries: libqca-qt5.so, libqca-cyrus-sasl.so, libqca-gcrypt.so, libqca-gnupg.so, libqca-logger.so, libqca-nss.so, libqca-ossl.so, and libqca-softstore.so
Installed Directories: $QT5DIR/include/Qca-qt5, $QT5DIR/lib/cmake/Qca-qt5, and $QT5DIR/lib/qca-qt5

Short Descriptions

mozcerts-qt5

is a command line tool for converting certdata.txt into outfile.pem files

qcatool-qt5

is a command line tool for performing various cryptographic operations with Qca

libqca-qt5.so

is the Qt Cryptography Architecture (Qca) library

Talloc-2.4.0

Introduction to Talloc

Talloc provides a hierarchical, reference counted memory pool system with destructors. It is the core memory allocator used in Samba.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Talloc Dependencies

Optional

docbook-xml-4.5, docbook-xsl-nons-1.79.2 and libxslt-1.1.37 (To generate man pages), GDB-13.1, git-2.39.2, libnsl-2.0.0, libtirpc-1.3.3, Valgrind-3.20.0, and xfsprogs-6.1.1

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/talloc

Installation of Talloc

Install Talloc by running the following commands:

./configure --prefix=/usr &&
make

To check the results, issue make check.

Now, as the root user:

make install

Contents

Installed Programs: None
Installed Libraries: libpytalloc-util.cpython-311-<arch>-linux-gnu.so, libtalloc.so, and talloc.cpython-311-<arch>-linux-gnu.so (Python-3 Module)
Installed Directories: None

Short Descriptions

libtalloc.so

contains a replacement for the Glibc malloc function

telepathy-glib-0.24.2

Introduction to Telepathy GLib

The Telepathy GLib contains a library used by GLib based Telepathy components. Telepathy is a D-Bus framework for unifying real time communication, including instant messaging, voice calls and video calls. It abstracts differences between protocols to provide a unified interface for applications.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Telepathy GLib Dependencies

Required

dbus-glib-0.112 and libxslt-1.1.37

Recommended
Optional

GTK-Doc-1.33.2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/telepathy-glib

Installation of Telepathy Glib

If you intend to run the tests, one of them defaults to invoking /usr/bin/python and fails if it is absent, causing the second batch of tests to not run - unlike the other tests which can be overridden from the environment. Fix it with the following command:

sed -i 's%/usr/bin/python%&3%' tests/all-errors-documented.py

Install Telepathy GLib by running the following commands:

PYTHON=/usr/bin/python3 ./configure --prefix=/usr          \
                                    --enable-vala-bindings \
                                    --disable-static       &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--enable-vala-bindings: This switch enables building of the Vala bindings. Remove if you don't have Vala-0.56.4 installed.

--disable-static: This switch prevents installation of static versions of the libraries.

--enable-gtk-doc: Use this parameter if GTK-Doc is installed and you wish to rebuild and install the API documentation.

Contents

Installed Programs: None
Installed Libraries: libtelepathy-glib.so
Installed Directories: /usr/include/telepathy-1.0 and /usr/share/gtk-doc/html/telepathy-glib

Short Descriptions

libtelepathy-glib.so

contains the Telepathy GLib API functions

Uchardet-0.0.8

Introduction to Uchardet

The Uchardet package contains an encoding detectory library which takes a sequence of bytes in an unknown character encoding and attempts to determine the encoding of the text.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Uchardet Dependencies

Required

CMake-3.25.2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/uchardet

Installation of Uchardet

Install Uchardet by running the following commands:

mkdir build &&
cd    build &&

cmake -DCMAKE_INSTALL_PREFIX=/usr \
      -DBUILD_STATIC=OFF          \
      -Wno-dev ..                 &&
make

To test the results, issue: make test.

Now, as the root user:

make install

Command Explanations

-DBUILD_STATIC=OFF: This switch disables building the static version of the library.

Contents

Installed Programs: uchardet
Installed Libraries: libuchardet.so
Installed Directories: /usr/include/uchardet

Short Descriptions

uchardet

detects what character set is used inside of a file

libuchardet.so

provides an API for detecting the encoding of text in a file

Umockdev-0.17.16

Introduction to Umockdev

The Umockdev package contains a framework that allows a developer to mock devices for use in unit testing.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Umockdev Dependencies

Required

libgudev-237, libpcap-1.10.3, and Vala-0.56.4

Optional

GTK-Doc-1.33.2 and libgphoto2 (optional for tests)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/umockdev

Installation of Umockdev

Install Umockdev by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release .. &&
ninja

To test the results, issue: PATH=$PATH:/usr/sbin ninja test. The addition to PATH is needed if you use the starting scripts in The Bash Shell Startup Files, because some tests need to run udevadm. One test needs to be run in an X session.

Now, as the root user:

ninja install

Command Explanations

-Dgtk_doc=true: Use this switch if you have GTK-Doc-1.33.2 installed and wish to rebuild and install the API documentation.

Contents

Installed Programs: umockdev-record, umockdev-run, and umockdev-wrapper
Installed Libraries: libumockdev-preload.so and libumockdev.so
Installed Directories: /usr/include/umockdev-1.0

Short Descriptions

umockdev-record

records Linux devices and their ancestors from sysfs/udev or records ioctls for a device

umockdev-run

runs a program under an umockdev testbed

umockdev-wrapper

wraps a program around libumockdev-preload.so.0 through LD_PRELOAD

libumockdev.so

provides API functions that allow mocking hardware devices for unit testing

Wayland-1.21.0

Introduction to Wayland

Wayland is a project to define a protocol for a compositor to talk to its clients as well as a library implementation of the protocol.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Wayland Dependencies

Required

libxml2-2.10.3

Optional

Doxygen-1.9.6, Graphviz-7.1.0 and xmlto-0.0.28 (to build the API documentation) and docbook-xml-4.5, docbook-xsl-nons-1.79.2 and libxslt-1.1.37 (to build the manual pages)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/wayland

Installation of Wayland

Install Wayland by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr       \
      --buildtype=release \
      -Ddocumentation=false &&
ninja

To test the results, issue: env -u XDG_RUNTIME_DIR ninja test.

Now, as the root user:

ninja install

Command Explanations

-Ddocumentation=false: This switch is used to disable building of the API documentation. Remove it if you have installed optional dependencies.

Contents

Installed Programs: wayland-scanner
Installed Libraries: libwayland-client.so, libwayland-cursor.so, libwayland-egl.so, and libwayland-server.so
Installed Directories: /usr/share/wayland

Short Descriptions

wayland-scanner

is a tool to generate proxy methods in wayland-client-protocol.h and wayland-server-protocol.h

libwayland-client.so

contains API functions for writing Wayland applications

libwayland-cursor.so

contains API functions for managing cursors in Wayland applications

libwayland-egl.so

contains API functions for handling OpenGL calls in Wayland applications

libwayland-server.so

contains API functions for writing Wayland compositors

Wayland-Protocols-1.31

Introduction to Wayland-Protocols

The Wayland-Protocols package contains additional Wayland protocols that add functionality outside of protocols already in the Wayland core.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Wayland-protocols Dependencies

Required

Wayland-1.21.0

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/wayland-protocols

Installation of Wayland-protocols

Install Wayland-protocols by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release &&
ninja

To test the results, issue: ninja test.

Now, as the root user:

ninja install

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/share/wayland-protocols

wpebackend-fdo-1.14.0

Introduction to wpebackend-fdo

The wpebackend-fdo package contains the Freedesktop.org backend for WPE WebKit and the WPE renderer.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

wpebackend-fdo Dependencies

Required

libepoxy-1.5.10, libwpe-1.14.1, and wayland-protocols-1.31

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/wpebackend-fdo

Installation of wpebackend-fdo

Install wpebackend-fdo by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release ..
ninja

Now, as the root user:

ninja install

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

Contents

Installed Programs: None
Installed Libraries: libWPEBackend-fdo-1.0.so
Installed Directories: /usr/include/wpe-fdo-1.0

Short Descriptions

libWPEBackend-fdo-1.0.so

contains functions that provide the freedesktop.org backend for WPE WebKit and the WPE renderer

wv-1.2.9

Introduction to wv

The wv package contains tools for reading information from an MS Word document.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

wv Dependencies

Required

libgsf-1.14.50 and libpng-1.6.39

Optional

libwmf

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/wv

Installation of wv

Install wv by running the following commands:

./configure --prefix=/usr --disable-static &&
make

This package does not have a test suite.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: wvSummary and several other wv* programs which are deprecated in favour of abiword: see https://wvware.sourceforge.net/
Installed Library: libwv-1.2.so
Installed Directory: /usr/share/wv

Short Descriptions

wvSummary

displays the summary information from an MS Word document

libwv-1.2.so

provides functions to access MS Word documents

Xapian-1.4.22

Introduction to xapian

Xapian is an open source search engine library.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Xapian Dependencies

Optional

Valgrind-3.20.0 (for tests)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/xapian

Installation of Xapian

Install Xapian by running the following commands:

./configure --prefix=/usr    \
            --disable-static \
            --docdir=/usr/share/doc/xapian-core-1.4.22 &&
make

To run the test suite, issue: make check.

Now, as the root user:

make install

Contents

Installed Programs: copydatabase, quest, simpleexpand, simpleindex, simplesearch, xapian-check, xapian-compact, xapian-config, xapian-delve, xapian-metadata, xapian-pos, xapian-progsrv, xapian-replicate, xapian-replicate-server and xapian-tcpsrv
Installed Libraries: libxapian.so
Installed Directories: /usr/include/xapian, /usr/lib/cmake/xapian, /usr/share/doc/xapian-core-1.4.22, and /usr/share/xapian-core

Short Descriptions

copydatabase

performs a document-by-document copy of one or more Xapian databases

quest

is a command line tool to search through a database

simpleexpand

is a simple example program demonstrating query expansion

simpleindex

indexes each paragraph of a text file as a Xapian document

simplesearch

is a simple command line search utility

xapian-check

checks the consistency of a database or table

xapian-compact

compacts a database, or merges and compacts several databases

xapian-config

reports information about the installed xapian

xapian-delve

inspects the contents of a Xapian database

xapian-metadata

reads and writes user metadata

xapian-pos

inspects the contents of a flint table for development or debugging

xapian-progsrv

is a remote server for use with ProgClient

xapian-replicate

replicates a database from a master server to a local copy

xapian-replicate-server

services database replication requests from clients

xapian-tcpsrv

is the TCP daemon for use with Xapian's remote backend

Chapter 10. Graphics and Font Libraries

Depending on what your system will be used for, you may or may not require the graphics and font libraries. Most desktop machines will want them for use with graphical applications. Most servers on the other hand, will not require them.

AAlib-1.4rc5

Introduction to AAlib

AAlib is a library to render any graphic into ASCII Art.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

AAlib Dependencies

Optional

Xorg Libraries, Xorg Legacy Fonts (runtime), slang-2.3.3, and GPM-1.20.7

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/aalib

Installation of AAlib

Fix a minor problem with the included m4 file:

sed -i -e '/AM_PATH_AALIB,/s/AM_PATH_AALIB/[&]/' aalib.m4

Install AAlib by running the following commands:

./configure --prefix=/usr             \
            --infodir=/usr/share/info \
            --mandir=/usr/share/man   \
            --with-ncurses=/usr       \
            --disable-static          &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Contents

Installed Programs: aafire, aainfo, aalib-config, aasavefont, and aatest
Installed Library: libaa.so
Installed Directories: None

Short Descriptions

aafire

is a demo of AAlib, rendering an animated fire in ASCII Art

aainfo

provides information for your current settings related to AAlib

aalib-config

provides configuration info for AAlib

aasavefont

saves a font to a file

aatest

shows the abilities of AAlib in a little test

libaa.so

is a collection of routines to render any graphical input in portable format to ASCII Art. It can be used through many programs and has a very well documented API, so you can easily put it into your own programs

babl-0.1.98

Introduction to Babl

The Babl package is a dynamic, any to any, pixel format translation library.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Babl Dependencies

Recommended
Optional

Little CMS-2.14 and w3m

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/babl

Installation of Babl

Install Babl by running the following commands:

mkdir bld &&
cd    bld &&

meson --prefix=/usr --buildtype=release .. &&
ninja 

To test the results, issue: ninja test.

Now, as the root user:

ninja install &&

install -v -m755 -d                         /usr/share/gtk-doc/html/babl/graphics &&
install -v -m644 docs/*.{css,html}          /usr/share/gtk-doc/html/babl          &&
install -v -m644 docs/graphics/*.{html,svg} /usr/share/gtk-doc/html/babl/graphics

Command Explanations

install -v -m755 -d /usr/share/gtk-doc/html/babl/graphics: This and the subsequent commands install the library html documentation under /usr/share/gtk-doc/html where other gtk packages put the programmer-oriented documentation.

Contents

Installed Programs: None
Installed Libraries: libbabl-0.1.so and libraries in /usr/lib/babl-0.1
Installed Directories: /usr/{include,lib}/babl-0.1 and /usr/share/gtk-doc/html/babl

Short Descriptions

libbabl-0.1.so

contains functions to access BablFishes to convert between formats

Exiv2-0.27.6

Introduction to Exiv2

Exiv2 is a C++ library and a command line utility for managing image and video metadata.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Exiv2 dependencies

Required

CMake-3.25.2

Recommended
Optional

libssh

Optional for documentation

Doxygen-1.9.6, Graphviz-7.1.0, and libxslt-1.1.37

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/exiv2

Installation of Exiv2

Install Exiv2 by running the following commands:

mkdir build &&
cd    build &&

cmake -DCMAKE_INSTALL_PREFIX=/usr  \
      -DCMAKE_BUILD_TYPE=Release   \
      -DEXIV2_ENABLE_VIDEO=yes     \
      -DEXIV2_ENABLE_WEBREADY=yes  \
      -DEXIV2_ENABLE_CURL=yes      \
      -DEXIV2_BUILD_SAMPLES=no     \
      -G "Unix Makefiles" .. &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Command Explanations

-DEXIV2_ENABLE_VIDEO=yes: This switch enables managing video metadata.

-DEXIV2_ENABLE_WEBREADY=yes: This switch enables managing web image metadata.

-DEXIV2_BUILD_SAMPLES=no: This switch is necessary to suppress building and installing sample programs. If the sample programs are built, 34 additional programs are installed in /usr/bin.

-DEXIV2_ENABLE_CURL=yes: This switch is necessary to enable network/http capabilities.

Contents

Installed Program: exiv2
Installed Library: libexiv2.so and libexiv2-xmp.a
Installed Directories: /usr/include/exiv2

Short Descriptions

exiv2

is a utility used to dump Exif data

FreeType-2.13.0

Introduction to FreeType2

The FreeType2 package contains a library which allows applications to properly render TrueType fonts.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

Additional Documentation

FreeType2 Dependencies

Recommended
Optional

Brotli-1.0.9 and librsvg-2.54.5

Optional (for documentation)

docwriter

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/freetype2

Installation of FreeType2

If you downloaded the additional documentation, unpack it into the source tree using the following command:

tar -xf ../freetype-doc-2.13.0.tar.xz --strip-components=2 -C docs

Install FreeType2 by running the following commands:

sed -ri "s:.*(AUX_MODULES.*valid):\1:" modules.cfg &&

sed -r "s:.*(#.*SUBPIXEL_RENDERING) .*:\1:" \
    -i include/freetype/config/ftoption.h  &&

./configure --prefix=/usr --enable-freetype-config --disable-static &&
make

This package does not come with a test suite.

Now, as the root user:

make install

If you downloaded the optional documentation, install it as the root user:

install -v -m755 -d /usr/share/doc/freetype-2.13.0 &&
cp -v -R docs/*     /usr/share/doc/freetype-2.13.0 &&
rm -v /usr/share/doc/freetype-2.13.0/freetype-config.1

Command Explanations

sed -ri ...: First command enables GX/AAT and OpenType table validation and second command enables Subpixel Rendering. Note that Subpixel Rendering may have patent issues. Be sure to read the 'Other patent issues' part of https://freetype.org/patents.html before enabling this option.

--enable-freetype-config: This switch ensure that the man page for freetype-config is installed.

--without-harfbuzz: If harfbuzz is installed prior to freetype without freetype support, use this switch to avoid a build failure.

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Program: freetype-config
Installed Library: libfreetype.so
Installed Directories: /usr/include/freetype2 and /usr/share/doc/freetype-2.13.0

Short Descriptions

freetype-config

is used to get FreeType compilation and linking information

libfreetype.so

contains functions for rendering various font types, such as TrueType and Type1

Fontconfig-2.14.2

Introduction to Fontconfig

The Fontconfig package contains a library and support programs used for configuring and customizing font access.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Fontconfig Dependencies

Required

FreeType-2.13.0

Optional

cURL-7.88.1 and UnZip-6.0 (both used by some tests for downloading and extracting test files), JSON-C-0.16, DocBook-utils-0.6.14 and libxml2-2.10.3, texlive-20220321 (or install-tl-unx)

Note

If you have DocBook Utils installed and you remove the --disable-docs parameter from the configure command below, you must have SGMLSpm-1.1 and texlive-20220321 installed also, or the Fontconfig build will fail.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/Fontconfig

Installation of Fontconfig

Install Fontconfig by running the following commands:

./configure --prefix=/usr        \
            --sysconfdir=/etc    \
            --localstatedir=/var \
            --disable-docs       \
            --docdir=/usr/share/doc/fontconfig-2.14.2 &&
make

To test the results, issue: make check. One test is known to fail if the kernel does not support user namespaces. Some tests will download some font files via Internet.

Now, as the root user:

make install

If you did not remove the --disable-docs parameter from the configure command, you can install the pre-generated documentation by using the following commands as the root user:

install -v -dm755 \
        /usr/share/{man/man{1,3,5},doc/fontconfig-2.14.2/fontconfig-devel} &&
install -v -m644 fc-*/*.1         /usr/share/man/man1 &&
install -v -m644 doc/*.3          /usr/share/man/man3 &&
install -v -m644 doc/fonts-conf.5 /usr/share/man/man5 &&
install -v -m644 doc/fontconfig-devel/* \
                                  /usr/share/doc/fontconfig-2.14.2/fontconfig-devel &&
install -v -m644 doc/*.{pdf,sgml,txt,html} \
                                  /usr/share/doc/fontconfig-2.14.2

Command Explanations

--disable-docs: This switch avoids building the documentation (the release tarball includes pre-generated documentation).

Configuring Fontconfig

Config Files

/etc/fonts/*, /etc/fonts/conf.d/* and /usr/share/fontconfig/conf.avail/*

Configuration Information

The main configuration file for Fontconfig is /etc/fonts/fonts.conf. Generally you do not want to edit this file. It will also read /etc/fonts/local.conf and any files in /etc/fonts/conf.d. To put a new font directory in the configuration, create (or update) the /etc/fonts/local.conf file with your local information or add a new file in /etc/fonts/conf.d. The default location of fonts in Fontconfig is:

  • /usr/share/fonts

  • ~/.local/share/fonts

  • ~/.fonts (this is now deprecated, but for the moment it still works)

Fontconfig also ships many example configuration files in the /usr/share/fontconfig/conf.avail directory. Symlinking specific files to /etc/fonts/conf.d will enable them. The default setup is generally good enough for most users. See /etc/fonts/conf.d/README for a description of the configuration files.

More information about configuring Fontconfig can be found in the user's manual in file:///usr/share/doc/fontconfig-2.14.2/fontconfig-user.html.

Contents

Installed Programs: fc-cache, fc-cat, fc-conflist, fc-list, fc-match, fc-pattern, fc-query, fc-scan, and fc-validate
Installed Library: libfontconfig.so
Installed Directories: /etc/fonts, /usr/include/fontconfig, /usr/share/doc/fontconfig-2.14.2, /usr/share/fontconfig, /usr/share/xml/fontconfig, and /var/cache/fontconfig

Short Descriptions

fc-cache

is used to create font information caches

fc-cat

is used to read font information caches

fc-conflist

shows the ruleset files' information on the system

fc-list

is used to create font lists

fc-match

is used to match available fonts, or find fonts that match a given pattern

fc-pattern

is used to parse pattern (empty pattern by default) and show the parsed result

fc-query

is used to query fonts files and print resulting patterns

fc-scan

is used to scan font files and directories, and print resulting patterns

fc-validate

is used to validate font files

libfontconfig.so

contains functions used by the Fontconfig programs and also by other programs to configure or customize font access

FriBidi-1.0.12

Introduction to FriBidi

The FriBidi package is an implementation of the Unicode Bidirectional Algorithm (BIDI). This is useful for supporting Arabic and Hebrew alphabets in other packages.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

FriBidi Dependencies

Optional

c2man (to build man pages)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/fribidi

Installation of FriBidi

Install FriBidi by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release .. &&
ninja

To test the results, issue: ninja test.

Now, as the root user:

ninja install

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

Contents

Installed Program: fribidi
Installed Library: libfribidi.so
Installed Directory: /usr/include/fribidi

Short Descriptions

fribidi

is a command-line interface to the libfribidi library and can be used to convert a logical string to visual output

libfribidi.so

contains functions used to implement the Unicode Bidirectional Algorithm

gegl-0.4.40

Introduction to gegl

This package provides the GEneric Graphics Library, which is a graph based image processing format.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

gegl Dependencies

Required

babl-0.1.98, JSON-GLib-1.6.6, libjpeg-turbo-2.1.5.1, and libpng-1.6.39

Recommended
Optional

asciidoc-10.2.0, Cairo-1.17.6, Exiv2-0.27.6, FFmpeg-5.1.2, gdk-pixbuf-2.42.10, gexiv2-0.14.0, GTK-Doc-1.33.2, JasPer-4.0.0, Little CMS-2.14, libraw-0.21.1, librsvg-2.54.5, libtiff-4.5.0, libwebp-1.3.0, Pango-1.50.12, Poppler-23.02.0, Ruby-3.2.1, SDL2-2.26.3, v4l-utils-1.22.1, Vala-0.56.4, libspiro-20220722, lensfun, libumfpack, LuaJIT, OpenCL (for tests), MRG, and OpenEXR

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/gegl

Installation of gegl

If installing over a previous version of gegl, one module needs to be removed. As the root user, run:

rm -f /usr/lib/gegl-0.4/vector-fill.so

If LibRaw-0.21.0 or above is installed, the build fails due to a change in the ABI. Fix the issue by issuing:

sed -e '/shot_select/s/params/raw&/' \
    -i operations/external/raw-load.c

Install gegl by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release .. &&
ninja

To run the tests, issue: ninja test. This should indicate no failures, but will skip many tests depending on optional dependencies installed on the system.

Now, as the root user:

ninja install

Command Explanations

-Ddocs=true: Build and install documentation (requires GTK-Doc-1.33.2,).

Contents

Installed Programs: gegl and gegl-imgcmp
Installed Libraries: libgegl-0.4.so, libgegl-npd-0.4.so, libgegl-sc-0.4.so, and modules in /usr/lib/gegl-0.4
Installed Directories: /usr/lib/gegl-0.4 and /usr/include/gegl-0.4

Short Descriptions

gegl

is a commandline tool for working with the XML data model

gegl-imgcmp

is a simple image difference detection tool for use in regression testing

libgegl-0.4.so

provides infrastructure to do demand based cached non destructive image editing on larger than RAM buffers

libgegl-npd-0.4.so

is the GEGL N-point image deformation library

libgegl-sc-0.4.so

is the GEGL Seamless Cloning library

giflib-5.2.1

Introduction to giflib

The giflib package contains libraries for reading and writing GIFs as well as programs for converting and working with GIF files.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

giflib Dependencies

Required

xmlto-0.0.28

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/giflib

Installation of giflib

Install giflib by running the following commands:

make

This package does not come with a test suite.

Now, as the root user:

make PREFIX=/usr install &&

rm -fv /usr/lib/libgif.a &&

find doc \( -name Makefile\* -o -name \*.1 \
         -o -name \*.xml \) -exec rm -v {} \; &&

install -v -dm755 /usr/share/doc/giflib-5.2.1 &&
cp -v -R doc/* /usr/share/doc/giflib-5.2.1

Command Explanations

rm -fv /usr/lib/libgif.a: This command removes a static library which is not used by any BLFS package.

find doc ... -exec rm -v {} \;: This command removes Makefiles, man and xml files from the documentation directory that would otherwise be installed by the commands that follow.

Contents

Installed Programs: gif2rgb, gifbuild, gifclrmp, giffix, giftext, and giftool
Installed Library: libgif.so
Installed Directory: /usr/share/doc/giflib-5.2.1

Short Descriptions

gif2rgb

converts images saved as GIF to 24-bit RGB images

gifbuild

dumps GIF data in a textual format, or undumps it to a GIF

gifclrmp

modifies GIF image colormaps

giffix

clumsily attempts to fix truncated GIF images

giftext

prints (text only) general information about a GIF file

giftool

is a GIF transformation tool

libgif.so

contains API functions required by the giflib programs and any other programs needing library functionality to read, write and manipulate GIF images

GLM-0.9.9.8

Introduction to GLM

OpenGL Mathematics (GLM) is a header-only C++ mathematics library for graphics software based on the OpenGL Shading Language (GLSL) specifications. An extension system provides extended capabilities such as matrix transformations and quaternions.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/GLM

Installation of GLM

Note

This package is unusual as it includes its functionality in header files. We just copy them into position.

As the root user:

cp -r glm /usr/include/ &&
cp -r doc /usr/share/doc/glm-0.9.9.8

Contents

Installed Program: None
Installed Library: None
Installed Directory: /usr/include/glm

Graphite2-1.3.14

Introduction to Graphite2

Graphite2 is a rendering engine for graphite fonts. These are TrueType fonts with additional tables containing smart rendering information and were originally developed to support complex non-Roman writing systems. They may contain rules for e.g. ligatures, glyph substitution, kerning, justification - this can make them useful even on text written in Roman writing systems such as English. Note that firefox by default provides an internal copy of the graphite engine and cannot use a system version (although it can now be patched to use it), but it too should benefit from the availability of graphite fonts.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Graphite2 Dependencies

Required

CMake-3.25.2

Optional

FreeType-2.13.0, silgraphite to build the comparerender test and benchmarking tool, and if that is present, and HarfBuzz-7.0.0 to add more functionality to it (this is a circular dependency, you would need to first build graphite2 without harfbuzz).

To build the documentation: asciidoc-10.2.0, Doxygen-1.9.6, texlive-20220321 (or install-tl-unx), and dblatex (for PDF docs)

To execute the test suite you will need FontTools (Python 3 module), otherwise, the "cmp" tests fail.

Optional (at runtime)

You will need at least one suitable graphite font for the package to be useful.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/graphite2

Installation of Graphite2

Some tests fail if FontTools (Python 3 module) is not installed. These tests can be removed with:

sed -i '/cmptest/d' tests/CMakeLists.txt

Install Graphite2 by running the following commands:

mkdir build &&
cd    build &&

cmake -DCMAKE_INSTALL_PREFIX=/usr .. &&
make

If you wish to build the documentation, issue:

make docs

To test the results, issue: make test.

Now, as the root user:

make install

If you built the documentation, install, as the root user:

install -v -d -m755 /usr/share/doc/graphite2-1.3.14 &&

cp      -v -f    doc/{GTF,manual}.html \
                    /usr/share/doc/graphite2-1.3.14 &&
cp      -v -f    doc/{GTF,manual}.pdf \
                    /usr/share/doc/graphite2-1.3.14

Command Explanations

-DCMAKE_VERBOSE_MAKEFILE=ON: This switch turns on build verbose mode.

Contents

Installed Programs: gr2fonttest, and optionally comparerender
Installed Libraries: libgraphite2.so
Installed Directories: /usr/{include,share}/graphite2 and optionally /usr/share/doc/graphite2-1.3.14

Short Descriptions

comparerender

is a test and benchmarking tool

gr2fonttest

is a diagnostic console tool for graphite fonts

libgraphite2.so

is a rendering engine for graphite fonts

HarfBuzz-7.0.0

Introduction to Harfbuzz

The HarfBuzz package contains an OpenType text shaping engine.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

HarfBuzz Dependencies

Recommended
Optional

Cairo-1.17.6 (circular: build cairo and all its recommended dependencies, including harfbuzz, first, then rebuild harfbuzz if the cairo backend is needed), git-2.39.2, GTK-Doc-1.33.2, FontTools (Python 3 module, for the test suite), and ragel

Warning

Recommended dependencies are not strictly required to build the package. However, you might not get expected results at runtime if you don't install them. Please do not report bugs with this package if you have not installed the recommended dependencies.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/harfbuzz

Installation of HarfBuzz

Install HarfBuzz by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr        \
      --buildtype=release  \
      -Dgraphite2=enabled  &&
ninja

To test the results, issue: ninja test.

Now, as the root user:

ninja install

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

-Dgraphite2=enabled: This switch enables Graphite2 support, which is required for building texlive-20220321 or LibreOffice-7.5.0.3 with system harfbuzz.

-Ddocs=disabled: If GTK-Doc-1.33.2 is installed, the documentation is built and installed. This switch prevents that.

Contents

Installed Programs: hb-info, hb-ot-shape-closure, hb-shape, hb-subset, and hb-view (only if Cairo is installed)
Installed Libraries: libharfbuzz.so, libharfbuzz-cairo.so (only if Cairo is installed), libharfbuzz-gobject.so, libharfbuzz-icu.so, and libharfbuzz-subset.so
Installed Directories: /usr/include/harbuzz, /usr/lib/cmake/harfbuzz, and /usr/share/gtk-doc/html/harfbuzz (optional)

Short Descriptions

hb-info

is used for gathering information about fonts installed on the system

hb-ot-shape-closure

gives the set of characters contained in a string, represented as single characters and/or single character names. Example: hb-ot-shape-closure /usr/share/fonts/dejavu/DejaVuSans.ttf "Hello World."

hb-shape

is used for the conversion of text strings into positioned glyphs

hb-subset

is used to create subsets of fonts, and display text using them

hb-view

displays a graphical view of a string shape using a particular font as a set of glyphs. The output format is automatically defined by the file extension, the supported ones being ansi/png/svg/pdf/ps/eps. For example: hb-view --output-file=hello.png /usr/share/fonts/dejavu/DejaVuSans.ttf "Hello World."

libharfbuzz.so

is the HarfBuzz text shaping library

libharfbuzz-cairo.so

provides Cairo integration for the Harfbuzz text shaping library

libharfbuzz-gobject.so

provides GObject integration for the HarfBuzz text shaping library

libharfbuzz-icu.so

provides ICU integration for the HarfBuzz text shaping library

libharfbuzz-subset.so

provides API functions for performing subsetting operations on font files

JasPer-4.0.0

Introduction to JasPer

The JasPer Project is an open-source initiative to provide a free software-based reference implementation of the JPEG-2000 codec.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

JasPer Dependencies

Required

CMake-3.25.2

Recommended
Optional

Freeglut-3.4.0 (required for jiv), Doxygen-1.9.6 (needed for generating html documentation), and texlive-20220321 (needed to regenerate the pdf documentation)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/jasper

Installation of JasPer

Note

The tarball jasper-4.0.0.tar.gz will extract to jasper-version-4.0.0.

Install JasPer by running the following commands:

mkdir BUILD &&
cd    BUILD &&

cmake -DCMAKE_INSTALL_PREFIX=/usr    \
      -DCMAKE_BUILD_TYPE=Release     \
      -DCMAKE_SKIP_INSTALL_RPATH=YES \
      -DJAS_ENABLE_DOC=NO            \
      -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/jasper-4.0.0 \
      ..  &&
make

To test the results, issue: make test.

Now, as the root user:

make install

Command Explanations

-DCMAKE_SKIP_INSTALL_RPATH=YES: This option removes embedded library search paths.

-DJAS_ENABLE_DOC=NO: This option disables rebuilding the pdf documentation if texlive-20220321 is installed.

Contents

Installed Programs: imgcmp, imginfo, jasper, and jiv
Installed Library: libjasper.so
Installed Directories: /usr/include/jasper and /usr/share/doc/jasper-4.0.0

Short Descriptions

imgcmp

compares two images of the same geometry

imginfo

displays information about an image

jasper

converts images between formats (BMP, JPS, JPC, JPG, PGX, PNM, MIF, and RAS)

jiv

displays images

libjasper.so

is a library used by programs for reading and writing JPEG2000 format files

Little CMS-1.19

Introduction to Little CMS

The Little CMS library is used by other programs to provide color management facilities.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

Little CMS Dependencies

Optional

libtiff-4.5.0, libjpeg-turbo-2.1.5.1, and Python-2.7.18 (with SWIG-4.1.1 also)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/lcms

Installation of Little CMS

Install Little CMS by running the following commands:

patch -Np1 -i ../lcms-1.19-cve_2013_4276-1.patch &&

./configure --prefix=/usr --disable-static       &&
make

To test the results, issue: make check.

Now, as the root user:

make install &&
install -v -m755 -d /usr/share/doc/lcms-1.19 &&
install -v -m644    README.1ST doc/* \
                    /usr/share/doc/lcms-1.19

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

--with-python: Use this parameter if Python and SWIG are installed.

Contents

Installed Programs: icc2ps, icclink, icctrans, wtpt and optionally, jpegicc, tiffdiff and tifficc
Installed Libraries: liblcms.so and the optional _lcms.so Python module
Installed Directory: /usr/share/doc/lcms-1.19

Short Descriptions

icc2ps

generates PostScript CRD or CSA from ICC profiles

icclink

links two or more profiles into a single device link profile

icctrans

is a color space conversion calculator

jpegicc

is an ICC profile applier for JPEG files

tifficc

is an ICC profile applier for TIFF files

tiffdiff

is a TIFF compare utility

wtpt

shows media white of profiles, identifying black body locus

liblcms.so

is used by the lcms programs as well as other programs to provide color management facilities

Little CMS-2.14

Introduction to Little CMS2

The Little Color Management System is a small-footprint color management engine, with special focus on accuracy and performance. It uses the International Color Consortium standard (ICC), which is the modern standard for color management.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Little CMS2 Dependencies

Optional

libjpeg-turbo-2.1.5.1 and libtiff-4.5.0

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/lcms2

Installation of Little CMS2

Apply the upstream fix for an issue breaking colord:

sed '/BufferSize < TagSize/,+1 s/goto Error/TagSize = BufferSize/' \
    -i src/cmsio0.c

Install Little CMS2 by running the following commands:

./configure --prefix=/usr --disable-static &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: jpgicc, linkicc, psicc, tificc, and transicc
Installed Library: liblcms2.so
Installed Directories: None

Short Descriptions

jpgicc

is the Little CMS ICC profile applier for JPEG

linkicc

is the Little CMS ICC device link generator

psicc

is the Little CMS ICC PostScript generator

tificc

is the Little CMS ICC tiff generator

transicc

is the Little CMS ColorSpace conversion calculator

liblcms2.so

contains functions that implement the lcms2 API

libexif-0.6.24

Introduction to libexif

The libexif package contains a library for parsing, editing, and saving EXIF data. Most digital cameras produce EXIF files, which are JPEG files with extra tags that contain information about the image. All EXIF tags described in EXIF standard 2.1 are supported.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libexif Dependencies

Optional (to Build Documentation)

Doxygen-1.9.6 and Graphviz-7.1.0

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libexif

Installation of libexif

Install libexif by running the following commands:

./configure --prefix=/usr    \
            --disable-static \
            --with-doc-dir=/usr/share/doc/libexif-0.6.24 &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Documentation was built and installed if you have the dependencies shown above installed. If you don't have the dependencies installed, there is a compressed tarball in the source tree doc directory that can be unpacked into /usr/share/doc/libexif-0.6.24.

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: None
Installed Library: libexif.so
Installed Directories: /usr/include/libexif and /usr/share/doc/libexif-0.6.24

Short Descriptions

libexif.so

contains functions used for parsing, editing, and saving EXIF data

Libgxps-0.3.2

Introduction to libgxps

The libgxps package provides an interface to manipulate XPS documents.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Libgxps Dependencies

Required

GTK+-3.24.36, Little CMS-2.14, libarchive-3.6.2, libjpeg-turbo-2.1.5.1, libtiff-4.5.0, and libxslt-1.1.37

Optional

git-2.39.2 and GTK-Doc-1.33.2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libgxps

Installation of Libgxps

Install Libgxps by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release .. &&
ninja

This package does not come with a test suite.

Now, as the root user:

ninja install

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

Contents

Installed Programs: xpstojpeg, xpstopdf, xpstopng, xpstops, and xpstosvg
Installed Library: libgxps.so
Installed Directories: /usr/include/libgxps

Short Descriptions

xpstojpeg

converts XPS documents to a JPEG image

xpstopdf

converts XPS documents to PDF format

xpstopng

converts XPS documents to a PNG image

xpstops

converts XPS documents to PostScript

xpstosvg

converts XPS documents to SVG images

libgxps.so

contains API functions for manipulating XPS documents

libjpeg-turbo-2.1.5.1

Introduction to libjpeg-turbo

libjpeg-turbo is a fork of the original IJG libjpeg which uses SIMD to accelerate baseline JPEG compression and decompression. libjpeg is a library that implements JPEG image encoding, decoding and transcoding.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libjpeg-turbo Dependencies

Required

CMake-3.25.2

Recommended

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libjpeg-turbo

Installation of libjpeg-turbo

Install libjpeg-turbo by running the following commands:

mkdir build &&
cd    build &&

cmake -DCMAKE_INSTALL_PREFIX=/usr \
      -DCMAKE_BUILD_TYPE=RELEASE  \
      -DENABLE_STATIC=FALSE       \
      -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/libjpeg-turbo-2.1.5.1 \
      -DCMAKE_INSTALL_DEFAULT_LIBDIR=lib  \
      .. &&
make

To test the results, issue: make test.

Now, as the root user:

make install

Command Explanations

-DWITH_JPEG8=ON: This switch enables compatibility with libjpeg version 8.

Contents

Installed Programs: cjpeg, djpeg, jpegtran, rdjpgcom, tjbench, and wrjpgcom
Installed Libraries: libjpeg.so and libturbojpeg.so
Installed Directories: /usr/share/doc/libjpeg-turbo-2.1.5.1

Short Descriptions

cjpeg

compresses image files to produce a JPEG/JFIF file on the standard output. Currently supported input file formats are: PPM (PBMPLUS color format), PGM (PBMPLUS gray-scale format), BMP, and Targa

djpeg

decompresses image files from JPEG/JFIF format to either PPM (PBMPLUS color format), PGM (PBMPLUS gray-scale format), BMP, or Targa format

jpegtran

is used for lossless transformation of JPEG files

rdjpgcom

displays text comments from within a JPEG file

tjbench

is used to benchmark the performance of libjpeg-turbo

wrjpgcom

inserts text comments into a JPEG file

libjpeg.so

contains functions used for reading and writing JPEG images

libmng-2.0.3

Introduction to libmng

The libmng libraries are used by programs wanting to read and write Multiple-image Network Graphics (MNG) files which are the animation equivalents to PNG files.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libmng Dependencies

Required

libjpeg-turbo-2.1.5.1 and Little CMS-2.14

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libmng

Installation of libmng

Install libmng by running the following commands:

./configure --prefix=/usr --disable-static &&
make

This package does not come with a test suite.

Now, as the root user:

make install &&

install -v -m755 -d        /usr/share/doc/libmng-2.0.3 &&
install -v -m644 doc/*.txt /usr/share/doc/libmng-2.0.3

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: None
Installed Library: libmng.so
Installed Directory: /usr/share/doc/libmng-2.0.3

Short Descriptions

libmng.so

provides functions for programs wishing to read and write MNG files which are animation files without the patent problems associated with certain other formats

libmypaint-1.6.1

Introduction to libmypaint

The libmypaint package, a.k.a. "brushlib", is a library for making brushstrokes which is used by MyPaint and other projects.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libmypaint Dependencies

Required

JSON-C-0.16

Recommended
Optional

Doxygen-1.9.6 (to create XML docs), gegl (0.3 versions only) and gperftools

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libmypaint

Installation of libmypaint

Install libmypaint by running the following commands:

./configure --prefix=/usr &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Contents

Installed Programs: None.
Installed Libraries: libmypaint.so (and optionally libmypaint-gegl.so which is not used by any packages in this book).
Installed Directory: /usr/include/libmypaint

Short Descriptions

libmypaint.so

contains functions for making brushstrokes

libpng-1.6.39

Introduction to libpng

The libpng package contains libraries used by other programs for reading and writing PNG files. The PNG format was designed as a replacement for GIF and, to a lesser extent, TIFF, with many improvements and extensions and lack of patent problems.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libpng

Installation of libpng

If you want to patch libpng to support apng files, apply it here:

gzip -cd ../libpng-1.6.39-apng.patch.gz | patch -p1

Install libpng by running the following commands:

./configure --prefix=/usr --disable-static &&
make

To test the results, issue: make check.

Now, as the root user:

make install &&
mkdir -v /usr/share/doc/libpng-1.6.39 &&
cp -v README libpng-manual.txt /usr/share/doc/libpng-1.6.39

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: libpng-config (symlink), libpng16-config, pngfix and png-fix-itxt
Installed Libraries: libpng.so
Installed Directories: /usr/include/libpng16 and /usr/share/doc/libpng-1.6.39

Short Descriptions

pngfix

tests, optimizes and optionally fixes the zlib header in PNG files. Optionally, when fixing, strips ancillary chunks from the file

png-fix-itxt

fixes PNG files that have an incorrect length field in the iTXt chunks

libpng-config

is a shell script that provides configuration information for applications wanting to use libpng

libpng.so

contain routines used to create and manipulate PNG format graphics files

libraw-0.21.1

Introduction to libraw

Libraw is a library for reading RAW files obtained from digital photo cameras (CRW/CR2, NEF, RAF, DNG, and others).

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libraw Dependencies

Recommended

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libraw

Installation of libraw

Install libraw by running the following commands:

autoreconf -fiv              &&
./configure --prefix=/usr    \
            --enable-jpeg    \
            --enable-jasper  \
            --enable-lcms    \
            --disable-static \
            --docdir=/usr/share/doc/libraw-0.21.1 &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Command Explanations

--enable-jpeg: This switch enables support for jpeg. Remove if you don't have libjpeg-turbo-2.1.5.1 installed.

--enable-jasper: This switch enables support for jasper. Remove if you don't have JasPer-4.0.0 installed.

--enable-lcms: This switch enables support for Little CMS2. Remove if you don't have Little CMS-2.14 installed.

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Note

All the installed programs are examples of using libraw.

Installed Programs: 4channels, dcraw_emu, dcraw_half, half_mt, mem_image, multirender_test, postprocessing_benchmark, raw-identify, simple_dcraw, and unprocessed_raw
Installed Library: libraw.so and libraw_r.so
Installed Directories: /usr/include/libraw and /usr/share/doc/libraw-0.21.1

Short Descriptions

4channels

generates four TIFF files from RAW data, one file per channel

dcraw_half

emulates "dcraw -h" (see DCRAW manpage)

mem_image

emulates "dcraw [-4] [-6] [-e]" (see DCRAW manpage)

postprocessing_benchmark

creates eight different renderings from one source file. The first and fourth one should be identical

simple_dcraw

emulates call to "dcraw [-D] [-T] [-v] [-e] [-4]" (see DCRAW manpage)

dcraw_emu

is an almost complete dcraw emulator (see DCRAW manpage)

half_mt

emulates call to "dcraw -h [-w] [-a] [-v]" (see DCRAW manpage)

multirender_test

creates eight different renderings from one source file. The first and fourth one should be identical

raw-identify

emulates call to "dcraw -i [-v]" (see DCRAW manpage)

unprocessed_raw

generates unprocessed raw image: with masked pixels and without black subtraction

librsvg-2.54.5

Introduction to librsvg

The librsvg package contains a library and tools used to manipulate, convert and view Scalable Vector Graphic (SVG) images.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

librsvg Dependencies

Required

Cairo-1.17.6, gdk-pixbuf-2.42.10, Pango-1.50.12, and rustc-1.67.1

Recommended
Optional

docutils-0.19 (for man pages), Gi-DocGen-2023.1 (for documentation), and Xorg Fonts (for tests)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/librsvg

Installation of librsvg

Install librsvg by running the following commands:

./configure --prefix=/usr    \
            --enable-vala    \
            --disable-static \
            --docdir=/usr/share/doc/librsvg-2.54.5 &&
make

To test the results, issue: make -k check. During testing some binaries are rebuilt with a different debug level, so you should run make again after the tests are complete to ensure everything is ready to be installed.

Now, as the root user:

make install

Note

If you installed the package on to your system using a DESTDIR method, an important file was not installed and should be copied and/or generated. Generate it using the following command as the root user:

gdk-pixbuf-query-loaders --update-cache

Command Explanations

--enable-vala: This switch enables building of the Vala bindings. Remove this switch if you don't have Vala-0.56.4 installed.

--disable-static: This switch prevents installation of static versions of the libraries.

--disable-introspection: Use this switch if you have not installed Gobject Introspection.

--disable-gtk-doc: This switch prevents building the API documentation, even if Gi-DocGen-2023.1 (despite the name of the option) is available.

Contents

Installed Programs: rsvg-convert
Installed Library: librsvg-2.so
Installed Directories: /usr/include/librsvg-2.0 and /usr/share/doc/librsvg-2.54.5

Short Descriptions

rsvg-convert

is used to convert images into PNG, PDF, PS, SVG and other formats

librsvg-2.so

provides the functions to render Scalable Vector Graphics

libpixbufloader-svg.so

is the Gdk Pixbuf plugin that allows GTK+ applications to render Scalable Vector Graphics images

Libspiro-20220722

Introduction to libspiro

Libspiro will take an array of spiro control points and convert them into a series of bezier splines which can then be used in the myriad of ways the world has come to use beziers.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libspiro

Installation of libspiro

Install libspiro by running the following commands:

./configure --prefix=/usr --disable-static &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: None
Installed Library: libspiro.so
Installed Directories: None

Short Descriptions

libspiro.so

is a shareable library that can be used by programs to do the Spiro computations for you

libtiff-4.5.0

Introduction to libtiff

The libtiff package contains the TIFF libraries and associated utilities. The libraries are used by many programs for reading and writing TIFF files and the utilities are used for general work with TIFF files.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libtiff Dependencies

Recommended
Optional

Freeglut-3.4.0 (required for tiffgt), libjpeg-turbo-2.1.5.1, sphinx-6.1.3, libwebp-1.3.0, JBIG-KIT, and LERC

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libtiff

Installation of libtiff

Install libtiff by running the following commands:

mkdir -p libtiff-build &&
cd       libtiff-build &&

cmake -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/libtiff-4.5.0 \
      -DCMAKE_INSTALL_PREFIX=/usr -G Ninja .. &&
ninja

To test the results, issue: ninja test.

Now, as the root user:

ninja install

Contents

Installed Programs: fax2ps, fax2tiff, pal2rgb, ppm2tiff, raw2tiff, tiff2bw, tiff2pdf, tiff2ps, tiff2rgba, tiffcmp, tiffcp, tiffcrop, tiffdither, tiffdump, tiffgt, tiffinfo, tiffmedian, tiffset and tiffsplit
Installed Libraries: libtiff.so and libtiffxx.so
Installed Directory: /usr/share/doc/tiff-4.5.0

Short Descriptions

fax2ps

converts a TIFF facsimile to compressed PostScript file

fax2tiff

creates a TIFF Class F fax file from raw fax data

pal2rgb

converts a palette color TIFF image to a full color image

ppm2tiff

creates a TIFF file from a PPM image file

raw2tiff

converts a raw byte sequence into TIFF

tiff2bw

converts a color TIFF image to grayscale

tiff2pdf

converts a TIFF image to a PDF document

tiff2ps

converts a TIFF image to a PostScript file

tiff2rgba

converts a wide variety of TIFF images into an RGBA TIFF image

tiffcmp

compares two TIFF files

tiffcp

copies (and possibly converts) a TIFF file

tiffcrop

selects, copies, crops, converts, extracts and/or processes one or more TIFF files

tiffdither

converts a grayscale image to bilevel using dithering

tiffdump

prints verbatim information about TIFF files

tiffgt

displays an image stored in a TIFF file

tiffinfo

prints information about TIFF files

tiffmedian

applies the median cut algorithm to data in a TIFF file

tiffset

sets the value of a TIFF header to a specified value

tiffsplit

splits a multi-image TIFF into single-image TIFF files

libtiff.so

contains the API functions used by the libtiff programs as well as other programs to read and write TIFF files

libtiffxx.so

contains the C++ API functions used by programs to read and write TIFF files

libwebp-1.3.0

Introduction to libwebp

The libwebp package contains a library and support programs to encode and decode images in WebP format.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

libwebp Dependencies

Recommended
Optional

Freeglut-3.4.0 and giflib-5.2.1

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libwebp

Installation of libwebp

Install libwebp by running the following commands:

./configure --prefix=/usr           \
            --enable-libwebpmux     \
            --enable-libwebpdemux   \
            --enable-libwebpdecoder \
            --enable-libwebpextras  \
            --enable-swap-16bit-csp \
            --disable-static        &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Command Explanations

--enable-swap-16bit-csp: This switch enables byte swap for 16 bit colorspaces.

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: cwebp, dwebp, gif2webp, img2webp, vwebp, webpinfo, and webpmux
Installed Library: libsharpyuv.so, libwebpdecoder.so, libwebpdemux.so, libwebpmux.so, and libwebp.so
Installed Directory: /usr/include/webp

Short Descriptions

cwebp

compresses an image using the WebP format

dwebp

decompresses WebP files into PNG, PAM, PPM or PGM images

gif2webp

converts a GIF image to a WebP image

img2webp

creates an animated WebP file from a sequence of input images

vwebp

decompresses a WebP file and displays it in a window

webpinfo

prints out the cunk level structure of WebP files along with performing basic integrity checks

webpmux

creates animated WebP files from non-animated WebP images, extracts frames from animated WebP images, and manages XMP/EXIF metadata and the ICC profile

libwebp.so

contains the API functions for WebP encoding and decoding

mypaint-brushes-1.3.1

Introduction to mypaint-brushes

The mypaint-brushes package contains brushes used by packages which use libmypaint.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

mypaint-brushes Dependencies

Required at runtime

libmypaint-1.6.1

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/mypaint-brushes

Installation of mypaint-brushes

Install mypaint-brushes by running the following commands:

./configure --prefix=/usr &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Contents

Installed Programs: None.
Installed Libraries: None.
Installed Directories: /usr/share/mypaint-data.

newt-0.52.23

Introduction to newt

Newt is a programming library for color text mode, widget based user interfaces. It can be used to add stacked windows, entry widgets, checkboxes, radio buttons, labels, plain text fields, scrollbars, etc., to text mode user interfaces. Newt is based on the S-Lang library.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Newt Dependencies

Required

popt-1.19 and slang-2.3.3

Recommended

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/newt

Installation of newt

Install newt by running the following command:

sed -e '/install -m 644 $(LIBNEWT)/ s/^/#/' \
    -e '/$(LIBNEWT):/,/rv/ s/^/#/'          \
    -e 's/$(LIBNEWT)/$(LIBNEWTSH)/g'        \
    -i Makefile.in                          &&

./configure --prefix=/usr           \
            --with-gpm-support      \
            --with-python=python3.11 &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Command Explanations

sed -e ... -i Makefile.in: Disables installation of a static library.

--with-gpm-support: This switch enables mouse support for newt applications through GPM.

--with-python=python3.11: By giving explicitly the name of the directory where python modules reside, this switch prevents building the python2 module.

Contents

Installed Programs: whiptail
Installed Library: libnewt.so, whiptcl.so, and /usr/lib/python3.11/site-packages/_snack.so
Installed Directories: None

Short Descriptions

whiptail

displays dialog boxes from shell scripts

libnewt.so

is the library for color text mode, widget based user interfaces

opencv-4.7.0

Introduction to opencv

The opencv package contains graphics libraries mainly aimed at real-time computer vision.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

Note

One additional file that starts with "ippicv" (integrated performance primitives) will be automatically downloaded during the cmake portion of the build procedure. This download is specific to the system architecture.

opencv Dependencies

Required

CMake-3.25.2 and UnZip-6.0

Recommended
Optional

apache-ant-1.10.13, Doxygen-1.9.6, Java-19.0.2, Python-2.7.18, blas, Cuda, Eigen, OpenEXR, GDAL, lapack, libdc1394, NumPy, Threading Building Blocks (TBB), and VTK - The Visualization Toolkit,

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/opencv

Installation of opencv

If you downloaded the optional modules, unpack them now:

tar -xf ../opencv_contrib-4.7.0.tar.gz

Install opencv by running the following commands:

mkdir build &&
cd    build &&

cmake -DCMAKE_INSTALL_PREFIX=/usr      \
      -DCMAKE_BUILD_TYPE=Release       \
      -DENABLE_CXX11=ON                \
      -DBUILD_PERF_TESTS=OFF           \
      -DWITH_XINE=ON                   \
      -DBUILD_TESTS=OFF                \
      -DENABLE_PRECOMPILED_HEADERS=OFF \
      -DCMAKE_SKIP_RPATH=ON            \
      -DBUILD_WITH_DEBUG_INFO=OFF      \
      -Wno-dev  ..                     &&
make

The package does not come with a test suite.

Now, as the root user:

make install

Command Explanations

-DWITH_XINE=ON: This option instructs the make procedure to use xine-lib-1.2.13.

-DENABLE_PRECOMPILED_HEADERS=OFF: This option is needed for compatibility with gcc-6.1 and later.

-DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-4.7.0/modules: instructs the build system to build additional modules.

Contents

Installed Programs: opencv_annotation, opencv_interactive-calibration, opencv_model_diagnostics, opencv_version, opencv_visualisation, and setup_vars_opencv4.sh
Installed Libraries: libopencv_calib3d.so, libopencv_core.so, libopencv_dnn.so, libopencv_features2d.so, libopencv_flann.so, libopencv_gapi.so, libopencv_highgui.so, libopencv_imgcodecs.so, libopencv_imgproc.so, libopencv_ml.so, libopencv_objdetect.so, libopencv_photo.so, libopencv_stitching.so, libopencv_video.so, and libopencv_videoio.so
Installed Directories: /usr/include/opencv4, /usr/lib/cmake/opencv4, /usr/lib/python3.11/site-packages/cv2, /usr/share/licenses/opencv4, /usr/share/opencv4, and /usr/share/java/opencv4

OpenJPEG-2.5.0

Introduction to OpenJPEG

OpenJPEG is an open-source implementation of the JPEG-2000 standard. OpenJPEG fully respects the JPEG-2000 specifications and can compress/decompress lossless 16-bit images.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

OpenJPEG Dependencies

Required

CMake-3.25.2

Optional

Little CMS-2.14, libpng-1.6.39, libtiff-4.5.0, and Doxygen-1.9.6 (to build the API documentation)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/openjpeg2

Installation of OpenJPEG

Install OpenJPEG by running the following commands:

mkdir -v build &&
cd       build &&

cmake -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_INSTALL_PREFIX=/usr \
      -DBUILD_STATIC_LIBS=OFF .. &&
make

This package does not come with a test suite.

Now, as the root user:

make install &&

pushd ../doc &&
  for man in man/man?/* ; do
      install -v -D -m 644 $man /usr/share/$man
  done
popd

Contents

Installed Programs: opj_compress, opj_decompress, and opj_dump
Installed Libraries: libopenjp2.so
Installed Directories: /usr/include/openjpeg-2.5 and /usr/lib/openjpeg-2.5

Short Descriptions

opj_compress

converts various image formats to the jpeg2000 format

opj_decompress

converts jpeg2000 images to other image types

opj_dump

reads in a jpeg2000 image and dumps the contents to stdout

Pixman-0.42.2

Introduction to Pixman

The Pixman package contains a library that provides low-level pixel manipulation features such as image compositing and trapezoid rasterization.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Pixman Dependencies

Optional

GTK+-2.24.33 and libpng-1.6.39 (for tests and demos)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/pixman

Installation of Pixman

Install Pixman by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release &&
ninja

To test the results, issue: ninja test.

Now, as the root user:

ninja install

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

Contents

Installed Programs: None
Installed Library: libpixman-1.so
Installed Directory: /usr/include/pixman-1

Short Descriptions

libpixman-1.so

contains functions that provide low-level pixel manipulation features

Poppler-23.02.0

Introduction to Poppler

The Poppler package contains a PDF rendering library and command line tools used to manipulate PDF files. This is useful for providing PDF rendering functionality as a shared library.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

  • Download (HTTP): https://poppler.freedesktop.org/poppler-23.02.0.tar.xz

  • Download MD5 sum: ce7eef12c40dcd78998a43422c2c71ef

  • Download size: 1.8 MB

  • Estimated disk space required: 89 MB (with Qt5 library and tests)

  • Estimated build time: 0.6 SBU (with parallelism=4, Qt5 library, and tests)

Additional Downloads

Poppler Encoding Data

The additional package consists of encoding files for use with Poppler. The encoding files are optional and Poppler will automatically read them if they are present. When installed, they enable Poppler to render CJK and Cyrillic properly.

Poppler Dependencies

Required

CMake-3.25.2, Fontconfig-2.14.2, and gobject-introspection-1.74.0

Recommended
Optional

cURL-7.88.1, gdk-pixbuf-2.42.10, git-2.39.2 (for downloading test files), GTK-Doc-1.33.2, GTK+-3.24.36, libtiff-4.5.0, Qt-5.15.8 (required for PDF support in Okular-22.12.2), and Qt-6.1 or later.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/poppler

Installation of Poppler

Install Poppler by running the following commands:

mkdir build                         &&
cd    build                         &&

cmake  -DCMAKE_BUILD_TYPE=Release   \
       -DCMAKE_INSTALL_PREFIX=/usr  \
       -DTESTDATADIR=$PWD/testfiles \
       -DENABLE_UNSTABLE_API_ABI_HEADERS=ON \
       ..                           &&
make

In order to run the test suite, some testcases are needed and can be obtained only from a git repository. The command to download them is: git clone --depth 1 https://gitlab.freedesktop.org/poppler/test.git testfiles. Then issue: LC_ALL=en_US.UTF-8 make test.

Now, as the root user:

make install

To install the documentation, run the following commands as root:

install -v -m755 -d           /usr/share/doc/poppler-23.02.0 &&
cp -vr ../glib/reference/html /usr/share/doc/poppler-23.02.0

Poppler Data

If you downloaded the additional encoding data package, install it by issuing the following commands:

tar -xf ../../poppler-data-0.4.12.tar.gz &&
cd poppler-data-0.4.12

Now, as the root user:

make prefix=/usr install

Command Explanations

-DCMAKE_BUILD_TYPE=Release: This switch is used to apply a higher level of compiler optimizations.

-DTESTDATADIR=$PWD/testfiles: Tells the test programs where the auxiliary files are located.

-DENABLE_UNSTABLE_API_ABI_HEADERS=ON: Installs some old Xpdf headers required by certain programs.

-DENABLE_GTK_DOC=ON: Use this parameter if GTK-Doc is installed and you wish to rebuild and install the API documentation.

-DENABLE_BOOST=OFF: Use this parameter if you have not installed boost (the Splash backend for Qt5 recommends boost).

LC_ALL=en_US.UTF-8 make test: Runs the test suite. The environment variable LC_ALL=en_US.UTF-8 is only needed if the default locale does not include UTF-8.

Contents

Installed Programs: pdfattach, pdfdetach, pdffonts, pdfimages, pdfinfo, pdfseparate, pdfsig, pdftocairo, pdftohtml, pdftoppm, pdftops, pdftotext, and pdfunite
Installed Libraries: libpoppler.so, libpoppler-cpp.so, libpoppler-glib.so, and libpoppler-qt5.so
Installed Directories: /usr/include/poppler, /usr/share/poppler, and /usr/share/doc/poppler-23.02.0

Short Descriptions

pdfattach

adds a new embedded file to an existing PDF file

pdfdetach

lists or extracts embedded files from PDF files

pdffonts

lists the fonts used in a PDF file along with various information for each font

pdfimages

saves images from a PDF file as PPM, PBM, or JPEG files

pdfinfo

prints the contents of the 'Info' dictionary (plus some other useful information) from a PDF file

pdfseparate

extracts single pages from a PDF file

pdfsig

verifies the digital signatures in a PDF document

pdftocairo

converts a PDF file to one of several formats (PNG, JPEG, PDF, PS, EPS, SVG) using the cairo output device of the poppler library

pdftohtml

converts a PDF file to HTML

pdftoppm

converts PDF files to PBM, PGM and PPM formats

pdftops

converts PDF files to Postscript format

pdftotext

converts PDF files to plain text

pdfunite

merges several PDF files, in the order of their occurrence on the command line, to one PDF output file

libpoppler.so

contains the API functions to render PDF files

libpoppler-cpp.so

is a C++ backend for rendering PDF files

libpoppler-glib.so

is a wrapper library used to interface the PDF rendering functions with GTK+

libpoppler-qt5.so

is a wrapper library used to interface the PDF rendering functions with Qt5

Potrace-1.16

Introduction to Potrace

Potrace™ is a tool for transforming a bitmap (PBM, PGM, PPM, or BMP format) into one of several vector file formats.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Potrace Dependencies

Recommended

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/potrace

Installation of Potrace

Install Potrace by running the following commands:

./configure --prefix=/usr                        \
            --disable-static                     \
            --docdir=/usr/share/doc/potrace-1.16 \
            --enable-a4                          \
            --enable-metric                      \
            --with-libpotrace                    &&
make

To run the test suite, issue: make check.

Now, as the root user:

make install

Command Explanations

--enable-a4: Use A4 as the default paper size.

--enable-metric: Use metric units (centimeters) as default

--disable-static: This switch prevents installation of static versions of the libraries.

--with-libpotrace: Install the library and headers.

Contents

Installed Programs: mkbitmap, potrace
Installed Libraries: libpotrace.so
Installed Directories: /usr/share/doc/potrace-1.16

Short Descriptions

mkbitmap

transforms images into bitmaps with scaling and filtering

potrace

transforms bitmaps into vector graphics

libpotrace.so

is a library for transforming bitmaps into vector graphics

Qpdf-11.2.0

Introduction to Qpdf

The Qpdf package contains command-line programs and a library that does structural, content-preserving transformations on PDF files.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Qpdf Dependencies

Required

libjpeg-turbo-2.1.5.1

Optional

fop-2.8, GnuTLS-3.8.0, and sphinx-6.1.3

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/qpdf

Installation of Qpdf

Install Qpdf by running the following commands:

mkdir build &&
cd    build &&

cmake -DCMAKE_INSTALL_PREFIX=/usr \
      -DCMAKE_BUILD_TYPE=Release  \
      -DBUILD_STATIC_LIBS=OFF     \
      -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/qpdf-11.2.0 \
      .. &&
make

To test the results, issue: ctest.

Now, as the root user:

make install

Contents

Installed Programs: fix-qdf, qpdf, and zlib-flate
Installed Library: libqpdf.so
Installed Directories: /usr/lib/cmake/qpdf, /usr/include/qpdf, and /usr/share/doc/qpdf-11.2.0

Short Descriptions

fix-qdf

is used to repair PDF files in QDF form after editing

qpdf

is used to convert one PDF file to another equivalent PDF file

zlib-flate

is a raw zlib compression program

libqpdf.so

contains the Qpdf API functions

qrencode-4.1.1

Introduction to qrencode

Qrencode is a fast and compact library for encoding data in a QR Code symbol, a 2D symbology that can be scanned by handheld terminals such as a mobile phone with a CCD sensor.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

  • Download (HTTP): https://fukuchi.org/works/qrencode/qrencode-4.1.1.tar.bz2

  • Download MD5 sum: de7185bcab635a34730e1b73d4efa705

  • Download size: 451 KB

  • Estimated disk space required: 5.0 MB (with documentation, add 5 MB for tests)

  • Estimated build time: less than 0.1 SBU, add 0.1 SBU for tests

Qrencode Dependencies

Recommended
Optional

Doxygen-1.9.6 for generating documentation, and SDL2-2.26.3 for tests

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/qrencode

Installation of qrencode

Install libqrencode by running the following commands:

./configure --prefix=/usr &&
make

If you have installed Doxygen-1.9.6, you can build the documentation by issuing:

doxygen

The tests must be run after installing the package.

Now, as the root user:

make install

If you have built the optional documentation, install it as the root user:

install -vdm 755 /usr/share/doc/qrencode-4.1.1 &&
mv html/* /usr/share/doc/qrencode-4.1.1

To test the results, if you have passed the --with-tests option to configure, issue: make check.

Command Explanations

--with-tests: This option allows building the test programs. It requires SDL2-2.26.3.

--without-tools: This option prevents building the qrencode executable, removing the need for libpng-1.6.39.

Contents

Installed Program: qrencode
Installed Library: libqrencode.so
Installed Directory: /usr/share/doc/qrencode-4.1.1 (optional)

Short Descriptions

qrencode

encodes input data in a QR Code and saves it as a PNG or EPS image

libqrencode.so

contains functions for encoding data in a QR code symbol

sassc-3.6.2

Introduction to sassc

SassC is a wrapper around libsass, a CSS pre-processor language.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/sassc

Installation of sassc

First, build the library:

tar -xf ../libsass-3.6.5.tar.gz &&
pushd libsass-3.6.5 &&

autoreconf -fi &&

./configure --prefix=/usr --disable-static &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Build the command line wrapper:

popd &&
autoreconf -fi &&

./configure --prefix=/usr &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Contents

Installed Programs: sassc
Installed Libraries: libsass.so
Installed Directories: /usr/include/sass

Short Descriptions

sassc

provides a command line interface to the libsass library

woff2-1.0.2

Introduction to WOFF2

WOFF2 is a library for converting fonts from the TTF format to the WOFF 2.0 format. It also allows decompression from WOFF 2.0 to TTF. The WOFF 2.0 format uses the Brotli compression algorithm to compress fonts suitable for downloading in CSS @font-face rules.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

WOFF2 Dependencies

Required

Brotli-1.0.9 and CMake-3.25.2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/woff2

Installation of WOFF2

Install WOFF2 by running the following commands:

mkdir out                           &&
cd    out                           &&
cmake -DCMAKE_INSTALL_PREFIX=/usr \
      -DCMAKE_BUILD_TYPE=Release .. &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Contents

Installed Program: None
Installed Libraries: libwoff2common.so, libwoff2dec.so and libwoff2enc.so
Installed Directory: /usr/include/woff2

Short Descriptions

libwoff2common.so

provides shared data used by the libwoff2dec and libwoff2enc libraries

libwoff2dec.so

is the WOFF2 decoder library

libwoff2enc.so

is the WOFF2 encoder library

Chapter 11. General Utilities

This chapter contains various utilities that do not fit conveniently into other chapters. Programs include some documentation generators, several utilities for manipulating text and graphics, programs for listing files, a program for entering PIN numbers and pass-phrases, and a connection manager.

Asciidoctor-2.0.18

Introduction to Asciidoctor

Asciidoctor is a fast, open source text processor and publishing toolchain for converting AsciiDoc content to HTML5, DocBook, PDF, and other formats.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Asciidoctor Dependencies

Required

Ruby-3.2.1

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/asciidoctor

Installation of Asciidoctor

Build the Ruby gem:

gem build asciidoctor.gemspec

The test suite needs many Ruby gems beyond the scope of BLFS.

Now, as the root user:

gem install asciidoctor-2.0.18.gem &&
install -vm644 man/asciidoctor.1 /usr/share/man/man1

Contents

Installed Programs: asciidoctor
Installed Libraries: None
Installed Directories: /usr/lib/ruby/gems/3.2.0/gems/asciidoctor-2.0.18 and /usr/lib/ruby/gems/3.2.0/doc/asciidoctor-2.0.18

Short Descriptions

asciidoctor

converts AsciiDoc source files to HTML, DocBook, and other formats

Bogofilter-1.2.5

Introduction to Bogofilter

The Bogofilter application is a mail filter that classifies mail as spam or ham (non-spam) by a statistical analysis of the message's header and content (body).

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Bogofilter Dependencies

Required

Berkeley DB-5.3.28

Recommended
Optional

lmdb-0.9.29, SQLite-3.40.1, xmlto-0.0.28, QDBM and TokyoCabinet

Note

If you do not install the recommended Gsl-2.7.1 package then a statically linked shipped version will be used instead.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/bogofilter

Installation of Bogofilter

Note

If you plan to change the version of your database library on an existing installation, or to change to a different database, read the warning at the top of the RELEASE.NOTES file.

Install Bogofilter by running the following commands:

./configure --prefix=/usr --sysconfdir=/etc/bogofilter &&
make

To test the results, issue make check.

Now, as the root user:

make install

Command Explanations

--with-database=: This switch allows you to change the default database from db to either qdbm, sqlite3 or tokyocabinet.

Contents

Installed Programs: bf_compact, bf_copy, bf_tar, bogofilter, bogolexer, bogotune, bogoupgrade and bogoutil
Installed Libraries: None
Installed Directories: /etc/bogofilter

Short Descriptions

bf_compact

creates a more compact bogofilter working directory with a dump/load cycle

bf_copy

copies a bogofilter working directory to another directory

bf_tar

bundles a bogofilter working directory in tar format and copies it to standard output

bogofilter

is a fast Bayesian spam filter

bogolexer

is used to separate messages into tokens and to test new versions of the lexer.l code

bogotune

attempts to find optimum parameter settings for bogofilter

bogoupgrade

upgrades the bogofilter database to the current version

bogoutil

dumps, loads, and maintains bogofilter database files

Compface-1.5.2

Introduction to Compface

Compface provides utilities and a library to convert from/to X-Face format, a 48x48 bitmap format used to carry thumbnails of email authors in a mail header.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/compface

Installation of Compface

Install Compface by running the following commands:

./configure --prefix=/usr --mandir=/usr/share/man &&
make

This package does not come with a test suite.

Now, as the root user:

make install &&
install -m755 -v xbm2xface.pl /usr/bin

Contents

Installed Programs: compface, uncompface and xbm2xface.pl
Installed Library: libcompface.{so,a}
Installed Directories: None

Short Descriptions

compface

is a filter for generating highly compressed representations of 48x48x1 face image files

uncompface

is an inverse filter which performs an inverse transformation with no loss of data

xbm2xface.pl

is a script to generate xfaces

libcompface.{so,a}

allows the compression and decompression algorithms to be used in other programs such as MTAs

desktop-file-utils-0.26

Introduction to Desktop File Utils

The Desktop File Utils package contains command line utilities for working with Desktop entries. These utilities are used by Desktop Environments and other applications to manipulate the MIME-types application databases and help adhere to the Desktop Entry Specification.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Desktop File Utils Dependencies

Required

GLib-2.74.5

Optional

Emacs-28.2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/desktop-file-utils

Installation of Desktop File Utils

Warning

If you are upgrading from a previous version of desktop-file-utils that used the Autotools method of installing and configuring the package, you must remove the desktop-file-edit symlink by using the following commands.

rm -fv /usr/bin/desktop-file-edit

Install Desktop File Utils by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release .. &&
ninja

This package does not come with a test suite.

Now, as the root user:

ninja install

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

Configuring Desktop File Utils

Configuration Information

The XDG Base Directory specification defines the standard locations for applications to place data and configuration files. These files can be used, for instance, to define the menu structure and menu items in a desktop environment.

The default location for configuration files to be installed is /etc/xdg, and the default locations for data files are /usr/local/share and /usr/share. These locations can be extended with the environment variables XDG_CONFIG_DIRS and XDG_DATA_DIRS, respectively. The GNOME, KDE and XFCE environments respect these settings.

When a package installs a .desktop file to a location in one of the base data directories, the database that maps MIME-types to available applications can be updated. For instance, the cache file at /usr/share/applications/mimeinfo.cache can be rebuilt by executing the following command as the root user:

install -vdm755 /usr/share/applications &&
update-desktop-database /usr/share/applications

Contents

Installed Programs: desktop-file-edit, desktop-file-install, desktop-file-validate and update-desktop-database
Installed Libraries: None
Installed Directories: None

Short Descriptions

desktop-file-edit

is used to modify an existing desktop file entry

desktop-file-install

is used to install a new desktop file entry. It is also used to rebuild or modify the MIME-types application database

desktop-file-validate

is used to verify the integrity of a desktop file

update-desktop-database

is used to update the MIME-types application database

dos2unix-7.4.4

Introduction to dos2unix

The dos2unix package contains an any to any text format converter.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/dos2unix

Installation of dos2unix

Build dos2unix by running the following commands:

make

To test the results, issue: make check.

Now, as the root user:

make install

Contents

Installed Program: dos2unix, mac2unix, unix2dos, and unix2mac
Installed Libraries: None
Installed Directories: /usr/share/doc/dos2unix-7.4.4

Short Descriptions

dos2unix

converts plain text files in DOS format to Unix format

mac2unix

converts plain text files in Mac format to Unix format

unix2dos

converts plain text files in Unix format to DOS format

unix2mac

converts plain text files in Unix format to Mac format

Graphviz-7.1.0

Introduction to Graphviz

The Graphviz package contains graph visualization software. Graph visualization is a way of representing structural information as diagrams of abstract graphs and networks. Graphviz has several main graph layout programs. It also has web and interactive graphical interfaces, auxiliary tools, libraries, and language bindings.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Graphviz Dependencies

Note

Graphviz basic usage does not need any libraries out of what is found in the LFS book. Its core rendering engine allows to generate several graphic formats, such as Postscript, SVG, VML, .fig, and Tk. Those formats can be converted to almost any other format using for example tools from ImageMagick-7.1.0-61. The dependencies below add the ability to generate graph images in bitmap format, to display the graph image on screen, to edit a graph by viewing the resulting image directly, or to view large graphs. Since Graphviz is a dependency of several other packages in this book, it is suggested to first build it without any dependencies, then to rebuild it when you have built enough packages to suit your needs.

Optional, for various bitmap outputs

Pango-1.50.12, with Cairo-1.17.6, Xorg Libraries, Fontconfig-2.14.2, and libpng-1.6.39, to generate images in bitmap SVG, postscript, PNG, and PDF formats, or displaying the image on screen. The PNG output is required for building gegl-0.4.40

Adding GTK+-2.24.33 with libjpeg-turbo-2.1.5.1 adds support for JPEG, BMP, TIF, and ICO formats, and allows displaying the image in a GTK+ window

GD Library may be used instead of Pango. It adds the ability to generate images in GIF, VRML, and GD formats, but Pango provides better outputs for the other formats, and is needed for displaying images

Other formats may be added with libwebp-1.3.0 (WebP support is considered experimental), DevIL, libLASi, and glitz

Optional, to load graphic images that may be displayed inside the nodes of a graph

libgs.so from ghostscript-10.00.0, librsvg-2.54.5, and Poppler-23.02.0

Optional, to build more tools

Freeglut-3.4.0 (with libglade-2.6.4, GtkGLExt, and libGTS, for building the smyrna large graph viewer, which is considered experimental), and Qt-5.15.8 (for building the gvedit graph editor.)

Optional (To Build Language Bindings)

SWIG-4.1.1 (SWIG must be installed or no bindings will be built), GCC-12.2.0 (for the go compiler), Guile-3.0.9, OpenJDK-19.0.2, Lua-5.4.4, PHP-8.2.3, Ruby-3.2.1, Tk-8.6.13, Io, Mono, OCaml, and R

Optional (building tools)

Criterion (framework for tests) and Electric Fence

Optional (for building the pdf documentation)

ghostscript-10.00.0 (for the ps2pdf command)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/graphviz

Installation of Graphviz

Install Graphviz by running the following commands:

sed -i '/LIBPOSTFIX="64"/s/64//' configure.ac &&

./autogen.sh              &&
./configure --prefix=/usr \
            --docdir=/usr/share/doc/graphviz-7.1.0

Note

A warning is generated by autogen.sh because the build tree is not a git repository. As a result, the build date is set to 0. To get a meaningful date in the version string, you can run:

sed -i "s/0/$(date +%Y%m%d)/" builddate.h

Whether or not you fix the date, proceed to compile the package:

make

This package does not come with a test suite that provides meaningful results.

Now, as the root user:

make install

Command Explanations

sed ... configure.ac: This command is needed to avoid installing files in /usr/lib64.

--with-javaincludedir="$JAVA_HOME/include -I$JAVA_HOME/include/linux": If you have built OpenJDK-19.0.2 in /opt, and you want to build the JAVA bindings, it is necessary to specify the location of the JAVA header files to configure. The configure switch is designed for only one directory, but two directories need to be included. This is possible nevertheless by using the -I switch inside the variable.

--with-webp: Even if libwebp-1.3.0 is installed, it is not included in the build without this option.

--with-smyrna: Even if the needed dependencies are installed, the interactive graph viewer smyrna is not built without this option.

Configuring Graphviz

Config Files

/usr/lib/graphviz/config

Configuration Information

There are no specific configuration requirements for Graphviz. You may consider installing the additional plugins and tools available from the download page at https://graphviz.org/download/source/ for additional capabilities. If additional plugins are installed, you can run dot -c (as the root user) to update the config file in /usr/lib/graphviz.

Contents

Installed Programs: acyclic, bcomps, ccomps, circo, cluster, dijkstra, dot, dot2gxl, dot_builtins, edgepaint, fdp, gc, gml2gv, graphml2gv, gv2gml, gv2gxl, gvcolor, gvedit, gvgen, gvmap, gvmap.sh, gvpack, gvpr, gxl2dot, gxl2gv, mm2gv, neato, nop, osage, patchwork, prune, sccmap, sfdp, tred, twopi, unflatten, and vimdot
Installed Libraries: libcdt.so, libcgraph.so, libgvc.so, libgvpr.so, liblab_gamut.so, libpathplan.so, libxdot.so, and several plugins in /usr/lib/graphviz. There are also several in subdirectories of /usr/lib/{lua,perl5,php,python3.11,tcl8.6}. Unfortunately, some libraries are duplicated.
Installed Directories: /usr/include/graphviz, /usr/lib/graphviz, /usr/lib/tcl8.6/graphviz, /usr/share/doc/graphviz-7.1.0, and /usr/share/graphviz

Short Descriptions

acyclic

is a filter that takes a directed graph as input and outputs a copy of the graph with sufficient edges reversed to make the graph acyclic

bcomps

decomposes graphs into their biconnected components, printing the components to standard output

ccomps

decomposes graphs into their connected components, printing the components to standard output

circo

draws graphs using a circular layout

cluster

takes a graph in DOT format as input, finds node clusters and then augments the graph with this information

diffimg

(needs GD Library) generates an image where each pixel is the difference between the corresponding pixel in each of the two source images

dijkstra

reads a stream of graphs and for each computes the distance of every node from sourcenode

dot

draws directed graphs. It works well on DAGs and other graphs that can be drawn as hierarchies. It reads attributed graph files and writes drawings. By default, the output format dot is the input file with layout coordinates appended

dot2gxl

converts between graphs represented in GXL and in the DOT language. Unless a conversion type is specified using a flag, gxl2dot will deduce the type of conversion from the suffix of the input file, a .dot suffix causing a conversion from DOT to GXL, and a .gxl suffix causing a conversion from GXL to DOT

edgepaint

performs edge coloring to disambiguate crossing edges

fdp

draws undirected graphs using a spring model. It relies on a force-directed approach in the spirit of Fruchterman and Reingold

gc

is a graph analogue to wc in that it prints to standard output the number of nodes, edges, connected components or clusters contained in the input files. It also prints a total count for all graphs if more than one graph is given

gml2gv

converts a graph specified in the GML format to a graph in the GV (formerly DOT) format

graphml2gv

converts a graph specified in the GRAPHML format to a graph in the GV (formerly DOT) format

gv2gml

converts a graph specified in the GV format to a graph in the GML format

gv2gxl

converts a graph specified in the GV format to a graph in the GXL format

gvcolor

is a filter that sets node colors from initial seed values. Colors flow along edges from tail to head, and are averaged (as HSB vectors) at nodes

gvedit

provides a simple graph editor and viewer. It allows many graphs to be viewed at the same time. The text of each graph is displayed in its own text window

gvgen

generates a variety of simple, regularly-structured abstract graphs

gvmap

takes as input a graph in DOT format, finds node clusters and produces a rendering of the graph as a geographic-style map, with clusters highlighted, in xdot format

gvmap.sh

is a pipeline for running gvmap

gvpack

reads in a stream of graphs, combines the graphs into a single layout, and produces a single graph serving as the union of the input graphs

gvpr

is a graph stream editor inspired by awk. It copies input graphs to its output, possibly transforming their structure and attributes, creating new graphs, or printing arbitrary information

gxl2dot

converts between graphs represented in GXL and in the DOT language. Unless a conversion type is specified using a flag, gxl2dot will deduce the type of conversion from the suffix of the input file, a .dot suffix causing a conversion from DOT to GXL, and a .gxl suffix causing a conversion from GXL to DOT

gxl2gv

converts between graphs represented in GXL and in the GV language

mm2gv

converts a sparse matrix of the Matrix Market format to a graph in the GV (formerly DOT) format

neato

draws undirected graphs using spring models. Input files must be formatted in the dot attributed graph language. By default, the output of neato is the input graph with layout coordinates appended

nop

reads a stream of graphs and prints each in pretty-printed (canonical) format on stdout. If no files are given, it reads from stdin

osage

draws clustered graphs. It takes any graph in DOT format as input

patchwork

draws clustered graphs using a squarified treemap layout. It takes any graph in DOT format as input

prune

reads directed graphs in the same format used by dot and removes subgraphs rooted at nodes specified on the command line via options

sccmap

decomposes digraphs into strongly connected components and an auxiliary map of the relationship between components. In this map, each component is collapsed into a node. The resulting graphs are printed to stdout

sfdp

draws undirected graphs using the spring model, but it uses a multi-scale approach to produce layouts of large graphs in a reasonably short time

tred

computes the transitive reduction of directed graphs, and prints the resulting graphs to standard output. This removes edges implied by transitivity. Nodes and subgraphs are not otherwise affected

twopi

draws graphs using a radial layout. Basically, one node is chosen as the center and put at the origin. The remaining nodes are placed on a sequence of concentric circles centered about the origin, each a fixed radial distance from the previous circle

unflatten

is a preprocessor to dot that is used to improve the aspect ratio of graphs having many leaves or disconnected nodes. The usual layout for such a graph is generally very wide or tall

vimdot

is a simple script which launches the gvim or vim editor along with a GUI window showing the dot output of the edited file

libcdt.so

manages run-time dictionaries using standard container data types: unordered set/multiset, ordered set/multiset, list, stack, and queue

libcgraph.so

supports graph programming by maintaining graphs in memory and reading and writing graph files. Graphs are composed of nodes, edges, and nested subgraphs

libgvc.so

provides a context for applications wishing to manipulate and render graphs. It provides command line parsing interfaces, common rendering code, and a plugin mechanism for renderers

libpathplan.so

contains functions to find the shortest path between two points in a simple polygon

libxdot.so

provides support for parsing and deparsing graphical operations specified by the xdot language

GTK-Doc-1.33.2

Introduction to GTK-Doc

The GTK-Doc package contains a code documenter. This is useful for extracting specially formatted comments from the code to create API documentation. This package is optional; if it is not installed, packages will not build the documentation. This does not mean that you will not have any documentation. If GTK-Doc is not available, the install process will copy any pre-built documentation to your system.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

GTK-Doc Dependencies

Required

docbook-xml-4.5, docbook-xsl-nons-1.79.2, itstool-2.0.7, and libxslt-1.1.37

Recommended
Optional

For tests: dblatex or fop-2.8 (XML PDF support), GLib-2.74.5, Which-2.21, and Python modules lxml-4.9.2, parameterized, and yelp-tools

Note

The optional python modules above can be easily installed with the pip3 command.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/gtk-doc

Installation of GTK-Doc

Install GTK-Doc by running the following commands:

autoreconf -fiv           &&
./configure --prefix=/usr &&
make

The test suite will hang if the package (or a previous version) is not already installed.

Now, as the root user:

make install

To test the results, issue: make check. Some tests will fail depending on optionally installed packages.

Contents

Installed Programs: gtkdocize, gtkdoc-check, gtkdoc-depscan, gtkdoc-fixxref, gtkdoc-mkdb, gtkdoc-mkhtml, gtkdoc-mkhtml2, gtkdoc-mkman, gtkdoc-mkpdf, gtkdoc-rebase, gtkdoc-scan, and gtkdoc-scangobj
Installed Libraries: None
Installed Directories: /usr/share/gtk-doc and /usr/share/cmake/GtkDoc

Short Descriptions

gtkdoc*

these are all shell, or Python scripts used by package Makefile scripts to generate documentation for the package being built

Highlight-4.4

Introduction to Highlight

Highlight is an utility that converts source code to formatted text with syntax highlighting.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Highlight Dependencies

Required

Boost-1.81.0 and Lua-5.4.4

Optional

Qt-5.15.8 (to build the GUI front-end)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/highlight

Installation of Highlight

For consistency, do not compress man pages.

sed -i '/GZIP/s/^/#/' makefile

To build Highlight run the following command:

make

To build the Qt5 GUI front-end, run the following command:

make doc_dir=/usr/share/doc/highlight-4.4/ gui

This package does not come with a test suite.

To install Highlight, run the following command as the root user:

make doc_dir=/usr/share/doc/highlight-4.4/ install

To install the GUI program, run the following command as the root user:

make install-gui

Command Explanations

doc_dir=/usr/share/doc/highlight-4.4/: installs the highlight documentation into a versioned directory. This parameter is also needed for make gui, because its value would be hardcoded into the gui executable. Note that the trailing / is necessary.

Contents

Installed Programs: highlight and highlight-gui (optional)
Installed Libraries: None
Installed Directories: /etc/highlight, /usr/share/doc/highlight-4.4, and /usr/share/highlight

Short Descriptions

highlight

is a universal source code to formatted text converter

highlight-gui

is the Qt5 interface to highlight.

ibus-1.5.27

Introduction to ibus

ibus is an Intelligent Input Bus. It is a new input framework for the Linux OS. It provides a fully featured and user friendly input method user interface.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Optional Download

ibus Dependencies

Required

DConf-0.40.0, ISO Codes-4.12.0, and Vala-0.56.4

Recommended
Optional

GTK+-3.24.36 (to build IM module for it), GTK-4.8.3 (to build IM module for it), D-Bus Python-1.3.2 and PyGObject-3.42.2 (both to build the Python support library), GTK-Doc-1.33.2, and libxkbcommon-1.5.0, Wayland-1.21.0 (both to build the Wayland support programs), and EmojiOne

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/ibus

Installation of ibus

If the optional Unicode Character Database was downloaded, install it now as the root user:

mkdir -p                /usr/share/unicode/ucd &&
unzip -uo ../UCD.zip -d /usr/share/unicode/ucd

Note

Be sure to also remove the --disable-unicode-dict in the configure step below.

Fix an issue with deprecated schema entries:

sed -i 's@/desktop/ibus@/org/freedesktop/ibus@g' \
    data/dconf/org.freedesktop.ibus.gschema.xml

Install ibus by running the following commands:

./configure --prefix=/usr              \
            --sysconfdir=/etc          \
            --disable-python2          \
            --disable-emoji-dict       \
            --disable-unicode-dict     \
            --disable-systemd-services &&
rm -f tools/main.c                     &&
make

To test the results, issue: make -k check. The test named ibus-compose fails because it uses some locales not installed in LFS. The test named ibus-keypress is known to fail in a Wayland based desktop environment. The test named xkb-latin-layouts is known to fail with a recent xkeyboard-config release. The test named test-override-ibus.py is known to fail if Python support library is enabled.

Now, as the root user:

make install &&
gzip -dfv /usr/share/man/man{{1,5}/ibus*.gz,5/00-upstream-settings.5.gz}

Command Explanations

--disable-emoji-dict: This switch disables the use of emoticon dictionaries. Omit if you installed the optional package.

--disable-unicode-dict: This switch disables the use of unicode dictionaries. Omit if you installed the optional Unicode Character Database.

rm -f tools/main.c: This command removes a generated file that was not removed when packaging.

--disable-gtk2: This switch disables building the GTK+ 2 immodule. Use it if you have not installed GTK+ 2.

--enable-gtk4: This switch enables building the GTK 4 immodule. Use it if you have installed GTK 4.

--enable-python-library: This switch enables building the Python support library. Use it if you have installed the optional dependencies.

--enable-wayland: This switch enables building the Wayland support programs. Use it if you have installed the optional dependencies.

--with-python=python3: This switch makes the configure script look for Python 3. Use it if you want to build the Python 3 support library alongside the Python 2 one.

--enable-gtk-doc: Use this parameter if GTK-Doc is installed and you wish to rebuild and install the API documentation.

gzip -dfv ...: Decompress installed man pages in accordance with other man pages.

Configuring Ibus

If GTK+-3 or GTK+-2 are installed and --disable-gtk{3,2} are not used, the ibus IM module for GTK+-3 or GTK+-2 will be installed. As the root user, update a cache file of GTK+-3 or GTK+-2 so the GTK-based applications can find the newly installed IM module and use ibus as an input method:

gtk-query-immodules-3.0 --update-cache

The command above updates the cache file for GTK+-3. For GTK+-2, use gtk-query-immodules-2.0 instead of gtk-query-immodules-3.0. GTK-4 does not require a cache file for IM modules.

Contents

Installed Programs: ibus, ibus-daemon, and ibus-setup
Installed Library: libibus-1.0.so and im-ibus.so (GTK+ Immodule)
Installed Directories: /etc/dconf/db/ibus.d, /usr/include/ibus-1.0, /usr/share/gtk-doc/html/ibus, and /usr/share/ibus

Short Descriptions

ibus-daemon

is the Intelligent Input Bus Daemon

ibus-setup

is the GTK+ program used to configure the ibus-daemon

libibus-1.0.so

contains the ibus API functions

ImageMagick-7.1.0-61

Introduction to ImageMagick

ImageMagick is a collection of tools and libraries to read, write, and manipulate an image in various image formats. Image processing operations are available from the command line. Bindings for Perl and C++ are also available.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Note

The ImageMagick source releases are updated frequently and the version shown above may no longer be available from the download locations. You can download a more recent version and use the existing BLFS instructions to install it. Chances are that it will work just fine, but this has not been tested by the BLFS team. If the package version shown above is not available from the locations shown above, you can download it from the BLFS package server at Oregon State University: ftp://ftp.osuosl.org/pub/blfs/conglomeration/ImageMagick/.

ImageMagick Dependencies

Recommended

The optional dependencies listed below should be installed if you need support for the specific format or the conversion tool the dependency provides. Additional information about the dependencies can be found in the Install-unix.txt file located in the source tree as well as issuing the ./configure --help command. A summary of this information, as well as some additional notes can be viewed on-line at https://imagemagick.org/script/install-source.php.

Optional System Utilities

Clang from LLVM-15.0.7, Cups-2.4.2, cURL-7.88.1, FFmpeg-5.1.2, fftw-3.3.10, p7zip-17.04 (LZMA), SANE-1.0.32, Wget-1.21.3, xdg-utils-1.1.3, xterm-379, Dmalloc, Electric Fence and PGP or GnuPG-2.4.0 (you'll have to do some hacking to use GnuPG), Profiles

Optional Graphics Libraries

JasPer-4.0.0, Little CMS-1.19 or Little CMS-2.14, libgxps-0.3.2, libjpeg-turbo-2.1.5.1, libpng-1.6.39, libraw-0.21.1 (RAW_R), librsvg-2.54.5, libtiff-4.5.0, libwebp-1.3.0, OpenJPEG-2.5.0, Pango-1.50.12, DjVuLibre, FlashPIX (libfpx), FLIF, JBIG-KIT, libheif with libde265 (both needed if converting macOS heic images), libjxl, libraqm, Liquid Rescale, OpenEXR, and RALCGM (or ralcgm)

Optional Graphics Utilities

Dejavu fonts, ghostscript-10.00.0, Gimp-2.10.32, Graphviz-7.1.0, Inkscape-1.2.2, Blender, corefonts, GhostPCL, Gnuplot, POV-Ray, and Radiance

Optional Conversion Tools

Enscript-1.6.6, Potrace-1.16, texlive-20220321 (or install-tl-unx) AutoTrace, GeoExpress Command Line Utilities, AKA MrSID Utilities (binary package), hp2xx, libwmf, UniConvertor, ufraw (for dng files, see https://imagemagick.org/script/formats.php for some special switches) and Utah Raster Toolkit (or URT-3.1b)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/imagemagick

Installation of ImageMagick

Install ImageMagick by running the following commands:

./configure --prefix=/usr     \
            --sysconfdir=/etc \
            --enable-hdri     \
            --with-modules    \
            --with-perl       \
            --disable-static  &&
make

Now, as the root user:

make DOCUMENTATION_PATH=/usr/share/doc/imagemagick-7.1.0 install

To test the installation, issue: make check. Note that the EPS, PS, and PDF tests require a working Ghostscript. One test in 'make check' needs Helvetica from Ghostscript Standard Fonts, which are optionally installed in ghostscript-10.00.0 - that test, and one other, might fail, but all the validation can still pass.

Command Explanations

--enable-hdri: Enables building of a high dynamic range version of ImageMagick.

--with-modules: Enables support for dynamically loadable modules.

--with-perl: Enables building and installing of PerlMagick.

--disable-static: This switch prevents installation of static versions of the libraries.

--with-gslib: Enables support to use the Ghostscript shared library.

--with-rsvg: Enables support to use the librsvg library.

--with-autotrace: Enables support to use the Autotrace library.

--with-wmf: Enables support to use the libwmf library.

--with-gvc: Enables support to use GraphViz.

--with-windows-font-dir= <Some/Directory>: This option specifies the directory where the Windows CoreFonts are installed.

--with-dejavu-font-dir= <Some/Directory>: This option specifies the directory where the DejaVu fonts are installed.

The options and parameters listed above are the only ones you should have to pass to the configure script to activate all the delegate dependencies. All other dependencies will be automatically detected and utilized in the build if they are installed.

Contents

Installed Programs: magick, Magick++-config, MagickCore-config, and MagickWand-config. (animate, compare, composite, conjure, convert, display, identify, import, magick-script, mogrify, montage, and stream are all symbolic links to magick)
Installed Libraries: libMagickCore-7.Q16HDRI.so, libMagickWand-7.Q16HDRI.so and libMagick++-7.Q16HDRI.so
Installed Directories: /etc/ImageMagick-7, /usr/include/ImageMagick-7, /usr/lib/ImageMagick-7.1.0, /usr/lib/perl5/site_perl/5.36/{,auto}/Image/Magick, /usr/share/doc/ImageMagick-7.1.0, and /usr/share/ImageMagick-7

Short Descriptions

animate

animates a sequence of images

compare

compares an image to a reconstructed image

composite

composites various images into the given base image

conjure

processes a MSL script to create an image

convert

converts image(s) from one format to another

display

displays an image

identify

describes the format and characteristics of an image file

import

captures an X window

magick

convert between image formats as well as resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample and much more

Magick{++,Core,Wand}-config

show information about the installed versions of the ImageMagick libraries

mogrify

transforms an image

montage

composites various images into a new image

stream

streams one or more pixel components of an image or portion of the image to your choice of storage formats

Image::Magick

allows the reading, manipulation and writing of a large number of image file formats using the ImageMagick library. Run make in the PerlMagick/demo directory of the package source tree after the package is installed to see a nice demo of the module's capabilities

libMagickCore-7.Q16HDRI.so

provides the C API for ImageMagick

libMagickWand-7.Q16HDRI.so

is the recommended C API for ImageMagick. Unlike the MagickCore API it uses only a few opaque types

libMagick++-7.Q16HDRI.so

provides the C++ API for ImageMagick

ISO Codes-4.12.0

Introduction to ISO Codes

The ISO Codes package contains a list of country, language and currency names and it is used as a central database for accessing this data.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/iso-codes

Installation of ISO Codes

The directory is called iso-codes-4.12.0.

Install ISO Codes by running the following commands:

./configure --prefix=/usr &&
make

To test the results, issue: make check.

Note

If you install ISO codes over a previous installed version, the install step will fail when creating some symlinks. In order to properly update them, run:

sed -i '/^LN_S/s/s/sfvn/' */Makefile

Now, as the root user:

make install

Contents

Installed Programs: None
Installed Libraries: None
Installed Directory: /usr/share/iso-codes, /usr/share/xml/iso-codes

lsof-4.95.0

Introduction to lsof

The lsof package is useful to LiSt Open Files for a given running application or process.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

lsof Dependencies

Required

libtirpc-1.3.3

Optional

Nmap-7.93 (with a symbolic link nc pointing to ncat in /usr/bin; used in tests)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/lsof

Kernel Configuration

To run the tests, the following option should be enabled in the kernel configuration:

General setup  --->
  [*] POSIX Message Queues    [CONFIG_POSIX_MQUEUE]

Installation of lsof

Install lsof by running the following commands:

./Configure -n linux &&
make

The tests should be run as the root user. They require that the POSIX message queues are enabled in the kernel, and that Nmap-7.93 be installed with a symbolic link /usr/bin/nc pointing to ncat.

make check

One test, case-20-ux-socket-endpoint, is known to fail. Other test may fail if the tests are run in a script.

Now, as the root user:

install -v -m4755 -o root -g root lsof /usr/bin &&
install -v lsof.8 /usr/share/man/man8

Command Explanations

./Configure -n linux: Avoid AFS, customization, and inventory checks, and use the linux dialect.

install -m4755 ...: lsof should be suid root to allow users to list all files. This may be a security threat on some systems. In that case change to -m755 and use sudo to run the program.

Contents

Installed Program: lsof
Installed Libraries: None
Installed Directories: None

Short Descriptions

lsof

lists open files for running processes

mandoc-1.14.6

Introduction to mandoc

mandoc is an utility to format manual pages.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of mandoc

Many utilities provided by mandoc conflicts with Man-DB in LFS. Only build the mandoc command:

./configure &&
make mandoc

To test the package, issue: make regress.

Now, as the root user:

install -vm755 mandoc   /usr/bin &&
install -vm644 mandoc.1 /usr/share/man/man1

Contents

Installed Programs: mandoc

Short Descriptions

mandoc

Formats manual pages

pinentry-1.2.1

Introduction to PIN-Entry

The PIN-Entry package contains a collection of simple PIN or pass-phrase entry dialogs which utilize the Assuan protocol as described by the Ägypten project. PIN-Entry programs are usually invoked by the gpg-agent daemon, but can be run from the command line as well. There are programs for various text-based and GUI environments, including interfaces designed for Ncurses (text-based), and for the common GTK and Qt toolkits.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

PIN-Entry Dependencies

Required

libassuan-2.5.5 and libgpg-error-1.46

Optional

Emacs-28.2, FLTK-1.3.8, Gcr-3.41.1, GTK+-2.24.33, libsecret-0.20.5, Qt-5.15.8, and efl

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/pinentry

Installation of PIN-Entry

Install PIN-Entry by running the following commands:

./configure --prefix=/usr --enable-pinentry-tty &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Command Explanations

--enable-inside-emacs=yes/no: Default is no.

--enable-pinentry-qt=yes/no: Default is yes.

--enable-pinentry-gtk2=yes/no: Default is yes. Even if other pinentry-* is installed, pinentry will be a symlink to pinentry-gtk-2.

--enable-pinentry-gnome3=yes/no: Default is yes. Actually, it uses Gcr for the pinentry dialog.

--enable-pinentry-tty: Default is 'maybe'.

Contents

Installed Programs: pinentry (symlink), pinentry-curses, pinentry-emacs, pinentry-fltk, pinentry-gnome3, pinentry-gtk-2, pinentry-qt, and pinentry-tty
Installed Libraries: None
Installed Directory: None

Short Descriptions

pinentry

is a symbolic link to the default PIN-Entry program

pinentry-curses

is an Ncurses text-based PIN-Entry helper program

pinentry-emacs

is an Emacs version of the PIN-Entry helper program

pinentry-fltk

is a FLTK PIN-Entry helper program

pinentry-gnome3

is a GNOME-3 PIN-Entry helper program

pinentry-gtk-2

is a GTK+2 PIN-Entry program program

pinentry-qt

is a Qt4 or 5 PIN-Entry helper program

pinentry-tty

is a tty PIN-Entry helper program

Rep-gtk-0.90.8.3

Introduction to Rep-gtk

The rep-gtk package contains a Lisp and GTK binding. This is useful for extending GTK-2 and GDK libraries with Lisp. Starting at rep-gtk-0.15, the package contains the bindings to GTK and uses the same instructions. Both can be installed, if needed.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Rep-gtk Dependencies

Required

GTK+-2.24.33 and librep-0.92.7

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/rep-gtk

Installation of Rep-gtk

Install rep-gtk by running the following commands:

./autogen.sh --prefix=/usr &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Contents

Installed Programs: None
Installed Libraries: Lisp bindings
Installed Directory: /usr/include/rep-gtk and /usr/lib/rep/gui

Short Descriptions

Lisp bindings

are libraries stored in /usr/lib/rep/gui/ that assist communication between Lisp and the GTK libraries

Screen-4.9.0

Introduction to Screen

Screen is a terminal multiplexor that runs several separate processes, typically interactive shells, on a single physical character-based terminal. Each virtual terminal emulates a DEC VT100 plus several ANSI X3.64 and ISO 2022 functions and also provides configurable input and output translation, serial port support, configurable logging, multi-user support, and many character encodings, including UTF-8. Screen sessions can be detached and resumed later on a different terminal.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Screen Dependencies

Optional

Linux-PAM-1.5.2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/screen

Installation of Screen

Install Screen by running the following commands:

sh autogen.sh                                 &&
./configure --prefix=/usr                     \
            --infodir=/usr/share/info         \
            --mandir=/usr/share/man           \
            --with-socket-dir=/run/screen     \
            --with-pty-group=5                \
            --with-sys-screenrc=/etc/screenrc &&

sed -i -e "s%/usr/local/etc/screenrc%/etc/screenrc%" {etc,doc}/* &&
make

This package does not come with a test suite.

Now, as the root user:

make install &&
install -m 644 etc/etcscreenrc /etc/screenrc

Command Explanations

--with-socket-dir=/run/screen: This option places the per-user sockets in a standard location.

--with-sys-screenrc=/etc/screenrc: This option places the global screenrc file in /etc.

--with-pty-group=5: This option sets the gid to the value used by LFS.

sed -i -e "s%/usr/local/etc/screenrc%/etc/screenrc%" {etc,doc}/*: This command corrects the configuration and documentation files to the location that is used here for the global screenrc file.

Configuring Screen

Config Files

/etc/screenrc and ~/.screenrc

Configuration Information

You may want to look at the example configuration file that was installed and customize it for your needs.

Contents

Installed Program: screen (symlink) and screen-4.9.0
Installed Libraries: None
Installed Directory: /usr/share/screen and /run/screen

Short Descriptions

screen

is a terminal multiplexor with VT100/ANSI terminal emulation

shared-mime-info-2.2

Introduction to Shared Mime Info

The Shared Mime Info package contains a MIME database. This allows central updates of MIME information for all supporting applications.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

Shared Mime Info Dependencies

Required

GLib-2.74.5 and libxml2-2.10.3

Optional

xmlto-0.0.28

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/shared-mime-info

Installation of Shared Mime Info

Install Shared Mime Info by running the following commands:

If you wish to run the test suite, you must first extract the xdgmime tarball into the current directory, and compile it so that meson can find it:

tar -xf ../xdgmime.tar.xz &&
make -C xdgmime

Now build the package:

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release -Dupdate-mimedb=true .. &&
ninja

If you have followed the instructions above to build xdgmime, to test the result issue ninja test.

Now, as the root user:

ninja install

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

-Dupdate-mimedb=true: This parameter tells the build system to run update-mime-database during installation. Otherwise, this must be done manually in order to be able to use the MIME database.

Contents

Installed Program: update-mime-database
Installed Library: None
Installed Directory: /usr/share/mime

Short Descriptions

update-mime-database

assists in adding MIME data to the database

Sharutils-4.15.2

Introduction to Sharutils

The Sharutils package contains utilities that can create 'shell' archives.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/sharutils

Installation of Sharutils

Fix a heap buffer overflow, and an issue exposed by GCC-10:

sed -i 's/BUFSIZ/rw_base_size/' src/unshar.c &&
sed -i '/program_name/s/^/extern /' src/*opts.h

Install Sharutils by running the following commands:

sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c        &&
echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h &&

./configure --prefix=/usr &&
make

To test the results, issue make check.

Now, as the root user:

make install

Contents

Installed Programs: shar, unshar, uudecode and uuencode
Installed Libraries: None
Installed Directories: None

Short Descriptions

shar

creates "shell archives" (or shar files) which are in text format and can be mailed

unshar

unpacks a shar file

uudecode

reads a file (or by default the standard input) and writes an encoded version to the standard output. The encoding uses only printing ASCII characters

uuencode

reads a file (or by default the standard input) and decodes the uuencoded version to the standard output

telepathy-mission-control-5.16.6

Introduction to Telepathy Mission Control

Telepathy Mission Control is an account manager and channel dispatcher for the Telepathy framework, allowing user interfaces and other clients to share connections to real-time communication services without conflicting.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Telepathy Mission Control Dependencies

Required

telepathy-glib-0.24.2

Recommended
Optional

D-Bus Python-1.3.2 (for the twisted tests), GTK-Doc-1.33.2, UPower-1.90.0, and Twisted (for the twisted tests)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/telepathy-mission-control

Installation of Telepathy Mission Control

Install Telepathy Mission Control by running the following commands:

PYTHON=python3 \
./configure --prefix=/usr --disable-static &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

PYTHON=python3: prevents using Python2 if it is installed.

--disable-static: This switch prevents installation of static versions of the libraries.

--enable-gtk-doc: Use this parameter if GTK-Doc is installed and you wish to rebuild and install the API documentation.

Contents

Installed Programs: mc-tool, mc-wait-for-name and mission-control-5 (library executable)
Installed Libraries: libmission-control-plugins.so
Installed Directories: /usr/include/mission-control-5.5 and /usr/share/gtk-doc/html/mission-control-plugins

Short Descriptions

mc-tool

is a command line tool used to manipulate Mission Control accounts

mc-wait-for-name

waits for a D-Bus bus name that will be provided automatically by the desktop session

mission-control-5

is a D-Bus service which runs on the session bus to implement AccountManager and ChannelDispatcher services described in the Telepathy D-Bus specification

libmission-control-plugins.so

contains Telepathy Mission Control plugin API functions

tidy-html5-5.8.0

Introduction to Tidy HTML5

The Tidy HTML5 package contains a command line tool and libraries used to read HTML, XHTML and XML files and write cleaned up markup. It detects and corrects many common coding errors and strives to produce visually equivalent markup that is both W3C compliant and compatible with most browsers.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Tidy HTML5 Dependencies

Required

CMake-3.25.2

Recommended

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/tidy

Installation of Tidy HTML5

Install Tidy HTML5 by running the following commands:

cd build/cmake &&

cmake -DCMAKE_INSTALL_PREFIX=/usr \
      -DCMAKE_BUILD_TYPE=Release  \
      -DBUILD_TAB2SPACE=ON        \
      ../..    &&

make

This package does not come with a test suite.

Now, as the root user:

make install &&
rm -fv /usr/lib/libtidy.a &&
install -v -m755 tab2space /usr/bin

Command Explanations

-DCMAKE_BUILD_TYPE=Release: This switch is used to build the release library without any debug `assert` in the code.

-DBUILD_TAB2SPACE=ON: This switch is used to enable building the tab2space utility.

Configuring Tidy HTML5

Config Files

The absolute path of the file specified in HTML_TIDY.

Configuration Information

The default configuration options can be set in the file defined in HTML_TIDY. Additional configuration options can be passed to tidy via command line parameters or the -config <file> parameter.

Contents

Installed Programs: tab2space and tidy
Installed Library: libtidy.so
Installed Directory: /usr/share/doc/tidy-5.8.0

Short Descriptions

tab2space

is a utility to expand tabs and ensure consistent line endings

tidy

validates, corrects, and pretty-prints HTML files

libtidy.so

library provides the Tidy HTML5 API functions to tidy and can also be called by other programs

Time-1.9

Introduction to Time

The time utility is a program that measures many of the CPU resources, such as time and memory, that other programs use. The GNU version can format the output in arbitrary ways by using a printf-style format string to include various resource measurements.

Although the shell has a builtin command providing similar functionalities, this utility is required by the LSB.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/time

Installation of Time

Install Time by running the following commands:

./configure --prefix=/usr &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Contents

Installed Program: time
Installed Library: None
Installed Directory: None

Short Descriptions

time

reports various statistics about an executed command

tree-2.1.0

Introduction to tree

The tree application is useful to display a dictionary tree's contents, including files, directories, and links.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/tree

Installation of tree

Install tree by running the following commands:

make

This package does not come with a test suite.

Now, as the root user:

make PREFIX=/usr MANDIR=/usr/share/man install &&
chmod -v 644 /usr/share/man/man1/tree.1

Contents

Installed Program: tree
Installed Libraries: None
Installed Directories: None

Short Descriptions

tree

displays a directory tree in a terminal

unixODBC-2.3.11

Introduction to unixODBC

The unixODBC package is an Open Source ODBC (Open DataBase Connectivity) sub-system and an ODBC SDK for Linux, Mac OSX, and UNIX. ODBC is an open specification for providing application developers with a predictable API with which to access data sources. Data sources include optional SQL Servers and any data source with an ODBC Driver. unixODBC contains the following components used to assist with the manipulation of ODBC data sources: a driver manager, an installer library and command line tool, command line tools to help install a driver and work with SQL, drivers and driver setup libraries.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

unixODBC Dependencies

Optional

Mini SQL and Pth-2.0.7

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/unixodbc

Installation of unixODBC

Install unixODBC by running the following commands:

./configure --prefix=/usr \
            --sysconfdir=/etc/unixODBC &&
make

This package does not come with a test suite.

Now, as the root user:

make install &&

find doc -name "Makefile*" -delete                &&
chmod 644 doc/{lst,ProgrammerManual/Tutorial}/*   &&

install -v -m755 -d /usr/share/doc/unixODBC-2.3.11 &&
cp      -v -R doc/* /usr/share/doc/unixODBC-2.3.11

Command Explanations

--enable-drivers: This parameter enables building the drivers that were installed by default in previous versions.

--enable-drivers-conf: This parameter enables building the driver configuration libraries that were installed by default in previous versions.

Configuring unixODBC

Config Files

/etc/unixODBC/*

Configuration Information

The files in /etc/unixODBC are meant to be configured by the system administrator (or the ODBC site administrator if appropriate privileges are granted to /etc/unixODBC). These files are not meant to be directly edited. The ODBC installer library is responsible for reading and writing the unixODBC config files.

Unfortunately, there are not many man, or any info pages for the various programs available in the unixODBC package. Along with the information in the Short Descriptions below and the documentation installed in /usr/share/doc/unixODBC-2.3.11, there are many README files throughout the source tree where the use and functionality of the programs can be found. Additionally, you can use the parameter -? for syntax and usage information. Lastly, the unixODBC web site at http://www.unixodbc.org/ has very good information.

Contents

Installed Programs: dltest, isql, iusql, odbc_config, odbcinst, and slencheck
Installed Libraries: libodbc.so, libodbccr.so, and libodbcinst.so
Installed Directories: /etc/unixODBC and /usr/share/doc/unixODBC-2.3.11

Short Descriptions

dltest

is a utility used to check a shared library to see if it can be loaded and if a given symbol exists in it

isql

is a utility which can be used to submit SQL to a data source and to format/output results. It can be used in batch or interactive mode

iusql

provides the same functionality as the isql program

odbc_config

is used to find out details about the installation of the unixODBC package

odbcinst

is a utility created for install script/RPM writers. It is a command line interface to key functionality in the libodbcinst library. It does not copy any files (i.e., libraries) but it will modify the ODBC System Information for the user

slencheck

is a utility which attempts to check whether an ODBC driver was built with 32-bit or 64-bit SQLLEN types

Xdg-user-dirs-0.18

Introduction to Xdg-user-dirs

Xdg-user-dirs is a tool to help manage well known user directories like the desktop folder and the music folder. It also handles localization (i.e. translation) of the filenames.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/xdg-user-dirs

Installation of Xdg-user-dirs

Install xdg-user-dirs by running the following commands:

./configure --prefix=/usr --sysconfdir=/etc &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Configuring Xdg-user-dirs

Config Files

~/.config/user-dirs.dirs, /etc/xdg/user-dirs.conf, and /etc/xdg/user-dirs.defaults. Those default locations can be overridden by XDG_CONFIG_HOME and XDG_CONFIG_DIRS

Contents

Installed Programs: xdg-user-dir and xdg-user-dirs-update
Installed Library: None
Installed Directory: None

Short Descriptions

xdg-user-dir

looks up the current path for one of the XDG user directories

xdg-user-dirs-update

creates localized versions of the user directories

Chapter 12. System Utilities

This chapter contains mainly hardware utilities. It also contains some applications used by other applications in the book for installation or configuration purposes.

AccountsService-22.08.8

Introduction to AccountsService

The AccountsService package provides a set of D-Bus interfaces for querying and manipulating user account information and an implementation of those interfaces based on the usermod(8), useradd(8) and userdel(8) commands.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

AccountsService Dependencies

Required

Polkit-122

Recommended
Optional

GTK-Doc-1.33.2 and xmlto-0.0.28

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/accountsservice

Installation of AccountsService

Install AccountsService by running the following commands:

mkdir build &&
cd build &&

meson --prefix=/usr             \
      --buildtype=release       \
      -Dadmin_group=adm         \
      -Delogind=true            \
      -Dsystemdsystemunitdir=no \
      .. &&
ninja

This package does not come with a test suite.

Now, as the root user:

ninja install

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

-Dadmin_group=adm: This switch sets the group for administrator accounts.

-Ddocbook=true: This switch enables building the D-Bus interface API documentation.

Configuring AccountsService

To allow users in the adm group to be listed as Administrators, execute the following commands as the root user:

cat > /etc/polkit-1/rules.d/40-adm.rules << "EOF"
polkit.addAdminRule(function(action, subject) {
   return ["unix-group:adm"];
   });
EOF

Contents

Installed Programs: accounts-daemon (in /usr/libexec)
Installed Libraries: libaccountsservice.so
Installed Directories: /usr/include/accountsservice-1.0, /usr/share/accountsservice, /usr/share/gtk-doc/html/libaccountsservice (optional), and /var/lib/AccountsService

Short Descriptions

accounts-daemon

is the AccountsService daemon

libaccountsservice.so

contains the AccountsService API functions

acpid-2.0.34

Introduction to acpid

The acpid (Advanced Configuration and Power Interface event daemon) is a completely flexible, totally extensible daemon for delivering ACPI events. It listens on netlink interface and when an event occurs, executes programs to handle the event. The programs it executes are configured through a set of configuration files, which can be dropped into place by packages or by the user.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/acpid

Installation of acpid

Install acpid by running the following commands:

./configure --prefix=/usr \
            --docdir=/usr/share/doc/acpid-2.0.34 &&
make

This package does not come with a test suite.

Now, as the root user:

make install                         &&
install -v -m755 -d /etc/acpi/events &&
cp -r samples /usr/share/doc/acpid-2.0.34

Configuring acpid

acpid is configured by user defined events. Place event files under /etc/acpi/events directory. If an event occurs, acpid recurses through the event files in order to see if the regex defined after "event" matches. If they do, action is executed.

The following brief example will suspend the system when the laptop lid is closed (it requires pm-utils-1.4.1):

cat > /etc/acpi/events/lid << "EOF"
event=button/lid
action=/etc/acpi/lid.sh
EOF

cat > /etc/acpi/lid.sh << "EOF"
#!/bin/sh
/bin/grep -q open /proc/acpi/button/lid/LID/state && exit 0
/usr/sbin/pm-suspend
EOF
chmod +x /etc/acpi/lid.sh

Unfortunately, not every computer labels ACPI events in the same way. To determine how your buttons are recognized, use the acpi_listen tool. Also, look in the samples directory under /usr/share/doc/acpid-2.0.34 for more examples.

Boot Script

To automatically start acpid when the system is rebooted, install the /etc/rc.d/init.d/acpid boot script from the blfs-bootscripts-20230101 package.

make install-acpid

Contents

Installed Programs: acpid, acpi_listen, and kacpimon
Installed Libraries: None
Installed Directories: /etc/acpi and /usr/share/doc/acpid-2.0.34

Short Descriptions

acpid

is a program that listens for ACPI events and executes the rules that match the received event

acpi_listen

is a simple tool which connects to acpid and listens for events

kacpimon

is a monitor program that connects to three sources of ACPI events (events file, netlink and input layer) and then reports on what it sees while it is connected

at-3.2.5

Introduction to at

The at package provide delayed job execution and batch processing. It is required for Linux Standards Base (LSB) conformance.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

at Dependencies

Required

An MTA

Optional

Linux-PAM-1.5.2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/at

Installation of at

Before building at, as the root user you should create the group and user atd which will run the atd daemon:

groupadd -g 17 atd                                                  &&
useradd -d /dev/null -c "atd daemon" -g atd -s /bin/false -u 17 atd

Install at with the following commands:

./configure --with-daemon_username=atd        \
            --with-daemon_groupname=atd       \
            --with-jobdir=/var/spool/atjobs   \
            --with-atspool=/var/spool/atspool \
            SENDMAIL=/usr/sbin/sendmail       &&
make -j1

To test the results, issue: make test.

Now, as the root user:

make install docdir=/usr/share/doc/at-3.2.5 \
             atdocdir=/usr/share/doc/at-3.2.5

Configuring at

Config Files

/etc/at.allow and /etc/at.deny determines who can submit jobs via at or batch.

Linux PAM Configuration

If At has been built with Linux PAM support, you need to create a PAM configuration file, to get it working correctly with BLFS.

Issue the following commands as the root user to create the configuration file for Linux PAM:

cat > /etc/pam.d/atd << "EOF"
# Begin /etc/pam.d/atd

auth required pam_unix.so
account required pam_unix.so
password required pam_unix.so
session required pam_unix.so

# End /etc/pam.d/atd
EOF

Boot Script

Install the /etc/init.d/atd init script from the blfs-bootscripts-20230101 package.

make install-atd

Contents

Installed Programs: at, atd, atq (symlink), atrm (symlink), atrun, and batch
Installed Libraries: None
Installed Directories: /usr/share/doc/at-3.2.5

Short Descriptions

at

queues, examines or deletes jobs for later execution

atd

is the daemon that runs jobs queued for later execution

atq

lists the user's pending jobs, or all jobs, if superuser

atrm

deletes jobs, identified by their job number

atrun

runs jobs queued for later execution

batch

is a script that executes commands when system load levels permit

autofs-5.1.8

Introduction to Autofs

Autofs controls the operation of the automount daemons. The automount daemons automatically mount filesystems when they are accessed and unmount them after a period of inactivity. This is done based on a set of pre-configured maps.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Autofs Dependencies

Required

libtirpc-1.3.3 and rpcsvc-proto-1.4.3

Optional

nfs-utils-2.6.2, libnsl-2.0.0, libxml2-2.10.3, MIT Kerberos V5-1.20.1, OpenLDAP-2.6.4 (client only), and Cyrus SASL-2.1.28

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/autofs

Kernel Configuration

Verify that automounter kernel support has been enabled:

File systems --->
  <*/M> Kernel automounter support (supports v3, v4, and v5) [CONFIG_AUTOFS_FS]

Optionally, enable the following options in the kernel configuration:

File systems  --->
  [*] Network File Systems  --->                                      [CONFIG_NETWORK_FILESYSTEMS]
    <*/M> NFS client support                                          [CONFIG_NFS_FS]
    <*/M> SMB3 and CIFS support (advanced network filesystem)         [CONFIG_CIFS]

Recompile and install the new kernel, if necessary.

Installation of Autofs

First fix an issue introduced by glibc-2.36:

grep -rl linux/fs modules | xargs sed -i "/linux\/fs/d"

Install Autofs by running the following commands:

./configure --prefix=/usr             \
            --with-mapdir=/etc/autofs \
            --with-libtirpc           \
            --without-openldap        \
            --mandir=/usr/share/man &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Caution

If autofs is already installed on your system, be sure to backup your configuration files. They'll be overwritten by the following command.

Install the default configuration files, still as the root user:

make install_samples

Command Explanations

--with-libtirpc: This switch forces the package to use libtirpc for RPC functionality instead of relying on implementation from Glibc, which was removed in LFS 8.1.

--without-openldap: This switch disables openldap if found. If openldap is desired, omit this switch. Note that openldap support in autofs requires MIT Kerberos V5-1.20.1.

Configuring Autofs

Config Files

/etc/sysconfig/autofs.conf, /etc/autofs/auto.master, /etc/autofs/auto.misc, and /etc/autofs/auto.net

Configuration Information

The installation process creates auto.master, auto.misc, auto.smb, and auto.net. Replace the auto.master file with the following commands as the root user:

mv /etc/autofs/auto.master /etc/autofs/auto.master.bak &&
cat > /etc/autofs/auto.master << "EOF"
# Begin /etc/autofs/auto.master

/media/auto  /etc/autofs/auto.misc  --ghost
#/home        /etc/autofs/auto.home

# End /etc/autofs/auto.master
EOF

This file creates a new media directory, /media/auto that will overlay any existing directory of the same name. In this example, the file, /etc/autofs/auto.misc, has a line:

                cd   -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom

that will mount a cdrom as /media/auto/cd if that directory is accessed. The --ghost option tells the automounter to create ghost versions (i.e. empty directories) of all the mount points listed in the configuration file regardless whether any of the file systems are actually mounted or not. This is very convenient and highly recommended, because it will show you the available auto-mountable file systems as existing directories, even when their file systems aren't currently mounted. Without the --ghost option, you'll have to remember the names of the directories. As soon as you try to access one of them, the directory will be created and the file system will be mounted. When the file system gets unmounted again, the directory is destroyed too, unless the --ghost option was given.

Note

An alternative method would be to specify another automount location such as /var/lib/auto/cdrom and create a symbolic link from /media/cdrom to the automount location.

The auto.misc file must be configured to your working hardware. The loaded configuration file should load your cdrom if /dev/cdrom is active or it can be edited to match your device setup. Examples for floppies are available in the file and easily activated. Documentation for this file is available using the man 5 autofs command.

In the second line, if enabled, a user's home directory would be mounted via NFS upon login. The /etc/home.auto would need to exist and have an entry similar to:

joe  example.org:/export/home/joe

where the directory /export/home/joe is exported via NFS from the system example.org. NFS shares are covered on the next page.

This package could also be used to mount SMB shares, however that feature is not configured in these instructions. For additional configuration information, see the man pages for auto.master(5). There are also web resources such as this AUTOFS HOWTO available.

Boot Script

autofs installs its own boot script, but it has no capability for logging or visual conformance with other BLFS scripts. It will be replaced by an enhanced version.

Install the /etc/init.d/autofs mount script included with the blfs-bootscripts-20230101 package.

make install-autofs

The time-out variable is set in /etc/sysconfig/autofs.conf. The installed file sets a default of 60 seconds of inactivity before unmounting the device. A much shorter time may be necessary to protect buffer writing to a floppy if users tend to remove the media prior to the timeout setting.

Contents

Installed Program: automount
Installed Libraries: lookup_dir.so, lookup_file.so, lookup_files.so, lookup_hosts.so, lookup_ldap.so (optional), lookup_multi.so, lookup_nis.so, lookup_program.so, lookup_userhome.so, lookup_yp.so, mount_afs.so, mount_autofs.so, mount_bind.so, mount_changer.so, mount_ext2.so, mount_ext3.so, mount_ext4.so, mount_generic.so, mount_nfs.so, mount_nfs4.so, parse_amd.so, and parse_sun.so
Installed Directories: /usr/lib/autofs and /etc/autofs

Short Descriptions

automount

is the daemon that performs the mounting when a request is made for the device

BlueZ-5.66

Introduction to BlueZ

The BlueZ package contains the Bluetooth protocol stack for Linux.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

BlueZ Dependencies

Required

dbus-1.14.6, GLib-2.74.5, and libical-3.0.16

Optional

docutils-0.19 (to generate man pages)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/bluez

Kernel Configuration

If you are building this package to use bluetooth devices (rather than as a build dependency), enable the following options in the kernel configuration, also the options in the Cryptographic API section if you intend to run the tests, and recompile the kernel if necessary:

General Setup --->
  [ /*] Configure standard kernel features (expert users)   [CONFIG_EXPERT]
    (Note: if CONFIG_EXPERT is disabled, the following options will be
           hidden and enabled implicitly.  We DO NOT recommend to enable
           CONFIG_EXPERT unless you are really an expert user.)
    [*] Enable timerfd() system call                        [CONFIG_TIMERFD]
    [*] Enable eventfd() system call                        [CONFIG_EVENTFD]

[*] Networking support --->                [CONFIG_NET]
  <*/M> Bluetooth subsystem support --->   [CONFIG_BT]
    <*/M> RFCOMM protocol support          [CONFIG_BT_RFCOMM]
    [*]   RFCOMM TTY support               [CONFIG_BT_RFCOMM_TTY]
    <*/M> BNEP protocol support            [CONFIG_BT_BNEP]
    [*]   Multicast filter support         [CONFIG_BT_BNEP_MC_FILTER]
    [*]   Protocol filter support          [CONFIG_BT_BNEP_PROTO_FILTER]
    <*/M> HIDP protocol support            [CONFIG_BT_HIDP]
        Bluetooth device drivers --->
          (Select the appropriate drivers for your Bluetooth hardware)

   <*/M> RF switch subsystem support ----  [CONFIG_RFKILL]

-*- Cryptographic API --->
   Crypto core or helper --- >
      <*/M> User-space cryptographic algorithm configuration   [CONFIG_CRYPTO_USER]
   Block ciphers --->
      <*/M> AES (Advanced Encryption Standard)                 [CONFIG_CRYPTO_AES]
   AEAD (authenticated encryption with associated data) ciphers --->
      <*/M> CCM (Counter with Cipher Block Chaining-MAC)       [CONFIG_CRYPTO_CCM]
   Hashes, digests, and MACs --->
      <*/M> CMAC (Cipher-based MAC)                            [CONFIG_CRYPTO_CMAC]
   Userspace interface --->
      <*/M> Hash algorithms                                    [CONFIG_CRYPTO_USER_API_HASH]
      <*/M> Symmetric key cipher algorithms                    [CONFIG_CRYPTO_USER_API_SKCIPHER]
      <*/M> AEAD cipher algorithms                             [CONFIG_CRYPTO_USER_API_AEAD]

Installation of BlueZ

Now, make some changes needed for SystemV systems:

patch -Np1 -i ../bluez-5.66-obexd_without_systemd-1.patch

Install BlueZ by running the following commands:

./configure --prefix=/usr         \
            --sysconfdir=/etc     \
            --localstatedir=/var  \
            --enable-library      \
            --disable-manpages    \
            --disable-systemd     &&
make

To test the results, issue: make check.

Now, as the root user:

make install &&
ln -svf ../libexec/bluetooth/bluetoothd /usr/sbin

Install the main configuration file as the root user:

install -v -dm755 /etc/bluetooth &&
install -v -m644 src/main.conf /etc/bluetooth/main.conf

If desired, install the API documentation as the root user:

install -v -dm755 /usr/share/doc/bluez-5.66 &&
install -v -m644 doc/*.txt /usr/share/doc/bluez-5.66

Command Explanations

--disable-manpages: This switch disables generating the manual pages because of the reliance on 'rst2man' in docutils. Remove this switch if you have docutils-0.19 installed and wish to generate the manual pages.

--enable-library: This switch enables building the BlueZ 4 compatibility library which is required by some applications.

--disable-systemd: This switch is needed because systemd is not part of LFS/BLFS. If you are using systemd, remove this switch.

ln -svf ../libexec/bluetooth/bluetoothd /usr/sbin: This command makes access to the bluetooth daemon more convenient.

Configuring BlueZ

Configuration Files

/etc/bluetooth/main.conf is installed automatically during the install. Additionally, there are three supplementary configuration files. /etc/sysconfig/bluetooth is installed as a part of the boot script below. In addition, you optionally can install the following, as the root user:

cat > /etc/bluetooth/rfcomm.conf << "EOF"
# Start rfcomm.conf
# Set up the RFCOMM configuration of the Bluetooth subsystem in the Linux kernel.
# Use one line per command
# See the rfcomm man page for options


# End of rfcomm.conf
EOF
cat > /etc/bluetooth/uart.conf << "EOF"
# Start uart.conf
# Attach serial devices via UART HCI to BlueZ stack
# Use one line per device
# See the hciattach man page for options

# End of uart.conf
EOF

Boot Script

To automatically start the bluetoothd daemon when the system is rebooted, install the /etc/rc.d/init.d/bluetooth bootscript from the blfs-bootscripts-20230101 package.

make install-bluetooth

Contents

Installed Programs: bluemoon, bluetoothctl, bluetoothd (symlink), btattach, btmon, hex2hcd, l2ping, l2test, mpris-proxy, and rctest
Installed Library: libbluetooth.so
Installed Directories: /etc/bluetooth, /usr/{include,libexec}/bluetooth, and /usr/share/doc/bluez-5.66

Short Descriptions

bluemoon

is a Bluemoon configuration utility

bluetoothctl

is the interactive Bluetooth control program

bluetoothd

is the Bluetooth daemon

btmon

provides access to the Bluetooth subsystem monitor infrastructure for reading HCI traces

hex2hcd

is used to convert a file needed by Broadcom devices to hcd (Broadcom bluetooth firmware) format

l2ping

is used to send a L2CAP echo request to the Bluetooth MAC address given in dotted hex notation

l2test

is a L2CAP testing program

rctest

is used to test RFCOMM communications on the Bluetooth stack

libbluetooth.so

contains the BlueZ 4 API functions

Bubblewrap-0.7.0

Introduction to Bubblewrap

Bubblewrap is a setuid implementation of user namespaces, or sandboxing, that provides access to a subset of kernel user namespace features. Bubblewrap allows user owned processes to run in an isolated environment with limited access to the underlying filesystem.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Bubblewrap Dependencies

Optional

libxslt-1.1.37 (to generate manual pages) and libseccomp-2.5.4 (built with python bindings, for tests)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/bubblewrap

Installation of Bubblewrap

Install Bubblewrap by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release .. &&
ninja

Next, if you desire to run the test suite, fix an issue caused by the merged-/usr configuration in LFS:

sed 's@symlink usr/lib64@ro-bind-try /lib64@' -i ../tests/libtest.sh

To test the results, issue: ninja test

Now, as the root user:

ninja install

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

Contents

Installed Program: bwrap
Installed Libraries: None
Installed Directories: None

Short Descriptions

bwrap

generates a sandbox for a program to run in

Colord-1.4.6

Introduction to Colord

Colord is a system service that makes it easy to manage, install, and generate color profiles. It is used mainly by GNOME Color Manager for system integration and use when no users are logged in.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Colord Dependencies

Required

dbus-1.14.6, GLib-2.74.5, Little CMS-2.14, Polkit-122, and SQLite-3.40.1

Recommended
Optional

gnome-desktop-43.2 and colord-gtk-0.3.0 (to build the example tools), DocBook-utils-0.6.14, GTK-Doc-1.33.2, libxslt-1.1.37, SANE-1.0.32, ArgyllCMS, and Bash Completion

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/colord

Installation of Colord

There should be a dedicated user and group to take control of the colord daemon after it has started. Issue the following commands as the root user:

groupadd -g 71 colord &&
useradd -c "Color Daemon Owner" -d /var/lib/colord -u 71 \
        -g colord -s /bin/false colord

Fix a double free causing a build failure on 32-bit x86 and runtime crashes with some monitors:

sed '/cmsUnregisterPluginsTHR/d' -i lib/colord/cd-context-lcms.c

Install Colord by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr            \
      --buildtype=release      \
      -Ddaemon_user=colord     \
      -Dvapi=true              \
      -Dsystemd=false          \
      -Dlibcolordcompat=true   \
      -Dargyllcms_sensor=false \
      -Dbash_completion=false  \
      -Ddocs=false             \
      -Dman=false ..           &&
ninja

Now, as the root user:

ninja install

To test the results, issue: ninja test. One test, colord-self-test-daemon, will fail if the package is already installed. The test suite must be run with the system-wide D-Bus Daemon running.

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

-Ddaemon_user=colord: This switch is used so the colord daemon will run as an unprivileged user instead of the root user.

-Dvapi=true: This switch enables building the Vala bindings. Remove if you don't have Vala-0.56.4 installed.

-Dsystemd=false: This switch disables support for systemd login in Colord applications.

-Dlibcolordcompat=true: This switch enables building a compatibility library for older packages that use Colord.

-Dargyllcms_sensor=false: This switch disables the ArgLLCMS sensor driver. Omit if you have ArgyllCMS installed and wish to use it.

-Dbash_completion=false: This switch disables Bash Completion support for Colord applications.

-Ddocs=false: This switch disables building of documentation. Omit if you have GTK-Doc-1.33.2 available.

-Dman=false: This switch disables building of man pages. Omit if you have DocBook-utils-0.6.14 available. Namespaced versions of the docbook-xsl stylesheets are also required.

Contents

Installed Programs: cd-create-profile, cd-fix-profile, cd-iccdump, cd-it8, and colormgr
Installed Libraries: libcolord.so, libcolordcompat.so, libcolordprivate.so, and libcolorhug.so
Installed Directories: /usr/include/colord-1, /usr/lib/colord-{plugins,sensors}, /usr/share/color{d}, /usr/share/gtk-doc/html/colord, and /var/lib/colord

Short Descriptions

cd-create-profile

is the Color Manager Profile Creation Tool

cd-fix-profile

is a tool used to fix metadata in ICC profiles

cd-iccdump

dumps the contents of an ICC profile as human readable text

cd-it8

is the Color Manager Testing Tool

colormgr

is a text-mode program that allows you to interact with colord on the command line

libcolord.so

contains the Colord API functions

libcolordcompat.so

contains legacy API functions for compatibility with older applications

libcolordprivate.so

contains internal API functions for the programs included with Colord

libcolorhug.so

contains a simple display hardware colorimiter

cpio-2.13

Introduction to cpio

The cpio package contains tools for archiving.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

CPIO Dependencies

Optional

texlive-20220321 (or install-tl-unx)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/cpio

Installation of cpio

First, fix a build issue when using GCC-10 and higher:

sed -i '/The name/,+2 d' src/global.c

Install cpio by running the following commands:

./configure --prefix=/usr \
            --enable-mt   \
            --with-rmt=/usr/libexec/rmt &&
make &&
makeinfo --html            -o doc/html      doc/cpio.texi &&
makeinfo --html --no-split -o doc/cpio.html doc/cpio.texi &&
makeinfo --plaintext       -o doc/cpio.txt  doc/cpio.texi

If you have texlive-20220321 installed and wish to create PDF or Postscript documentation, issue one or both of the following commands:

make -C doc pdf &&
make -C doc ps

To test the results, issue: make check.

Now, as the root user:

make install &&
install -v -m755 -d /usr/share/doc/cpio-2.13/html &&
install -v -m644    doc/html/* \
                    /usr/share/doc/cpio-2.13/html &&
install -v -m644    doc/cpio.{html,txt} \
                    /usr/share/doc/cpio-2.13

If you built PDF or Postscript documentation, install it by issuing the following commands as the root user:

install -v -m644 doc/cpio.{pdf,ps,dvi} \
                 /usr/share/doc/cpio-2.13

Command Explanations

--enable-mt: This parameter forces the building and installation of the mt program.

--with-rmt=/usr/libexec/rmt: This parameter inhibits building the rmt program as it is already installed by the Tar package in LFS.

Contents

Installed Programs: cpio and mt
Installed Libraries: None
Installed Directories: /usr/share/doc/cpio-2.13

Short Descriptions

cpio

copies files to and from archives

mt

controls magnetic tape drive operations

cups-pk-helper-0.2.7

Introduction to cups-pk-helper

The cups-pk-helper package contains a PolicyKit helper used to configure Cups with fine-grained privileges.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

cups-pk-helper Dependencies

Required

Cups-2.4.2 and Polkit-122

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/cups-pk-helper

Installation of cups-pk-helper

Install cups-pk-helper by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr .. &&
ninja

This package does not come with a test suite.

Now, as the root user:

ninja install

Contents

Installed Programs: cups-pk-helper-mechanism (library executable)
Installed Libraries: None
Installed Directories: None

dbus-1.14.6

Introduction to D-Bus

D-Bus is a message bus system, a simple way for applications to talk to one another. D-Bus supplies both a system daemon (for events such as new hardware device added or printer queue changed) and a per-user-login-session daemon (for general IPC needs among user applications). Also, the message bus is built on top of a general one-to-one message passing framework, which can be used by any two applications to communicate directly (without going through the message bus daemon).

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

D-Bus Dependencies

Recommended
Optional

For the tests: D-Bus Python-1.3.2, PyGObject-3.42.2, and Valgrind-3.20.0; for documentation: Doxygen-1.9.6, xmlto-0.0.28, Ducktype, and Yelp Tools

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/dbus

Installation of D-Bus

Install D-Bus by running the following commands (you may wish to review the output from ./configure --help first and add any desired parameters to the configure command shown below):

./configure --prefix=/usr                        \
            --sysconfdir=/etc                    \
            --localstatedir=/var                 \
            --runstatedir=/run                   \
            --enable-user-session                \
            --disable-doxygen-docs               \
            --disable-xml-docs                   \
            --disable-static                     \
            --with-systemduserunitdir=no         \
            --with-systemdsystemunitdir=no       \
            --docdir=/usr/share/doc/dbus-1.14.6  \
            --with-system-socket=/run/dbus/system_bus_socket &&
make

See below for test instructions.

Now, as the root user:

make install

If you are using a DESTDIR install, dbus-daemon-launch-helper needs to be fixed afterwards. Issue, as root user:

chown -v root:messagebus /usr/libexec/dbus-daemon-launch-helper &&
chmod -v      4750       /usr/libexec/dbus-daemon-launch-helper

If you are still building your system in chroot or you did not start the daemon yet, but you want to compile some packages that require D-Bus, generate the D-Bus UUID to avoid warnings when compiling some packages with the following command as the root user:

dbus-uuidgen --ensure

If using elogind-246.10, create a symlink to the /var/lib/dbus/machine-id file:

ln -sfv /var/lib/dbus/machine-id /etc

The dbus tests cannot be run until after D-Bus Python-1.3.2 and PyGObject-3.42.2 have been installed. They must be run as an unprivileged user from a local session with bus address. To run the standard tests issue make check.

If you want to run the unit regression tests, configure requires additional parameters which expose additional functionality in the binaries that are not intended to be used in a production build of D-Bus. If you would like to run the tests, issue the following commands (for the tests, you don't need to build the docs):

make distclean                                    &&
PYTHON=python3 ./configure --enable-tests         \
                           --enable-asserts       \
                           --disable-doxygen-docs \
                           --disable-xml-docs     &&
make                                              &&
make check

There have been reports that the tests may fail if running inside a Midnight Commander shell. You may get out-of-memory error messages when running the tests. These are normal and can be safely ignored.

Command Explanations

--disable-doxygen-docs: This switch disables doxygen documentation build and install, if you have doxygen installed. If doxygen is installed, and you wish to build them, remove this parameter.

--disable-xml-docs: This switch disables html documentation build and install, if you have xmlto installed. If xmlto is installed, and you wish to build them, remove this parameter.

--disable-static: This switch prevents installation of static versions of the libraries.

--enable-user-session: This parameter enables per-user DBus sessions with elogind.

--with-systemd{user,system}unitdir=no: These switches disable installation of systemd units on elogind based systems.

--with-system-pid-file=/run/dbus/pid: This parameter specifies the location of the PID file.

--with-system-socket=/run/dbus/system_bus_socket: This parameter specifies the location of the system bus socket.

--enable-tests: Builds extra parts of the code to support all tests. Do not use on a production build.

--enable-embedded-tests: Builds extra parts of the code to support only unit tests. Do not use on a production build.

--enable-asserts: Enables debugging code to run assertions for statements normally assumed to be true. This prevents a warning that '--enable-tests' on its own is only useful for profiling and might not give true results for all tests, but adds its own NOTE that this should not be used in a production build.

Configuring D-Bus

Config Files

/etc/dbus-1/session.conf, /etc/dbus-1/system.conf and /etc/dbus-1/system.d/*

Configuration Information

The configuration files listed above should probably not be modified. If changes are required, you should create /etc/dbus-1/session-local.conf and/or /etc/dbus-1/system-local.conf and make any desired changes to these files.

If any packages install a D-Bus .service file outside of the standard /usr/share/dbus-1/services directory, that directory should be added to the local session configuration. For instance, /usr/local/share/dbus-1/services can be added by performing the following commands as the root user:

cat > /etc/dbus-1/session-local.conf << "EOF"
<!DOCTYPE busconfig PUBLIC
 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- Search for .service files in /usr/local -->
  <servicedir>/usr/local/share/dbus-1/services</servicedir>

</busconfig>
EOF

D-Bus Session Daemon

To automatically start dbus-daemon when the system is rebooted, install the /etc/rc.d/init.d/dbus bootscript from the blfs-bootscripts-20230101 package.

make install-dbus

Note that this boot script only starts the system-wide D-Bus daemon. Each user requiring access to D-Bus services will also need to run a session daemon as well. There are many methods you can use to start a session daemon using the dbus-launch command. Review the dbus-launch man page for details about the available parameters and options. Here are some suggestions and examples:

  • Add dbus-launch to the line in the ~/.xinitrc file that starts your graphical desktop environment.

  • If you use gdm or some other display manager that calls the ~/.xsession file, you can add dbus-launch to the line in your ~/.xsession file that starts your graphical desktop environment. The syntax would be similar to the example in the ~/.xinitrc file.

  • The examples shown previously use dbus-launch to specify a program to be run. This has the benefit (when also using the --exit-with-x11 parameter) of stopping the session daemon when the specified program is stopped. You can also start the session daemon in your system or personal startup scripts by adding the following lines:

    # Start the D-Bus session daemon
    eval `dbus-launch`
    export DBUS_SESSION_BUS_ADDRESS

    This method will not stop the session daemon when you exit your shell, therefore you should add the following line to your ~/.bash_logout file:

    # Kill the D-Bus session daemon
    kill $DBUS_SESSION_BUS_PID

Contents

Installed Programs: dbus-cleanup-sockets, dbus-daemon, dbus-launch, dbus-monitor, dbus-run-session, dbus-send, dbus-test-tool, dbus-update-activation-environment, and dbus-uuidgen
Installed Library: libdbus-1.so
Installed Directories: /etc/dbus-1, /usr/{include,lib}/dbus-1.0, /usr/lib/cmake/DBus1, /usr/share/dbus-1, /usr/share/xml/dbus-1, /usr/share/doc/dbus-1.14.6, and /var/{lib,run}/dbus

Short Descriptions

dbus-cleanup-sockets

is used to clean up leftover sockets in a directory

dbus-daemon

is the D-Bus message bus daemon

dbus-launch

is used to start dbus-daemon from a shell script. It would normally be called from a user's login scripts

dbus-monitor

is used to monitor messages going through a D-Bus message bus

dbus-run-session

starts a process as a new D-Bus session

dbus-send

is used to send a message to a D-Bus message bus

dbus-test-tool

is a D-Bus traffic generator and test tool; it is a multi-purpose tool for debugging and profiling D-Bus

dbus-update-activation-environment

is used to update the environment used for D-Bus session services; it updates the list of environment variables used by dbus-daemon --session when it activates session services without using systemd

dbus-uuidgen

is used to generate a universally unique ID

libdbus-1.so

contains the API functions used by the D-Bus message daemon. D-Bus is first a library that provides one-to-one communication between any two applications; dbus-daemon is an application that uses this library to implement a message bus daemon

elogind-246.10

Introduction to elogind

elogind is the systemd project's "logind", extracted to be a standalone daemon. It integrates with Linux-PAM-1.5.2 to track all the users logged in to a system, and whether they are logged in graphically, on the console, or remotely. Elogind exposes this information via the standard org.freedesktop.login1 D-Bus interface, and also through the file system using systemd's standard /run/systemd layout.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

elogind Dependencies

Required

dbus-1.14.6

Recommended
Optional

For the tests: lxml-4.9.2, gobject-introspection-1.74.0, zsh-5.9, Valgrind-3.20.0, audit-userspace, bash-completion, kexec, and SELinux

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/elogind

Kernel Configuration

Enable the following options in the kernel configuration and recompile the kernel if necessary:

General setup --->
    [*]     Control Group support                        [CONFIG_CGROUPS]
File systems --->
    [*]     Inotify support for userspace                [CONFIG_INOTIFY_USER]
            Pseudo filesystems --->
                [*]    Tmpfs POSIX Access Control Lists  [CONFIG_TMPFS_POSIX_ACL]

In addition, some tests need the userspace cryptographic kernel API, which is enabled with:

-*- Cryptographic API --->                               [CONFIG_CRYPTO]
   <M/*> Userspace cryptographic algorithm configuration [CONFIG_CRYPTO_USER]
   <M/*> User-space interface for hash algorithms        [CONFIG_CRYPTO_USER_API_HASH]

Installation of elogind

Install elogind by running the following commands:

sed -i '/Disable polkit/,+8 d' meson.build &&

sed '/request_name/i\
r = sd_bus_set_exit_on_disconnect(m->bus, true);\
if (r < 0)\
    return log_error_errno(r, "Failed to set exit on disconnect: %m");' \
    -i src/login/logind.c &&

mkdir build &&
cd    build &&

meson --prefix=/usr                        \
      --buildtype=release                  \
      -Dcgroup-controller=elogind          \
      -Ddbuspolicydir=/etc/dbus-1/system.d \
      -Dman=auto                           \
      ..  &&
ninja

To test the results, issue: ninja test. A few tests are skipped if not run with root privileges.

Now, as the root user:

ninja install                                           &&
ln -sfv  libelogind.pc /usr/lib/pkgconfig/libsystemd.pc &&
ln -sfvn elogind /usr/include/systemd

Command Explanations

sed ... meson.build: This change allows the package to be built without polkit being installed (it is still a runtime dependency) but able to use polkit after that package is installed.

sed ... src/login/logind.c: This change allows the elogind daemon to exit when it is disconnected from dbus (for example when dbus is killed).

-Dcgroup-controller=elogind: This switch ensures that elogind is selected as the cgroup controller, even if booted with another running cgroup controller.

-Ddbuspolicydir=/etc/dbus-1/system.d: This switch sets the location of the D-Bus policy directory.

-Dman=auto: The default value of this switch is false. Setting it to auto allows building and installing the man pages if the recommended dependencies are installed.

-Ddefault-kill-user-processes=false: Determines whether the processes of a user should be killed when the user logs out. The default is true, but this defeats the traditional use of screen or tmux. This can also be changed in the configuration file (see below).

ln -s ...: These commands install symlinks so that software packages can find the systemd-compatible library and headers.

Configuring elogind

Config File

/etc/elogind/logind.conf

Configuration Information

The installed file /etc/elogind/logind.conf contains all the possible options with their defaults, commented out. You may wish to disable automatically killing user processes when the user logs out, by running, as the root user:

sed -e '/\[Login\]/a KillUserProcesses=no' \
    -i /etc/elogind/logind.conf

Each user will need to register a user session using Linux-PAM at login. The /etc/pam.d/system-session file needs to be modified and a new file must be created in order for elogind to work correctly. Run the following commands as the root user:

cat >> /etc/pam.d/system-session << "EOF" &&
# Begin elogind addition

session  required    pam_loginuid.so
session  optional    pam_elogind.so

# End elogind addition
EOF
cat > /etc/pam.d/elogind-user << "EOF"
# Begin /etc/pam.d/elogind-user

account  required    pam_access.so
account  include     system-account

session  required    pam_env.so
session  required    pam_limits.so
session  required    pam_unix.so
session  required    pam_loginuid.so
session  optional    pam_keyinit.so force revoke
session  optional    pam_elogind.so

auth     required    pam_deny.so
password required    pam_deny.so

# End /etc/pam.d/elogind-user
EOF

Contents

Installed Programs: busctl, elogind-inhibit, and loginctl
Installed Library: libelogind.so
Installed Directories: /lib/elogind, /etc/elogind, /usr/include/elogind, and /usr/share/doc/elogind-246.10

Short Descriptions

busctl

is used to introspect and monitor the D-Bus bus

elogind-inhibit

is used to execute a program with a shutdown, sleep or idle inhibitor lock taken

loginctl

is used to introspect and control the state of the elogind Login Manager

libelogind.so

is the main elogind utility library

blocaled-0.4

Introduction to blocaled

blocaled is an implementation of the org.freedesktop.locale1 D-Bus protocol, which normally comes with systemd. It is needed by the GNOME desktop.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

blocaled Dependencies

Required

Polkit-122 and libdaemon-0.14

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/blocaled

Installation of blocaled

Install blocaled by running the following commands:

./configure --prefix=/usr --sysconfdir=/etc &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Configuring blocaled

Config Files

/etc/blocaled.conf

Configuration Information

/etc/blocaled.conf contains the location of the settings files used by blocaled. The defaults are suitable for BLFS. Information about the entries is available as comments in the file.

The org.freedesktop.locale1 protocol is unable to export locale variables. Locale settings are stored by default in /etc/locale.conf. We need to retrieve them in the bash profile. As the root user, issue:

cat > /etc/profile.d/i18n.sh << "EOF"
# Begin /etc/profile.d/i18n.sh

if [ -r /etc/locale.conf ]; then source /etc/locale.conf; fi

if [ -n "$LANG" ];              then export LANG; fi
if [ -n "$LC_TYPE" ];           then export LC_TYPE; fi
if [ -n "$LC_NUMERIC" ];        then export LC_NUMERIC; fi
if [ -n "$LC_TIME" ];           then export LC_TIME; fi
if [ -n "$LC_COLLATE" ];        then export LC_COLLATE; fi
if [ -n "$LC_MONETARY" ];       then export LC_MONETARY; fi
if [ -n "$LC_MESSAGES" ];       then export LC_MESSAGES; fi
if [ -n "$LC_PAPER" ];          then export LC_PAPER; fi
if [ -n "$LC_NAME" ];           then export LC_NAME; fi
if [ -n "$LC_ADDRESS" ];        then export LC_ADDRESS; fi
if [ -n "$LC_TELEPHONE" ];      then export LC_TELEPHONE; fi
if [ -n "$LC_MEASUREMENT" ];    then export LC_MEASUREMENT; fi
if [ -n "$LC_IDENTIFICATION" ]; then export LC_IDENTIFICATION; fi

# End /etc/profile.d/i18n.sh
EOF

Then the /etc/locale file should be generated, as the root user:

cat > /etc/locale.conf << EOF
# Begin /etc/locale.conf

LANG=$LANG

# End /etc/locale.conf
EOF

If you plan to run an X (or Wayland) Window system, you may want to set up your X keyboard. The best way to do it is to retrieve the settings from /etc/sysconfig/console, and feed them to the blocaled daemon. As the root user:

source /etc/sysconfig/console &&
KEYMAP=${KEYMAP:-us}          &&

gdbus call --system                                             \
           --dest org.freedesktop.locale1                       \
           --object-path /org/freedesktop/locale1               \
           --method org.freedesktop.locale1.SetVConsoleKeyboard \
           "$KEYMAP" "$KEYMAP_CORRECTIONS" true true

This should create or modify the Xorg configuration file (default is /etc/X11/xorg.conf.d/30-keyboard.conf) to match the keyboard settings set in KEYMAP.

Contents

Installed Program: blocaled (in /usr/libexec)
Installed Library: None
Installed Directory: /usr/share/blocaled

Short Descriptions

blocaled

is the daemon implementing the org.freedesktop.locale1 D-Bus protocol

Fcron-3.2.1

Introduction to Fcron

The Fcron package contains a periodical command scheduler which aims at replacing Vixie Cron.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Fcron Dependencies

Optional

An MTA, text editor (default is vi from the Vim-9.0.1273 package), Linux-PAM-1.5.2, and DocBook-utils-0.6.14

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/fcron

Installation of Fcron

Fcron uses the cron facility of syslog to log all messages. Since LFS does not set up this facility in /etc/syslog.conf, it needs to be done prior to installing Fcron. This command will append the necessary line to the current /etc/syslog.conf (perform as the root user):

cat >> /etc/syslog.conf << "EOF"
# Begin fcron addition to /etc/syslog.conf

cron.* -/var/log/cron.log

# End fcron addition
EOF

The configuration file has been modified, so reloading the sysklogd daemon will activate the changes (again as the root user).

/etc/rc.d/init.d/sysklogd reload

For security reasons, an unprivileged user and group for Fcron should be created (perform as the root user):

groupadd -g 22 fcron &&
useradd -d /dev/null -c "Fcron User" -g fcron -s /bin/false -u 22 fcron

Now fix some locations hard coded in the documentation:

find doc -type f -exec sed -i 's:/usr/local::g' {} \;

Install Fcron by running the following commands:

./configure --prefix=/usr          \
            --sysconfdir=/etc      \
            --localstatedir=/var   \
            --without-sendmail     \
            --with-boot-install=no \
            --with-systemdsystemunitdir=no &&
make

This package does not come with a test suite.

Now, as the root user:

make install

DESTDIR install must be done as root user. Furthermore, if PAM configuration files should be installed in /etc/pam.d, you have to create this directory in the DESTDIR before doing the install.

Command Explanations

--without-sendmail: By default, Fcron will attempt to use the sendmail command from an MTA package to email you the results of the fcron script. This switch is used to disable default email notification. Omit the switch to enable the default. Alternatively, you can use the --with-sendmail=</path/to/MTA command> to use a different mailer command.

--with-boot-install=no: This prevents installation of the bootscript included with the package.

--with-systemdsystemunitdir=no: This prevents building the systemd units, which are not needed for a SYS V system.

--with-editor=</path/to/editor>: This switch allows you to set the default text editor.

--with-dsssl-dir=</path/to/dsssl-stylesheets>: May be used if you have DocBook-utils-0.6.14 installed. Currently, the dsssl stylesheets are located at /usr/share/sgml/docbook/dsssl-stylesheets-1.79.

Configuring Fcron

Config Files

/etc/fcron.conf, /etc/fcron.allow, and /etc/fcron.deny

Configuration Information

There are no required changes in any of the config files. Configuration information can be found in the man page for fcron.conf.

fcron scripts are written using fcrontab. Refer to the fcrontab man page for proper parameters to address your situation.

If Linux-PAM is installed, two PAM configuration files are installed in etc/pam.d. Alternatively if etc/pam.d is not used, the installation will append two configuration sections to the existing /etc/pam.conf file. You should ensure the files match your preferences. Modify them as required to suit your needs.

Periodic Jobs

If you would like to set up a periodic hierarchy for the root user, first issue the following commands (as the root user) to create the /usr/bin/run-parts script:

cat > /usr/bin/run-parts << "EOF" &&
#!/bin/sh
# run-parts:  Runs all the scripts found in a directory.
# from Slackware, by Patrick J. Volkerding with ideas borrowed
# from the Red Hat and Debian versions of this utility.

# keep going when something fails
set +e

if [ $# -lt 1 ]; then
  echo "Usage: run-parts <directory>"
  exit 1
fi

if [ ! -d $1 ]; then
  echo "Not a directory: $1"
  echo "Usage: run-parts <directory>"
  exit 1
fi

# There are several types of files that we would like to
# ignore automatically, as they are likely to be backups
# of other scripts:
IGNORE_SUFFIXES="~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp"

# Main loop:
for SCRIPT in $1/* ; do
  # If this is not a regular file, skip it:
  if [ ! -f $SCRIPT ]; then
    continue
  fi
  # Determine if this file should be skipped by suffix:
  SKIP=false
  for SUFFIX in $IGNORE_SUFFIXES ; do
    if [ ! "$(basename $SCRIPT $SUFFIX)" = "$(basename $SCRIPT)" ]; then
      SKIP=true
      break
    fi
  done
  if [ "$SKIP" = "true" ]; then
    continue
  fi
  # If we've made it this far, then run the script if it's executable:
  if [ -x $SCRIPT ]; then
    $SCRIPT || echo "$SCRIPT failed."
  fi
done

exit 0
EOF
chmod -v 755 /usr/bin/run-parts

Next, create the directory layout for the periodic jobs (again as the root user):

install -vdm754 /etc/cron.{hourly,daily,weekly,monthly}

Finally, add the run-parts to the system fcrontab (while still the root user):

cat > /var/spool/fcron/systab.orig << "EOF"
&bootrun 01 * * * * root run-parts /etc/cron.hourly
&bootrun 02 4 * * * root run-parts /etc/cron.daily
&bootrun 22 4 * * 0 root run-parts /etc/cron.weekly
&bootrun 42 4 1 * * root run-parts /etc/cron.monthly
EOF

Boot Script

Install the /etc/rc.d/init.d/fcron init script from the blfs-bootscripts-20230101 package.

make install-fcron

Finally, again as the root user, start fcron and generate the /var/spool/fcron/systab file:

/etc/rc.d/init.d/fcron start &&
fcrontab -z -u systab

Contents

Installed Programs: fcron, fcrondyn, fcronsighup, and fcrontab
Installed Libraries: None
Installed Directories: /usr/share/doc/fcron-3.2.1 and /var/spool/fcron

Short Descriptions

fcron

is the scheduling daemon

fcrondyn

is a user tool intended to interact with a running fcron daemon

fcronsighup

instructs fcron to reread the Fcron tables

fcrontab

is a program used to install, edit, list and remove the tables used by fcron

GPM-1.20.7

Introduction to GPM

The GPM (General Purpose Mouse daemon) package contains a mouse server for the console and xterm. It not only provides cut and paste support generally, but its library component is used by various software such as Links to provide mouse support to the application. It is useful on desktops, especially if following (Beyond) Linux From Scratch instructions; it's often much easier (and less error prone) to cut and paste between two console windows than to type everything by hand!

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/GPM

Kernel Configuration

Enable the following option in the kernel configuration and recompile the kernel if necessary:

Device Drivers  --->
  Input device support ---> [CONFIG_INPUT]
    <*/M> Mouse interface   [CONFIG_INPUT_MOUSEDEV]

Installation of GPM

Install GPM by running the following commands:

patch -Np1 -i ../gpm-1.20.7-consolidated-1.patch &&
./autogen.sh                                     &&
./configure --prefix=/usr --sysconfdir=/etc      &&
make

This package does not come with a test suite.

Now, as the root user:

make install                                          &&

install-info --dir-file=/usr/share/info/dir           \
             /usr/share/info/gpm.info                 &&

rm -fv /usr/lib/libgpm.a                              &&
ln -sfv libgpm.so.2.1.0 /usr/lib/libgpm.so            &&
install -v -m644 conf/gpm-root.conf /etc              &&

install -v -m755 -d /usr/share/doc/gpm-1.20.7/support &&
install -v -m644    doc/support/*                     \
                    /usr/share/doc/gpm-1.20.7/support &&
install -v -m644    doc/{FAQ,HACK_GPM,README*}        \
                    /usr/share/doc/gpm-1.20.7

Command Explanations

./autogen.sh: This command creates the missing configure script.

install-info ...: This package installs a .info file, but does not update the system dir file. This command makes the update.

ln -v -sfn libgpm.so.2.1.0 /usr/lib/libgpm.so: This command is used to create (or update) the .so symlink to the library.

Configuring GPM

Boot Script

Install the /etc/rc.d/init.d/gpm init script included in the blfs-bootscripts-20230101 package.

make install-gpm

Config Files

/etc/gpm-root.conf and ~/.gpm-root: The default and individual user gpm-root configuration files.

/etc/sysconfig/mouse: This file contains the name of your mouse device and the protocol it uses. To create this file, run the following as the root user:

cat > /etc/sysconfig/mouse << "EOF"
# Begin /etc/sysconfig/mouse

MDEVICE="<yourdevice>"
PROTOCOL="<yourprotocol>"
GPMOPTS="<additional options>"

# End /etc/sysconfig/mouse
EOF

Configuration Information

Examples of values to set MDEVICE, PROTOCOL, and GPMOPTS to are:

MDEVICE="/dev/input/mice"
PROTOCOL="imps2"
GPMOPTS=""

A list of which protocol values are known can be found by running gpm -m [device] -t -help. The MDEVICE setting depends on which type of mouse you have. For example, /dev/ttyS0 for a serial mouse (on Windows this is COM1), /dev/input/mice is often used for USB mice and /dev/psaux for PS2 mice. GPMOPTS is the 'catch all' for any additional options that are needed for your hardware.

Contents

Installed Programs: disable-paste, display-buttons, display-coords, get-versions, gpm, gpm-root, hltest, mev, and mouse-test
Installed Library: libgpm.so
Installed Directory: /usr/share/doc/gpm-1.20.7

Short Descriptions

disable-paste

is a security mechanism used to disable the paste buffer

display-buttons

is a simple program that reports the mouse buttons being pressed and released

display-coords

is a simple program that reports the mouse coordinates

get-versions

is used to report the GPM library and server versions

gpm

is a cut and paste utility and mouse server for virtual consoles

gpm-root

is a default handler for gpm. It is used to draw menus on the root window

hltest

is a simple sample application using the high-level library, meant to be read by programmers trying to use the high-level library

mev

is a program to report mouse events

mouse-test

is a tool for determining the mouse type and device it's attached to

libgpm.so

contains the API functions to access the GPM daemon

Hdparm-9.65

Introduction to Hdparm

The Hdparm package contains a utility that is useful for obtaining information about, and controlling ATA/IDE controllers and hard drives. It allows to increase performance and sometimes to increase stability.

This package is known to build and work properly using an LFS 11.3 platform.

Warning

As well as being useful, incorrect usage of Hdparm can destroy your information and in rare cases, drives. Use with caution and make sure you know what you are doing. If in doubt, it is recommended that you leave the default kernel parameters alone.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/hdparm

Installation of Hdparm

Build Hdparm by running the following command:

make

This package does not come with a test suite.

Now, as the root user:

make binprefix=/usr install

Contents

Installed Program: hdparm
Installed Libraries: None
Installed Directories: None

Short Descriptions

hdparm

provides a command-line interface to various hard disk ioctls supported by the stock Linux ATA/IDE device driver subsystem

LSB-Tools-0.10

Introduction to LSB-Tools

The LSB-Tools package includes tools for Linux Standards Base (LSB) conformance.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/LSB-Tools

Installation of LSB-Tools

Install LSB-Tools by running the following commands:

python3 setup.py build

Now, as the root user:

python3 setup.py install --optimize=1

Configuration Information

The configuration for this package was done in LFS. The file /etc/lsb-release should already exist. Be sure that the DISTRIB_CODENAME entry has been set properly.

Contents

Installed Programs: lsb_release, install_initd, and remove_initd
Installed Library: None
Installed Directories: /usr/lib/python3.11/site-packages/lsbtools

Short Descriptions

lsb_release

is a script to give LSB data

install_initd

is a script to activate SysV startup scripts

remove_initd

is a script to deactivate SysV startup scripts

Lm-sensors-3-6-0

Introduction to Lm_sensors

The lm_sensors package provides userspace support for the hardware monitoring drivers in the Linux kernel. This is useful for monitoring the temperature of the CPU and adjusting the performance of some hardware (such as cooling fans).

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

lm_sensors Dependencies

Required

Which-2.21

Optional

RRDtool (required to build the sensord program) and dmidecode (runtime)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/lm_sensors

Kernel Configuration

Getting your kernel config right is an iterative process that may require that you recompile your kernel a couple of times. The simplest way to go about it is to start by enabling modules and then compile everything that may be needed by Lm Sensors as a module:

[*] Enable loadable module support  --->  [CONFIG_MODULES]

Device Drivers  --->
  [*] PCI support --->                    [CONFIG_PCI]
  I2C support --->
    <*/M> I2C device interface            [CONFIG_I2C_CHARDEV]
    I2C Hardware Bus support  --->
      <M> (configure all of them as modules)
  <*/M> Hardware Monitoring support  ---> [CONFIG_HWMON]
    <M> (configure all of them as modules)

Recompile your kernel and reboot into the new kernel. Don't forget to make modules_install We will come back to the kernel in the Configuring section below.

Installation of Lm_sensors

Install Lm_sensors by running the following commands:

make PREFIX=/usr        \
     BUILD_STATIC_LIB=0 \
     MANDIR=/usr/share/man

This package does not come with a test suite.

Now, as the root user:

make PREFIX=/usr        \
     BUILD_STATIC_LIB=0 \
     MANDIR=/usr/share/man install &&

install -v -m755 -d /usr/share/doc/lm_sensors-3-6-0 &&
cp -rv              README INSTALL doc/* \
                    /usr/share/doc/lm_sensors-3-6-0

Command Explanations

BUILD_STATIC_LIB=0: This parameter disables compiling and installing the static version of libsensors.

PROG_EXTRA=sensord: This parameter enables compiling sensord, a daemon that can monitor your system at regular intervals. Compiling sensord requires RRDtool. Be sure to install RRDtool in /usr by running make prefix=/usr when building it. Otherwise, Lm_sensors will not find it easily.

Configuring Lm_sensors

Config File

/etc/sensors3.conf

Configuration Information

To find out what hardware sensors your system has, issue the following command as the root user:

sensors-detect

The appropriate modules should have been loaded and a summary is displayed at the end. Now you know what is needed and you can recompile your kernel to enable just the options you need (i.e., don't enable the modules you cannot use).

Contents

Installed Programs: fancontrol, isadump, isaset, pwmconfig, sensors, sensors-conf-convert, sensors-detect, and optionally, sensord
Installed Library: libsensors.so
Installed Directories: /etc/sensors.d, /usr/include/sensors and /usr/share/doc/lm_sensors-3-6-0

Short Descriptions

fancontrol

is a shell script for use with lm_sensors. It reads its configuration from a file, then calculates fan speeds from temperatures and sets the corresponding PWM outputs to the computed values

isadump

is a small helper program to examine registers visible through the ISA bus. It is intended to probe any chip that lives on the ISA bus working with an address register and a data register (I2C-like access) or a flat range (of up to 256 bytes)

isaset

is a small helper program to set registers visible through the ISA bus

pwmconfig

tests the pulse width modulation (PWM) outputs of sensors and configures fancontrol

sensors

prints the current readings of all sensor chips

sensors-conf-convert

is a Perl script to convert lm-sensors version 2 configuration files to work with version 3

sensors-detect

is a Perl script that will walk you through the process of scanning your system for various hardware monitoring chips (sensors) supported by libsensors, or more generally by the lm_sensors tool suite

sensord

(optional) is a daemon that can be used to periodically log sensor readings

libsensors.so

contains the lm_sensors API functions

Logrotate-3.21.0

Introduction to Logrotate

The logrotate package allows automatic rotation, compression, removal, and mailing of log files.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Logrotate Dependencies

Required

popt-1.19

Recommended
Optional

An MTA (runtime)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/logrotate

Installation of Logrotate

Install logrotate by running the following command:

./configure --prefix=/usr &&
make

To test the results, issue: make test. One test fails because the very old compress is not present and two tests fail if an MTA is not installed.

Now, as the root user:

make install

Configuring Logrotate

Logrotate needs a configuration file, which must be passed as an argument to the command when executed. Create the file as the root user:

cat > /etc/logrotate.conf << EOF
# Begin /etc/logrotate.conf

# Rotate log files weekly
weekly

# Don't mail logs to anybody
nomail

# If the log file is empty, it will not be rotated
notifempty

# Number of backups that will be kept
# This will keep the 2 newest backups only
rotate 2

# Create new empty files after rotating old ones
# This will create empty log files, with owner
# set to root, group set to sys, and permissions 664
create 0664 root sys

# Compress the backups with gzip
compress

# No packages own lastlog or wtmp -- rotate them here
/var/log/wtmp {
    monthly
    create 0664 root utmp
    rotate 1
}

/var/log/lastlog {
    monthly
    rotate 1
}

# Some packages drop log rotation info in this directory
# so we include any file in it.
include /etc/logrotate.d

# End /etc/logrotate.conf
EOF

chmod -v 0644 /etc/logrotate.conf

Now create the /etc/logrotate.d directory as the root user:

mkdir -p /etc/logrotate.d

At this point additional log rotation commands can be entered, typically in the /etc/logrotate.d directory. For example:

cat > /etc/logrotate.d/sys.log << EOF
/var/log/sys.log {
   # If the log file is larger than 100kb, rotate it
   size   100k
   rotate 5
   weekly
   postrotate
      /bin/killall -HUP syslogd
   endscript
}
EOF

chmod -v 0644 /etc/logrotate.d/sys.log

You can designate multiple files in one entry:

cat > /etc/logrotate.d/example.log << EOF
file1
file2
file3 {
   ...
   postrotate
    ...
   endscript
}
EOF

chmod -v 0644 /etc/logrotate.d/example.log

You can use in the same line the list of files: file1 file2 file3. See the logrotate man page or https://www.techrepublic.com/article/manage-linux-log-files-with-logrotate/ for more examples.

The command logrotate /etc/logrotate.conf can be run manually, however, the command should be run daily. Other useful commands are logrotate -d /etc/logrotate.conf for debugging purposes and logrotate -f /etc/logrotate.conf forcing the logrotate commands to be run immediately. Combining the previous options -df, you can debug the effect of the force command. When debugging, the commands are only simulated and are not actually run. As a result, errors about files not existing will eventually appear because the files are not actually created.

To run the logrotate command daily, if you've installed Fcron-3.2.1 and completed the section on periodic jobs, execute the following commands, as the root user, to create a daily cron job:

cat > /etc/cron.daily/logrotate.sh << "EOF" &&
#!/bin/bash
/usr/sbin/logrotate /etc/logrotate.conf
EOF
chmod 754 /etc/cron.daily/logrotate.sh

Contents

Installed Programs: logrotate
Installed Library: None
Installed Directories: None

Short Descriptions

logrotate

performs the log maintenance functions defined in the configuration files

MC-4.8.29

Introduction to MC

MC (Midnight Commander) is a text-mode full-screen file manager and visual shell. It provides a clear, user-friendly, and somewhat protected interface to a Unix system while making many frequent file operations more efficient and preserving the full power of the command prompt.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

MC Dependencies

Required

GLib-2.74.5 and PCRE-8.45

Recommended
Optional

Doxygen-1.9.6, GPM-1.20.7, libssh2-1.10.0, Ruby-3.2.1, Samba-4.17.5, UnZip-6.0, a graphical environment, and Zip-3.0

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/MC

Installation of MC

Install MC by running the following commands:

./configure --prefix=/usr \
            --sysconfdir=/etc \
            --enable-charset &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--sysconfdir=/etc: This switch places the global configuration directory in /etc.

--enable-charset: This switch adds support to mcedit for editing files in encodings different from the one implied by the current locale.

Configuring MC

Config Files

~/.config/mc/*

Configuration Information

The ~/.config/mc directory and its contents are created when you start mc for the first time. Then you can edit the main ~/.config/mc/ini configuration file manually or through the MC shell. Consult the mc(1) man page for details.

Contents

Installed Programs: mc and the symlinks mcdiff, mcedit and mcview
Installed Libraries: None
Installed Directories: /etc/mc and /usr/{libexec,share}/mc

Short Descriptions

cons.saver

is used internally by mc for saving and restoring the text behind the panels on Linux text console

mc

is a visual shell

mcdiff

is an internal visual diff tool

mcedit

is an internal file editor

mcview

is an internal file viewer

ModemManager-1.18.12

Introduction to ModemManager

ModemManager provides a unified high level API for communicating with mobile broadband modems, regardless of the protocol used to communicate with the actual device.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

ModemManager Dependencies

Required

libgudev-237

Recommended
Optional

GTK-Doc-1.33.2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/ModemManager

Installation of ModemManager

Install ModemManager by running the following commands:

./configure --prefix=/usr                 \
            --sysconfdir=/etc             \
            --localstatedir=/var          \
            --disable-static              \
            --disable-maintainer-mode     \
            --with-systemd-journal=no     \
            --with-systemd-suspend-resume &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--with-systemd-suspend-resume: This switch forces ModemManager to use the elogind power management facilities.

--with-systemd-journal=no : This switch forces ModemManager not to use the systemd journal for logging.

--disable-static: This switch prevents installation of static versions of the libraries.

--enable-gtk-doc: Use this parameter if GTK-Doc is installed and you wish to rebuild and install the API documentation.

Contents

Installed Programs: mmcli and ModemManager
Installed Libraries: libmm-glib.so
Installed Directories: /etc/ModemManager, /usr/include/libmm-glib, /usr/include/ModemManager, /usr/lib/ModemManager, /usr/share/ModemManager, /usr/share/gtk-doc/html/libmm-glib (optional), and /usr/share/gtk-doc/html/ModemManager (optional)

Short Descriptions

mmcli

is an utility used to control and monitor the ModemManager

ModemManager

is a D-Bus service used to communicate with modems

libmm-glib.so

contains API functions for communicating with mobile broadband modems, regardless of the protocol used to communicate with the actual device

notification-daemon-3.20.0

Introduction to Notification Daemon

The Notification Daemon package contains a daemon that displays passive pop-up notifications.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Notification Daemon Dependencies

Required

GTK+-3.24.36 and libcanberra-0.30 (Built with GTK+-3.24.36 support).

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/notification-daemon

Installation of Notification Daemon

Install Notification Daemon by running the following commands:

./configure --prefix=/usr     \
            --sysconfdir=/etc \
            --disable-static  &&
make

This package does not come with a test suite.

Now, as the root user:

make install

You can test the notification daemon with the command notify-send:

pgrep -l notification-da &&
notify-send -i info Information "Hi ${USER}, This is a Test"

The command pgrep -l notification-da is added to assure that it is the daemon of this package that is running, not another one, e.g. the daemon from xfce4-notifyd-0.8.1.

Contents

Installed Program: none
Installed Libraries: none
Installed Directory: none

p7zip-17.04

Introduction to p7zip

p7zip is the Unix command-line port of 7-Zip, a file archiver that archives with high compression ratios. It handles 7z, ZIP, GZIP, Brotli, BZIP2, XZ, TAR, APM, ARJ, CAB, CHM, CPIO, CramFS, DEB, DMG, FAT, HFS, ISO, Lizard, LZ5, LZFSE, LZH, LZMA, LZMA2, MBR, MSI, MSLZ, NSIS, NTFS, RAR, RPM, SquashFS, UDF, VHD, WIM, XAR, Z, and Zstd formats.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

p7zip Dependencies

Optional

wxWidgets

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/p7zip

Installation of p7zip

First, prevent p7zip from installing compressed manual pages:

sed '/^gzip/d' -i install.sh

Next, fix a security vulnerability:

sed -i '160a if(_buffer == nullptr || _size == _pos) return E_FAIL;' CPP/7zip/Common/StreamObjects.cpp

Install p7zip by running the following commands:

make all3

To test the results, issue: make test.

Now, as the root user:

make DEST_HOME=/usr \
     DEST_MAN=/usr/share/man \
     DEST_SHARE_DOC=/usr/share/doc/p7zip-17.04 install

Note

If using DESTDIR techniques, use DEST_DIR instead.

Contents

Installed Programs: 7z, 7za, and 7zr
Installed Libraries: None
Installed Directory: /usr/lib/p7zip and /usr/share/doc/p7zip-17.04

Short Descriptions

7z

is a file archiver utility

7za

is a stand-alone executable handling less archive formats than 7z

7zr

is a minimal version of 7za that handles only 7z archives

Pax-20201030

Introduction to Pax

pax is an archiving utility created by POSIX and defined by the POSIX.1-2001 standard. Rather than sort out the incompatible options that have crept up between tar and cpio, along with their implementations across various versions of UNIX, the IEEE designed a new archive utility. The name pax is an acronym for portable archive exchange. Furthermore, pax means peace in Latin, so its name implies that it shall create peace between the tar and cpio format supporters. The command invocation and command structure is somewhat a unification of both tar and cpio.

pax has been required to be present in LSB conformant systems since LSB version 3.0.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/pax

Installation of Pax

Install pax by running the following commands:.

Note

This package expands to the directory pax.

bash Build.sh

This package does not come with a test suite.

Now, as the root user:

Note

This package also creates hard links from pax to the programs cpio and tar in the build directory. The LFS editors do not recommend that they be installed as they will overwrite the GNU versions of these programs.

install -v pax /usr/bin &&
install -v -m644 pax.1 /usr/share/man/man1

Contents

Installed Program: pax

Short Descriptions

pax

copies files to and from archives in several formats

pciutils-3.9.0

Introduction to PCI Utils

The PCI Utils package contains a set of programs for listing PCI devices, inspecting their status and setting their configuration registers.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

pciutils Dependencies

Recommended

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/pciutils

Installation of PCI Utils

Install PCI Utils by running the following commands:

make PREFIX=/usr                \
     SHAREDIR=/usr/share/hwdata \
     SHARED=yes

This package does not come with a test suite.

Now, as the root user:

make PREFIX=/usr                \
     SHAREDIR=/usr/share/hwdata \
     SHARED=yes                 \
     install install-lib        &&

chmod -v 755 /usr/lib/libpci.so

Command Explanations

SHARED=yes: This parameter enables building of the shared library instead of the static one.

ZLIB=no: This option prevents compression of the pci.ids file.

Configuring PCI Utils

The pci.ids data file is constantly being updated. To get a current version of this file, run update-pciids as the root user. This program requires the Which-2.21 script or program to find cURL-7.88.1, Lynx-2.8.9rel.1, or Wget-1.21.3 which are used to download the most current file, and then replace the existing file in /usr/share/hwdata.

You should update the /usr/share/hwdata/pci.ids file periodically. If you've installed Fcron-3.2.1 and completed the section on periodic jobs, execute the following commands, as the root user, to create a weekly cron job:

cat > /etc/cron.weekly/update-pciids.sh << "EOF" &&
#!/bin/bash
/usr/sbin/update-pciids
EOF
chmod 754 /etc/cron.weekly/update-pciids.sh

Contents

Installed Programs: lspci, setpci, and update-pciids
Installed Library: libpci.so
Installed Directory: /usr/include/pci and /usr/share/hwdata

Short Descriptions

lspci

is a utility for displaying information about all PCI buses in the system and all devices connected to them

setpci

is a utility for querying and configuring PCI devices

update-pciids

fetches the current version of the PCI ID list.

libpci.so

is library that allows applications to access the PCI subsystem

pm-utils-1.4.1

Introduction to Power Management Utilities

The Power Management Utilities provide simple shell command line tools to suspend and hibernate the computer. They can be used to run user supplied scripts on suspend and resume.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Power Management Utilities Dependencies

Optional

xmlto-0.0.28 (to generate man pages)

Optional (runtime)

Hdparm-9.65, Wireless Tools-29, ethtool, and vbetool

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/pm-utils

Kernel Configuration

If needed, enable the following options in the kernel configuration and recompile the kernel:

Power management and ACPI options --->
    <*> Suspend to RAM and standby            [CONFIG_SUSPEND]
    <*> Hibernation (aka 'suspend to disk')   [CONFIG_HIBERNATION]

Suspend to RAM allows the system to enter sleep states in which main memory is powered and thus its contents are preserved. The method cuts power to most parts of the machine aside from the RAM. Because of the large power savings, it is advisable for laptops to automatically enter this mode when the computer is running on batteries and the lid is closed (or the user is inactive for some time).

Suspend to disk (Hibernation) saves the machine's state into swap space and completely powers off the machine. When the machine is powered on, the state is restored. Until then, there is zero power consumption. Suspend to RAM and hibernation are normally appropriate for portable devices such as laptops, but can be used on workstations. The capability is not really appropriate for servers.

To use hibernation, the kernel parameter resume=/dev/<swap_partition> has to be used on the kernel command line (in grub.cfg). The swap partition should be at least the size of the physical RAM on the system.

Installation of Power Management Utilities

Install Power Management Utilities by running the following commands:

./configure --prefix=/usr     \
            --sysconfdir=/etc \
            --docdir=/usr/share/doc/pm-utils-1.4.1 &&
make

This package does not come with a test suite.

Now, as the root user:

make install

If you don't have xmlto-0.0.28 installed, copy pregenerated man pages, as the root user:

install -v -m644 man/*.1 /usr/share/man/man1 &&
install -v -m644 man/*.8 /usr/share/man/man8 &&
ln -sv pm-action.8 /usr/share/man/man8/pm-suspend.8 &&
ln -sv pm-action.8 /usr/share/man/man8/pm-hibernate.8 &&
ln -sv pm-action.8 /usr/share/man/man8/pm-suspend-hybrid.8

Configuring Power Management Utilities

Suspend or resume functionality can be easily modified by installing files into the /etc/pm/sleep.d directory. These files, known as hooks, are run when the system is put into a sleep state or resumed. Default hooks are located in /usr/lib/pm-utils/sleep.d, and user hooks should be put in /etc/pm/sleep.d. See the pm-action(8) man page for more information.

In order to use hibernation with GRUB and a swap partition, you need to add kernel parameter resume=swap_partition (e.g. resume=/dev/sda1) to the kernel line in the /boot/grub/grub.cfg configuration file.

Contents

Installed Programs: on_ac_power, pm-hibernate, pm-is-supported, pm-powersave, pm-suspend and pm-suspend-hybrid
Installed Libraries: None
Installed Directories: /etc/pm, /usr/lib/pm-utils and /usr/share/doc/pm-utils-1.4.1

Short Descriptions

on_ac_power

is a script that determines whether the system is running on AC power (rather than a battery)

pm-hibernate

is a symlink to pm-action script that puts the computer into hibernate mode (the system is fully powered off and system state is saved to disk)

pm-is-supported

is a script that checks whether power management features such as suspend and hibernate are supported

pm-powersave

is a script that puts the computer into powersaving (low power) mode

pm-suspend

is a symlink to pm-action script that puts the computer into suspend mode (most devices are shut down and system state is saved in RAM)

pm-suspend-hybrid

is a symlink to pm-action script that puts the computer into hybrid-suspend mode (the system does everything it needs to hibernate, but suspends instead of shutting down)

Raptor-2.0.15

Introduction to Raptor

Raptor is a C library that provides a set of parsers and serializers that generate Resource Description Framework (RDF) triples.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

Raptor Dependencies

Required

cURL-7.88.1 and libxslt-1.1.37

Optional

GTK-Doc-1.33.2, ICU-72.1 and libyajl

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/raptor

Installation of Raptor

First, apply a patch that fixes a couple of security issues:

patch -Np1 -i ../raptor-2.0.15-security_fixes-1.patch

Install Raptor by running the following commands:

./configure --prefix=/usr --disable-static &&
make

To test the results, issue: make check. Several of the XML tests may fail.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

--with-icu-config=/usr/bin/icu-config: Use this switch if you have installed ICU-72.1 and wish to build Raptor with its support.

Contents

Installed Programs: rapper
Installed Libraries: libraptor2.so
Installed Directories: /usr/include/raptor2 and /usr/share/gtk-doc/html/raptor2

Short Descriptions

rapper

is a RDF parsing and serializing utility

libraptor2.so

contains the Raptor API functions

Rasqal-0.9.33

Introduction to Rasqal

Rasqal is a C library that handles Resource Description Framework (RDF) query language syntaxes, query construction, and execution of queries returning results as bindings, boolean, RDF graphs/triples or syntaxes.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

  • Download (HTTP): https://download.librdf.org/source/rasqal-0.9.33.tar.gz

  • Download MD5 sum: 1f5def51ca0026cd192958ef07228b52

  • Download size: 1.6 MB

  • Estimated disk space required: 22 MB (additional 4 MB for the tests)

  • Estimated build time: 0.3 SBU (additional 0.7 SBU for the tests)

Rasqal Dependencies

Required

Raptor-2.0.15

Optional

PCRE-8.45 and libgcrypt-1.10.1

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/rasqal

Installation of Rasqal

Install Rasqal by running the following commands:

./configure --prefix=/usr --disable-static &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: rasqal-config and roqet
Installed Library: librasqal.so
Installed Directories: /usr/include/rasqal and /usr/share/gtk-doc/html/rasqal

Short Descriptions

rasqal-config

is an utility for retrieving the installation options of Rasqal

roqet

is an RDF query utility

Redland-1.0.17

Introduction to Redland

Redland is a set of free software C libraries that provide support for the Resource Description Framework (RDF).

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Redland Dependencies

Required

Rasqal-0.9.33

Optional

Berkeley DB-5.3.28, libiodbc-3.52.15, SQLite-3.40.1, MariaDB-10.6.12 or MySQL, PostgreSQL-15.2, virtuoso, and 3store

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/redland

Installation of Redland

Install Redland by running the following commands:

./configure --prefix=/usr --disable-static &&
make

To test the results, issue make check.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: rdfproc, redland-config and redland-db-upgrade
Installed Libraries: librdf.so and /usr/lib/redland/librdf_storage_*.so
Installed Directories: /usr/lib/redland, /usr/share/gtk-doc/html/redland and /usr/share/redland

Short Descriptions

rdfproc

is the Redland RDF processor utility

redland-config

is a script to get information about the installed version of Redland

redland-db-upgrade

upgrades older Redland databases to 0.9.12 format

sg3_utils-1.47

Introduction to sg3_utils

The sg3_utils package contains low level utilities for devices that use a SCSI command set. Apart from SCSI parallel interface (SPI) devices, the SCSI command set is used by ATAPI devices (CD/DVDs and tapes), USB mass storage devices, Fibre Channel disks, IEEE 1394 storage devices (that use the "SBP" protocol), SAS, iSCSI and FCoE devices (amongst others).

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/sg3_utils

Installation of sg3_utils

Install sg3_utils by running the following commands:

./configure --prefix=/usr --disable-static &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: rescan-scsi-bus.sh, scsi_logging_level, scsi_mandat, scsi_readcap, scsi_ready, scsi_satl, scsi_start, scsi_stop, scsi_temperature, sg_bg_ctl, sg_compare_and_write, sg_copy_results, sg_dd, sg_decode_sense, sg_emc_trespass, sg_format, sg_get_config, sg_get_lba_status, sg_ident, sg_inq, sg_logs, sg_luns, sg_map, sg_map26, sg_modes, sg_opcodes, sg_persist, sg_prevent, sg_raw, sg_rbuf, sg_rdac, sg_read, sg_read_attr, sg_read_block_limits, sg_read_buffer, sg_read_long, sg_readcap, sg_reassign, sg_referrals, sg_rep_pip, sg_rep_zones, sg_requests, sg_reset, sg_reset_wp, sg_rmsn, sg_rtpg, sg_safte, sg_sanitize, sg_sat_identify, sg_sat_phy_event, sg_sat_read_gplog, sg_sat_set_features, sg_scan, sg_seek, sg_senddiag, sg_ses, sg_ses_microcode, sg_start, sg_stpg, sg_stream_ctl, sg_sync, sg_test_rwbuf, sg_timestamp, sg_turs, sg_unmap, sg_verify, sg_vpd, sg_wr_mode, sg_write_buffer, sg_write_long, sg_write_same, sg_write_verify, sg_write_x, sg_xcopy, sg_zone, sginfo, sgm_dd, and sgp_dd
Installed Library: libsgutils2.so
Installed Directories: None

Short Descriptions

rescan-scsi-bus.sh

adds or removes SCSI devices without having to reboot

scsi_logging_level

accesses Linux SCSI logging level information

scsi_mandat

checks SCSI device support for mandatory commands

scsi_readcap

does the SCSI READ CAPACITY command on disks

scsi_ready

does the SCSI TEST UNIT READY on devices

scsi_satl

checks for SCSI to ATA Translation (SAT) device support

scsi_start

starts one or more SCSI disks

scsi_stop

stops one or more SCSI disks

scsi_temperature

fetches the temperature of a SCSI device

sg_bg_ctl

performs a SCSI BACKGROUND CONTROL command on a device to perform "advanced background operations"

sg_compare_and_write

sends the SCSI COMPARE AND WRITE command to device

sg_copy_results

sends the SCSI RECEIVE COPY RESULTS command (XCOPY related)

sg_dd

copies data to and from files and devices. Specialised for devices that understand the SCSI command set

sg_decode_sense

takes SCSI sense data in binary or as a sequence of ASCII hexadecimal bytes and decodes it

sg_emc_trespass

changes ownership of a LUN from another Service-Processor to this one

sg_format

formats or resizes a SCSI disk (perhaps changes its block size)

sg_get_config

sends a SCSI GET CONFIGURATION command (MMC-4 +)

sg_get_elem_status

sends a SCSI GET PHYSICAL ELEMENT STATUS command to a device

sg_get_lba_status

sends the SCSI GET LBA STATUS command

sg_ident

sends a SCSI REPORT or SET IDENTIFYING INFORMATION command

sginfo

access mode page information for a SCSI (or ATAPI) device

sg_inq

sends a SCSI INQUIRY or ATA IDENTIFY (PACKET) DEVICE command and outputs the response

sg_logs

access log pages with SCSI LOG SENSE command

sg_luns

sends the SCSI REPORT LUNS command

sg_map

displays mapping between linux sg and other SCSI devices

sg_map26

maps a special file to a SCSI generic (sg) device (or vice versa)

sgm_dd

copies data to and from files and devices. Specialized for devices that understand the SCSI command set and does memory mapped transfers from sg devices

sg_modes

reads mode pages with the SCSI MODE SENSE command

sg_opcodes

reports information on supported SCSI commands or task management functions

sgp_dd

copies data to and from files and devices. Specialized for devices that understand the SCSI command set

sg_persist

sends a SCSI PERSISTENT RESERVE (IN or OUT) command to manipulate registrations and reservations

sg_prevent

sends a SCSI PREVENT ALLOW MEDIUM REMOVAL command

sg_raw

sends an arbitrary SCSI command to a device

sg_rbuf

reads data using the SCSI READ BUFFER command

sg_rdac

displays or modifies the RDAC Redundant Controller Page

sg_read

reads blocks of data continually from the same offset

sg_read_attr

performs a SCSI READ ATTRIBUTE command on a device

sg_read_block_limits

sends a SCSI READ BLOCK LIMITS command

sg_read_buffer

sends a SCSI READ BUFFER command

sg_readcap

sends a SCSI READ CAPACITY command

sg_read_long

sends a SCSI READ LONG command

sg_reassign

sends a SCSI REASSIGN BLOCKS command

sg_referrals

sends a SCSI REPORT REFERRALS command

sg_rep_pip

sends a SCSI REPORT PROVISIONING INITIALIZATION PATTERN command

sg_rep_zones

sends a SCSI REPORT ZONES command

sg_requests

sends one or more SCSI REQUEST SENSE commands

sg_reset

sends a SCSI device, target, bus or host reset; or checks reset state

sg_reset_wp

sends a SCSI RESET WRITE POINTER command

sg_rmsn

sends a SCSI READ MEDIA SERIAL NUMBER command

sg_rtpg

sends a SCSI REPORT TARGET PORT GROUPS command

sg_safte

fetches status information from a SCSI Accessed Fault-Tolerant Enclosure (SAF-TE) device

sg_sanitize

sends a SCSI SANITIZE command

sg_sat_identify

sends an ATA IDENTIFY (PACKET) DEVICE command via a SCSI to ATA Translation (SAT) layer

sg_sat_phy_event

sends an ATA READ LOG EXT command via a SAT pass through to fetch log page 11h which contains SATA phy event counters

sg_sat_read_gplog

sends an ATA READ LOG EXT command via a SCSI to ATA Translation (SAT) layer

sg_sat_set_features

sends an ATA SET FEATURES command via a SCSI to ATA Translation (SAT) layer

sg_scan

does a scan of sg devices (or given SCSI/ATAPI/ATA devices) and prints the results

sg_seek

performs a SCSI SEEK or PRE-FETCH command on a device and it's cache

sg_senddiag

performs a SCSI SEND DIAGNOSTIC command

sg_ses

sends controls and fetches the current status from a SCSI Enclosure Services (SES) device

sg_ses_microcode

sends microcode to a SCSI enclosure

sg_start

sends a SCSI START STOP UNIT command to start, stop, load or eject medium

sg_stpg

sends a SCSI SET TARGET PORT GROUPS command

sg_stream_ctl

performs a SCSI STREAM CONTROL or GET STREAM STATUS command on a device to open or close an I/O stream

sg_sync

sends a SCSI command to synchronize the cache

sg_test_rwbuf

tests the SCSI host adapter by issuing write and read operations on a device's buffer and calculating checksums

sg_timestamp

reports or sets the timestamp on a SCSI device

sg_turs

sends one or more SCSI TEST UNIT READY commands

sg_unmap

sends a SCSI UNMAP command

sg_verify

invokes SCSI VERIFY command(s) on a block device

sg_vpd

fetches Vital Product Data (VPD) pages using a SCSI INQUIRY command

sg_write_buffer

sends a SCSI WRITE BUFFER command

sg_write_long

sends a SCSI WRITE LONG command

sg_write_same

sends a SCSI WRITE SAME command

sg_write_verify

sends a SCSI WRITE AND VERIFY command

sg_write_x

performs SCSI WRITE commands on a device

sg_wr_mode

writes mode pages

sg_xcopy

copies data to and from files and devices using SCSI EXTENDED COPY (XCOPY)

sg_zone

performs SCSI ZONE commands on a device, such as OPEN, CLOSE, FINISH or SEQUENTIALIZE

libsgutils2.so

contains the sg3_utils API functions

Sysstat-12.7.2

Introduction to Sysstat

The Sysstat package contains utilities to monitor system performance and usage activity. Sysstat contains the sar utility, common to many commercial Unixes, and tools you can schedule via cron to collect and historize performance and activity data.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Sysstat Dependencies

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/sysstat

Installation of Sysstat

Install Sysstat by running the following commands:

sa_lib_dir=/usr/lib/sa    \
sa_dir=/var/log/sa        \
conf_dir=/etc/sysconfig   \
./configure --prefix=/usr \
            --disable-file-attr &&
make

This package does not come with a working test suite.

Now, as the root user:

make install

Command Explanations

sa_lib_dir: This environment variable specifies the location of the package-specific library directory.

sa_dir: This environment variable specifies the location of the directory containing the data files.

conf_dir: This environment variable specifies the location of the system configuration directory.

--disable-file-attr: Do not set attributes on files being installed. This parameter causes the installation to ignore the man group variable resulting in the man files having root: root ownership.

Note

Run ./configure --help to see other influential environment variables you can pass to configure. You may want to use the history and compressafter variables to customize the amount of data files kept on the system.

Configuring Sysstat

Config Files

/etc/sysconfig/sysstat and /etc/sysconfig/sysstat.ioconf

Cron Information

To begin gathering Sysstat history information, you must add to, or create a privileged user's crontab. The history data location is /var/log/sa. The user running Sysstat utilities via cron must have write access to this location.

Below is an example of what to install in the crontab. Adjust the parameters to suit your needs. Use man sa1 and man sa2 for information about the commands.

# 8am-7pm activity reports every 10 minutes during weekdays
0 8-18 * * 1-5 /usr/lib/sa/sa1 600 6 &

# 7pm-8am activity reports every hour during weekdays
0 19-7 * * 1-5 /usr/lib/sa/sa1 &

# Activity reports every hour on Saturday and Sunday
0 * * * 0,6 /usr/lib/sa/sa1 &

# Daily summary prepared at 19:05
5 19 * * * /usr/lib/sa/sa2 -A &

Ensure you submit the revised crontab to the cron daemon.

System Startup Information

At system startup, a LINUX RESTART message must be inserted in the daily data file to reinitialize the kernel counters. This can be automated by installing the /etc/rc.d/init.d/sysstat init script included in the blfs-bootscripts-20230101 package using the following command as the root user:

make install-sysstat

Contents

Installed Programs: cifsiostat, iostat, mpstat, pidstat, sadf, sar, and tapestat
Installed Libraries: None
Installed Directories: /usr/lib/sa, /usr/share/doc/sysstat-12.7.2 and /var/log/sa

Short Descriptions

cifsiostat

displays statistics about read and write operations on CIFS filesystems

iostat

reports CPU statistics and input/output statistics for devices and partitions

mpstat

writes activities for each available processor

pidstat

is used for monitoring individual tasks currently being managed by the Linux kernel

sadf

is used for displaying the contents of data files created by the sar command. But unlike sar, sadf can write its data in many different formats

sar

is used for displaying the contents of elected cumulative activity counters in the operating system

tapestat

is used for monitoring the activity of tape drives connected to a system

UDisks-2.9.4

Introduction to UDisks

The UDisks package provides a daemon, tools and libraries to access and manipulate disks and storage devices.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

UDisks Dependencies

Required

libatasmart-0.19, libblockdev-2.28, libgudev-237, libxslt-1.1.37, and Polkit-122

Required at runtime

btrfs-progs-6.1.3, dbus-1.14.6, dosfstools-4.2, gptfdisk-1.0.9, mdadm-4.2, and xfsprogs-6.1.1

Recommended
Optional (Required if building GNOME)

gobject-introspection-1.74.0

Optional

D-Bus Python-1.3.2 (for the integration tests), GTK-Doc-1.33.2, LVM2-2.03.18, PyGObject-3.42.2 (for the integration tests), exFAT, and libiscsi

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/udisks2

Installation of UDisks

Install UDisks by running the following commands:

./configure --prefix=/usr        \
            --sysconfdir=/etc    \
            --localstatedir=/var \
            --disable-static     &&
make

To test the results, issue: make check. A more thorough test can be run with make ci. You must first create the directories /var/run/udisks2 and /var/lib/udisks2, and the optional python modules should be present.

Now, as the root user:

make install

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

--enable-gtk-doc: Use this parameter if GTK-Doc is installed and you wish to rebuild and install the API documentation.

Contents

Installed Programs: udisksctl and umount.udisks2
Installed Library: libudisks2.so
Installed Directories: /etc/udisks2, /usr/include/udisks2, /usr/libexec/udisks2, /usr/share/gtk-doc/html/udisks2, and /var/lib/udisks2

Short Descriptions

udisksctl

is a command-line program used to interact with the udisksd daemon

umount.udisks2

is a command-line program used to unmount file systems that have been mounted by the UDisks daemon

libudisks2.so

contains the UDisks API functions

UnRar-6.2.6

Introduction to UnRar

The UnRar package contains a RAR extraction utility used for extracting files from RAR archives. RAR archives are usually created with WinRAR, primarily in a Windows environment.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/unrar

Installation of UnRar

Note

This package extracts the tarball to the unversioned directory unrar and not the expected directory unrar-6.2.6.

Install UnRar by running the following commands:

make -f makefile

This package does not come with a test suite.

Now, as the root user:

install -v -m755 unrar /usr/bin

Contents

Installed Program: unrar
Installed Libraries: None
Installed Directories: None

Short Descriptions

unrar

uncompresses a RAR archive

UnZip-6.0

Introduction to UnZip

The UnZip package contains ZIP extraction utilities. These are useful for extracting files from ZIP archives. ZIP archives are created with PKZIP or Info-ZIP utilities, primarily in a DOS environment.

This package is known to build and work properly using an LFS 11.3 platform.

Caution

The previous version of the UnZip package had some locale related issues. Currently there are no BLFS editors capable of testing these locale issues. Therefore, the locale related information is left on this page, but has not been tested. A more general discussion of these problems can be found in the Program Assumes Encoding section of the Locale Related Issues page.

Package Information

Additional Downloads

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/unzip

UnZip Locale Issues

Note

Use of UnZip in the JDK, Mozilla, DocBook or any other BLFS package installation is not a problem, as BLFS instructions never use UnZip to extract a file with non-ASCII characters in the file's name.

These issues are thought to be fixed in the patch. But since none of the editors have data to test this, the following workarounds are retained in case they might still be needed.

The UnZip package assumes that filenames stored in the ZIP archives created on non-Unix systems are encoded in CP850, and that they should be converted to ISO-8859-1 when writing files onto the filesystem. Such assumptions are not always valid. In fact, inside the ZIP archive, filenames are encoded in the DOS codepage that is in use in the relevant country, and the filenames on disk should be in the locale encoding. In MS Windows, the OemToChar() C function (from User32.DLL) does the correct conversion (which is indeed the conversion from CP850 to a superset of ISO-8859-1 if MS Windows is set up to use the US English language), but there is no equivalent in Linux.

When using unzip to unpack a ZIP archive containing non-ASCII filenames, the filenames are damaged because unzip uses improper conversion when any of its encoding assumptions are incorrect. For example, in the ru_RU.KOI8-R locale, conversion of filenames from CP866 to KOI8-R is required, but conversion from CP850 to ISO-8859-1 is done, which produces filenames consisting of undecipherable characters instead of words (the closest equivalent understandable example for English-only users is rot13). There are several ways around this limitation:

1) For unpacking ZIP archives with filenames containing non-ASCII characters, use WinZip while running the Wine Windows emulator.

2) Use bsdtar -xf from libarchive-3.6.2 to unpack the ZIP archive. Then fix the damage made to the filenames using the convmv tool (https://j3e.de/linux/convmv/). The following is an example for the zh_CN.UTF-8 locale:

convmv -f cp936 -t utf-8 -r --nosmart --notest \
    </path/to/unzipped/files>

Installation of UnZip

First apply the patch:

patch -Np1 -i ../unzip-6.0-consolidated_fixes-1.patch

Now compile the package:

make -f unix/Makefile generic

The test suite does not work for target generic.

Now, as the root user:

make prefix=/usr MANDIR=/usr/share/man/man1 \
 -f unix/Makefile install

Command Explanations

make -f unix/Makefile generic: This target begins by running a configure script (unlike the older targets such as linux and linux_noasm) which creates a flags file that is then used in the build. This ensures that the 32-bit x86 build receives the right flags to unzip files which which are larger than 2GB when extracted.

Contents

Installed Programs: funzip, unzip, unzipfsx, zipgrep, and zipinfo
Installed Libraries: None
Installed Directories: None

Short Descriptions

funzip

allows the output of unzip commands to be redirected

unzip

lists, tests or extracts files from a ZIP archive

unzipfsx

is a self-extracting stub that can be prepended to a ZIP archive. Files in this format allow the recipient to decompress the archive without installing UnZip

zipgrep

searches files in a ZIP archive for lines matching a pattern

zipinfo

produces technical information about the files in a ZIP archive, including file access permissions, encryption status, type of compression, etc

UPower-1.90.0

Introduction to UPower

The UPower package provides an interface for enumerating power devices, listening to device events and querying history and statistics. Any application or service on the system can access the org.freedesktop.UPower service via the system message bus.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

UPower Dependencies

Required

libgudev-237, libusb-1.0.26, and Polkit-122

Optional (Required if building GNOME)

gobject-introspection-1.74.0

Optional

GTK-Doc-1.33.2, libxslt-1.1.37, docbook-xsl-nons-1.79.2, PyGObject-3.42.2, dbusmock-0.28.7, umockdev-0.17.16 (for part of the test suite), and libimobiledevice

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/upower

Installation of UPower

First, remove an unneeded dependency from a test:

sed '/parse_version/d' -i src/linux/integration-test.py

Install UPower by running the following commands:

mkdir build                         &&
cd    build                         &&
meson --prefix=/usr                        \
      --buildtype=release                  \
      -Dgtk-doc=false                      \
      -Dman=false                          \
      -Dsystemdsystemunitdir=no            \
      -Dudevrulesdir=/usr/lib/udev/rules.d \
      ..                            &&
ninja

To test the results, issue: LC_ALL=C ninja test. Some checks may not pass due to missing files. Test suite should be run from a local GUI session started with dbus-launch.

Now, as the root user:

ninja install

Command Explanations

-Dgtk-doc=false: Prevents building the documentation. Remove this if you have GTK-Doc installed and wish to build the documentation.

-Dman=false: Prevents building the manual pages. Remove this if you have libxslt-1.1.37 and docbook-xsl-nons-1.79.2 installed and wish to build the manual pages.

-Dsystemdsystemunitdir=no: Removes the dependency on systemd.

-Dudevrulesdir=/usr/lib/udev/rules.d: Tells the build system where to install udev rules because the information is missing in /usr/lib/pkgconfig/libudev.pc

Contents

Installed Program: upower
Installed Libraries: libupower-glib.so
Installed Directories: /etc/UPower, /usr/include/libupower-glib, and /var/lib/upower

Short Descriptions

upower

is the UPower command line tool

libupower-glib.so

contains the UPower API functions

usbutils-015

Introduction to USB Utils

The USB Utils package contains utilities used to display information about USB buses in the system and the devices connected to them.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

USB Utils Dependencies

Required

libusb-1.0.26

Recommended

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/usbutils

Installation of USB Utils

Install USB Utils by running the following commands:

autoreconf -fiv &&

./configure --prefix=/usr --datadir=/usr/share/hwdata &&
make

This package does not come with a test suite.

Now, as the root user:

make install

To install the usb.ids data file, using Wget-1.21.3, run, as the root user:

install -dm755 /usr/share/hwdata/ &&
wget http://www.linux-usb.org/usb.ids -O /usr/share/hwdata/usb.ids

The script lsusb.py displays information in a more easily readable form than lsusb. To find the options, use lsusb.py -h. One form of use recommended by the developer is lsusb.py -ciu.

Configuring USB Utils

The usb.ids data file is constantly being updated. To get a current version of this file, using Wget-1.21.3, periodically run again, as the root user:

wget http://www.linux-usb.org/usb.ids -O /usr/share/hwdata/usb.ids

You should update the /usr/share/hwdata/usb.ids file periodically. If you've installed Fcron-3.2.1 and completed the section on periodic jobs, execute the following commands, as the root user, to create a weekly cron job:

cat > /etc/cron.weekly/update-usbids.sh << "EOF" &&
#!/bin/bash
/usr/bin/wget http://www.linux-usb.org/usb.ids -O /usr/share/hwdata/usb.ids
EOF
chmod 754 /etc/cron.weekly/update-usbids.sh

Contents

Installed Programs: lsusb, lsusb.py, usb-devices, and usbhid-dump
Installed Libraries: None
Installed Directories: None

Short Descriptions

lsusb

is a utility for displaying information about all USB buses in the system and all devices connected to them, but not in human friendly form

lsusb.py

displays information about all USB buses in the system and all devices connected to them in reasonable human friendly form

usb-devices

is a shell script that displays details of USB buses and devices connected to them. It is designed to be used if /proc/bus/usb/devices is not available on your system

usbhid-dump

is used to dump report descriptors and streams from HID (human interface device) interfaces of USB devices

Which-2.21 and Alternatives

The presence or absence of the which program in the main LFS book is probably one of the most contentious issues on the mailing lists. It has resulted in at least one flame war in the past. To hopefully put an end to this once and for all, presented here are two options for equipping your system with which. The question of which which is for you to decide.

Introduction to GNU Which

The first option is to install the actual GNU which package.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/which

Installation of Which

Install which by running the following commands:

./configure --prefix=/usr &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Contents

Installed Program: which
Installed Libraries: None
Installed Directories: None

Short Descriptions

which

shows the full path of (shell) commands installed in your PATH

The 'which' Script

The second option (for those who don't want to install the package) is to create a simple script (execute as the root user):

cat > /usr/bin/which << "EOF"
#!/bin/bash
type -pa "$@" | head -n 1 ; exit ${PIPESTATUS[0]}
EOF
chmod -v 755 /usr/bin/which
chown -v root:root /usr/bin/which

This should work OK and is probably the easiest solution for most cases, but is not the most comprehensive implementation.

Zip-3.0

Introduction to Zip

The Zip package contains Zip utilities. These are useful for compressing files into ZIP archives.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/zip

Installation of Zip

Install Zip by running the following commands:

make -f unix/Makefile generic_gcc

This package does not come with a test suite.

Now, as the root user:

make prefix=/usr MANDIR=/usr/share/man/man1 -f unix/Makefile install

Command Explanations

make prefix=/usr -f unix/Makefile install: This command overrides the prefix variable that is set to /usr/local in the unix/Makefile. Alternatives to generic_gcc can be seen with a make -f unix/Makefile list command.

Contents

Installed Programs: zip, zipcloak, zipnote, and zipsplit
Installed Libraries: None
Installed Directories: None

Short Descriptions

zip

compresses files into a ZIP archive

zipcloak

is a utility to encrypt and decrypt a ZIP archive

zipnote

reads or writes comments stored in a ZIP file

zipsplit

is a utility to split ZIP files into smaller files

Chapter 13. Programming

A base LFS system can be used as a development platform, however the base system only includes language support for C, C++, Perl, and Python. This chapter provides instructions to build many popular programming environments to greatly expand your system's development capabilities.

Autoconf2.13

Introduction to Autoconf2.13

Autoconf2.13 is an old version of Autoconf . This old version accepts switches which are not valid in more recent versions. Now that firefox has started to use python2 for configuring, this old version is required even if configure files have not been changed.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/autoconf213

Installation of Autoconf2.13

Install Autoconf by running the following commands:

patch -Np1 -i ../autoconf-2.13-consolidated_fixes-1.patch &&
mv -v autoconf.texi autoconf213.texi                      &&
rm -v autoconf.info                                       &&
./configure --prefix=/usr --program-suffix=2.13           &&
make

To test the installation issue make check (all 253 tests should pass).

Now, as the root user:

make install                                      &&
install -v -m644 autoconf213.info /usr/share/info &&
install-info --info-dir=/usr/share/info autoconf213.info

Command Explanations

mv -v autoconf.texi autoconf213.texi: ensure that the info file added by this package will not overwrite the more recent version.

rm -v autoconf.info: ensure that the info file will be created by the current version of texinfo.

--program-suffix=2.13: ensure that the installed programs have the version added to their names, so that only a script which specifically looks for these old versions will find them.

install -v -m644 ...: the patch removes install-info from the Makefile because that would install (and if necessary recreate) standards.info which is an old version, so now autoconf213.info has to be manually installed.

Contents

Installed Programs: autoconf2.13, autoheader2.13, autoreconf2.13, autoscan2.13, autoupdate2.13, and ifnames2.13
Installed Library: None
Installed Directory: /usr/share/autoconf-2.13

Short Descriptions

autoconf2.13

Produces shell scripts that automatically configure software source code packages to adapt to many kinds of Unix-like systems

autoheader2.13

is a tool for creating template files of C #define statements for configure to use

autoreconf2.13

This automatically runs autoconf2.13, autoheader2.13, aclocal, automake, gettextize and libtoolize in the right order when changes have been made to autoconf or automake template files

autoscan2.13

Can be used as a preliminary step in creating a configure.in file

autoupdate2.13

Modifies a configure.in file that still calls autoconf macros by their old names to use the current macro names

ifnames2.13

Prints the identifiers that the package uses in C preprocessor conditionals [If a package has already been set up to have some portability, this program can help determine what configure needs to check for. It can also fill in gaps in a configure.in file generated by autoscan]

Cbindgen-0.24.3

Introduction to Cbindgen

Cbindgen can be used to generate C bindings for Rust code.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

cbindgen Dependencies

Required

rustc-1.67.1

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/cbindgen

Installation of cbindgen

Note

As with most Rust packages, this needs a network connection to check the current versions of the required cargo crates, and to download them if they are not already present.

Install cbindgen by running the following commands:

cargo build --release

To test the results, issue: cargo test. Three tests in the final suite are known to fail.

Now, as the root user:

install -Dm755 target/release/cbindgen /usr/bin/

Contents

Installed Program: cbindgen
Installed Library: none
Installed Directory: none

Short Descriptions

cbindgen

generates C bindings for Rust code

Clisp-2.49

Introduction to Clisp

GNU Clisp is a Common Lisp implementation which includes an interpreter, compiler, debugger, and many extensions.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

Clisp Dependencies

Recommended
Optional

libnsl-2.0.0 and libffcall

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/clisp

Installation of Clisp

Note

This package does not support parallel build.

If you are building on a 32-bit system, work around a bug in GCC caused by the latest version of binutils:

case $(uname -m) in
    i?86) export CFLAGS="${CFLAGS:--O2 -g} -falign-functions=4" ;;
esac

Remove two tests, which fail for unknown reasons:

sed -i -e '/socket/d' -e '/"streams"/d' tests/tests.lisp

Install Clisp by running the following commands:

If you are building clisp against libffcall, apply the patch to fix a build failure with current readline:

patch -Np1 -i ../clisp-2.49-readline7_fixes-1.patch

Install Clisp by running the following commands:

mkdir build &&
cd    build &&

../configure --srcdir=../                       \
             --prefix=/usr                      \
             --docdir=/usr/share/doc/clisp-2.49 \
             --with-libsigsegv-prefix=/usr &&

ulimit -s 16384 &&
make -j1

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

ulimit -s 16384: this increases the maximum stack size, as recommended by the configure.

--docdir=/usr/share/doc/clisp-2.49: this ensures the html documentation will go into a versioned directory instead of straight into /usr/share/html/.

--with-libsigsegv-prefix=/usr: use this to tell configure that you have installed libsigsegv in /usr, otherwise it will not be found.

--with-libffcall-prefix=/usr: use this to tell configure that you have installed the optional libffcall in /usr, otherwise like libsigsegv it will not be found.

Contents

Installed Programs: clisp, clisp-link
Installed Libraries: various static libraries in /usr/lib/clisp-2.49/base/
Installed Directories: /usr/lib/clisp-2.49 /usr/share/doc/clisp-2.49 /usr/share/emacs/site-lisp;

Short Descriptions

clisp

is an ANSI Common Lisp compiler, interpreter, and debugger

clisp-link

is used to link an external module to clisp

CMake-3.25.2

Introduction to CMake

The CMake package contains a modern toolset used for generating Makefiles. It is a successor of the auto-generated configure script and aims to be platform- and compiler-independent. A significant user of CMake is KDE since version 4.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

  • Download (HTTP): https://cmake.org/files/v3.25/cmake-3.25.2.tar.gz

  • Download MD5 sum: 24cde56ea2dc5e22d7f5d1abc7a82258

  • Download size: 10 MB

  • Estimated disk space required: 354 MB (add 1.1 GB for tests)

  • Estimated build time: 1.6 SBU (add 3.2 SBU for tests, both using parallelism=4)

CMake Dependencies

Recommended
Optional

GCC-12.2.0 (for gfortran), git-2.39.2 (for use during tests), Mercurial-6.3.2 (for use during tests), Qt-5.15.8 (for the Qt-based GUI), sphinx-6.1.3 (for building documents), Subversion-1.14.2 (for testing), and rhash

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/cmake

Installation of CMake

Install CMake by running the following commands:

sed -i '/"lib64"/s/64//' Modules/GNUInstallDirs.cmake &&

./bootstrap --prefix=/usr        \
            --system-libs        \
            --mandir=/share/man  \
            --no-system-jsoncpp  \
            --no-system-librhash \
            --docdir=/share/doc/cmake-3.25.2 &&
make

To test the results, issue: LC_ALL=en_US.UTF-8 bin/ctest -j<N> -O cmake-3.25.2-test.log, where <N> is an integer between 1 and the number of system cores. Setting LC_ALL is needed to prevent some test failures when some of the locale variables are set to non English locales. One test, BundleUtilities, is known to fail.

If you want to investigate a problem with a given "problem1-test", use bin/ctest -R "problem1-test" and, to omit it, use bin/ctest -E "problem1-test". These options can be used together: bin/ctest -R "problem1-test" -E "problem2-test". Option -N can be used to display all available tests, and you can run bin/ctest for a sub-set of tests by using separated by spaces names or numbers as options. Option --help can be used to show all options.

Now, as the root user:

make install

Command Explanations

sed ... Modules/GNUInstallDirs.cmake: This command disables applications using cmake from attempting to install files in /usr/lib64/.

--system-libs: This switch forces the build system to link against Zlib, Bzip2, cURL, nghttp2, Expat and libarchive installed on the system.

--no-system-jsoncpp: This switch removes the JSON-C++ library from the list of system libraries. A bundled version of that library is used instead.

--no-system-librhash: This switch removes the librhash library from the list of system libraries used. A bundled version of that library is used instead.

--no-system-{curl,libarchive,libuv,nghttp2}: Use the corresponding option in the list for the bootstrap if one recommended dependency is not installed. A bundled version of the dependency will be used instead.

--qt-gui: This switch enables building the Qt-based GUI for CMake.

--parallel=: This switch enables performing the CMake bootstrap with multiple jobs at one time.

Contents

Installed Programs: ccmake, cmake, cmake-gui (optional), cpack, and ctest
Installed Libraries: None
Installed Directories: /usr/share/cmake-3.25 and /usr/share/doc/cmake-3.25.2

Short Descriptions

ccmake

is a curses based interactive frontend to cmake

cmake

is the makefile generator

cmake-gui

(optional) is the Qt-based frontend to cmake

cpack

is the CMake packaging program

ctest

is a testing utility for cmake-generated build trees

Doxygen-1.9.6

Introduction to Doxygen

The Doxygen package contains a documentation system for C++, C, Java, Objective-C, Corba IDL and to some extent PHP, C# and D. It is useful for generating HTML documentation and/or an off-line reference manual from a set of documented source files. There is also support for generating output in RTF, PostScript, hyperlinked PDF, compressed HTML, and Unix man pages. The documentation is extracted directly from the sources, which makes it much easier to keep the documentation consistent with the source code.

You can also configure Doxygen to extract the code structure from undocumented source files. This is very useful to quickly find your way in large source distributions. Used along with Graphviz, you can also visualize the relations between the various elements by means of include dependency graphs, inheritance diagrams, and collaboration diagrams, which are all generated automatically.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

  • Download (HTTP): https://doxygen.nl/files/doxygen-1.9.6.src.tar.gz

  • Download MD5 sum: 5f7ab15c8298d013c5ef205a4febc7b4

  • Download size: 5.1 MB

  • Estimated disk space required: 217 MB (with tests)

  • Estimated build time: 1.4 SBU (using parallelism=4; with tests)

Doxygen Dependencies

Required

CMake-3.25.2 and git-2.39.2

Optional

Graphviz-7.1.0, ghostscript-10.00.0, libxml2-2.10.3 (required for the tests), LLVM-15.0.7 (with clang), Python-2.7.18, Qt-5.15.8 (for doxywizard), texlive-20220321 (or install-tl-unx), xapian-1.4.22 (for doxyindexer), and javacc

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/doxygen

Installation of Doxygen

Install Doxygen by running the following commands:

mkdir -v build &&
cd       build &&

cmake -G "Unix Makefiles"         \
      -DCMAKE_BUILD_TYPE=Release  \
      -DCMAKE_INSTALL_PREFIX=/usr \
      -Wno-dev .. &&

make

To test the results, issue: make tests.

If you wish to generate the package documentation, you must have Python, TeX Live (for HTML docs) and Ghostscript (for PDF docs) installed, then issue the following command:

cmake -DDOC_INSTALL_DIR=share/doc/doxygen-1.9.6 -Dbuild_doc=ON .. &&

make docs

Now, as the root user:

make install &&
install -vm644 ../doc/*.1 /usr/share/man/man1

If you have generated the package documentation, then the man pages are automatically installed, and you do not need to run the last install ... command.

Command Explanations

-Dbuild_wizard=ON: Use this switch if Qt5 is installed and you wish to build the GUI front-end.

-Dbuild_search=ON: Use this switch if xapian is installed and you wish to build external search tools (doxysearch.cgi and doxyindexer).

-Duse_libclang=ON: Use this switch if llvm with clang are installed, to add support for libclang parsing.

Configuring Doxygen

There is no real configuration necessary for the Doxygen package although three additional packages are required if you wish to use extended capabilities. If you need to use the language translation features, you must have Python-2.7.18 installed. If you require formulas to create PDF documentation, then you must have texlive-20220321 installed. If you require formulas to convert PostScript files to bitmaps, then you must have ghostscript-10.00.0 installed.

Contents

Installed Programs: doxygen and optionally, doxywizard, doxyindexer and doxysearch.cgi
Installed Libraries: None
Installed Directory: /usr/share/doc/doxygen-1.9.6

Short Descriptions

doxygen

is a command-line based utility used to generate template configuration files and then generate documentation from these templates. Use doxygen --help for an explanation of the command-line parameters

doxywizard

is a GUI front-end for configuring and running doxygen

doxyindexer

generates a search index called doxysearch.db from one or more search data files produced by doxygen. See, e.g. https://javacc.github.io/javacc/

doxysearch.cgi

is a CGI program to search the data indexed by doxyindexer

GCC-12.2.0

Introduction to GCC

The GCC package contains the GNU Compiler Collection. This page describes the installation of compilers for the following languages: C, C++, Fortran, Objective C, Objective C++, and Go. Since C and C++ are installed in LFS, this page is either for upgrading C and C++, or for installing additional compilers.

Note

Additional languages, among which D and ADA, are available in the collection. D and ADA have a binary bootstrap requirement for the first installation, so their installation is not described here. To install them, you can proceed along the same lines as below after installing the corresponding compiler from a binary package, adding ada or d to the --enable-languages line.

This package is known to build and work properly using an LFS 11.3 platform.

Caution

If you are upgrading GCC from any other version prior to 12.2.0, then you must be careful compiling 3rd party kernel modules. You should ensure that the kernel and all its native modules are also compiled using the same version of GCC that you use to build the 3rd party module. This issue does not affect native kernel (and kernel modules) updates, as the instructions below are a complete reinstallation of GCC. If you have existing 3rd party modules installed, ensure they are recompiled using the updated version of GCC. As always, never update the kernel headers from the ones used when Glibc was compiled during LFS.

Some system headers need to be fixed to be used with GCC. This is done during the installation of GCC, and the fixed headers are installed in /usr/lib/gcc/<machine triplet>/<GCC version>/include-fixed . This is harmless if GCC is built during the LFS stage. But if you reinstall GCC in BLFS, some of the BLFS packages may be fixed. If one of those packages is reinstalled afterwards, the fixed headers are not updated, which may lead to version mismatches. In case that happens, the fixed headers must be updated by running (as root): /usr/libexec/gcc/x86_64-pc-linux-gnu/12.2.0/install-tools/mkheaders . The machine triplet may be different on a 32-bit system.

Package Information

GCC Dependencies

Optional

GDB-13.1, Valgrind-3.20.0 (for tests), and ISL (to enable graphite optimization)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/gcc

Installation of GCC

Important

Even if you specify only languages other than C and C++ to the ./configure command below, the installation process will overwrite your existing GCC C and C++ compilers and libraries. Running the full suite of tests is recommended.

Do not continue with the make install command until you are confident the build was successful. You can compare your test results with those found at https://gcc.gnu.org/ml/gcc-testresults/. You may also want to refer to the information found in the GCC section of Chapter 8 in the LFS book (../../../../lfs/view/11.3/chapter08/gcc.html).

The instructions below are intentionally performing a bootstrap process. Bootstrapping is needed for robustness and is highly recommended when upgrading the compilers version. To disable bootstrap anyway, add --disable-bootstrap to the ./configure options below.

Install GCC by running the following commands:

case $(uname -m) in
  x86_64)
    sed -i.orig '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64
  ;;
esac

mkdir build                                            &&
cd    build                                            &&

../configure                                           \
    --prefix=/usr                                      \
    --disable-multilib                                 \
    --with-system-zlib                                 \
    --enable-default-pie                               \
    --enable-default-ssp                               \
    --enable-languages=c,c++,fortran,go,objc,obj-c++ &&
make

If you have installed additional packages such as Valgrind and GDB, the GCC part of the test suite will run more tests than in LFS. Some of those will report FAIL and others XPASS (pass when expected to FAIL). As of gcc-12.2.0, about 60 FAIL occur in the guality suite, as well as miscellaneous failures throughout the rest of the test suite, fifteen of which are already present in the GCC tests of LFS. If all the compilers above are built, there will be around 80 unexpected failures out of over 482,000 tests. To run the tests, issue:

ulimit -s 32768 &&
make -k check

The tests are very long, and the results may be hard to find in the logs, specially if you use parallel jobs with make. You can get a summary of the tests with:

../contrib/test_summary

Now, as the root user:

make install &&

mkdir -pv /usr/share/gdb/auto-load/usr/lib              &&
mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib &&

chown -v -R root:root \
    /usr/lib/gcc/*linux-gnu/12.2.0/include{,-fixed}

Some packages expect to find the C preprocessor in /lib or may refer to the C compiler under the name cc. The following symbolic links are not needed if you have followed the LFS instructions, since they have been already created. If you do not have them on your system, issue as the root user:

ln -v -sf ../usr/bin/cpp /lib          &&
ln -v -sf gcc /usr/bin/cc              &&
install -v -dm755 /usr/lib/bfd-plugins &&
ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/12.2.0/liblto_plugin.so /usr/lib/bfd-plugins/

Command Explanations

mkdir build; cd build: The GCC documentation recommends building the package in a dedicated build directory.

--disable-multilib: This parameter ensures that files are created for the specific architecture of your computer.

--with-system-zlib: Uses the system zlib instead of the bundled one. zlib is used for compressing and decompressing GCC's intermediate language in LTO (Link Time Optimization) object files.

--enable-default-pie: Makes the -fpie option the default when compiling programs. Together with the ASLR feature enabled in the kernel, this defeats some kind of attacks based on known memory layouts.

--enable-default-ssp: Makes the -fstack-protector-strong option the default when compiling programs. SSP is a technique preventing alteration of the program flow by corrupting the parameter stack.

--enable-languages=c,c++,fortran,go,objc,obj-c++: This command identifies which languages to build. You may modify this command to remove undesired languages. Other languages can be added, including ADA, D, BRIG (add brig to the list of enabled languages), a binary format for HSAIL (Heterogeneous System Architecture Intermediate Language), and JIT (add jit to the list of enabled languages), a library which can be linked into interpreters that want to generate machine code on the fly at run-time. They have not been tested by the BLFS developers.

ulimit -s 32768: This command prevents several tests from running out of stack space.

make -k check: This command runs the test suite without stopping if any errors are encountered.

../contrib/test_summary: This command will produce a summary of the test suite results. You can append | grep -A7 Summ to the command to produce an even more condensed version of the summary. You may also wish to redirect the output to a file for review and comparison later on.

mv -v /usr/lib/*gdb.py ...: The installation stage puts some files used by gdb under the /usr/lib directory. This generates spurious error messages when performing ldconfig. This command moves the files to another location.

chown -v -R root:root /usr/lib/gcc/*linux-gnu/...: If the package is built by a user other than root, the ownership of the installed include directory (and its content) will be incorrect. This command changes the ownership to the root user and group.

Contents

Some program and library names and descriptions are not listed here, but can be found at LFS section for GCC as they were initially installed during the building of LFS.

Installed Programs: gccgo, gfortran, go, and gofmt, hard-linked to architecture specific names
Installed Libraries: libgfortran.{so,a}, libgo.{so,a}, libgobegin.a, libgolibbegin.a, libobjc.{so,a}, and numerous other run-time libraries and executables
Installed Directories: /usr/lib/go

Short Descriptions

gccgo

is a GCC-based compiler for the Go language

go

is a tool for managing Go source code

gofmt

is a tool for formatting Go source code

gfortran

is a GCC-based compiler for the Fortran language

GC-8.2.2

Introduction to GC

The GC package contains the Boehm-Demers-Weiser conservative garbage collector, which can be used as a garbage collecting replacement for the C malloc function or C++ new operator. It allows you to allocate memory basically as you normally would, without explicitly deallocating memory that is no longer useful. The collector automatically recycles memory when it determines that it can no longer be otherwise accessed. The collector is also used by a number of programming language implementations that either use C as intermediate code, want to facilitate easier interoperation with C libraries, or just prefer the simple collector interface. Alternatively, the garbage collector may be used as a leak detector for C or C++ programs, though that is not its primary goal.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Optional

libatomic_ops-7.6.14

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/gc

Installation of GC

Install GC by running the following commands:

./configure --prefix=/usr      \
            --enable-cplusplus \
            --disable-static   \
            --docdir=/usr/share/doc/gc-8.2.2 &&
make

To test the results, issue: make check.

Now, as the root user:

make install &&
install -v -m644 doc/gc.man /usr/share/man/man3/gc_malloc.3

Command Explanations

--docdir=/usr/share/doc/gc-8.2.2: This option is used so the package will install the documentation in a versioned directory.

--enable-cplusplus: This parameter enables the building and installing of the C++ library along with the standard C library.

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: None
Installed Libraries: libcord.so, libgc.so, libgccpp.so, and libgctba.so
Installed Directories: /usr/include/gc and /usr/share/doc/gc-8.2.2

Short Descriptions

libcord.so

contains a tree-based string library

libgc.so

contains a C interface to the conservative garbage collector, primarily designed to replace the C malloc function

libgccpp.so

contains a C++ interface to the conservative garbage collector

libgctba.so

contains a C++ interface to throw bad allocations

GDB-13.1

Introduction to GDB

GDB, the GNU Project debugger, allows you to see what is going on inside another program while it executes -- or what another program was doing at the moment it crashed. Note that GDB is most effective when tracing programs and libraries that were built with debugging symbols and not stripped.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

GDB Dependencies

Recommended Runtime Dependency
Optional

Doxygen-1.9.6, GCC-12.2.0 (ada, gfortran, and go are used for tests), Guile-3.0.9, Python-2.7.18, rustc-1.67.1 (used for some tests), Valgrind-3.20.0, and SystemTap (run-time, used for tests)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/gdb

Installation of GDB

Install GDB by running the following commands:

mkdir build &&
cd    build &&

../configure --prefix=/usr          \
             --with-system-readline \
             --with-python=/usr/bin/python3 &&
make

Optionally, to build the API documentation using Doxygen-1.9.6, run:

make -C gdb/doc doxy

To test the results, issue:

pushd gdb/testsuite &&
make  site.exp      &&
echo  "set gdb_test_timeout 120" >> site.exp &&
runtest
popd

See gdb/testsuite/README and TestingGDB. There are many problems with the test suite:

  • Clean directories are needed if re-running the tests. For that reason, make a copy of the compiled source code directory before the tests in case you need to run the tests again.

  • Results depend on installed compilers.

  • A test run of the test suite had 33 unexpected failures out of over 106000 tests.

  • On some systems, the gdb.tui test suite will fail if running over SSH.

  • On some AMD-based systems, over 200 additional tests may fail due to a difference in the threading implementation on those CPUs.

Now, as the root user:

make -C gdb install

If you have built the API documentation, it is now in gdb/doc/doxy. You can install it (as the root user):

install -d /usr/share/doc/gdb-13.1 &&
rm -rf gdb/doc/doxy/xml &&
cp -Rv gdb/doc/doxy /usr/share/doc/gdb-13.1

Command Explanations

--with-system-readline: This switch forces GDB to use the copy of Readline installed in LFS.

--with-python=/usr/bin/python3: This switch forces GDB to use Python 3. Remove this switch if you have installed Python-2.7.18 and want to use it instead of Python 3.

Contents

Installed Programs: gcore, gdb and gdbserver
Installed Library: None
Installed Directories: /usr/{include,share}/gdb and /usr/share/doc/gdb-13.1

Short Descriptions

gcore

generates a core dump of a running program

gdb

is the GNU Debugger

gdbserver

is a remote server for the GNU debugger (it allows programs to be debugged from a different machine)

Git-2.39.2

Introduction to Git

Git is a free and open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Every Git clone is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server. Branching and merging are fast and easy to do. Git is used for version control of files, much like tools such as Mercurial-6.3.2, Bazaar, Subversion-1.14.2, CVS, Perforce, and Team Foundation Server.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

  • Download (HTTP): https://www.kernel.org/pub/software/scm/git/git-2.39.2.tar.xz

  • Download MD5 sum: 32d34dc65ae0955cc68c7152b5ca8b13

  • Download size: 6.8 MB

  • Estimated disk space required: 392 MB (with downloaded documentation, add 18 MB to build documentation)

  • Estimated build time: 0.3 SBU (with parallelism=4; add 0.4 SBU for building documentation and 1.6 SBU (disk speed dependent) for tests, both with parallelism=4)

Additional Downloads

Git Dependencies

Recommended
Optional

GnuPG-2.4.0 (runtime, may be used to sign Git commits or tags, or verify the signatures of them), OpenSSH-9.2p1 (runtime, needed to use Git over ssh), pcre2-10.42 (or the deprecated PCRE-8.45), in either case configured with --enable-jit, Subversion-1.14.2 with Perl bindings (runtime, for git svn), Tk-8.6.13 (gitk, a simple Git repository viewer, uses Tk at runtime), Valgrind-3.20.0, Authen::SASL and MIME::Base64 (both runtime, for git send-email), and IO-Socket-SSL-2.081 (runtime, for git send-email to connect to a SMTP server with SSL encryption)

Optional (to create the man pages, html docs and other docs)

xmlto-0.0.28 and asciidoc-10.2.0 , and also dblatex (for the PDF version of the user manual), and docbook2x to create info pages

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/git

Installation of Git

Install Git by running the following commands:

./configure --prefix=/usr \
            --with-gitconfig=/etc/gitconfig \
            --with-python=python3 &&
make

You can build the man pages and/or html docs, or use downloaded ones. If you choose to build them, use the next two instructions.

If you have installed asciidoc-10.2.0 you can create the html version of the man pages and other docs:

make html

If you have installed asciidoc-10.2.0 and xmlto-0.0.28 you can create the man pages:

make man

The test suite can be run in parallel mode. To run the test suite, issue: make test. If run as a normal user, 0 tests should be reported as failed in the final summary.

Now, as the root user:

make perllibdir=/usr/lib/perl5/5.36/site_perl install

If you created the man pages and/or html docs

Install the man pages as the root user:

make install-man

Install the html docs as the root user:

make htmldir=/usr/share/doc/git-2.39.2 install-html

If you downloaded the man pages and/or html docs

If you downloaded the man pages untar them as the root user:

tar -xf ../git-manpages-2.39.2.tar.xz \
    -C /usr/share/man --no-same-owner --no-overwrite-dir

If you downloaded the html docs untar them as the root user:

mkdir -vp   /usr/share/doc/git-2.39.2 &&
tar   -xf   ../git-htmldocs-2.39.2.tar.xz \
      -C    /usr/share/doc/git-2.39.2 --no-same-owner --no-overwrite-dir &&

find        /usr/share/doc/git-2.39.2 -type d -exec chmod 755 {} \; &&
find        /usr/share/doc/git-2.39.2 -type f -exec chmod 644 {} \;

Reorganize text and html in the html-docs (both methods)

For both methods, the html-docs include a lot of plain text files. Reorganize the files as the root user:

mkdir -vp /usr/share/doc/git-2.39.2/man-pages/{html,text}         &&
mv        /usr/share/doc/git-2.39.2/{git*.txt,man-pages/text}     &&
mv        /usr/share/doc/git-2.39.2/{git*.,index.,man-pages/}html &&

mkdir -vp /usr/share/doc/git-2.39.2/technical/{html,text}         &&
mv        /usr/share/doc/git-2.39.2/technical/{*.txt,text}        &&
mv        /usr/share/doc/git-2.39.2/technical/{*.,}html           &&

mkdir -vp /usr/share/doc/git-2.39.2/howto/{html,text}             &&
mv        /usr/share/doc/git-2.39.2/howto/{*.txt,text}            &&
mv        /usr/share/doc/git-2.39.2/howto/{*.,}html               &&

sed -i '/^<a href=/s|howto/|&html/|' /usr/share/doc/git-2.39.2/howto-index.html &&
sed -i '/^\* link:/s|howto/|&html/|' /usr/share/doc/git-2.39.2/howto-index.txt

Command Explanations

--with-gitconfig=/etc/gitconfig: This sets /etc/gitconfig as the file that stores the default, system wide, Git settings.

--with-python=python3: Use this switch to use Python 3, instead of the EOL'ed Python 2. Python is used for the git p4 interface to Perforce repositories, and also used in some tests.

--with-libpcre2: Use this switch if PCRE2 is installed and has been built with the non-default JIT enabled.

--with-libpcre1: As an alternative to PCRE2, use this switch if the deprecated PCRE is installed and has been built with the non-default JIT enabled.

tar -xf ../git-manpages-2.39.2.tar.gz -C /usr/share/man --no-same-owner: This untars git-manpages-2.39.2.tar.gz. The -C option makes tar change directory to /usr/share/man before it starts to decompress the docs. The --no-same-owner option stops tar from preserving the user and group details of the files. This is useful as that user or group may not exist on your system; this could (potentially) be a security risk.

mv /usr/share/doc/git-2.39.2 ...: These commands move some of the files into subfolders to make it easier to sort through the docs and find what you're looking for.

find ... chmod ...: These commands correct the permissions in the shipped documentation tar file.

Configuring Git

Config Files

~/.gitconfig and /etc/gitconfig

Contents

Installed Programs: git, git-receive-pack, git-upload-archive, and git-upload-pack (hardlinked to each other), git-cvsserver, git-shell, gitk, and scalar
Installed Libraries: None
Installed Directories: /usr/libexec/git-core, and /usr/share/{doc/git-2.39.2,git-core,git-gui,gitk,gitweb}

Short Descriptions

git

is the stupid content tracker

git-cvsserver

is a CVS server emulator for Git

gitk

is a graphical Git repository browser (needs Tk-8.6.13)

git-receive-pack

is invoked by git send-pack and updates the repository with the information fed from the remote end

git-shell

is a login shell for SSH accounts to provide restricted Git access

git-upload-archive

is invoked by git archive --remote and sends a generated archive to the other end over the git protocol

git-upload-pack

is invoked by git fetch-pack, it discovers what objects the other side is missing, and sends them after packing

scalar

is a repository management tool that optimizes Git for use in large repositories

Running a Git Server

Introduction

This section will describe how to set up, administer and secure a git server. Git has many options available. For more detailed documentation see https://git-scm.com/book/en/v2.

Server Dependencies

Required

git-2.39.2 and OpenSSH-9.2p1

Setting up a Git Server

The following instructions will install a git server. It will be set up to use OpenSSH as the secure remote access method.

Configuration of the server consists of the following steps:

1. Set Up Users, Groups, and Permissions

You will need to be user root for the initial portion of configuration. Create the git user and group and set and unusable password hash with the following commands:

groupadd -g 58 git &&
useradd -c "git Owner" -d /home/git -m -g git -s /usr/bin/git-shell -u 58 git &&
sed -i '/^git:/s/^git:[^:]:/git:NP:/' /etc/shadow

Putting in an unusable password hash (replacing the ! by NP) unlocks the account but it cannot be used to login via password authentication. That is required by sshd to work properly. Next, create some files and directories in the home directory of the git user allowing access to the git repository using ssh keys.

install -o git -g git -dm0700 /home/git/.ssh &&
install -o git -g git -m0600 /dev/null /home/git/.ssh/authorized_keys

For any developer who should have access to the repository add his/her public ssh key to /home/git/.ssh/authorized_keys. First, prepend some options to prevent users from using the connection to git for port forwarding to other machines the git server might reach.

echo -n "no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty " >> /home/git/.ssh/authorized_keys &&
cat <user-ssh-key> >> /home/git/.ssh/authorized_keys

It is also useful to set the default name of the initial branch of new repositories by modifying the git configuration. As the root user, run:

git config --system init.defaultBranch trunk

Finally add the /usr/bin/git-shell entry to the /etc/shells configuration file. This shell has been set in the git user profile and is to make sure that only git related actions can be executed:

echo "/usr/bin/git-shell" >> /etc/shells

2. Create a git repository

The repository can be anywhere on the filesystem. It is important that the git user has read/write access to that location. We use /srv/git as base directory. Create a new git repository with the following commands (as the root user):

Note

In all the instructions below, we use project1 as an example repository name. You should name your repository as a short descriptive name for your specific project.

install -o git -g git -m755 -d /srv/git/project1.git &&
cd /srv/git/project1.git                             &&
git init --bare                                      &&
chown -R git:git .

3. Populate the repository from a client system

Note

All the instructions in this section and the next should be done on a user system, not the server system.

Now that the repository is created, it can be used by the developers to put some files into it. Once the ssh key of the user is imported to git's authorized_keys file, the user can interact with the repository.

A minimal configuration should be available on the developer's system specifying its user name and the email address. Create this minimal config file on client side:

cat > ~/.gitconfig <<EOF
[user]
        name = <users-name>
        email = <users-email-address>
EOF

On the developer's machine, set up some files to be pushed to the repository as the initial content:

Note

The gitserver term used below should be the host name (or ip address) of the git server.

mkdir myproject
cd myproject
git init --initial-branch=trunk
git remote add origin git@gitserver:/srv/git/project1.git
cat >README <<EOF
This is the README file
EOF
git add README
git commit -m 'Initial creation of README'
git push --set-upstream origin trunk

The initial content is now pushed to the server and is available for other users. On the current machine, the argument --set-upstream origin trunk is now no longer required as the local repository is now connected to the remote repository. Subsequent pushes can be performed as

git push

Other developers can now clone the repository and do modifications to the content (as long as their ssh keys has been installed):

git clone git@gitserver:/srv/git/project1.git
cd project1
vi README
git commit -am 'Fix for README file'
git push

Note

This is a very basic server setup based on OpenSSH access. All developers are using the git user to perform actions on the repository and the changes users are committing can be distinguished as the local user name (see ~/.gitconfig) is recorded in the changesets.

Access is restricted by the public keys added to git's authorized_keys file and there is no option for the public to export/clone the repository. To enable this, continue with step 4 to set up the git server for public read-only access.

In the URL used to clone the project, the absolute path (here /srv/git/project1.git) has to be specified as the repository is not in git's home directory but in /srv/git. To get rid of the need to expose the structure of the server installation, a symlink can be added in git's home directory for each project like this:

ln -svf /srv/git/project1.git /home/git/

Now, the repository can be cloned using

git clone git@gitserver:project1.git

4. Configure the Server

The setup described above makes a repository available for authenticated users (via providing the ssh public key file). There is also a simple way to publish the repository to unauthenticated users — of course without write access.

The combination of access via ssh (for authenticated users) and the export of repositories to unauthenticated users via the daemon is in most cases enough for a development site.

Note

The daemon will be reachable at port 9418 by default. Make sure that your firewall setup allows access to that port.

To start the server at boot time, install the git-daemon bootscript included in the blfs-bootscripts-20230101 package:

make install-git-daemon

In order to allow git to export a repository, a file named git-daemon-export-ok is required in each repository directory on the server. The file needs no content, just its existence enables, its absence disables the export of that repository.

touch /srv/git/project1.git/git-daemon-export-ok

The script to start the git daemon uses some default values internally. Most important is the path to the repository directory which is set to /srv/git. In case you have for whatever reason created the repository in a different location, you'll need to tell the boot script where the repository is to be found. This can be achieved by creating a configuration file named /etc/sysconfig/git-daemon. This configuration file will be imported if it exists, meaning it is optional. The file can look like:

# Begin /etc/sysconfig/git-daemon

# Specify the location of the git repository
GIT_BASE_DIR="/srv/git/"

# Directories added to whitelist
DFT_REPO_DIR="$GIT_BASE_DIR"

# Add extra options which will appended to the 'git daemon'
# command executed in the boot script
GIT_DAEMON_OPTS=""

# End /etc/sysconfig/git-daemon

There are only three options to set in the configuration file:

  • GIT_BASE_DIR=<dirname>

    Specify the location of the git repositories. Relative paths used when accessing the daemon will translated relative to this directory.

  • DFT_REPO_DIR=<dirname>

    This directory is added to the white list of allowed directories. This variable can hold multiple directory names but is usually set equal to GIT_BASE_DIR.

  • GIT_DAEMON_OPTS=<options>

    In case special options to the git daemon command are needed, they have to be specified in this setting. One example might be to adjust the port number where daemon is listening. In this case, add --port=<port number> to this variable. For more information about which options can be set, take a look at the output of git daemon --help.

After starting the daemon, unauthenticated users can clone exported repositories by using

git clone git://gitserver/project1.git

As the base directory is /srv/git by default (or set to a custom value in the configuration), git interprets the incoming path (/project1.git) relative to that base directory so that the repository in /srv/git/project1.git is served.

Guile-3.0.9

Introduction to Guile

The Guile package contains the GNU Project's extension language library. Guile also contains a stand alone Scheme interpreter.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Guile Dependencies

Required

GC-8.2.2 and libunistring-1.1

Optional

Emacs-28.2 and GDB-13.1 (run-time only dependencies).

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/guile

Installation of Guile

Install Guile by running the following commands:

./configure --prefix=/usr    \
            --disable-static \
            --docdir=/usr/share/doc/guile-3.0.9 &&
make      &&
make html &&

makeinfo --plaintext -o doc/r5rs/r5rs.txt doc/r5rs/r5rs.texi &&
makeinfo --plaintext -o doc/ref/guile.txt doc/ref/guile.texi

To test the results, issue: ./check-guile. On an i686 system, as many as 10 tests will fail in the numbers.test test suite due to minor floating-point rounding errors.

Now, as the root user:

make install      &&
make install-html &&

mkdir -p                       /usr/share/gdb/auto-load/usr/lib &&
mv /usr/lib/libguile-*-gdb.scm /usr/share/gdb/auto-load/usr/lib &&
mv /usr/share/doc/guile-3.0.9/{guile.html,ref} &&
mv /usr/share/doc/guile-3.0.9/r5rs{.html,}     &&

find examples -name "Makefile*" -delete         &&
cp -vR examples   /usr/share/doc/guile-3.0.9   &&

for DIRNAME in r5rs ref; do
  install -v -m644  doc/${DIRNAME}/*.txt \
                    /usr/share/doc/guile-3.0.9/${DIRNAME}
done &&
unset DIRNAME

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Programs: guild, guile, guile-config, guile-snarf and guile-tools
Installed Libraries: libguile-3.0.so and guile-readline.so
Installed Directories: /usr/include/guile, /usr/lib/guile, /usr/share/doc/guile-3.0.9 and /usr/share/guile

Short Descriptions

guile

is a stand-alone Scheme interpreter for Guile

guile-config

is a Guile script which provides the information necessary to link your programs against the Guile library, in much the same way PkgConfig does

guile-snarf

is a script to parse declarations in your C code for Scheme visible C functions

guild

is a wrapper program installed along with guile, which knows where a particular module is installed and calls it, passing its arguments to the program

guile-tools

is a symlink to guild

Librep-0.92.7

Introduction to Librep

The librep package contains a Lisp system. This is useful for scripting or for applications that may use the Lisp interpreter as an extension language.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/librep

Installation of Librep

Install librep by running the following commands:

./configure --prefix=/usr --disable-static &&
make

This package does not come with a test suite.

Now, as the root user:

sed -i '5043,5044 d' libtool &&
make install

Contents

Installed Programs: rep, rep-remote, rep-xgettext, and repdoc
Installed Libraries: librep.so and numerous modules installed in the /usr/lib/rep hierarchy
Installed Directories: /usr/lib/rep, /usr/share/emacs/site-lisp, and /usr/share/rep

Short Descriptions

rep

is the Lisp interpreter

librep.so

contains the functions necessary for the Lisp interpreter

LLVM-15.0.7

Introduction to LLVM

The LLVM package contains a collection of modular and reusable compiler and toolchain technologies. The Low Level Virtual Machine (LLVM) Core libraries provide a modern source and target-independent optimizer, along with code generation support for many popular CPUs (as well as some less common ones!). These libraries are built around a well specified code representation known as the LLVM intermediate representation ("LLVM IR").

Clang provides new C, C++, Objective C and Objective C++ front-ends for LLVM and is required by some desktop packages such as firefox and for rust if that is built using the system LLVM.

The Compiler RT package provides runtime sanitizer and profiling libraries for developers who use Clang and LLVM.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

Cmake modules for LLVM

Recommended Download

Clang

Optional Download

Compiler RT

LLVM Dependencies

Required

CMake-3.25.2

Optional

Doxygen-1.9.6, git-2.39.2, Graphviz-7.1.0, libxml2-2.10.3, Pygments-2.14.0, rsync-3.2.7 (for tests), recommonmark-0.7.1 (for building documentation), texlive-20220321 (or install-tl-unx), Valgrind-3.20.0, PyYAML-6.0, Zip-3.0, OCaml, psutil (for tests), and Z3

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/llvm

Installation of LLVM

Starting with version 15.0.0, an additional tarball llvm-cmake-15.0.7.src.tar.xz is needed. The upstream expects it extracted at the same level as the llvm-15.0.7.src.tar.xz tarball, and the extracted directory renamed to cmake. Extract it and modify the build system to avoid creating a directory outside the llvm-15.0.7.src hierarchy:

tar -xf ../llvm-cmake-15.0.7.src.tar.xz &&
sed '/LLVM_COMMON_CMAKE_UTILS/s@../[email protected]@' \
    -i CMakeLists.txt

Install clang into the source tree by running the following commands:

tar -xf ../clang-15.0.7.src.tar.xz -C tools &&
mv tools/clang-15.0.7.src tools/clang

If you have downloaded compiler-rt, install it into the source tree by running the following commands:

tar -xf ../compiler-rt-15.0.7.src.tar.xz -C projects &&
mv projects/compiler-rt-15.0.7.src projects/compiler-rt

There are many Python scripts in this package which use /usr/bin/env python to access the system Python which on LFS is Python-3.11.2. Use the following command to fix these scripts:

grep -rl '#!.*python' | xargs sed -i '1s/python$/python3/'

If you have downloaded clang, apply the following patch to enable SSP by default in compiled programs.

patch -Np2 -d tools/clang <../clang-15.0.7-enable_default_ssp-1.patch

Install LLVM by running the following commands:

mkdir -v build &&
cd       build &&

CC=gcc CXX=g++                                  \
cmake -DCMAKE_INSTALL_PREFIX=/usr               \
      -DLLVM_ENABLE_FFI=ON                      \
      -DCMAKE_BUILD_TYPE=Release                \
      -DLLVM_BUILD_LLVM_DYLIB=ON                \
      -DLLVM_LINK_LLVM_DYLIB=ON                 \
      -DLLVM_ENABLE_RTTI=ON                     \
      -DLLVM_TARGETS_TO_BUILD="host;AMDGPU;BPF" \
      -DLLVM_BINUTILS_INCDIR=/usr/include       \
      -DLLVM_INCLUDE_BENCHMARKS=OFF             \
      -DCLANG_DEFAULT_PIE_ON_LINUX=ON           \
      -Wno-dev -G Ninja ..                      &&
ninja

If you have installed recommonmark-0.7.1 and its dependencies, you can generate the html documentation and manual pages with the following commands:

cmake -DLLVM_BUILD_DOCS=ON            \
      -DLLVM_ENABLE_SPHINX=ON         \
      -DSPHINX_WARNINGS_AS_ERRORS=OFF \
      -Wno-dev -G Ninja ..            &&
ninja docs-llvm-html  docs-llvm-man

The clang documentation can be built too:

ninja docs-clang-html docs-clang-man

To test the results, issue: ninja check-all. Tests are built with all available cores, but run using the number of online processors. (The difference is that available cores can be limited using taskset, but taking them offline requires echoing 0 to /sys/devices/system/cpu/cpu<N>/online by the root user and makes them temporarily unusable by all jobs on the machine.) Note that four tests out of more than 64,700 are known to fail: DataFlowSanitizer-x86_64 :: custom.cpp, DataFlowSanitizer-x86_64 :: origin_unaligned_memtrans.c, DataFlowSanitizer-x86_64 :: release_shadow_space.c, LLVM :: tools/llvm-libtool-darwin/L-and-l.test,

Now, as the root user:

ninja install &&
cp bin/FileCheck /usr/bin

If you have built the llvm documentation, it has been installed by the above command, but it needs to be moved. As the root user:

install -v -d -m755 /usr/share/doc/llvm-15.0.7            &&
mv -v /usr/share/doc/LLVM/llvm /usr/share/doc/llvm-15.0.7 &&
rmdir -v --ignore-fail-on-non-empty /usr/share/doc/LLVM

If you have built the clang documentation, it has been installed, but needs to be moved too. Again as the root user:

install -v -d -m755 /usr/share/doc/llvm-15.0.7             &&
mv -v /usr/share/doc/LLVM/clang /usr/share/doc/llvm-15.0.7 &&
rmdir -v --ignore-fail-on-non-empty /usr/share/doc/LLVM

Command Explanations

-DLLVM_ENABLE_FFI=ON: This switch allows LLVM to use libffi.

-DLLVM_BUILD_LLVM_DYLIB=ON: This switch builds the libraries as static and links all of them into an unique shared one. This is the recommended way of building a shared library.

-DCMAKE_BUILD_TYPE=Release: This switch enables compiler optimizations in order to speed up the code and reduce its size. It also disables some compile checks which are not necessary on a production system.

-DLLVM_TARGETS_TO_BUILD="host;AMDGPU;BPF": This switch enables building for the same target as the host, and also for the r600 AMD GPU used by the Mesa r600 and radeonsi drivers. The BPF target is required to build v4l-utils-1.22.1. The Default is all of the targets. You can use a semicolon separated list. Valid targets are: host, X86, Sparc, PowerPC, ARM, AArch64, Mips, Hexagon, Xcore, M68K, MSP430, NVPTX, SystemZ, AMDGPU, BPF, CppBackend, or all.

-DLLVM_LINK_LLVM_DYLIB=ON: Used in conjunction with -DLLVM_BUILD_LLVM_DYLIB=ON, this switch enables linking the tools against the shared library instead of the static ones. It slightly reduces their size and also ensures that llvm-config will correctly use libLLVM-15.so.

-DLLVM_ENABLE_RTTI=ON: This switch is used to build LLVM with run-time type information. This is required for building Mesa-22.3.5.

-DLLVM_BINUTILS_INCDIR=/usr/include: This switch is used to tell the build system the location of binutils headers, which were installed in LFS. This allows the building of LLVMgold.so, which is needed for building programs with clang and Link Time Optimization (LTO).

-DLLVM_INCLUDE_BENCHMARKS=OFF: is used to disable generation build targets for the LLVM benchmarks. This option requires additional code that is not currently available.

-DCLANG_DEFAULT_PIE_ON_LINUX=ON: makes -fpie option the default when compiling programs. Together with the ASLR feature enabled in the kernel, this defeats some kind of attacks based on known memory layouts.

-DBUILD_SHARED_LIBS=ON: if used instead of -DLLVM_BUILD_LLVM_DYLIB=ON and -DLLVM_LINK_LLVM_DYLIB=ON, builds all the LLVM libraries (about 60) as shared libraries instead of static.

-DLLVM_ENABLE_DOXYGEN: Enables the generation of browsable HTML documentation if you have installed Doxygen-1.9.6. You should run make doxygen-html afterwards, and install the generated documentation manually.

Contents

Installed Programs: analyze-build, bugpoint, c-index-test, clang, clang++ (symlinks to clang-15), clang-15, clang-check, clang-cl, clang-cpp (last two symlinks to clang), clang-extdef-mapping, clang-format, clang-linker-wrapper, clang-nvlink-wrapper, clang-offload-bundler, clang-offload-packager, clang-offload-wrapper, clang-refactor, clang-rename, clang-repl, clang-scan-deps, diagtool, dsymutil, FileCheck, git-clang-format, hmaptool, intercept-build, llc, lli, llvm-addr2line (symlink to llvm-symbolizer), llvm-ar, llvm-as, llvm-bcanalyzer, llvm-bitcode-strip (symlink to llvm-objcopy), llvm-cat, llvm-cfi-verify, llvm-config, llvm-cov, llvm-c-test, llvm-cvtres, llvm-cxxdump, llvm-cxxfilt, llvm-cxxmap, llvm-debuginfod, llvm-debuginfod-find, llvm-diff, llvm-dis, llvm-dlltool (symlink to llvm-ar), llvm-dwarfdump, llvm-dwarfutil, llvm-dwp, llvm-exegesis, llvm-extract, llvm-gsymutil, llvm-ifs, llvm-install-name-tool (symlink to llvm-objcopy), llvm-jitlink, llvm-lib (symlink to llvm-ar), llvm-libtool-darwin, llvm-link, llvm-lipo, llvm-lto, llvm-lto2, llvm-mc, llvm-mca, llvm-ml, llvm-modextract, llvm-mt, llvm-nm, llvm-objcopy, llvm-objdump, llvm-opt-report, llvm-otool (symlink to llv-objdump), llvm-pdbutil, llvm-profdata, llvm-profgen, llvm-ranlib (symlink to llvm-ar), llvm-rc, llvm-readelf (symlink to llvm-readobj), llvm-readobj, llvm-reduce, llvm-remark-size-diff, llvm-rtdyld, llvm-sim, llvm-size, llvm-split, llvm-stress, llvm-strings, llvm-strip (symlink to llvm-objcopy), llvm-symbolizer, llvm-tapi-diff, llvm-tblgen, llvm-tli-checker, llvm-undname, llvm-windres (symlink to llvm-rc), llvm-xray, opt, sancov, sanstats, scan-build, scan-build-py, scan-view, split-file, and verify-uselistorder
Installed Libraries: libLLVM.so, libLLVM*.a (95 libraries), libLTO.so, libRemarks.so, libclang.so, libclang-cpp.so, libclang*.a (41 libraries), and LLVMgold.so
Installed Directories: /usr/include/{clang,clang-c,llvm,llvm-c}, /usr/lib/{clang,cmake/{clang,llvm},libear,libscanbuild}, /usr/share/{clang,opt-viewer,scan-build,scan-view}, and /usr/share/doc/llvm-15.0.7

Short Descriptions

analyze-build

is a static analysis tool

bugpoint

is the automatic test case reduction tool

c-index-test

is used to test the libclang API and demonstrate its usage

clang

is the Clang C, C++, and Objective-C compiler

clang-check

is a tool to perform static code analysis and display Abstract Syntax Trees (AST)

clang-extdef-mapping

is a tool to collect the USR name and location of external definitions in a source file

clang-format

is a tool to format C/C++/Java/JavaScript/Objective-C/Protobuf code

clang-linker-wrapper

is a wrapper utility over the host linker

clang-nvlink-wrapper

is a wrapper tool over the nvlink program

clang-offload-bundler

is a tool to bundle/unbundle OpenMP offloaded files associated with a common source file

clang-offload-packager

is a tool to bundle several object files into a single binary, which can then be used to create a fatbinary containing offloading code

clang-offload-wrapper

is a tool to create wrapper bitcode for offload target binaries

clang-refactor

is a Clang-based refactoring tool for C, C++ and Objective-C

clang-rename

is a tool to rename symbols in C/C++ programs

clang-scan-deps

is a tool to scan for dependencies in a source file

diagtool

is a combination of tools for dealing with diagnostics in clang

FileCheck

is a tool that reads two files (one from standard input, and one specified on the command line) and uses one to verify the other.

dsymutil

is a tool used to manipulate archived DWARF debug symbol files, compatible with the Darwin command dsymutil

git-clang-format

runs clang-format on git generated patches (requires git-2.39.2)

hmaptool

is a Python tool to dump and construct header maps

llc

is the LLVM static compiler

lli

is used to directly execute programs from LLVM bitcode

llvm-addr2line

is a tool used to convert addresses into file names and line numbers

llvm-ar

is the LLVM archiver

llvm-as

is the LLVM assembler

llvm-bcanalyzer

is the LLVM bitcode analyzer

llvm-bitcode-strip

strips LLVM bitcode from an object

llvm-cat

is a tool to concatenate llvm modules

llvm-cfi-verify

identifies whether Control Flow Integrity protects all indirect control flow instructions in the provided object file, DSO, or binary

llvm-config

Prints LLVM compilation options

llvm-cov

is used to emit coverage information

llvm-c-test

is a bytecode disassembler

llvm-cvtres

is a tool to convert Microsoft resource files to COFF

llvm-cxxdump

is used as a C++ ABI Data Dumper

llvm-cxxfilt

is used to demangle C++ symbols in llvm code

llvm-cxxmap

is used to remap C++ mangled symbols

llvm-debuginfod

is a service providing debug information over an HTTP API for analyzing stripped binaries

llvm-debuginfod-find

is an interface to the llvm-debuginfod daemon for finding debuginfod artifacts

llvm-diff

is the LLVM structural 'diff'

llvm-dis

is the LLVM disassembler

llvm-dwarfdump

prints the content of DWARF sections in object files

llvm-dwarfutil

is a tool to copy and manipulate debug info

llvm-dwp

merges split DWARF files

llvm-elfabi

is used to read information about an ELF binary's ABI

llvm-exegesis

is a benchmarking tool that uses information available in LLVM to measure host machine instruction characteristics like latency or port decomposition

llvm-extract

is used to extract a function from an LLVM module

llvm-gsymutil

is used to process GSYM Symbolication Format files which convert memory addresses to function name and source file line. These files are smaller than DWARF or Breakpad files

llvm-ifs

is used to merge interface stubs with object files

llvm-install-name-tool

is used to rewrite load commands into MachO binary format

llvm-jitlink

is used to parse relocatable object files to make their contents executable in a target process

llvm-libtool-darwin

provides basic libtool functionality on Darwin-based systems. This is mostly useful if you are generating binaries for macOS systems

llvm-link

is the LLVM linker

llvm-lipo

is used to create universal binaries from MachO files

llvm-lto

is the LLVM LTO (link time optimization) linker

llvm-lto2

is a test harness for the resolution based LTO interface

llvm-mc

is a standalone machine code assembler/disassembler

llvm-mca

is a performance analysis tool to statically measure the performance of machine code

llvm-ml

is a playground for machine code provided by LLVM

llvm-modextract

is a tool to extract one module from multimodule bitcode files

llvm-mt

is a tool to generate signed files and catalogs from a side-by-side assembly manifest (used for Microsoft SDK)

llvm-nm

is used to list LLVM bitcode and object file's symbol table

llvm-objcopy

is LLVM's version of an objcopy tool

llvm-objdump

is an LLVM object file dumper

llvm-opt-report

is a tool to generate an optimization report from YAML optimization record files

llvm-pdbutil

is a PDB (Program Database) dumper. PDB is a Microsoft format

llvm-profdata

is a small tool to manipulate and print profile data files

llvm-profgen

generates LLVM SPGO profiling information

llvm-ranlib

is used to generate an index for a LLVM archive

llvm-rc

is a platform-independent tool to compile resource scripts into binary resource files

llvm-readobj

displays low-level format-specific information about object files

llvm-reduce

is used to automatically reduce testcases when running a test suite

llvm-remark-size-diff

reports the difference in instruction count and stack size remarks between two remark files

llvm-rtdyld

is the LLVM MC-JIT tool

llvm-size

is the LLVM object size dumper

llvm-split

is the LLVM module splitter

llvm-stress

is used to generate random .ll files

llvm-strings

print strings found in a binary (object file, executable, or archive library)

llvm-symbolizer

converts addresses into source code locations

llvm-tblgen

is the LLVM Target Description To C++ Code Generator

llvm-tli-checker

is the LLVM TargetLibraryInfo versus SDK checker

llvm-undname

is a tool to demangle names

llvm-xray

is an implementation of Google's XRay function call tracing system

intercept-build

generates a database of build commands for a project

opt

is the LLVM optimizer

sancov

is the sanitizer coverage processing tool

sanstats

is the sanitizer statistics processing tool

scan-build

is a Perl script that invokes the Clang static analyzer

scan-build-py

is a Python script that invokes the Clang static analyzer

scan-view

is a viewer for Clang static analyzer results

split-file

splits an input file into multiple parts separated by regex

verify-uselistorder

is the LLVM tool to verify use-list order

Lua-5.4.4

Introduction to Lua

Lua is a powerful light-weight programming language designed for extending applications. It is also frequently used as a general-purpose, stand-alone language. Lua is implemented as a small library of C functions, written in ANSI C, and compiles unmodified in all known platforms. The implementation goals are simplicity, efficiency, portability, and low embedding cost. The result is a fast language engine with small footprint, making it ideal in embedded systems too.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

  • Download (HTTP): https://www.lua.org/ftp/lua-5.4.4.tar.gz

  • Download MD5 sum: bd8ce7069ff99a400efd14cf339a727b

  • Download size: 356 KB

  • Estimated disk space required: 5.8 MB (with Basic tests)

  • Estimated build time: less than 0.1 SBU (with Basic tests)

Additional Downloads

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/lua

Installation of Lua

Some packages check for the pkg-config file for Lua, which is created with:

cat > lua.pc << "EOF"
V=5.4
R=5.4.4

prefix=/usr
INSTALL_BIN=${prefix}/bin
INSTALL_INC=${prefix}/include
INSTALL_LIB=${prefix}/lib
INSTALL_MAN=${prefix}/share/man/man1
INSTALL_LMOD=${prefix}/share/lua/${V}
INSTALL_CMOD=${prefix}/lib/lua/${V}
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: Lua
Description: An Extensible Extension Language
Version: ${R}
Requires:
Libs: -L${libdir} -llua -lm -ldl
Cflags: -I${includedir}
EOF

Install Lua by running the following commands:

patch -Np1 -i ../lua-5.4.4-shared_library-2.patch &&
make linux

To test the results, issue: make test. This will run the interpreter and print its version. More comprehensive tests can be performed if you downloaded the "Test suite" tarball. Those tests need to be executed after the package is installed, thus we defer to the description below.

Now, as the root user:

make INSTALL_TOP=/usr                \
     INSTALL_DATA="cp -d"            \
     INSTALL_MAN=/usr/share/man/man1 \
     TO_LIB="liblua.so liblua.so.5.4 liblua.so.5.4.4" \
     install &&

mkdir -pv                      /usr/share/doc/lua-5.4.4 &&
cp -v doc/*.{html,css,gif,png} /usr/share/doc/lua-5.4.4 &&

install -v -m644 -D lua.pc /usr/lib/pkgconfig/lua.pc

Here we describe only the "Basic tests". Untar the tarball and change to the lua-5.4.4-tests directory, then issue lua -e "_U=true" all.lua. If the tests finish without error, you will see a message containing the string "final OK".

Contents

Installed Programs: lua and luac
Installed Library: liblua.so
Installed Directories: /usr/{lib,share}/lua and /usr/share/doc/lua-5.4.4

Short Descriptions

lua

is the standalone Lua interpreter

luac

is the Lua compiler

liblua.so

contains the Lua API functions

Lua-5.2.4

Introduction to Lua 5.2

Lua is a powerful light-weight programming language designed for extending applications. It is also frequently used as a general-purpose, stand-alone language. Lua is implemented as a small library of C functions, written in ANSI C, and compiles unmodified in all known platforms. The implementation goals are simplicity, efficiency, portability, and low embedding cost. The result is a fast language engine with small footprint, making it ideal in embedded systems too.

This is an older version of Lua needed only for compatibility with other programs such as Wireshark-4.0.3.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

  • Download (HTTP): https://www.lua.org/ftp/lua-5.2.4.tar.gz

  • Download MD5 sum: 913fdb32207046b273fdb17aad70be13

  • Download size: 248 KB

  • Estimated disk space required: 3.6 MB

  • Estimated build time: less than 0.1 SBU

Additional Downloads

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/lua

Installation of Lua 5.2

Some packages check for the pkg-config file for Lua, which is created with:

cat > lua.pc << "EOF"
V=5.2
R=5.2.4

prefix=/usr
INSTALL_BIN=${prefix}/bin
INSTALL_INC=${prefix}/include/lua5.2
INSTALL_LIB=${prefix}/lib
INSTALL_MAN=${prefix}/share/man/man1
INSTALL_LMOD=${prefix}/share/lua/${V}
INSTALL_CMOD=${prefix}/lib/lua/${V}
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include/lua5.2

Name: Lua
Description: An Extensible Extension Language
Version: ${R}
Requires:
Libs: -L${libdir} -llua5.2 -lm -ldl
Cflags: -I${includedir}
EOF

Install Lua by running the following commands:

patch -Np1 -i ../lua-5.2.4-shared_library-1.patch &&

sed -i '/#define LUA_ROOT/s:/usr/local/:/usr/:' src/luaconf.h &&

sed -r -e '/^LUA_(SO|A|T)=/ s/lua/lua5.2/' \
       -e '/^LUAC_T=/ s/luac/luac5.2/'     \
       -i src/Makefile &&

make MYCFLAGS="-fPIC" linux

The installation of this package is complex, so we will use the DESTDIR method of installation:

make TO_BIN='lua5.2 luac5.2'                     \
     TO_LIB="liblua5.2.so liblua5.2.so.5.2 liblua5.2.so.5.2.4" \
     INSTALL_DATA="cp -d"                        \
     INSTALL_TOP=$PWD/install/usr                \
     INSTALL_INC=$PWD/install/usr/include/lua5.2 \
     INSTALL_MAN=$PWD/install/usr/share/man/man1 \
     install &&

install -Dm644 lua.pc install/usr/lib/pkgconfig/lua52.pc &&

mkdir -pv install/usr/share/doc/lua-5.2.4 &&
cp -v doc/*.{html,css,gif,png} install/usr/share/doc/lua-5.2.4 &&

ln -s liblua5.2.so install/usr/lib/liblua.so.5.2   &&
ln -s liblua5.2.so install/usr/lib/liblua.so.5.2.4 &&

mv install/usr/share/man/man1/{lua.1,lua5.2.1} &&
mv install/usr/share/man/man1/{luac.1,luac5.2.1}

Now, as the root user:

chown -R root:root install  &&
cp -a install/* /

Command Explanations

sed -i ... src/luaconf.h: This command changes the Lua search path to match the install path.

sed -i ... src/Makefile: This command deconflicts this installation with the latest version of lua.

Contents

Installed Programs: lua5.2 and luac5.2
Installed Library: liblua5.2.so
Installed Directories: /usr/include/lua5.2, /usr/lib/lua/5.2, /usr/share/doc/lua-5.2.4, and /usr/share/lua/5.2

Short Descriptions

lua5.2

is the standalone Lua version 5.2 interpreter

luac5.2

is the Lua version 5.2 compiler

liblua5.2.so

contains the Lua version 5.2 API functions

Mercurial-6.3.2

Introduction to Mercurial

Mercurial is a distributed source control management tool similar to Git and Bazaar. Mercurial is written in Python and is used by projects such as Mozilla for Firefox and Thunderbird.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Mercurial Dependencies

Optional

docutils-0.19 (required to build the documentation), git-2.39.2, GPGME-1.18.0 (with Python bindings), OpenSSH-9.2p1 (runtime, to access ssh://... repositories), Pygments-2.14.0, rustc-1.67.1 (see rust/README.rst and rust/rhg/README.md), Subversion-1.14.2 (with Python bindings), Bazaar, CVS, pyflakes, pyOpenSSL, and re2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/mercurial

Installation of Mercurial

Build Mercurial by issuing the following command:

make build

To build the documentation (requires docutils-0.19), issue:

make doc

To run the test suite, issue:

TESTFLAGS="-j<N> --tmpdir tmp --blacklist blacklists/fsmonitor --blacklist blacklists/linux-vfat" make check

where <N> is an integer between one and the number of ( processor X threads ), inclusive. Several tests (about 20) fail because some error messages have changed in Python, or some deprecation warnings are printed, that were not present when the test was designed. In order to investigate any apparently failing tests, you may use the run-tests.py script. To see the almost forty switches, some of them very useful, issue tests/run-tests.py --help. Running the following commands, you will execute only the tests that failed before:

pushd tests  &&
  rm -rf tmp &&
  ./run-tests.py --tmpdir tmp test-gpg.t
popd

Normally, the previous failures will be reproducible. However, if you add the switch --debug before --tmpdir, and run the tests again, some failures may disappear, which is a problem with the test suite. If this happens, there will be no more of these failures even if you do not pass the --debug switch again.

An interesting switch is --time, which will generate a table of all the executed tests and their respective start, end, user, system and real times once the tests are complete. Note that these switches may be used with make check by including them in the TESTFLAGS environment variable.

Install Mercurial by running the following command (as root):

make PREFIX=/usr install-bin

If you built the documentation, install it by running the following command (as root):

make PREFIX=/usr install-doc

After installation, two very quick and simple tests should run correctly. The first one needs some configuration:

cat >> ~/.hgrc << "EOF"
[ui]
username = <user_name> <user@mail>
EOF

where you must replace <user_name> and <your@mail> (mail is optional and can be omitted). With the user identity defined, run hg debuginstall and several lines will be displayed, the last one reading "no problems detected". Another quick and simple test is just hg, which should output basic commands that can be used with hg.

Configuring Mercurial

Config Files

/etc/mercurial/hgrc and ~/.hgrc

The great majority of extensions are disabled by default. Run hg help extensions if you need to enable any, e.g. when investigating test failures. This will output a list of enabled and disabled extensions, as well as more information such as how to enable or disable extensions using configuration files.

If you have installed make-ca-1.12 and want Mercurial to use the certificates, as the root user, issue:

install -v -d -m755 /etc/mercurial &&
cat > /etc/mercurial/hgrc << "EOF"
[web]
cacerts = /etc/pki/tls/certs/ca-bundle.crt
EOF

Contents

Installed Programs: hg
Installed Libraries: several internal modules under /usr/lib/python3.11/site-packages/mercurial
Installed Directories: /etc/mercurial, /usr/lib/python3.11/site-packages/hgdemandimport, /usr/lib/python3.11/site-packages/hgext, /usr/lib/python3.11/site-packages/hgext3rd, /usr/lib/python3.11/site-packages/mercurial, and /usr/lib/python3.11/site-packages/mercurial-6.3.2-py3.11.egg-info

Short Descriptions

hg

is the mercurial version control system

NASM-2.16.01

Introduction to NASM

NASM (Netwide Assembler) is an 80x86 assembler designed for portability and modularity. It includes a disassembler as well.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

NASM Dependencies

Optional (for generating documentation):

asciidoc-10.2.0 and xmlto-0.0.28

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/nasm

Installation of NASM

If you downloaded the optional documentation, put it into the source tree:

tar -xf ../nasm-2.16.01-xdoc.tar.xz --strip-components=1

Install NASM by running the following commands:

./configure --prefix=/usr &&
make

This package does not come with a test suite.

Now, as the root user:

make install

If you downloaded the optional documentation, install it with the following instructions as the root user:

install -m755 -d         /usr/share/doc/nasm-2.16.01/html  &&
cp -v doc/html/*.html    /usr/share/doc/nasm-2.16.01/html  &&
cp -v doc/*.{txt,ps,pdf} /usr/share/doc/nasm-2.16.01

Contents

Installed Programs: nasm and ndisasm
Installed Libraries: None
Installed Directory: /usr/share/doc/nasm-2.16.01

Short Descriptions

nasm

is a portable 80x86 assembler

ndisasm

is an 80x86 binary file disassembler

Patchelf-0.17.2

Introduction to Patchelf

The patchelf package contains a small utility to modify the dynamic linker and RPATH of ELF executables.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/patchelf

Installation of Patchelf

Install patchelf by running the following commands:

./configure --prefix=/usr \
            --docdir=/usr/share/doc/patchelf-0.17.2 &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Contents

Installed Program: patchelf

Short Descriptions

patchelf

is a simple utility for modifying existing ELF executables and libraries; it can change the dynamic loader ("ELF interpreter") of executables and change the RPATH of executables and libraries.

Perl Modules

Introduction to Perl Modules

The Perl module packages (also referred to as Distributions, because each can contain multiple modules) add useful objects to the Perl language. The packages listed on this page are required or recommended for other packages in the book. If they have dependent modules, those are either on this page or else on the next page (Perl Module Dependencies).

In many cases, only the required or recommended dependencies are listed - there might be other modules which allow more tests to be run, but omitting them will still allow the tests to PASS.

For a few modules, the BLFS editors have determined that other modules still listed as prerequisites are not required, and omitted them.

Where an alphabetically-earlier dependency of the same module pulls in a dependency, it is not mentioned for the later dependencies of the same module. You should build the listed dependencies in order.

It is generally worth running the tests for perl modules, they often can show problems such as missing dependencies which are required to use the module. Here, the editors have attempted to separate those dependencies which are only required for running test suites, but they will not be mentioned for a module where one of its dependencies uses that module for its own test suite. That is to say, if you intend to run the test suites, please run them for each dependency of the module.

It is possible to automatically install the current versions of a module and all missing or too-old dependencies recommended by upstream using CPAN. See CPAN automated install of perl modules at the end of this page.

Most of these modules only install files below /usr/lib/perl5/site_perl/5.xx.y and those will not be documented. One or two install programs (mostly, perl scripts), or a library, into /usr/bin/ or /usr/lib/ and these are documented.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/perl-modules

Archive::Zip-1.68

Introduction to Archive::Zip

The Archive::Zip module allows a Perl program to create, manipulate, read, and write Zip archive files.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Archive::Zip Dependencies
Recommended (for the test suite)

UnZip-6.0 (with its patch)

Optional

Test-MockModule-v0.176.0

Installation of Archive::Zip

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Contents

Installed Programs: crc32

Short Descriptions

crc32

computes and prints to stdout the CRC-32 values of the given files

autovivification-0.18

Introduction to the autovivification module

This module allows you disable autovivification (the automatic creation and population of new arrays and hashes whenever undefined variables are dereferenced), and optionally throw a warning or an error when it would have occurred.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of autovivification

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Business::ISBN-3.007

Introduction to Business::ISBN

The Business::ISBN module is for work with International Standard Book Numbers.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Business::ISBN Dependencies
Required

Business-ISBN-Data-20210112.006

Installation of Business::ISBN

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Business::ISMN-1.202

Introduction to Business::ISMN

The Business::ISMN module is for work with International Standard Music Numbers.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Business::ISMN Dependencies
Required

Tie-Cycle-1.227

Installation of Business::ISMN

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Business::ISSN-1.005

Introduction to Business::ISSN

The Business::ISSN module is for work with International Standard Serial Numbers.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Business::ISSN

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Class::Accessor-0.51

Introduction to Class::Accessor

Class::Accessor generates accessors/mutators for your class.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Class::Accessor

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Data::Compare-1.27

Introduction to Data::Compare

The Data::Compare module compares two perl data structures.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Data::Compare Dependencies
Required

Clone-0.46, File-Find-Rule-0.34

Installation of Data::Compare

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Data::Dump-1.25

Introduction to Data::Dump

Data::Dump provides pretty printing of data structures.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Data::Dump

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Data::Uniqid-0.12

Introduction to Data::Uniqid

Data::Uniqid provides three simple routines for generating unique IDs.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Data::Uniqid

Although the final test fails and reports an Error, the test suite returns a status of 0. The error can safely be ignored.

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

DateTime::Calendar::Julian-0.107

Introduction to DateTime::Calendar::Julian

DateTime::Calendar::Julian implements the Julian Calendar.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
DateTime::Calendar::Julian Dependencies
Required

DateTime-1.59

Installation of DateTime::Calendar::Julian

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

DateTime::Format::Builder-0.83

Introduction to DateTime::Format::Builder

DateTime::Format::Builder created DateTime parser classes and objects.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
DateTime::Format::Builder Dependencies
Required

DateTime-Format-Strptime-1.79 and Params-Validate-1.31

Installation of DateTime::Format::Builder

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Encode::EUCJPASCII-0.03

Introduction to Encode::EUCJPASCII

Encode::EUCJPASCII provides an eucJP-open (Extended Unix Code, Japanese) mapping.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Encode::EUCJPASCII

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Encode::HanExtra-0.23

Introduction to Encode::HanExtra

The Encode::HanExtra module provides extra sets of Chinese Encodings which are not included in the core Encode module because of size issues.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Encode::HanExtra

This module uses the 'unsafe' build and installation instructions (In perl-5.26.0 the use of the current directory in @INC was removed for security reasons and this module has not been updated) :

PERL_USE_UNSAFE_INC=1 perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Encode::JIS2K-0.03

Introduction to Encode::JIS2K

The Encode::JIS2K module provides JIS X 0212 (aka JIS 2000) Encodings.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Encode::JIS2K

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

File::Slurper-0.014

Introduction to File::Slurper

File::Slurper is a simple, sane and efficient module to slurp a file.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
File::Slurper Dependencies
Recommended (required for the test suite)

Installation of File::Slurper

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

File::Which-1.27

Introduction to File::Which

File::Which provides a portable implementation of the 'which' utility.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of File::Which

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

HTML::Parser-3.81

Introduction to HTML::Parser

The HTML::Parser distribution is a collection of modules that parse and extract information from HTML documents.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
HTML::Parser Dependencies
Required

HTML-Tagset-3.20

Required (runtime)

HTTP-Message-6.44 (its module HTTP::Headers is a run-time requirement for HTML::HeadParser from this distribution).

Installation of HTML::Parser

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

HTTP::Daemon-6.15

Introduction to HTTP::Daemon

Instances of the HTTP::Daemon class are HTTP/1.1 servers that listen on a socket for incoming requests. The HTTP::Daemon is a subclass of IO::Socket::INET, so you can perform socket operations directly on it too.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
HTTP::Daemon Dependencies
Required

HTTP-Message-6.44

Note

Makefile.PL and running the tests will complain that Module::Build::Tiny is missing, but that is only needed for Build.PL which is used if the system lacks a C compiler.

Installation of HTTP::Daemon

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

IO::Socket::SSL-2.081

Introduction to IO::Socket::SSL

IO::Socket::SSL makes using SSL/TLS much easier by wrapping the necessary functionality into the familiar IO::Socket interface and providing secure defaults whenever possible.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
IO::Socket::SSL Dependencies
Required

make-ca-1.12 and Net-SSLeay-1.92

Recommended

Installation of IO::Socket::SSL

This module uses a variant of the standard build and installation instructions:

yes | perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Command Explanations

yes: Perl will ask if you wish to run external tests, which will 'fail soft' if there are network problems. The default is 'y', this allows you to script the build.

IO::String-1.08

Introduction to IO::String

IO::String - Emulate file interface for in-core strings.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of IO::String

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

IPC::Run3-0.048

Introduction to IPC::Run3

IPC::Run3 is used to run a subprocess with input/output redirection.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of IPC::Run3

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

JSON-4.10

Introduction to JSON

JSON provides a simple wrapper for JSON::XS-compatible modules with some additional features.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of JSON

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Lingua::Translit-0.29

Introduction to Lingua::Translit

Lingua::Translit and its translit program transliterate text between writing systems.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Lingua::Translit

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Contents

Installed Programs: translit

Short Descriptions

translit

transliterates text between writing systems using various standards

LWP (libwww-perl-6.67)

Introduction to LWP - The World-wide Web library for Perl

The libwww-perl collection is a set of Perl modules which provides a simple and consistent application programming interface (API) to the World-Wide Web. The main focus of the library is to provide classes and functions that allow you to write WWW clients. The library also contains modules that are of more general use and even classes that help you implement simple HTTP servers.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
libwww-perl Dependencies
Required

File-Listing-6.15, HTTP-Cookies-6.10, HTTP-Daemon-6.15, HTTP-Negotiate-6.01, HTML-Parser-3.81, Net-HTTP-6.22, Try-Tiny-0.31 and WWW-RobotRules-6.02

Recommended (required for the test suite)

Installation of libwww-perl

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

After installing this package, if you want HTTPS protocol support install LWP-Protocol-https-6.10.

Contents

Installed Programs: lwp-download, lwp-dump, lwp-mirror, lwp-request

Short Descriptions

lwp-download

is a script to fetch a large file from the web

lwp-dump

is used to see what headers and content is returned for a URL

lwp-mirror

is a simple mirror utility

lwp-request

is a simple command line user agent

List::AllUtils-0.19

Introduction to List::AllUtils

The List::Allutils module combines List::Util and List::MoreUtils in one bite-sized package.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
List::AllUtils Dependencies
Required

List-SomeUtils-0.59, List-UtilsBy-0.12

Installation of List::AllUtils

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

List::MoreUtils-0.430

Introduction to List::MoreUtils

List::MoreUtils provides the stuff missing in List::Util.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
List::MoreUtils Dependencies
Required

Exporter-Tiny-1.006000 and List-MoreUtils-XS-0.430

Installation of List::MoreUtils

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Log::Log4perl-1.57

Introduction to Log::Log4perl

Log::Log4perl provides a Log4j implementation for perl.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Log::Log4perl

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Contents

Installed Programs: l4p-templ

Short Descriptions

l4p-templ

prints out the text of a template Log4perl configuration for starting a new Log4perl configuration file

LWP::Protocol::https-6.10

Introduction to LWP::Protocol::https

LWP::Protocol::https provides https support for LWP::UserAgent (i.e. libwww-perl-6.67). Once the module is installed LWP is able to access sites using HTTP over SSL/TLS.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Additional Download
LWP::Protocol::https Dependencies
Required

IO-Socket-SSL-2.081, libwww-perl-6.67 and make-ca-1.12 with /etc/pki/tls/certs/ca-bundle.crt.

Installation of LWP::Protocol::https

First, apply a patch to use the system certificates (using the CPAN automated install will instead use Mozilla::CA which is usually not up to date and does not use local certificates).

patch -Np1 -i ../LWP-Protocol-https-6.10-system_certs-2.patch

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Module::Build-0.4232

Introduction to Module::Build

Module::Build allows perl modules to be built without a make command being present.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Module::Build

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Note that this module can also be built using Build.PL

Contents

Installed Programs: config_data

Short Descriptions

config_data

is used to query or change the configuration of perl modules

Net::DNS-1.36

Introduction to Net::DNS

Net::DNS is a DNS resolver implemented in Perl. It can be used to perform nearly any type of DNS query from a Perl script.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Net::DNS

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Parse::RecDescent-1.967015

Introduction to Parse::RecDescent

Parse::RecDescent incrementally generates top-down recursive-descent text parsers from simple yacc-like grammar specifications.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Parse::RecDescent

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Parse::Yapp-1.21

Introduction to Parse::Yapp

Parse::Yapp is a Perl extension for generating and using LALR parsers.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Parse::Yapp

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Contents

Installed Programs: yapp

Short Descriptions

yapp

is a frontend to the Parse::Yapp module, which lets you create a Perl OO parser from an input grammar file

PerlIO::utf8_strict-0.010

Introduction to PerlIO::utf8_strict

PerlIO::utf8_strict provides a fast and correct UTF-8 PerlIO layer. Unlike perl's default :utf8 layer it checks the input for correctness.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
PerlIO::utf8_strict Dependencies
Recommended (required for the test suite)

Installation of PerlIO::utf8_strict

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Regexp::Common-2017060201

Introduction to Regexp::Common

Regexp::Common provides commonly requested regular expressions.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Regexp::Common

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

SGMLSpm-1.1

Introduction to SGMLSpm

The SGMLSpm module is a Perl library used for parsing the output from James Clark's SGMLS and NSGMLS parsers.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of SGMLSpm

Before beginning the build, issue the following command to prevent an error:

chmod -v 644 MYMETA.yml

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

After the package has been installed, run the following command as the root user:

ln -sv sgmlspl.pl /usr/bin/sgmlspl

Contents

Installed Programs: sgmlspl.pl, sgmlspl

Short Descriptions

sgmlspl.pl

is an SGML processor

sgmlspl

is a symbolic link used during the install of DocBook-utils-0.6.14

Sort::Key-1.33

Introduction to Sort::Key

Sort::Key provides a set of functions to sort lists of values by some calculated key value.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Sort::Key

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Test::Command-0.11

Introduction to Test::Command

Test::Command tests the exit status, STDOUT, or STDERR, of an external command.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Test::Command

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Test::Differences-0.69

Introduction to Test::Differences

Test::Differences tests strings and data structures and shows the differences if they do not match.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Test::Differences Dependencies
Required

Text-Diff-1.45,

Recommended (required for the test suite)

Installation of Test::Differences

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Text::BibTeX-0.89

Introduction to Text::BibTeX

Text::BibTeX provides an interface to read and parse BibTeX files.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Text::BibTeX Dependencies
Required

Config-AutoConf-0.320, ExtUtils-LibBuilder-0.08

Installation of Text::BibTeX

This module is built using Build.PL:

perl Build.PL &&
./Build       &&
./Build test

Now, as the root user:

./Build install

Contents

Installed Programs: biblex, libparse, dumpnames
Installed Libraries: libtparse.so

Short Descriptions

biblex

performs lexical analysis on a BibTeX file

bibparse

parses a series of BibTeX files with command line options to control the string post-processing behavior

dumpnames

parses a BibTeX file, splitting 'author' and 'editor' fields into lists of names, and then dumps everything to stdout

libbtparse.so

is a library for parsing and processing BibTeX data files

Text::CSV-2.02

Introduction to Text::CSV

Text::CSV is a comma-separated values manipulator, using XS (eXternal Subroutine - for subroutines written in C or C++) or pure perl.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Text::CSV Dependencies
Recommended

Installation of Text::CSV

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Text::Roman-3.5

Introduction to Text::Roman

Text::Roman allows conversion between Roman and Arabic algorisms (number systems, e.g. MCMXLV and 1945).

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Text::Roman

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Unicode::Collate-1.31

Introduction to Unicode::Collate

Unicode::Collate provides a Unicode collation algorithm.

Note

This is a core module. If you are using perl-5.28.0 or later, its version is good enough for biber-2.18 and you do not need to reinstall this module.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Unicode::Collate

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Unicode::LineBreak-2019.001

Introduction to Unicode::LineBreak

Unicode::LineBreak provides a UAX #14 Unicode Line Breaking Algorithm.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Unicode::LineBreak Dependencies
Required

MIME-Charset-1.013.1, also Wget-1.21.3 (to download two files from unicode.org in the test suite)

Optional

Installation of Unicode::LineBreak

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

URI-5.17

Introduction to URI

This module implements the URI class. Objects of this class represent "Uniform Resource Identifier references" as specified in RFC 2396 (and updated by RFC 2732). A Uniform Resource Identifier is a compact string of characters that identifies an abstract or physical resource. A Uniform Resource Identifier can be further classified as either a Uniform Resource Locator (URL) or a Uniform Resource Name (URN). The distinction between URL and URN does not matter to the URI class interface. A "URI-reference" is a URI that may have additional information attached in the form of a fragment identifier.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
URI Dependencies
Recommended (required for the test suite)
Optional

Business-ISBN-3.007

Installation of URI

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

XML::LibXML::Simple-1.01

Introduction to XML::LibXML::Simple

The XML::LibXML::Simple module is a rewrite of XML::Simple to use the XML::LibXML parser for XML structures,instead of the plain Perl or SAX parsers.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
XML::LibXML::Simple Dependencies
Required

XML-LibXML-2.0208

Installation of XML::LibXML::Simple

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

XML::LibXSLT-2.002001

Introduction to XML::LibXSLT

XML-LibXSLT provides an interface to libxslt-1.1.37

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
XML::LibXSLT Dependencies
Required

libxslt-1.1.37, XML-LibXML-2.0208

Installation of XML::LibXSLT

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

XML::Simple-2.25

Introduction to XML::Simple

XML::Simple provides an easy API to read and write XML (especially config files). It is deprecated and its use is discouraged.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
XML::Simple Dependencies
Optional

XML-SAX-1.02 (for an alternative parser which will be used if available, otherwise XML::Parser which was installed in LFS will be used),

Installation of XML::Simple

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

XML::Writer-0.900

Introduction to XML::Writer

XML::Writer provides a Perl extension for writing XML documents.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of XML::Writer

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

CPAN automated install of perl modules

Automatic Installation of Perl Modules.

There is an alternate way of installing the modules using the cpan shell install command. The command automatically downloads the latest source from the CPAN archive for the module and any missing prerequisite modules listed by upstream. Then for each module it extracts it, runs the compilation, the tests and installs it.

You still need to install any non-perl dependencies before running the automated installation method. You may wish to clean out the build/ directory after installing, to free up the space. If any post-install actions such as creating a symlink are mentioned, you should also do those.

The first time you run cpan, you'll be prompted to enter some information regarding download locations and methods. This information is retained in files located in ~/.cpan.

In particular, you may wish to configure it so that Sudo-1.9.13p1 is used for the installs, allowing you to build and test as a regular user. The following examples have not used that approach.

Start the cpan shell by issuing 'cpan' as the root user. Any module may now be installed from the cpan>  prompt with the command:

install <Module::Name>

For additional commands and help, issue 'help' from the cpan>  prompt.

Alternatively, for scripted or non-interactive installations, use the following syntax as the root user to install one or more modules:

cpan -i <Module1::Name> <Module2::Name>

Review the cpan.1 man page for additional parameters you can pass to cpan on the command line.

Perl Module Dependencies

Perl Modules which are only required by other modules

The modules on the previous page are referenced from other pages in BLFS, but these modules are only in the book as dependencies of those modules. If you use the CPAN install method, you do not need to read this page.

The BLFS editors pay much less attention to these modules, and the versions will not be regularly reviewed. In all cases, only the required or recommended dependencies are listed - there might be other modules which allow more tests to be run, but omitting them will still allow the tests to PASS.

Note

The links on this page (to metacpan.org) should go to "known good" versions, for which their dependencies are correct. If you wish to use a later version, please check the Changes file at https://metacpan.org - sometimes added dependencies are listed, other times not. Some of these modules have very frequent updates, often bringing different dependencies. The linked metacpan.org versions below were known to work with the the module versions in BLFS when last reviewed.

However, if you notice that the Changes file for a newer version than is in the current development book reports a fix for a security issue, please report this to either the blfs-dev or the blfs-support list.

Similarly, if you discover that an updated module on the previous page needs an extra dependency, please report this.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/perl-modules

Algorithm::Diff-1.201

Introduction to Algorithm::Diff

Algorithm::Diff computes 'intelligent' differences between two files or lists.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Algorithm::Diff

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Alien::Build-2.77

Introduction to Alien::Build

Alien::Build provides tools for building external (non-CPAN) dependencies for CPAN.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Alien::Build Dependencies
Required

Capture-Tiny-0.48, File-Which-1.27, FFI-CheckLib-0.31 and File-chdir-0.1011

Installation of Alien::Build

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Alien::Build::Plugin::Download::GitLab-0.01

Introduction to Alien::Build::Plugin::Download::GitLab

Alien::Build::Plugin::Download::GitLab allows Alien::Build to download from GitLab (in practice, this does not download if the required library is already installed on the system).

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Alien::Build::Plugin::Download::GitLab Dependencies
Required

Alien-Build-2.77 and URI-5.17

Installation of Alien::Build::Plugin::Download::GitLab

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Alien::Libxml2-0.19

Introduction to Alien::Libxml2

Alien::Libxml2 is designed to allow modules to install the C libxml2 library on your system. In BLFS, it uses pkg-config to find how to link to the installed libxml2-2.10.3.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Alien::Libxml2 Dependencies
Required

Alien-Build-Plugin-Download-GitLab-0.01, libxml2-2.10.3, Path-Tiny-0.144

Recommended (required for the test suite)

Installation of Alien::Libxml2

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

B::COW-0.007

Introduction to B::COW

B::COW provides additional helpers for the B core module to check Copy On Write.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of B::COW

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

B::Hooks::EndOfScope-0.26

Introduction to B::Hooks::EndOfScope

B::Hooks::EndOfScope allows you to execute code when perl finished compiling the surrounding scope.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
B::Hooks::EndOfScope Dependencies
Required

Module-Implementation-0.09, Sub-Exporter-Progressive-0.001013 and Variable-Magic-0.63

Recommended (required for the test suite)

Installation of B::Hooks::EndOfScope

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Business::ISBN::Data-20210112.006

Introduction to Business-ISBN-Data

Business-ISBN-Data is a data pack for Business::ISBN.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Business-ISBN-Data

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Capture::Tiny-0.48

Introduction to Capture::Tiny

The Capture::Tiny module captures STDOUT and STDERR from Perl, XS (eXternal Subroutine, i.e. written in C or C++) or external programs.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Capture::Tiny

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Class::Data::Inheritable-0.09

Introduction to Class::Data::Inheritable

Class::Data::Inheritable is for creating accessor/mutators to class data. That is, if you want to store something about your class as a whole (instead of about a single object).

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Class::Data::Inheritable

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Class::Inspector-1.36

Introduction to Class::Inspector

Class::Inspector allows you to get information about a loaded class.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Class::Inspector

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Class::Singleton-1.6

Introduction to Class::Singleton

A Singleton describes an object class that can have only one instance in any system, such as a print spooler. This module implements a Singleton class from which other classes can be derived.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Class::Singleton

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Class:Tiny-1.008

Introduction to Class:Tiny

Class:Tiny offers a minimalist class construction kit.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Class:Tiny

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Clone-0.46

Introduction to Clone

Clone recursively copies perl datatypes.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Clone Dependencies
Recommended (required for the test suite)

Installation of Clone

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Config::AutoConf-0.320

Introduction to Config::AutoConf

The Config::AutoConf module implements some of the AutoConf macros (detecting a command, detecting a library, etc.) in pure perl.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Config::AutoConf Dependencies
Required

Capture-Tiny-0.48, File-Slurper-0.014

Installation of Config::AutoConf

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

CPAN::Meta::Check-0.017

Introduction to CPAN::Meta::Check

CPAN::Meta::Check verifies if requirements described in a CPAN::Meta object are present.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of CPAN::Meta::Check

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

DateTime-1.59

Introduction to DateTime

DateTime is a date and time object for perl.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
DateTime Dependencies
Required

DateTime-Locale-1.37, DateTime-TimeZone-2.57

Recommended (required for the test suite)

Installation of DateTime

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

DateTime::Format::Strptime-1.79

Introduction to DateTime::Format::Strptime

DateTime::Format::Strptime implements most of strptime(3), i.e. it takes a string and a pattern and returns a DateTime object.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
DateTime::Format::Strptime Dependencies
Required

DateTime-1.59

Installation of DateTime::Format::Strptime

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

DateTime::Locale-1.37

Introduction to DateTime::Locale

DateTime::Locale provides localization support for DateTime-1.59.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
DateTime::Locale Dependencies
Required

Dist-CheckConflicts-0.11, File-ShareDir-1.118, namespace-autoclean-0.29 and Params-ValidationCompiler-0.31

Recommended (required for the test suite)

Installation of DateTime::Locale

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

DateTime::TimeZone-2.57

Introduction to DateTime::TimeZone

This class is the base class for all time zone objects. A time zone is represented internally as a set of observances, each of which describes the offset from GMT for a given time period.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
DateTime::TimeZone Dependencies
Required

Class-Singleton-1.6, Module-Runtime-0.016, and Params-ValidationCompiler-0.31, also

Recommended (required for the test suite)

Installation of DateTime::TimeZone

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Devel::StackTrace-2.04

Introduction to Devel::StackTrace

Devel::StackTrace provides an object representing a stacvk trace.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Devel::StackTrace

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Dist::CheckConflicts-0.11

Introduction to Dist::CheckConflicts

Dist::CheckConflicts declares version conflicts for a distribution, to support post-install updates of dependent distributions.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Dist::CheckConflicts Dependencies
Required

Module-Runtime-0.016

Recommended (required for the test suite)

Installation of Dist::CheckConflicts

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Encode::Locale-1.05

Introduction to Encode::Locale

Encode::Locale determines the locale encoding.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Encode::Locale

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Eval::Closure-0.14

Introduction to Eval::Closure

Eval::Closure safely and cleanly creates closures via string eval.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Eval::Closure Dependencies
Recommended (required for the test suite)

Installation of Eval::Closure

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Exception::Class-1.45

Introduction to Exception::Class

Exception::Class allows you to declare real exception classes in Perl.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Exception::Class Dependencies
Required

Class-Data-Inheritable-0.09, Devel-StackTrace-2.04

Installation of Exception::Class

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Exporter::Tiny-1.006000

Introduction to Exporter::Tiny

Exporter::Tiny is an exporter with the features of Sub::Exporter but only core dependencies.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Exporter::Tiny

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

ExtUtils::LibBuilder-0.08

Introduction to ExtUtils::LibBuilder

ExtUtils::LibBuilder is a tool to build C libraries.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
ExtUtils::LibBuilder Dependencies
Required

Module-Build-0.4232

Installation of ExtUtils::LibBuilder

This module is built using Build.PL:

perl Build.PL &&
./Build       &&
./Build test

Now, as the root user:

./Build install

FFI::CheckLib-0.31

Introduction to FFI::CheckLib

FFI::CheckLib checks whether a particular dynamic library is available for FFI (Foreign Function Interface) to use.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
FFI::CheckLib Dependencies
Recommended (required for the test suite)

Installation of FFI::CheckLib

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

File::chdir-0.1011

Introduction to File::chdir

File::chdir provides a more sensible way to change directories.

Perl's chdir() has the unfortunate problem of being very, very, very global. If any part of your program calls chdir() or if any library you use calls chdir(), it changes the current working directory for the *whole* program. File::chdir gives you an alternative, $CWD and @CWD.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of File::chdir

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

File::Copy::Recursive-0.45

Introduction to File::Copy::Recursive

This module copies and moves directories recursively (or single files), to an optional depth and attempts to preserve each file or directory's mode.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
File::Copy::Recursive Dependencies
Recommended (required for the test suite)

Installation of File::Copy::Recursive

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

File::Find::Rule-0.34

Introduction to File::Find::Rule

File::Find::Rule is a friendlier interface to File::Find. It allows you to build rules which specify the desired files and directories.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
File::Find::Rule Dependencies
Required

Number-Compare-0.03, Text-Glob-0.11

Installation of File::Find::Rule

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Contents

Installed Programs: findrule

Short Descriptions

findrule

is a command line wrapper to File::Find::Rule

File::Listing-6.15

Introduction to File::Listing

File::Listing parses a directory listing.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
File::Listing Dependencies
Required

HTTP-Date-6.05,

Installation of File::Listing

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

File::ShareDir-1.118

Introduction to File::ShareDir

File::ShareDir allows you to access data files which have been installed by File::ShareDir::Install.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
File::ShareDir Dependencies
Required

Class-Inspector-1.36, File-ShareDir-Install-0.14

Installation of File::ShareDir

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

File::ShareDir::Install-0.14

Introduction to File::ShareDir::Install

File::ShareDir::Install allows you to install read-only data files from a distribution.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of File::ShareDir::Install

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

HTML::Tagset-3.20

Introduction to HTML::Tagset

HTML::Tagset provides several data tables useful in parsing HTML.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of HTML::Tagset

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

HTTP::Cookies-6.10

Introduction to HTTP::Cookies

HTTP::Cookies provides a class for objects that represent a "cookie jar" -- that is, a database of all the HTTP cookies that a given LWP::UserAgent (from libwww-perl-6.67) object knows about.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
HTTP::Cookies Dependencies
Required

HTTP-Message-6.44

Installation of HTTP::Cookies

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

HTTP::Date-6.05

Introduction to HTTP::Date

HTTP::Date provides functions to deal with the date formats used by the HTTP protocol and also with some other date formats.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
HTTP::Date Dependencies
Recommended

Installation of HTTP::Date

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

HTTP::Message-6.44

Introduction to HTTP::Message

HTTP::Message provides a base class for HTTP style message objects.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
HTTP::Message Dependencies
Required

Clone-0.46, Encode-Locale-1.05, HTTP-Date-6.05, IO-HTML-1.004, LWP-MediaTypes-6.04 and URI-5.17

Recommended (required for the test suite)

Installation of HTTP::Message

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

HTTP::Negotiate-6.01

Introduction to HTTP::Negotiate

HTTP::Negotiate provides a complete implementation of the HTTP content negotiation algorithm.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
HTTP::Negotiate Dependencies
Recommended (required for the test suite)

Installation of HTTP::Negotiate

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Importer-0.026

Introduction to Importer

Importer provides an alternative but compatible interface to modules that export symbols.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Importer

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

IO::HTML-1.004

Introduction to IO::HTML

IO::HTML opens an HTML file with automatic character set detection.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of IO::HTML

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

IPC::System::Simple-1.30

Introduction to IPC::System::Simple

IPC::System::Simple takes the hard work out of calling external commands and producing detailed diagnostics.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of IPC::System::Simple

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

List::MoreUtils::XS-0.430

Introduction to List::MoreUtils::XS

List::MoreUtils::XS is a compiled backend for List::MoreUtils

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of List::MoreUtils::XS

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

List::SomeUtils-0.59

Introduction to List::SomeUtils

List::SomeUtils provides the stuff missing in List::Util.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
List::SomeUtils Dependencies
Required

Module-Implementation-0.09, List-SomeUtils-XS-0.58

Installation of List::SomeUtils

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

List::SomeUtils::XS-0.58

Introduction to List::SomeUtils::XS

List::SomeUtils::XS is a (faster) XS (eXternal Subroutine) implementation for List::SomeUtils.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
List::SomeUtils::XS Dependencies
Recommended (required for the test suite)

Installation of List::SomeUtils::XS

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

List::UtilsBy-0.12

Introduction to List::UtilsBy

List::UtilsBy provides a number of higher-order list utility functions.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of List::UtilsBy

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

LWP::MediaTypes-6.04

Introduction to LWP::MediaTypes

LWP::MediaTypes guesses the media type (i.e. the MIME Type) for a file or URL.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
LWP::MediaTypes Dependencies
Recommended (required for the test suite)

Installation of LWP::MediaTypes

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

MIME::Charset-1.013.1

Introduction to MIME::Charset

MIME::Charset provides information about character sets used for MIME messages o nthe internet, such as their encodings.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
MIME::Charset Dependencies
Recommended

Installation of MIME::Charset

This module uses a variant of the standard build and installation instructions:

yes '' | perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Command Explanations

yes |: Perl will ask if you wish to install a further module for handling legacy Japanese encodings, and another which it would use for translating documentation to Japanese. The default option is 'n', using 'yes' allows you to script the build.

Module::Implementation-0.09

Introduction to Module::Implementation

Module::Implementation loads one of several alternate underlying implementations of a module (e.g. eXternal Subroutine or pure Perl, or an implementation for a given OS).

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Module::Implementation Dependencies
Required

Module-Runtime-0.016, Try-Tiny-0.31

Recommended (required for the test suite)

Installation of Module::Implementation

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Module::Pluggable-5.2

Introduction to Module::Pluggable

Module::Pluggable provides a way of having 'plugins' for your module.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Module::Pluggable

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Module::Runtime-0.016

Introduction to Module::Runtime

Module::Runtime provides functions to deal with runtime handling of Perl modules.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Module::Runtime

Although Module::Build is still listed as a prerequisite, it is no-longer necessary on systems with a working make.

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

MRO::Compat-0.15

Introduction to MRO::Compat

The "mro" namespace provides several utilities for dealing with method resolution order and method caching in general in Perl 5.9.5 and higher. This module provides those interfaces for earlier versions of Perl.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of MRO::Compat

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

namespace::autoclean-0.29

Introduction to namespace::autoclean

This module is very similar to namespace::clean, except it will clean all imported functions, no matter if you imported them before or after you used the pragma. It will also not touch anything that looks like a method.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
namespace::autoclean Dependencies
Required

namespace-clean-0.27, Sub-Identify-0.14

Recommended (required for the test suite)

Installation of namespace::autoclean

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

namespace::clean-0.27

Introduction to namespace::clean

This package allows you to keep imports and functions out of your namespace.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
namespace::clean Dependencies
Required

B-Hooks-EndOfScope-0.26, Package-Stash-0.40

Installation of namespace::clean

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Net::HTTP-6.22

Introduction to Net::HTTP

The Net::HTTP class is a low level HTTP client. An instance of the class represents a connection to an HTTP server.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Net::HTTP Dependencies
Required

URI-5.17

Installation of Net::HTTP

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Net::SSLeay-1.92

Introduction to Net::SSLeay

Net::SSLeay is a PERL extension for using OpenSSL.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Net::SSLeay

Note

If enabling the external tests, one test in t/external/15_altnames.t may fail.

This module uses a variant of the standard build and installation instructions:

yes '' | perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Command Explanations

yes '': Perl will ask if you wish to run external tests, which will fail if you do not have network connectivity. The default is 'n', specifying this allows you to script the build.

Number::Compare-0.03

Introduction to Number::Compare

Number::Compare compiles a simple comparison to an anonymous subroutine, which you can call with a value to be tested against. It understands IEC standard magnitudes (k, ki, m, mi, g, gi).

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Number::Compare

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Package::Stash-0.40

Introduction to Package::Stash

Manipulating stashes (Perl's symbol tables) is occasionally necessary, but incredibly messy, and easy to get wrong. This module hides all of that behind a simple API.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Package::Stash Dependencies
Required

Dist-CheckConflicts-0.11, Module-Implementation-0.09

Recommended (required for the test suite)

Installation of Package::Stash

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Params::Validate-1.31

Introduction to Params::Validate

Params::Validate allows you to validate method or function call parameters to an arbitrary level of specificity.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Params::Validate Dependencies
Required

Module-Build-0.4232, Module-Implementation-0.09

Recommended (required for the test suite)

Installation of Params::Validate

This module is built using Build.PL:

perl Build.PL &&
./Build       &&
./Build test

Now, as the root user:

./Build install

Params::ValidationCompiler-0.31

Introduction to Params::ValidationCompiler

Params::ValidationCompiler builds an optimized subroutine parameter validator.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Params::ValidationCompiler Dependencies
Required

Exception-Class-1.45, Specio-0.48

Recommended (required for the test suite)

Installation of Params::ValidationCompiler

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Path::Tiny-0.144

Introduction to Path::Tiny

Path::Tiny provides a small fast utility for working with file paths.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Path::Tiny

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Role::Tiny-2.002004

Introduction to Role::Tiny

Role::Tiny is a minimalist role composition tool.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Role::Tiny

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Scope::Guard-0.21

Introduction to Scope::Guard

Scope::Guard provides a convenient way to perform cleanup or other forms of resource management at the end of a scope.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Scope::Guard

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Specio-0.48

Introduction to Specio

Specio provides classes for representing type constraints and coercion, along with syntax sugar for declaring them.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Specio Dependencies
Required

Devel-StackTrace-2.04, Eval-Closure-0.14, Module-Runtime-0.016, Role-Tiny-2.002004, Sub-Quote-2.006008 and Try-Tiny-0.31

Recommended (required for the test suite)
Optional

namespace-autoclean-0.29 (for the test suite)

Installation of Specio

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Sub::Exporter::Progressive-0.001013

Introduction to Sub::Exporter::Progressive

Sub::Exporter::Progressive is a wrapper for Sub::Exporter.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Sub::Exporter::Progressive

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Sub::Identify-0.14

Introduction to Sub::Identify

Sub::Identify allows you to retrieve the real name of code references. It is encouraged to migrate to Sub::Util (a core module) when possible.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Sub::Identify

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Sub::Info-0.002

Introduction to Sub::Info

Sub::Info is a tool for inspecting subroutines.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Sub::Info Dependencies
Required

Importer-0.026

Installation of Sub::Info

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Sub::Quote-2.006008

Introduction to Sub::Quote

Sub::Quote provides ways to generate subroutines from strings.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Sub::Quote

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Sub::Uplevel-0.2800

Introduction to Sub::Uplevel

Sub::Uplevel allows you to fool a caller that it is running in a higher stack frame.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Sub::Uplevel

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

SUPER-1.20190531

Introduction to SUPER

SUPER provides easier methods to dispatch control to the superclass (when subclassing a class).

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
SUPER Dependencies
Recommended (required for the test suite)

Installation of SUPER

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Term::Table-0.016

Introduction to Term::Table

Term::Table formats a header and rows into a table. This is used by some failing tests to provide diagnostics about what has goen wrong.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Term::Table Dependencies
Required

Importer-0.026

Installation of Term::Table

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Test::Deep-1.204

Introduction to Test::Deep

Test::Deep gives you very flexible ways to check that the result you got is the result you were expecting.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Test::Deep

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Test::Exception-0.43

Introduction to Test::Exception

Test::Exception provides convenience methods for testing exception based code.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Test::Exception Dependencies
Required

Sub-Uplevel-0.2800

Installation of Test::Exception

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Test::Fatal-0.017

Introduction to Test::Fatal

The Test::Fatal module provides simple helpers for testing code which throws exceptions.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Test::Fatal Dependencies
Required

Try-Tiny-0.31

Installation of Test::Fatal

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Test::File-1.993

Introduction to Test::File

Test::File provides a collection of test utilities for file attributes.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Test::File Dependencies
Recommended (required for the test suite)

Installation of Test::File

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Test::File::ShareDir-1.001002

Introduction to Test::File::ShareDir

Test::File::ShareDir is some low level plumbing to enable a distribution to perform tests while consuming its own share directories in a manner similar to how they will be once installed. This allows File-ShareDir-1.118 to see the latest version of content instead of whatever is installed on the target system where you are testing.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Test::File::ShareDir Dependencies
Required

Class-Tiny-1.008, File-Copy-Recursive-0.45, File-ShareDir-1.118, Path-Tiny-0.144 and Scope-Guard-0.21

Recommended (required for the test suite)

Installation of Test::File::ShareDir

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Test::LeakTrace-0.17

Introduction to Test::LeakTrace

Test::LeakTrace traces memory leaks.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Test::LeakTrace

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Test::MockModule-v0.176.0

Introduction to Test::MockModule

Test::MockModule lets you temporarily redefine subroutines in other packages for the purposes of unit testing.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Test::MockModule Dependencies
Required

Module-Build-0.4232, SUPER-1.20190531

Recommended (required for the test suite)

Installation of Test::MockModule

This module is built using Build.PL:

perl Build.PL &&
./Build       &&
./Build test

Now, as the root user:

./Build install

Test::Needs-0.002010

Introduction to Test::Needs

Test::Needs skips tests if a requested module is not present.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Test::Needs

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Test::Requires-0.11

Introduction to Test::Requires

The Test::Requires module checks if another (optional) module can be loaded, and if not it skips all the current tests.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Test::Requires

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Test::RequiresInternet-0.05

Introduction to Test::RequiresInternet

Test::RequiresInternet is intended to easily test network connectivity before functional tests begin to non-local Internet resources.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Test::RequiresInternet

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Test::utf8-1.02

Introduction to Test::utf8

Test::utf8 is a collection of tests useful for dealing with utf8 strings in Perl.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Test::utf8

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Test::Warnings-0.031

Introduction to Test::Warnings

Test::Warnings tests for warnings and the lack of them.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Test::Warnings

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Test::Without::Module-0.21

Introduction to Test::Without::Module

This module allows you to deliberately hide modules from a program even though they are installed. This is mostly useful for testing modules that have a fallback when a certain dependency module is not installed.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Test::Without::Module

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Test2::Plugin::NoWarnings-0.09

Introduction to Test2::Plugin::NoWarnings

Test2::Plugin::NoWarnings causes tests to fail if there are any warnings while they run.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Test2::Plugin::NoWarnings Dependencies
Required

Test2-Suite-0.000145

Recommended (required for the test suite)

Installation of Test2::Plugin::NoWarnings

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Test2::Suite-0.000145

Introduction to Test2::Suite

Test2::Suite is a distribution with a rich set of tools built upon the Test2 framework.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Test2::Suite Dependencies
Required

Module-Pluggable-5.2, Scope-Guard-0.21, Sub-Info-0.002 and Term-Table-0.016

Installation of Test2::Suite

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Text::CSV_XS-1.49

Introduction to Text::CSV_XS

Text::CSV_XS provides facilities for the composition and decomposition of comma-separated values.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Text::CSV_XS

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Text::Diff-1.45

Introduction to Text::Diff

Text::Diff performs diffs on files and record sets.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Text::Diff Dependencies
Required

Algorithm-Diff-1.201

Installation of Text::Diff

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Text::Glob-0.11

Introduction to Text::Glob

Text::Glob implements glob(3) style matching that can be used to match against text, rather than fetching names from a filesystem.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Text::Glob

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Tie::Cycle-1.227

Introduction to Tie::Cycle

You use Tie::Cycle to go through a list over and over again. Once you get to the end of the list, you go back to the beginning. You don't have to worry about any of this since the magic of tie does that for you.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Tie::Cycle

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

TimeDate-2.33

Introduction to TimeDate

TimeDate provides miscellaneous timezone manipulation routines.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of TimeDate

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Try::Tiny-0.31

Introduction to Try::Tiny

Try::Tiny provides try and catch to expect and handle exceptional conditions, avoiding quirks in Perl and common mistakes.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Try::Tiny Dependencies
Optional (can be used by the test suite)

Capture-Tiny-0.48

Installation of Try::Tiny

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Variable::Magic-0.63

Introduction to Variable::Magic

Magic is Perl's way of enhancing variables. With this module, you can add your own magic to any variable.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Variable::Magic

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

WWW::RobotRules-6.02

Introduction to WWW::RobotRules

WWW::RobotRules parses robots.txt files, creating a WWW::RobotRules object with methods to check if access to a given URL is prohibited.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
WWW::RobotRules Dependencies
Required (runtime)

libwww-perl-6.67 (install this module first and install that later)

Installation of WWW::RobotRules

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

XML::LibXML-2.0208

Introduction to XML::LibXML

XML::LibXML is a perl binding for libxml2-2.10.3.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
XML::LibXML Dependencies
Required

Alien-Libxml2-0.19, XML-SAX-1.02

Installation of XML::LibXML

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

XML::NamespaceSupport-1.12

Introduction to XML::NamespaceSupport

XML::NamespaceSupport offers a simple way to process namespaced XML names from within any application that may need them.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of XML::NamespaceSupport

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

XML::SAX-1.02

Introduction to XML::SAX

XML::SAX is a SAX parser access API for Perl. It includes classes and APIs required for implementing SAX drivers, along with a factory class for returning any SAX parser installed on the user's system.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
XML::SAX Dependencies
Required

libxml2-2.10.3, XML-NamespaceSupport-1.12 and XML-SAX-Base-1.09

Installation of XML::SAX

This module uses a variant of the standard build and installation instructions:

yes | perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

Command Explanations

yes: Perl will ask if you want it to alter ParserDetails.ini and then wait for a response. The default is 'y'. Using 'yes' allows you to script this.

XML::SAX::Base-1.09

Introduction to XML::SAX::Base

This module has a very simple task - to be a base class for PerlSAX drivers and filters.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of XML::SAX-Base

This module uses the standard build and installation instructions:

perl Makefile.PL &&
make             &&
make test

Now, as the root user:

make install

PHP-8.2.3

Introduction to PHP

PHP is the PHP Hypertext Preprocessor. Primarily used in dynamic web sites, it allows for programming code to be directly embedded into the HTML markup. It is also useful as a general purpose scripting language.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

  • Download (HTTP): https://www.php.net/distributions/php-8.2.3.tar.xz

  • Download MD5 sum: cb768cf744184e64d48b15305c437336

  • Download size: 11 MB

  • Estimated disk space required: 673 MB (with documentation)

  • Estimated build time: 1.7 SBU (with parallelism=4; add 1.6 SBU for tests)

Additional Downloads

PHP Dependencies

Recommended
Optional System Utilities and Libraries

Aspell-0.60.8, enchant-2.3.3, libxslt-1.1.37, an MTA (that provides a sendmail command), pcre2-10.42, Pth-2.0.7, AppArmor, Dmalloc, Net-SNMP, oniguruma, OSSP mm, re2c, and XMLRPC-EPI

Optional Graphics Utilities and Libraries

FreeType-2.13.0, libexif-0.6.24, libjpeg-turbo-2.1.5.1, libpng-1.6.39, libtiff-4.5.0, libwebp-1.3.0, a graphical environment, FDF Toolkit, GD, and t1lib

Optional Web Utilities

cURL-7.88.1, tidy-html5-5.8.0, Caudium, Hyperwave, Roxen WebServer, and WDDX

Optional Data Management Utilities and Libraries

Berkeley DB-5.3.28 (Note that PHP does not officially support versions above 5.3), libiodbc-3.52.15, lmdb-0.9.29, MariaDB-10.6.12 or MySQL, OpenLDAP-2.6.4, PostgreSQL-15.2, SQLite-3.40.1, unixODBC-2.3.11, Adabas, Birdstep, cdb, DBMaker, Empress, FrontBase, IBM DB2, Mini SQL, Monetra, and QDBM

PHP also provides support for many commercial database tools such as Oracle, SAP and ODBC Router.

Optional Security/Encryption Utilities and Libraries

Cyrus SASL-2.1.28, MIT Kerberos V5-1.20.1, libmcrypt, and mhash

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/php

Installation of PHP

You can use PHP for server-side scripting, command-line scripting or client-side GUI applications. This book provides instructions for setting up PHP for server-side scripting as it is the most common form.

Note

PHP has many more configure options that will enable support for various things. You can use ./configure --help to see a full list of the available options. Also, use of the PHP web site is highly recommended, as their online docs are very good. An example of a configure command that utilizes many of the most common dependencies can be found at https://anduin.linuxfromscratch.org/BLFS/files/php_configure.txt.

If, for whatever reason, you don't have libxml2-2.10.3 installed, you need to add --disable-libxml to the configure command in the instructions below. Note that this will prevent the pear command from being built.

Install PHP by running the following commands:

./configure --prefix=/usr                \
            --sysconfdir=/etc            \
            --localstatedir=/var         \
            --datadir=/usr/share/php     \
            --mandir=/usr/share/man      \
            --without-pear               \
            --enable-fpm                 \
            --with-fpm-user=apache       \
            --with-fpm-group=apache      \
            --with-config-file-path=/etc \
            --with-zlib                  \
            --enable-bcmath              \
            --with-bz2                   \
            --enable-calendar            \
            --enable-dba=shared          \
            --with-gdbm                  \
            --with-gmp                   \
            --enable-ftp                 \
            --with-gettext               \
            --enable-mbstring            \
            --disable-mbregex            \
            --with-readline              &&
make

To test the results, issue: make test. Several tests (out of over 16000) may fail, in which case you are asked whether you want to send the report to the PHP developers. If you want to automate the test, you may prefix the command with yes "n" | .

Now, as the root user:

make install                                     &&
install -v -m644 php.ini-production /etc/php.ini &&

install -v -m755 -d /usr/share/doc/php-8.2.3 &&
install -v -m644    CODING_STANDARDS* EXTENSIONS NEWS README* UPGRADING* \
                    /usr/share/doc/php-8.2.3

The default configuration files for the fastCGI process manager are installed only if they do not already exist on the system. If this is the first installation, they should be renamed, as the root user:

if [ -f /etc/php-fpm.conf.default ]; then
  mv -v /etc/php-fpm.conf{.default,} &&
  mv -v /etc/php-fpm.d/www.conf{.default,}
fi

The pre-built HTML documentation is packaged in two forms: a tarball containing many individual files, useful for quick loading into your browser, and one large individual file, which is useful for using the search utility of your browser. If you downloaded either, or both, of the documentation files, issue the following commands as the root user to install them (note these instructions assume English docs, modify the tarball names below if necessary).

For the Single HTML file:

install -v -m644 ../php_manual_en.html.gz \
    /usr/share/doc/php-8.2.3 &&
gunzip -v /usr/share/doc/php-8.2.3/php_manual_en.html.gz

For the Many HTML files tarball:

tar -xvf ../php_manual_en.tar.gz \
    -C /usr/share/doc/php-8.2.3 --no-same-owner

The bundled pear is not installed because of a bug which might pollute the filesystem with several hidden files and directories. If pear is needed, execute the following commands to install it:

wget https://pear.php.net/go-pear.phar
php ./go-pear.phar

Command Explanations

--datadir=/usr/share/php: This works around a bug in the build machinery, which installs some data to a wrong location.

--enable-fpm: This parameter allows building the fastCGI Process Manager.

--without-pear: This switch disables installation of bundled pear software.

--with-config-file-path=/etc: This parameter makes PHP look for the php.ini configuration file in /etc.

--with-zlib: This parameter adds support for Zlib compression.

--enable-bcmath: Enables bc style precision math functions.

--with-bz2: Adds support for Bzip2 compression functions.

--enable-calendar: This parameter provides support for calendar conversion.

--enable-dba=shared: This parameter enables support for database (dbm-style) abstraction layer functions.

--enable-ftp: This parameter enables FTP functions.

--with-gettext: Enables functions that use Gettext text translation.

--enable-mbstring: This parameter enables multibyte string support.

--with-readline: This parameter enables command line Readline support.

--disable-libxml: This option allows building PHP without libxml2 installed.

--with-apxs2: Instead of building the fastCGI process manager, it is possible to build an apache module. This has some performance penalty for heavy loaded servers, but may be easier to set up. This switch is incompatible with the --enable-fpm and --with-fpm-... switches.

--with-mysqli=shared: This option includes MySQLi support.

--with-mysql-sock=/run/mysqld/mysqld.sock: Location of the MySQL unix socket pointer.

--with-pdo-mysql=shared: This option includes PDO: MySQL support.

--with-tidy=shared: This option includes tidy library support.

Configuring PHP

Config Files

/etc/php.ini, /etc/pear.conf, /etc/php-fpm.conf, and /etc/php-fpm.d/www.conf

Configuration Information

The file used as the default /etc/php.ini configuration file is recommended by the PHP development team. This file modifies the default behavior of PHP. If no /etc/php.ini is used, all configuration settings fall to the defaults. You should review the comments in this file and ensure the changes are acceptable in your particular environment.

The fastCGI process manager uses the configuration file /etc/php-fpm.conf. The default file shipped with PHP includes all the /etc/php-fpm.d/*.conf in turn. There is a shipped /etc/php-fpm.d/www.conf file, that contains the parameters related to the interaction with the Apache Web server.

You may have noticed the following from the output of the make install command:

You may want to add: /usr/lib/php to your php.ini include_path

If desired, add the entry using the following command as the root user:

sed -i 's@php/includes"@&\ninclude_path = ".:/usr/lib/php"@' \
    /etc/php.ini

To enable fastCGI support in the Apache web server, two LoadModule directives must be added to the httpd.conf file. They are commented out, so just issue the following command as root user:

sed -i -e '/proxy_module/s/^#//'      \
       -e '/proxy_fcgi_module/s/^#//' \
       /etc/httpd/httpd.conf

Those modules accept various ProxyPass directives. One possibility is (as the root user):

echo \
'ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9000/srv/www/$1' >> \
/etc/httpd/httpd.conf

Additionally, it may be useful to add an entry for index.php to the DirectoryIndex directive of the httpd.conf file. Lastly, adding a line to set up the .phps extension to show highlighted PHP source may be desirable:

AddType application/x-httpd-php-source .phps

You'll need to restart the Apache web server after making any modifications to the httpd.conf file.

Boot Script

To automatically start the php-fpm daemon when the system is rebooted, install the /etc/rc.d/init.d/php bootscript from the blfs-bootscripts-20230101 package as the root user:

make install-php

Contents

Installed Programs: phar (symlink), phar.phar, php, php-cgi, php-config, php-fpm, phpdbg, and phpize
Installed Libraries: dba.so and opcache.so in /usr/lib/php/extensions/no-debug-non-zts-20220829
Installed Directories: /etc/php-fpm.d, /usr/{include,lib,share}/php, and /usr/share/doc/php-8.2.3

Short Descriptions

php

is a command line interface that enables you to parse and execute PHP code

pear

is the PHP Extension and Application Repository (PEAR) package manager. This isn't installed by default

php-fpm

is the fastCGI process manager for PHP

phpdbg

is the interactive PHP debugger

Python-2.7.18

Introduction to Python 2

The Python 2 package contains the Python development environment. It is useful for object-oriented programming, writing scripts, prototyping large programs or developing entire applications. This version is for backward compatibility with other dependent packages.

Note

Python2 has been deprecated by the upstream developers. Support for Python2 was discontinued on January 1st, 2020.

BLFS is attempting to use Python3 as much as possible, but some packages have not been updated to support Python3.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Additional Downloads

Python 2 Dependencies

Recommended
Optional

BlueZ-5.66 and Valgrind-3.20.0

Optional (For more additional modules)

libnsl-2.0.0 and Tk-8.6.13

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/Python

Installation of Python 2

First, disable the installation of a script that overwrites a more recent script:

sed -i '/2to3/d' ./setup.py

Install Python 2 by running the following commands:

patch -Np1 -i ../Python-2.7.18-security_fixes-1.patch &&
./configure --prefix=/usr                              \
            --enable-shared                            \
            --with-system-expat                        \
            --with-system-ffi                          \
            --enable-unicode=ucs4                     &&
make

If you invoke the tests, they will run through twice. To test the results, issue: make -k test. Several tests are known to fail, including test_ftplib, test_ssl, test_urllib2_localnet, test_xml_etree, test_xml_etree_c, and test_minidom. These failures are due to OpenSSL-3 and Expat-2.4.6.

Now, as the root user:

make altinstall                                &&
ln -s python2.7        /usr/bin/python2        &&
ln -s python2.7-config /usr/bin/python2-config &&
chmod -v 755 /usr/lib/libpython2.7.so.1.0

Since Python 2 is in maintenance mode, and Python 3 is recommended by upstream for development, you probably do not need to install the documentation. However, if you still want to install documentation for both Python versions, be sure to define the PYTHONDOCS variable for the version you want to use, each time you need to consult the documentation. If you have downloaded the preformatted documentation from https://docs.python.org/download.html, install it as the root user:

install -v -dm755 /usr/share/doc/python-2.7.18 &&

tar --strip-components=1                     \
    --no-same-owner                          \
    --directory /usr/share/doc/python-2.7.18 \
    -xvf ../python-2.7.18-docs-html.tar.bz2 &&

find /usr/share/doc/python-2.7.18 -type d -exec chmod 0755 {} \; &&
find /usr/share/doc/python-2.7.18 -type f -exec chmod 0644 {} \;

Command Explanations

--with-system-expat: This switch enables linking against system version of Expat.

--with-system-ffi: This switch enables linking against system version of libffi.

--enable-unicode=ucs4: This switch enables 32-bit Unicode support in Python.

--with-ensurepip=yes : This switch enables building pip and setuptools packaging programs. setuptools is needed for building some Python modules. This switch is not recommended because this version of Python is no longer maintained.

--with-dbmliborder=bdb:gdbm:ndbm: Use this switch if you want to build Python DBM Module against Berkeley DB instead of GDBM.

make altinstall: This make target omits some default symbolic links that may interfere with Python 3.

chmod ...: Fix permissions for libraries to be consistent with other libraries.

Configuring Python 2

In order for python to find the installed documentation, you must add the following environment variable to individual user's or the system's profile:

export PYTHONDOCS=/usr/share/doc/python-2.7.18

Contents

Installed Programs: pydoc, python2 (symlink), python2-config (symlink), python2.7, python2.7-config, smtpd.py, and idle
Installed Library: libpython2.7.so
Installed Directories: /usr/{include,lib}/python2.7 and /usr/share/doc/python-2.7.18

Short Descriptions

idle

is a wrapper script that opens a Python aware GUI editor. For this script to run, you must have installed Tk before Python so that the Tkinter Python module is built

pydoc

is the Python documentation tool

python2

is an interpreted, interactive, object-oriented programming language

python2.7

is a version-specific name for the python program

smtpd.py

is an SMTP proxy implemented in Python

Python-3.11.2

Introduction to Python 3

The Python 3 package contains the Python development environment. This is useful for object-oriented programming, writing scripts, prototyping large programs or developing entire applications.

Note

Python 3 was installed in LFS. The only reason to rebuild it here is if optional modules are needed, or to upgrade this package.

This package is known to build and work properly using an LFS 11.3 platform.

Important

If upgrading to a new Python-3 minor version (for example, from Python-3.10.x to Python-3.11.0), you will need to reinstall any Python3 modules you have installed. You should also reinstall packages that generate Python3 modules including gobject-introspection-1.74.0, opencv-4.7.0, Graphviz-7.1.0 (if swig is installed).

Before you upgrade, you can get a complete list of modules installed with pip3 list.

The wheel module and meson from LFS will also have to be reinstalled: https://www.linuxfromscratch.org/lfs/view/development/chapter08/wheel.html and https://www.linuxfromscratch.org/lfs/view/development/chapter08/meson.html.

Package Information

Additional Optional Download

Python 3 Dependencies

Recommended
Optional

BlueZ-5.66, GDB-13.1 (required for some tests), Valgrind-3.20.0, and libmpdec

Optional (For Additional Modules)

Berkeley DB-5.3.28, libnsl-2.0.0, and Tk-8.6.13

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/Python3

Installation of Python 3

Install Python 3 by running the following commands:

CXX="/usr/bin/g++"               \
./configure --prefix=/usr        \
            --enable-shared      \
            --with-system-expat  \
            --with-system-ffi    \
            --enable-optimizations &&
make

To test the result, issue make test. Some tests may need an Internet connection. Two tests, test_distutils and test_embed are known to fail.

Now, as the root user:

make install

If upgrading and the documentation has been downloaded, optionally install it as the root user:

install -v -dm755 /usr/share/doc/python-3.11.2/html

tar --strip-components=1  \
    --no-same-owner       \
    --no-same-permissions \
    -C /usr/share/doc/python-3.11.2/html \
    -xvf ../python-3.11.2-docs-html.tar.bz2

Command Explanations

CXX="/usr/bin/g++" ./configure ...: Avoid an annoying message during configuration.

--with-system-expat: This switch enables linking against the system version of Expat.

--with-system-ffi: This switch enables linking against the system version of libffi.

--with-dbmliborder=bdb:gdbm:ndbm: Use this switch if you want to build the Python DBM Module against Berkeley DB instead of GDBM.

--enable-optimizations: This switch enables stable, but expensive, optimizations.

--with-lto: This optional switch enables thick Link Time Optimization. Unusually, it creates a much larger /usr/lib/python3.11/config-3.11-<arch>-linux-gnu/libpython3.11.a with a small increase in the time to compile Python. Run-time results do not appear to show any benefit from doing this.

Configuring Python 3

In order for python3 to find the installed documentation, create the following version independent symlink:

ln -svfn python-3.11.2 /usr/share/doc/python-3

and add the following environment variable to the individual user's or system's profile:

export PYTHONDOCS=/usr/share/doc/python-3/html

Contents

Installed Programs: 2to3 (symlink) and 2to3-3.11, idle3 (symlink) and idle3.11, pip3 (symlink) and pip3.11, pydoc3 and pydoc3.11, python3 (symlink); python3.11, and python3-config (symlink) and python3.11-config
Installed Libraries: libpython3.11.so and libpython3.so
Installed Directories: /usr/include/python3.11, /usr/lib/python3.11, and /usr/share/doc/python-3.11.2

Short Descriptions

idle3

is a wrapper script that opens a Python aware GUI editor. For this script to run, you must have installed Tk before Python so that the Tkinter Python module is built

pydoc3

is the Python documentation tool

python3

is an interpreted, interactive, object-oriented programming language

python3.11

is a version-specific name for the python program

Python Modules

Introduction to Python Modules

The Python module packages add useful objects to the Python language. Modules utilized by packages throughout BLFS are listed here, along with their dependencies.

Important

In BLFS, we normally build and install Python 3 modules with pip3. Please take care that the pip3 install commands in the book should be run as root unless it's for a Python virtual environment. Running pip3 install as a non-root user may seem to work fine, but it will cause the installed module to be inaccessible by other users.

pip3 install will not reinstall an already installed module by default. For using the pip3 install command to upgrade a module (for example, from meson-0.61.3 to meson-0.62.0), insert --upgrade into the command line. If it's really necessary to downgrade a module or reinstall the same version for some reason, insert --force-reinstall into the command line.

Asciidoc-10.2.0

Introduction to Asciidoc Module

The Asciidoc package is a text document format for writing notes, documentation, articles, books, ebooks, slideshows, web pages, man pages and blogs. AsciiDoc files can be translated to many formats including HTML, PDF, EPUB, and man page.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Asciidoc Dependencies
Optional (runtime)

docbook-xsl-nons-1.79.2, fop-2.8, libxslt-1.1.37, Lynx-2.8.9rel.1, dblatex, and W3m

Installation of Asciidoc

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

This package does not come with a test suite.

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user asciidoc

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: a2x and asciidoc
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/asciidoc and /usr/lib/python3.11/site-packages/asciidoc-10.2.0.dist-info
Short Descriptions

a2x

is a toolchain manager for AsciiDoc (converts Asciidoc text files to other file formats)

asciidoc

converts an AsciiDoc text file to HTML or DocBook

CSSSelect-1.2.0

Introduction to CSSSelect Module

CSSSelect provides CSS selectors for Python.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
CSSSelect Dependencies
Required

setuptools_scm-7.1.0

Optional (for testing)

pluggy-1.0.0 and pytest-7.2.1

Installation of CSSSelect

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user cssselect

To test the installation issue pytest.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/cssselect

CacheControl-0.12.11

Introduction to CacheControl Module

CacheControl is a port of the caching algorithms in httplib2 for use with requests session object. It was written because httplib2's better support for caching is often mitigated by its lack of thread safety. The same is true of requests in terms of caching.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
CacheControl Dependencies
Required

msgpack-1.0.4 and requests-2.28.2

Installation of CacheControl

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user cachecontrol

This module does not have a working test suite.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: doesitcache
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/CacheControl-0.12.11.dist-info and /usr/lib/python3.11/site-packages/cachecontrol
Short Descriptions

doesitcache

is an undocumented command line script.

Cython-0.29.33

Introduction to Cython Module

The Cython package provides a compiler for writing C extensions for the Python language.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Cython

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

This package does not come with a test suite.

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user Cython

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: cygdb cython cythonize
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/Cython, /usr/lib/python3.11/site-packages/Cython-0.29.33.dist-info, and /usr/lib/python3.11/site-packages/pyximport
Short Descriptions

cygdb

is the Cython debugger

cython

is a compiler for code written in the Cython language. It outputs a C/C++ program which can be compiled with a C/C++ compiler

cythonize

is a compiler for code written in the Cython language. It outputs an extension module which is directly importable from Python

dbusmock-0.28.7

Introduction to dbusmock

dbusmock is a Python library useful for writing tests for software which talks to D-Bus services.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
dbusmock Dependencies
Required

D-Bus Python-1.3.2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/dbusmock

Installation of dbusmock

Build the package with:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

To install the package run the following as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user python-dbusmock

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/dbusmock and /usr/lib/python3.11/site-packages/python_dbusmock-0.28.7.dist-info

D-Bus Python-1.3.2

Introduction to D-Bus Python Module

D-Bus Python provides Python bindings to the D-Bus API interface.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
D-Bus Python Dependencies
Required

dbus-1.14.6, GLib-2.74.5, meson_python-0.12.0, and patchelf-0.17.2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/dbus-python

Installation of D-Bus Python

Build the D-Bus Python module by running the following command:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

This package does not come with a test suite.

Now install the module as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user dbus-python

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/dbus and /usr/lib/python3.11/site-packages/dbus_python-1.3.2.egg-info

docutils-0.19

Introduction to docutils

docutils is a set of Python modules and programs for processing plaintext docs into formats such as HTML, XML, or LaTeX.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/docutils

Installation of docutils

To build the Python 3 applications, run the following command:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

To install the Python applications run the following as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user docutils &&

for f in /usr/bin/rst*.py; do
  ln -svf $(basename $f) /usr/bin/$(basename $f .py)
done

To reduce the time needed for loading Python scripts, pip3 install will compile the scripts with extension .py into byte code and save the result into .pyc files in the directory __pycache__. But this package installs .py scripts into /usr/bin. So the byte code files for them will be installed into /usr/bin/__pycache__, which is not allowed by FHS. Still as the root user, remove this directory:

rm -rfv /usr/bin/__pycache__

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: docutils, rst2html4, rst2html5, rst2html, rst2latex, rst2man, rst2odt_prepstyles, rst2odt, rst2pseudoxml, rst2s5, rst2xetex, rst2xml, and rstpep2html
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/docutils{,-0.19.dist-info}
Short Descriptions

docutils

converts documents into various formats

rst2html

generates (X)HTML documents from standalone reStructuredText sources

rst2html4

generates (X)HTML documents from standalone reStructuredText sources

rst2html5

generates HTML5 documents from standalone reStructuredText sources

rst2latex

generates LaTeX documents from standalone reStructuredText sources

rst2man

generates plain unix manual documents from standalone reStructuredText sources

rst2odt

generates OpenDocument/OpenOffice/ODF documents from standalone reStructuredText sources

rst2odt_prepstyles

Fix a word-processor-generated styles.odt for odtwriter use

rst2pseudoxml

generates pseudo-XML from standalone reStructuredText sources (for testing purposes)

rst2s5

generates S5 (X)HTML slideshow from standalone reStructuredText sources

rst2xetex

generates LaTeX documents from standalone reStructuredText sources for compilation with the Unicode-aware TeX variants XeLaTeX or LuaLaTeX

rst2xml

generates Docutils-native XML from standalone reStructuredText sources

rstpep2html

generates (X)HTML from reStructuredText-format PEP files

Doxypypy-0.8.8.7

Introduction to Doxypypy Module

The Doxypypy package is a doxygen filter for python.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Doxypypy Dependencies
Required

chardet-5.1.0 and Doxygen-1.9.6 (at run time)

Installation of Doxypypy

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user doxypypy

This package does not come with a working test suite.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: doxypypy
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/doxypypy and /usr/lib/python3.11/site-packages/doxypypy-0.8.8.7.dist-info
Short Descriptions

doxypypy

filters Python code for use with Doxygen, using a syntax-aware approach.

Doxyqml-0.5.2

Introduction to Doxyqml Module

The Doxyqml package allows using Doxygen to document QML classes.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Doxyqml Dependencies
Required (Run Time)

Doxygen-1.9.6

Optional (for testing)

pytest-7.2.1

Installation of Doxyqml

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user doxyqml

To test the installation, run:

pytest

The test_qmlclass.py test is known to fail.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: doxyqml
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/doxyqml and /usr/lib/python3.11/site-packages/doxyqml-0.5.2.dist-info
Short Descriptions

doxyqml

is a Doxygen input filter for QML files.

Gi-DocGen-2023.1

Introduction to Gi-DocGen Module

Gi-DocGen is a document generator for GObject-based libraries. GObject is the base type system of the GNOME project. GI-Docgen reuses the introspection data generated by GObject-based libraries to generate the API reference of these libraries, as well as other ancillary documentation.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Gi-DocGen Dependencies
Required

Markdown-3.4.1, MarkupSafe-2.1.2, Pygments-2.14.0, Jinja2-3.1.2, and typogrify-2.0.7

Optional (for testing)

pytest-7.2.1

Installation of gi-docgen

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user gi-docgen

To test the installation, issue pytest.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: gi-docgen
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/gidocgen and /usr/lib/python3.11/site-packages/gi_docgen-2023.1.dist-info

Short Descriptions

gi-docgen

manages documentation for libgobject based libraries.

Jinja2-3.1.2

Introduction to Jinja2 Module

Jinja2 is a Python module that implements a simple pythonic template language.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Jinja2 Dependencies
Required

MarkupSafe-2.1.2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/Jinja2

Installation of Jinja2

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Install the module as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user Jinja2

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/Jinja2 and /usr/lib/python3.11/site-packages/Jinja2-3.1.2.dist-info

libxml2-2.10.3 (for its Python2 module)

Introduction to the libxml2 Python2 module

These instructions provide the Python2 bindings for libxml2: the Python3 bindings are built as part of libxml2-2.10.3 and most packages in the book do not use these bindings for the older Python2.

By building these bindings after libxml2-2.10.3 has been installed, there is no need to rebuild the time-consuming (if all dependencies are used) main part of that package.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
libxml2 (Python2) Dependencies
Required

libxml2-2.10.3 and Python-2.7.18

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libxml2

Installation of libxml2 Python2 module

To build the Python 2 module, run:

./configure PYTHON=python2 &&
cd python                  &&
python2 setup.py build

To install the Python 2 module, as the root user run:

python2 setup.py install --optimize=1

Contents

Installed Modules: drv_libxml2.py, libxml2.py
Installed Libraries: libxml2mod.so
Installed Directories: None

Short Descriptions

drv_libxml2.py

is a SAX Python2 driver for libxml2

libxml2.py

is the Python2 binding for libxml2

libxml2mod.so

is the interface for Python2 to use libxml2.so

lxml-4.9.2

Introduction to lxml Module

lxml provides Python bindings for libxslt-1.1.37 and libxml2-2.10.3.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
lxml Dependencies
Required

libxslt-1.1.37

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/lxml

Installation of lxml

To build the Python 3 module, run:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

To install the module, issue the following command as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user lxml

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/lxml and /usr/lib/python3.11/site-packages/lxml-4.9.2.dist-info

Mako-1.2.4

Introduction to Mako Module

Mako is a Python module that implements hyperfast and lightweight templating for the Python platform.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Mako Dependencies
Required

MarkupSafe-2.1.2

Optional (for Testing)

pytest-7.2.1

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/Mako

Installation of Mako

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Install the module as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user Mako

To test the installation, issue pytest.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: mako-render
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/mako and /usr/lib/python3.11/site-packages/Mako-1.2.4.dist-info
Short Descriptions

mako-render

renders a template

MarkupSafe-2.1.2

Introduction to MarkupSafe Module

MarkupSafe is a Python module that implements a XML/HTML/XHTML Markup safe string.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
MarkupSafe Dependencies
Optional (for tests)

pytest-7.2.1

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/MarkupSafe

Installation of MarkupSafe

Install MarkupSafe with the following commands:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Then, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user markupsafe

To test the installation, issue pytest.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/markupSafe and /usr/lib/python3.11/site-packages/MarkupSafe-2.1.2.dist-info

NumPy-1.24.2

Introduction to NumPy Module

NumPy is the fundamental package for scientific computing with Python.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
NumPy Dependencies
Required

cython-0.29.33

Optional

fortran from GCC-12.2.0, lapack and cblas, openblas

Optional (for testing)

attrs-22.2.0, pytest-7.2.1, hypothesis

Installation of NumPy

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user numpy

The installation can be tested with the following commands:

python3 -m venv --system-site-packages testenv &&
source testenv/bin/activate                    &&
pip3 install hypothesis                        &&
python3 runtests.py
deactivate

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: f2py, f2py3 and f2py3.11 (3 copies of the same script)
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/numpy
Short Descriptions

f2py

is the Fortran to Python interface generator utility.

Packaging-23.0

Introduction to Packaging Module

The Packaging library provides utilities that implement the interoperability specifications which have clearly one correct behaviour or benefit greatly from having a single shared implementation.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Packaging Dependencies
Required

flit_core-3.8.0

Optional (for testing)

pytest-7.2.1 and pretend

Installation of Packaging

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user packaging

Assuming pytest-7.2.1 is installed, but the other optional dependency is not, the installation can be tested with the following commands:

python3 -m venv --system-site-packages testenv &&
source testenv/bin/activate                    &&
pip3 install pretend                           &&
python3 /usr/bin/pytest
deactivate

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/packaging and /usr/lib/python3.11/site-packages/packaging-23.0.dist-info

Py3c-1.4

Introduction to Py3c

Py3c helps you port C extensions to Python 3. It provides a detailed guide, and a set of macros to make porting easy and reduce boilerplate.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/py3c

Installation of Py3c

The Py3c package is a headers-only package and because of that, no configuration and compilation is required.

To test the package, issue:

make test-python3 &&
make test-python3-cpp

To install the Python 3 module, run the following command as the root user:

make prefix=/usr install

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/include/py3c

PyAtSpi2-2.46.0

Introduction to PyAtSpi2

The PyAtSpi2 package contains Python bindings for the core components of the GNOME Accessibility.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
PyAtSpi2 Dependencies
Required

PyGObject-3.42.2

Recommended

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/pyatspi2

Installation of PyAtSpi2

To build PyAtSpi2 as a Python 3 module, run the following commands:

./configure --prefix=/usr --with-python=/usr/bin/python3

This package does not come with a test suite.

To install the Python 3 module, run the following command as the root user:

make install

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/pyatspi

PyCairo-1.18.2

Introduction to PyCairo for Python2 Module

This version of PyCairo provides Python2 bindings to Cairo.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
PyCairo Dependencies
Required

Cairo-1.17.6 and Python-2.7.18

Optional

Hypothesis (for tests)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/pycairo

Installation of PyCairo

Note

This version of PyCairo is only retained for packages such as Gimp-2.10.32 which is stuck on Python2 until Gimp-3 is released.

Install PyCairo for Python2 by running the following commands:

python2 setup.py build

This package does not come with a test suite.

Now, as the root user:

python2 setup.py install --optimize=1   &&
python2 setup.py install_pycairo_header &&
python2 setup.py install_pkgconfig

Contents

Installed Program: None
Installed Library: _cairo.so
Installed Directories: /usr/include/pycairo, /usr/lib/python2.7/site-packages/cairo, /usr/lib/python2.7/site-packages/pycairo-1.18.2-py2.7.egg,

PyCairo-1.23.0

Introduction to PyCairo Module

PyCairo provides Python bindings to Cairo.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
PyCairo Dependencies
Required

Cairo-1.17.6

Optional

Hypothesis and pytest-7.2.1 (for tests)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/pycairo

Installation of PyCairo

Note

The current version of pycairo no longer builds the Python2 module. If you need that module for packages such as Gimp-2.10.32, use PyCairo-1.18.2

Install PyCairo for Python3 by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release .. &&
ninja

To run the tests, this package requires the optional pytest module. If it is installed, run the tests by running ninja test. The test_surface.py test has a failure.

Now, as the root user:

ninja install

Contents

Installed Program: None
Installed Library: None
Installed Directories: /usr/include/pycairo, /usr/lib/python3.11/site-packages/cairo, and /usr/lib/python3.11/site-packages/pycairo-1.23.0.egg-info

PyCryptodome-3.17.0

Introduction to the PyCryptodome Module

PyCryptodome is a collection of both secure hash functions (such as SHA256 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal, etc.), and is a drop-in replacement for PyCrypto.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/pycryptodome

Installation of PyCryptodome

To build PyCryptodome as a Python 3 module, run the following command:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

To install the module, run the following command as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user pycryptodome

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/Crypto /usr/lib/python3.11/site-packages/pycryptodome-3.17.0.dist-info

Pygments-2.14.0

Introduction to Pygments Module

Pygments is a general syntax highlighter written in Python, for more than 300 languages.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/pygments

Installation of Pygments

Build the Python 3 module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

To install the package run the following as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user Pygments

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: pygmentize
Installed Library: None
Installed Directories: /usr/lib/python3.11/site-packages/pygments and /usr/lib/python3.11/site-packages/Pygments-2.14.0.dist-info

Short Descriptions

pygmentize

highlights an input file and writes the result to an output file

PyGObject-2.28.7

Introduction to PyGObject Module

PyGObject-2.28.7 provides Python 2 bindings to the GObject class from GLib.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
PyGObject Dependencies
Required

GLib-2.74.5, PyCairo-1.18.2 and Python-2.7.18

Optional

gobject-introspection-1.74.0 and libxslt-1.1.37 (to Build Documentation)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/pygobject2

Installation of PyGObject

Install PyGObject by running the following commands:

./configure --prefix=/usr --disable-introspection &&
make

This package does not have a working test suite.

Now, as the root user:

make install

Command Explanations

--disable-introspection: Omit this switch if you have installed gobject-introspection-1.74.0. Note that it conflicts with PyGObject-3.42.2.

--disable-docs: This option disables the rebuilding of the html documentation if libxslt-1.1.37 is installed.

Contents

Installed Programs: pygobject-codegen-2.0
Installed Libraries: libpyglib-2.0-python.so, _gio.so, unix.so, _glib.so and _gobject.so.
Installed Directories: /usr/include/pygtk-2.0, /usr/lib/python2.7/site-packages/gtk-2.0/{gio,glib,gobject}, /usr/share/gtk-doc/html/pygobject and /usr/share/pygobject/2.0

PyGObject-3.42.2

Introduction to PyGObject3 Module

PyGObject3 provides Python bindings to the GObject class from GLib.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
PyGObject3 Dependencies
Required

gobject-introspection-1.74.0 and PyCairo-1.23.0 (Python 3 module)

Optional (for the tests)

GTK-4.8.3, pep8, pyflakes, and pytest-7.2.1

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/pygobject3

Installation of PyGObject3

First, remove a faulty test:

mv -v tests/test_gdbus.py{,.nouse}

Install pygobject3 by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release .. &&
ninja

To test the results, issue: ninja test. An already active graphical session with a bus address is necessary to run the tests. Another round of tests may report ERROR if GTK-4.8.3 is not installed.

Now, as the root user:

ninja install

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

Contents

Installed Programs: None
Installed Library: /usr/lib/python3.11/site-packages/gi/_gi{,_cairo}.cpython-311-<arch>-linux-gnu.so
Installed Directories: /usr/include/pygobject-3.0 and /usr/lib/python3.11/site-packages/{gi,pygtkcompat}

PyGTK-2.24.0

Introduction to PyGTK Module

PyGTK lets you to easily create programs with a graphical user interface using the Python programming language.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
PyGTK Dependencies
Required

PyGObject-2.28.7 and Python-2.7.18

Required (atk module)

at-spi2-core-2.46.0

Required (pango module)

Pango-1.50.12

Required (pangocairo module)

PyCairo-1.18.2 and Pango-1.50.12

Required (gtk and gtk.unixprint modules)

PyCairo-1.18.2 and GTK+-2.24.33.

Required (gtk.glade module)

PyCairo-1.18.2 and libglade-2.6.4.

Optional

NumPy

Optional (to Build Documentation)

libxslt-1.1.37

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/pygtk

Installation of PyGTK

First, adapt PyGTK to changes in Pango by removing undefined APIs:

sed -i '1394,1402 d' pango.defs

Install PyGTK by running the following commands:

./configure --prefix=/usr &&
make

The tests must be run from an active X display. If this is so, issue: make check.

Now, as the root user:

make install

Command Explanations

--enable-docs: This option enables rebuilding the html documentation if libxslt-1.1.37 is installed.

Contents

Installed Programs: pygtk-codegen-2.0 and pygtk-demo.
Installed Libraries: atk.so, _gtk.so, glade.so, gtkunixprint.so, pango.so and pangocairo.so.
Installed Directories: /usr/include/pygtk-2.0, /usr/lib/pygtk, /usr/lib/python2.7/site-packages/gtk-2.0, /usr/share/gtk-doc/html/pygtk and /usr/share/pygtk.
Short Descriptions

pygtk-codegen-2.0

is a wrapper script to run the PyGTK codegen module

pygtk-demo

is a Python wrapper to run the PyGTK demo program

pyparsing-3.0.9

Introduction to pyparsing Module

The pyparsing module is an alternative approach to creating and executing simple grammars, vs. the traditional lex/yacc approach, or the use of regular expressions. It provides a library of classes that client code uses to construct the grammar directly in Python code.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
pyparsing Dependencies
Required

flit_core-3.8.0

Optional

Jinja2-3.1.2 and railroad-diagrams (also needed for tests)

Optional (for testing)

pytest-7.2.1

Installation of pyparsing

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user pyparsing

Assuming pytest-7.2.1 and Jinja2-3.1.2 are installed, but the other optional dependency is not, the installation can be tested with the following commands:

python3 -m venv --system-site-packages testenv &&
source testenv/bin/activate                    &&
pip3 install railroad-diagrams                 &&
python3 /usr/bin/pytest
deactivate

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/pyparsing and /usr/lib/python3.11/site-packages/pyparsing-3.0.9.dist-info

pySerial-3.5

Introduction to pySerial Module

The pySerial module encapsulates access to the serial port.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
pySerial Dependencies
Required

setuptools_scm-7.1.0

Optional (for testing)

pluggy-1.0.0 and pytest-7.2.1

Installation of pySerial

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user pyserial

To test the installation issue pytest.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: pyserial-miniterm and pyserial-ports
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/pyserial-3.5.dist-info and /usr/lib/python3.11/site-packages/serial
Short Descriptions

pyserial-miniterm

is a console application that provides a small terminal application. It may inherit terminal features from the terminal in which it is run.

pyserial-ports

lists available ports.

Pytest-7.2.1

Introduction to Pytest Module

The Pytest framework makes it easy to write small, readable tests, and can scale to support complex functional testing for applications and libraries.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Pytest Dependencies
Required

attrs-22.2.0, iniconfig-2.0.0, packaging-23.0, pluggy-1.0.0, and py-1.11.0

Recommended
Optional (for testing)

Pygments-2.14.0, requests-2.28.2, argcomplete, hypothesis, mock, nose, and xmlschema

Installation of Pytest

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user pytest

The installation can be tested with the following commands:

python3 -m venv --system-site-packages testenv &&
source testenv/bin/activate                    &&
pip3 install pytest[testing]                   &&
python3 /usr/bin/pytest
deactivate

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: pytest and py.test (different files but with same content)
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/_pytest, /usr/lib/python3.11/site-packages/pytest, and /usr/lib/python3.11/site-packages/pytest-7.2.1.dist-info
Short Descriptions

pytest

sets up, manages, and/or runs test in python module source directories

PyXDG-0.28

Introduction to PyXDG Module

PyXDG is a Python library to access freedesktop.org standards.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/pyxdg

Installation of PyXDG

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Install the module as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user pyxdg

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Directory: /usr/lib/python3.11/site-packages/xdg and /usr/lib/python3.11/site-packages/pyxdg-0.28.dist-info

PyYAML-6.0

Introduction to PyYAML Module

PyYAML is a Python module that implements the next generation YAML parser and emitter.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
PyYAML Dependencies
Required

cython-0.29.33 and libyaml-0.2.5

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/PyYAML

Installation of PyYAML

Build PyYAML with the following command:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, install the module as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user PyYAML

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python2.7/site-packages/yaml and /usr/lib/python3.11/site-packages/PyYAML-0.2.5.dist-info

Recommonmark-0.7.1

Introduction to Recommonmark Module

Recommonmark is a docutils-compatibility bridge to CommonMark. It allows writing CommonMark inside of Docutils and Sphinx projects. Recommonmark is now deprecated in favor of MyST-Parser. Unfortunately, LLVM-15.0.7 still depends on this module.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Recommonmark Dependencies
Required

commonmark-0.9.1 and sphinx-6.1.3

Optional (for testing)

pytest-7.2.1

Installation of Recommonmark

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user recommonmark

Recommonmark is now deprecated in favor of MyST-Parser. For this reason, a lot of tests have to be disabled because they do not pass with recent versions of Sphinx. The installation can be partially tested with the following command:

pytest -k 'not (test_integration or test_code or test_headings or test_image or test_links or test_lists)'

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: cm2html, cm2latex, cm2man, cm2pseudoxml, cm2xetex, and cm2xml
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/recommonmark and /usr/lib/python3.11/site-packages/recommonmark-0.7.1.dist-info

Short Descriptions

cm2html

generates a html document from markdown sources

cm2latex

generates a latex document from markdown sources

cm2man

generates a manpage from markdown sources

cm2pseudoxml

generates a pseudo-XML document from markdown sources

cm2xetex

generates a xetex document from markdown sources

cm2xml

generates an XML document from markdown sources

Requests-2.28.2

Introduction to Requests Module

The Requests package is an elegant and simple HTTP library for Python, built for human beings. It allows sending HTTP/1.1 requests extremely easily.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Additional Download
Requests Dependencies
Required

charset-normalizer-3.0.1, idna-3.4, and urllib3-1.26.14

Recommended
Optional

PySocks (also needed for testing)

Optional (for testing)

pytest-7.2.1, Flask<2, httpbin, MarkupSafe<2.1, pytest-mock, pytest-httpbin, sphinx<5, trustme, and Werkzeug<2

Installation of Requests

First apply a patch so that the same environment variable already used to point to system certificates in Python3 following the installation of make-ca can also be used by this module:

patch -Np1 -i ../requests-2.28.2-use_system_certs-1.patch

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user requests

Assuming pytest-7.2.1 is installed, but the other optional dependencies are not, the installation can be tested with the following commands:

python3 -m venv --system-site-packages testenv &&
source testenv/bin/activate                    &&
pip3 install --force-reinstall sphinx\<5       &&
pip3 install pytest-mock    \
             werkzeug\<2    \
             flask\<2       \
             pytest-httpbin \
             pysocks        \
             trustme                           &&
pip3 install --force-reinstall Markupsafe\<2.1 &&
python3 /usr/bin/pytest tests                  &&
deactivate

Note

See make-ca-1.12 for how to set the environment variable, and for how local copies of the Certifi and Requests modules installed in a virtual environment will override the system certificates.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/requests and /usr/lib/python3.11/site-packages/requests-2.28.2.dist-info

Scour-0.38.2

Introduction to Scour Module

Scour is an SVG (Scalable Vector Graphics) optimizer/cleaner that reduces their size by optimizing structure and removing unnecessary data.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Scour Dependencies
Required

six-1.16.0

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/scour

Installation of scour

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

To install the module, run the following command as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user scour

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: scour
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/scour and /usr/lib/python3.11/site-packages/scour-0.38.2.dist-info

Short Descriptions

scour

is a program to optimize and clean SVG files

six-1.16.0

Introduction to Six Module

Six is a Python 2 to 3 compatibility library.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/six

Installation of Six

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

This package does not come with a test suite.

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user six

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/six-1.16.0.dist-info

Sphinx-6.1.3

Introduction to Sphinx Module

The Sphinx package is a set of tools for translating some structured text formats into pretty documentation in various formats.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Sphinx Dependencies
Required

alabaster-0.7.13, Babel-2.11.0, docutils-0.19, imagesize-1.4.1, Jinja2-3.1.2, packaging-23.0, Pygments-2.14.0, requests-2.28.2, snowballstemmer-2.2.0, sphinxcontrib-applehelp-1.0.3, sphinxcontrib-devhelp-1.0.2, sphinxcontrib-htmlhelp-2.0.0, sphinxcontrib-jsmath-1.0.1, sphinxcontrib-qthelp-1.0.3, and sphinxcontrib-serializinghtml-1.1.5

Optional (for tests)

cython-0.29.33, pytest-7.2.1, texlive-20220321, and html5lib

Installation of Sphinx

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user sphinx

Assuming cython-0.29.33 and pytest-7.2.1 are installed, but the other optional dependency is not, the installation can be tested with the following commands:

python3 -m venv --system-site-packages testenv &&
source testenv/bin/activate                    &&
pip3 install html5lib                          &&
python3 /usr/bin/pytest
deactivate

One test, tests/test_config.py::test_needs_sphinx is known to fail.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: sphinx-apidoc, sphinx-autogen, sphinx-build, and sphinx-quickstart
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/sphinx and /usr/lib/python3.11/site-packages/sphinx-6.1.3.dist-info
Short Descriptions

sphinx-apidoc

creates an reST file from python modules and packages

sphinx-autogen

generates ReStructuredText from special directives contained in given input files

sphinx-build

generates documentation in various formats from ReStructuredText source files

sphinx-quickstart

generates required files for a sphinx project

Sphinx_rtd_theme-1.2.0

Introduction to Sphinx_rtd_theme Module

The sphinx_rtd_theme module is a Sphinx theme designed to provide a great reader experience for documentation users on both desktop and mobile devices. This theme is used primarily on Read the Docs but can work with any Sphinx project.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Sphinx_rtd_theme Dependencies
Required

sphinx-6.1.3 and sphinxcontrib-jquery-2.0.0

Optional (for tests)

pytest-7.2.1 and readthedocs-sphinx-ext

Installation of Sphinx_rtd_theme

Fix a wrong version for a dependency list:

sed -e s/0.19/0.20/ \
    -i setup.cfg

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user sphinx_rtd_theme

Assuming pytest-7.2.1 is installed, but the other optional dependency is not, the installation can be tested with the following commands:

python3 -m venv --system-site-packages testenv &&
source testenv/bin/activate                    &&
pip3 install readthedocs-sphinx-ext            &&
python3 /usr/bin/pytest
deactivate

Several tests return a warning because they use a deprecated sphinx API.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/sphinx_rtd_theme and /usr/lib/python3.11/site-packages/sphinx_rtd_theme-1.2.0.dist-info

Python Dependencies

Introduction to Python Dependencies

Python modules listed in Python Modules have dependencies that are not referenced by other packages in BLFS. These dependencies are listed here. They will not get updated on regular basis, unless a more recent version is needed.

Important

In BLFS, we normally build and install Python 3 modules with pip3. Please take care that the pip3 install commands in the book should be run as root unless it's for a Python virtual environment. Running pip3 install as a non-root user may seem to work fine, but it will cause the installed module to be inaccessible by other users.

pip3 install will not reinstall an already installed module by default. For using the pip3 install command to upgrade a module (for example, from meson-0.61.3 to meson-0.62.0), insert --upgrade into the command line. If it's really necessary to downgrade a module or reinstall the same version for some reason, insert --force-reinstall into the command line.

Alabaster-0.7.13

Introduction to Alabaster Module

The Alabaster package is a theme for the sphinx documentation system. Although developed separately, it is the default theme for sphinx.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Alabaster

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

This package does not come with a test suite.

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user alabaster

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/alabaster and /usr/lib/python3.11/site-packages/alabaster-0.7.13.dist-info

Attrs-22.2.0

Introduction to Attrs Module

The Attrs package is a theme for the sphinx documentation system. Although developed separately, it is the default theme for sphinx.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Optional (for testing)

pytest-7.2.1, coverage[toml], hypothesis, Pympler, mypy, pytest-mypy-plugins, zope.interface, and cloudpickle

Installation of Attrs

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user attrs

To test the installation, run:

python3 -m venv --system-site-packages testenv &&
source testenv/bin/activate                    &&
pip3 install attrs[tests]                      &&
python3 /usr/bin/pytest                        &&
deactivate

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/attr, /usr/lib/python3.11/site-packages/attrs, and /usr/lib/python3.11/site-packages/attrs-22.2.0.dist-info

Babel-2.11.0

Introduction to Babel Module

The Babel package is an integrated collection of utilities that assist in internationalizing and localizing Python applications, with an emphasis on web-based applications.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Babel Dependencies
Required

pytz-2022.7.1

Optional (for testing)

pytest-7.2.1, Python-3.11.2 (with the sqlite module), freezegun==0.3.12, and pytest-cov

Installation of Babel

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user Babel

Assuming pytest-7.2.1 is installed, but the other optional dependencies are not, the installation can be tested with the following commands:

python3 -m venv --system-site-packages testenv &&
source testenv/bin/activate                    &&
pip3 install pytest-cov freezegun==0.3.12      &&
python3 /usr/bin/pytest
deactivate

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: pybabel
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/babel and /usr/lib/python3.11/site-packages/Babel-2.11.0.dist-info
Short Descriptions

pybabel

is a command-line interface for working with message catalogs

Chardet-5.1.0

Introduction to chardet Module

Chardet is a universal character encoding detector.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Chardet Dependencies
Optional (for testing)

pytest-7.2.1

Installation of Chardet

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user chardet

To test the installation issue pytest.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: chardetect
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/chardet and /usr/lib/python3.11/site-packages/chardet-5.1.0.dist-info
Short Descriptions

chardetect

is a Universal Character Encoding Detector

Charset-normalizer-3.0.1

Introduction to charset-normalizer Module

The charset-normalizer library helps reading text from an unknown character encoding.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Charset-normalizer Dependencies
Optional (for testing)

pytest-7.2.1 and pytest-cov

Installation of Charset-normalizer

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user charset-normalizer

Assuming pytest-7.2.1 is installed, but the other optional dependencies are not, the installation can be tested with the following commands:

python3 -m venv --system-site-packages testenv &&
source testenv/bin/activate                    &&
pip3 install pytest-cov                        &&
python3 /usr/bin/pytest
deactivate

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: normalizer
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/charset_normalizer and /usr/lib/python3.11/site-packages/charset_normalizer-3.0.1.dist-info
Short Descriptions

normalizer

is a Universal Charset Detector (discovers originating encoding and normalizes text to unicode)

Commonmark-0.9.1

Introduction to Commonmark Module

Commonmark Python parser for the CommonMark Markdown specification.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Commonmark Dependencies
Optional (for testing)

pytest-7.2.1, flake8, and hypothesis

Installation of Commonmark

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user commonmark

Assuming pytest-7.2.1 is installed and the other optional dependency is not, the installation can be tested with:

python3 -m venv --system-site-packages testenv &&
source testenv/bin/activate                    &&
pip3 install hypothesis                        &&
python3 /usr/bin/pytest commonmark/tests/unit_tests.py
python3 commonmark/tests/run_spec_tests.py
deactivate

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: cmark
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/commonmark and /usr/lib/python3.11/site-packages/commonmark-0.9.1.dist-info

Short Descriptions

cmark

processes Markdown according to the CommonMark specification

Editables-0.3

Introduction to Editables Module

Editables is python library for creating editable wheels.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Editables

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

This package does not come with a test suite.

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user editables

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/editables and /usr/lib/python3.11/site-packages/editables-0.3.dist-info

Flit_core-3.8.0

Introduction to Flit_core Module

The Flit_core module is the key component of the Flit system, which provides a simple way to put Python packages and modules on PyPi.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Flit_core Dependencies
Optional (for testing)

pytest-7.2.1 and testpath

Installation of Flit_core

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user flit_core

Assuming pytest-7.2.1 is installed, but the other optional dependency is not, the installation can be tested with the following commands:

python3 -m venv --system-site-packages testenv &&
source testenv/bin/activate                    &&
pip3 install testpath                          &&
python3 /usr/bin/pytest
deactivate

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/flit_core and /usr/lib/python3.11/site-packages/flit_core-3.8.0.dist-info

Hatchling-1.12.2

Introduction to Hatchling Module

Hatchling is an extensible, standards compliant build backend for python modules.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Hatchling Dependencies
Required

editables-0.3, packaging-23.0, pathspec-0.10.3, and pluggy-1.0.0

Installation of Hatchling

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

This package does not come with a working test suite.

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user hatchling

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: hatchling
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/hatchling and /usr/lib/python3.11/site-packages/hatchling-1.12.2.dist-info

Short Descriptions

hatchling

is a python module builder

Hatch_vcs-0.3.0

Introduction to Hatch-vcs Module

Hatch_vcs is a Hatch plugin for versioning with several VCS .

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Hatch_vcs Dependencies
Required

hatchling-1.12.2 and setuptools_scm-7.1.0

Optional (for testing)

pytest-7.2.1

Installation of Hatch_vcs

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user hatch_vcs

To test the installation, issue pytest. One test fails.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/hatch_vcs and /usr/lib/python3.11/site-packages/hatch_vcs-0.3.0.dist-info

Idna-3.4

Introduction to Idna Module

The Idna module provides support for the Internationalized Domain Names in Applications (IDNA) protocol as specified in RFC 5891.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Idna Dependencies
Required

flit_core-3.8.0

Optional (for testing)

pytest-7.2.1

Installation of Idna

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user idna

To test the installation, run pytest.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/idna and /usr/lib/python3.11/site-packages/idna-3.4.dist-info

Imagesize-1.4.1

Introduction to Imagesize Module

The imagesize package analyzes image file headers and returns the image size and DPI. It works with JPEG/JPEG 2000/PNG/GIF/TIFF/SVG/Netpbm/WebP formats.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Imagesize Dependencies
Optional (for testing)

pytest-7.2.1 and requests-2.28.2

Installation of Imagesize

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user imagesize

To test the installation, run pytest.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/imagesize and /usr/lib/python3.11/site-packages/imagesize-1.4.1.dist-info

Iniconfig-2.0.0

Introduction to Iniconfig Module

Iniconfig is a small and simple INI-file parser module.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Iniconfig Dependencies
Required

hatch_vcs-0.3.0

Installation of Iniconfig

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

This package does not come with a test suite.

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user iniconfig

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/iniconfig and /usr/lib/python3.11/site-packages/iniconfig-2.0.0.dist-info

Markdown-3.4.1

Introduction to Markdown Module

Markdown is a Python parser for John Gruber's Markdown specification.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Markdown Dependencies
Optional (for testing)

pytest-7.2.1, PyYAML-6.0, and coverage

Installation of Markdown

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user Markdown

Assuming pytest-7.2.1 and PyYAML-6.0 are installed and the other optional dependency is not, the installation can be tested with:

python3 -m venv --system-site-packages testenv &&
source testenv/bin/activate                    &&
pip3 install coverage                          &&
python3 /usr/bin/pytest --ignore=tests/test_syntax/extensions/test_md_in_html.py
deactivate

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: markdown_py
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/markdown and /usr/lib/python3.11/site-packages/Markdown-3.4.1.dist-info

Short Descriptions

markdown_py

converts markdown files to (x)html

Meson_python-0.12.0

Introduction to Meson_python Module

The Meson_python module contains a Python build backend (PEP 517) for Meson projects.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Meson_python Dependencies
Required

pyproject-metadata-0.7.0

Recommended (Runtime)

patchelf-0.17.2

Installation of Meson_python

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

This package does not come with a test suite.

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user meson_python

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/meson_python and /usr/lib/python3.11/site-packages/meson_python-0.12.0.dist-info

MessagePack-1.0.4

Introduction to MessagePack Module

MessagePack is an efficient binary serialization format. It lets you exchange data among multiple languages like JSON. But it's faster and smaller. This package provides CPython bindings for reading and writing MessagePack data.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
MessagePack Dependencies
Required

cython-0.29.33 and setuptools_scm-7.1.0

Optional (for testing)

pluggy-1.0.0 and pytest-7.2.1

Installation of MessagePack

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user msgpack

To test the installation issue pytest.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/msgpack-1.0.4.dist-info and /usr/lib/python3.11/site-packages/msgpack

Pathspec-0.10.3

Introduction to Pathspec Module

Pathspec is a utility library for pattern matching of file paths.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Pathspec Dependencies
Optional (for testing)

pytest-7.2.1

Installation of Pathspec

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user pathspec

To test the installation, issue pytest.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/pathspec and /usr/lib/python3.11/site-packages/pathspec-0.10.3.dist-info

Pluggy-1.0.0

Introduction to Pluggy Module

The Pluggy package gives users the ability to extend or modify the behaviour of a host program by installing a plugin for that program. The plugin code will run as part of normal program execution, changing or enhancing certain aspects of it. In essence, pluggy enables function hooking so a user can build pluggable systems.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Pluggy Dependencies
Recommended
Optional (for testing)

pytest-7.2.1 and pytest-benchmark

Installation of Pluggy

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user pluggy

Assuming pytest-7.2.1 is installed, but the other optional dependencies are not, the installation can be tested with the following commands:

python3 -m venv --system-site-packages testenv &&
source testenv/bin/activate                    &&
pip3 install pytest-benchmark                  &&
python3 /usr/bin/pytest
deactivate

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/pluggy and /usr/lib/python3.11/site-packages/pluggy-1.0.0.dist-info

Py-1.11.0

Introduction to Py Module

The Py library is a Python development support library used in Pytest. It is deprecated and should be removed at some point in time, but part of it is still used in Pytest.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Py Dependencies
Recommended

Installation of Py

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

Due to the deprecation of this package, the test suite is not maintained and cannot be run.

pip3 install --no-index --find-links dist --no-cache-dir --no-user py

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/py and /usr/lib/python3.11/site-packages/py-1.11.0.dist-info

Pyproject-Metadata-0.7.0

Introduction to Pyproject-Metadata Module

The Pyproject-Metadata module contains a data class for PEP 621 metadata with support for core metadata (PEP 643) generation.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Pyproject-Metadata Dependencies
Required

packaging-23.0

Installation of Pyproject-Metadata

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

This package does not come with a test suite.

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user pyproject-metadata

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/pyproject_metadata and /usr/lib/python3.11/site-packages/pyproject_metadata-0.7.0.dist-info

Pytz-2022.7.1

Introduction to Pytz Module

The Pytz library brings the IANA tz database into Python. It allows accurate and cross-platform timezone calculations.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Pytz dependencies
Optional (for testing)

pytest-7.2.1

Installation of Pytz

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user pytz

To test the installation, run pytest. A few warnings are issued.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/pytz and /usr/lib/python3.11/site-packages/pytz-2022.7.1.dist-info

Setuptools_scm-7.1.0

Introduction to Setuptools_scm Module

The Setuptools_scm package is used to extract Python package versions from git or hg metadata instead of declaring them.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Setuptools_scm Dependencies
Required

packaging-23.0 and typing_extensions-4.4.0

Optional (for testing)

git-2.39.2, Mercurial-6.3.2, and pytest-7.2.1

Installation of Setuptools_scm

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user setuptools_scm

The installation can be tested with pytest. A few tests may fail if your git configuration is not the one expected by the test suite.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/setuptools_scm and /usr/lib/python3.11/site-packages/setuptools_scm-7.1.0.dist-info

Smartypants-2.0.1

Introduction to Smartypants Module

Smartypants translates plain ASCII punctuation characters into smart typographic punctuation HTML entities.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Smartypants

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

This package does not come with a working test suite.

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user smartypants

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: smartypants
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/smartypants-2.0.1.dist-info

Short Descriptions

smartypants

translates ASCII punctuation to HTML punctuation.

Snowballstemmer-2.2.0

Introduction to Snowballstemmer Module

The Snowballstemmer package is a small string processing language for creating stemming algorithms for use in Information Retrieval, plus a collection of stemming algorithms implemented using it. Stemming maps different forms of the same word to a common stem — for example, the English stemmer maps connection, connections, connective, connected, and connecting to connect. So a searching for connected would also find documents which only have the other forms.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Installation of Snowballstemmer

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

This package does not come with a test suite.

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user snowballstemmer

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/snowballstemmer and /usr/lib/python3.11/site-packages/snowballstemmer-2.2.0.dist-info

Sphinxcontrib-applehelp-1.0.3

Introduction to Sphinxcontrib-applehelp Module

The Sphinxcontrib-applehelp package is a Sphinx extension which outputs Apple help books.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Sphinxcontrib-applehelp Dependencies
Optional (for testing)

pytest-7.2.1 and sphinx-6.1.3 (circular dependency)

Installation of Sphinxcontrib-applehelp

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user sphinxcontrib-applehelp

To test the installation, run pytest. Several warnings may be issued, due to the use of deprecated functions.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/sphinxcontrib and /usr/lib/python3.11/site-packages/sphinxcontrib_applehelp-1.0.3.dist-info

Sphinxcontrib-devhelp-1.0.2

Introduction to Sphinxcontrib-devhelp Module

The Sphinxcontrib-devhelp package is a Sphinx extension which outputs Devhelp documents.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Sphinxcontrib-devhelp Dependencies
Optional (for testing)

pytest-7.2.1 and sphinx-6.1.3 (circular dependency)

Installation of Sphinxcontrib-devhelp

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user sphinxcontrib-devhelp

To test the installation, run pytest.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/sphinxcontrib and /usr/lib/python3.11/site-packages/sphinxcontrib_devhelp-1.0.2.dist-info

Sphinxcontrib-htmlhelp-2.0.0

Introduction to Sphinxcontrib-htmlhelp Module

The Sphinxcontrib-htmlhelp package is a Sphinx extension which renders HTML help files.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Sphinxcontrib-htmlhelp Dependencies
Optional (for testing)

pytest-7.2.1, sphinx-6.1.3 (circular dependency), and html5lib

Installation of Sphinxcontrib-htmlhelp

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user sphinxcontrib-htmlhelp

Assuming pytest-7.2.1 is installed, but the other optional dependency is not, the installation can be tested with the following commands:

python3 -m venv --system-site-packages testenv   &&
source testenv/bin/activate                      &&
pip3 install html5lib                            &&
sed -i 's/text()/read_&/' tests/test_htmlhelp.py &&
python3 /usr/bin/pytest
deactivate

the sed ... command is needed because of a change in Sphinx API for versions greater than 5.0.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/sphinxcontrib and /usr/lib/python3.11/site-packages/sphinxcontrib_htmlhelp-2.0.0.dist-info

Sphinxcontrib-jquery-2.0.0

Introduction to Sphinxcontrib-jquery Module

The Sphinxcontrib-jquery package is a Sphinx extension which includes jQuery on newer Sphinx releases.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Sphinxcontrib-jquery Dependencies
Optional (for testing)

pytest-7.2.1

Installation of Sphinxcontrib-jquery

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

This package does not come with a testsuite.

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user sphinxcontrib-jquery

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/sphinxcontrib and /usr/lib/python3.11/site-packages/sphinxcontrib_jquery-2.0.0.dist-info

Sphinxcontrib-jsmath-1.0.1

Introduction to Sphinxcontrib-jsmath Module

The Sphinxcontrib-jsmath package is a Sphinx extension which renders display math in HTML via JavaScript.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Sphinxcontrib-jsmath Dependencies
Optional (for testing)

pytest-7.2.1 and sphinx-6.1.3 (circular dependency)

Installation of Sphinxcontrib-jsmath

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user sphinxcontrib-jsmath

The installation can be tested with the following commands:

sed -i 's/text()/read_&/' tests/test_jsmath.py &&
pytest

the sed ... command is needed because of a change in Sphinx API for versions greater than 5.0.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/sphinxcontrib and /usr/lib/python3.11/site-packages/sphinxcontrib_jsmath-1.0.1.dist-info

Sphinxcontrib-qthelp-1.0.3

Introduction to Sphinxcontrib-qthelp Module

The Sphinxcontrib-qthelp package is a Sphinx extension which outputs QtHelp documents.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Sphinxcontrib-qthelp Dependencies
Optional (for testing)

pytest-7.2.1 and sphinx-6.1.3 (circular dependency)

Installation of Sphinxcontrib-qthelp

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user sphinxcontrib-qthelp

The installation can be tested with the following commands:

sed -i 's/text()/read_&/' tests/test_qthelp.py &&
pytest

The sed ... command is needed because of a change in Sphinx API for versions greater than 5.0.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/sphinxcontrib and /usr/lib/python3.11/site-packages/sphinxcontrib_qthelp-1.0.3.dist-info

Sphinxcontrib-serializinghtml-1.1.5

Introduction to Sphinxcontrib-serializinghtml Module

The Sphinxcontrib-serializinghtml package is a Sphinx extension which outputs serialized HTML files (json and pickle).

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Sphinxcontrib-serializinghtml Dependencies
Optional (for testing)

pytest-7.2.1 and sphinx-6.1.3 (circular dependency)

Installation of Sphinxcontrib-serializinghtml

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user sphinxcontrib-serializinghtml

To test the installation, run pytest.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/sphinxcontrib and /usr/lib/python3.11/site-packages/sphinxcontrib_serializinghtml-1.1.5.dist-info

Typing_extensions-4.4.0

Introduction to Typing_extensions Module

The Typing_extensions module allows using new type system features not yet defined on the Python version in use on the system.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Typing_extensions Dependencies
Required

flit_core-3.8.0

Installation of Typing_extensions

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

This package does not come with a test suite.

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user typing_extensions

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/typing_extensions-4.4.0.dist-info

Typogrify-2.0.7

Introduction to Typogrify Module

Typogrify provides filters to enhance web typography, including support for Django and Jinja templates.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Typogrify Dependencies
Required

smartypants-2.0.1

Installation of Typogrify

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

This package does not come with a testsuite.

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user typogrify

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/typogrify and /usr/lib/python3.11/site-packages/typogrify-2.0.7.dist-info

Urllib3-1.26.14

Introduction to Urllib3 Module

The Urllib3 module is a powerful, user-friendly HTTP client for Python. It brings many critical features that are missing from the Python standard libraries.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information
Urllib3 Dependencies
Optional (for tests)

pytest-7.2.1, mock, PySocks, pytest-freezegun, pytest-timeout, python-dateutil, tornado, and trustme

Installation of Urllib3

Build the module:

pip3 wheel -w dist --no-build-isolation --no-deps $PWD

Now, as the root user:

pip3 install --no-index --find-links dist --no-cache-dir --no-user urllib3

Assuming pytest-7.2.1 is installed, but the other optional dependencies are not, the installation can be tested with the following commands:

python3 -m venv --system-site-packages testenv &&
source testenv/bin/activate                    &&
pip3 install trustme         \
             tornado         \
             python-dateutil \
             mock            \
             pysocks         \
             pytest-timeout  \
             pytest-freezegun                  &&
python3 /usr/bin/pytest
deactivate

A few errors are known to occur.

Command Explanations

-w dist: builds the appropriate "wheel" for this module in the directory dist.

--no-build-isolation: tells pip3 to run the build in the system environment instead of creating a temporary build environment.

--no-deps: prevents pip3 from building wheels for the project's dependencies.

--no-index: ignores the package index (only looking at --find-links URLs instead).

--find-links dist: looks for links to archives such as wheel (.whl) files in the directory dist.

--no-cache-dir: disables the cache to prevent a warning when installing as the root user.

--no-user: Prevent mistakenly running the install command as a non-root user.

--upgrade: Upgrade the package to the newest available version. This option is used with the install command if a version of the package is already installed.

--force-reinstall: Reinstall the package even if it is up-to-date. This option is used with the install command if reinstalling the package or reverting to an earlier version of the package.

--no-deps: Do not install package dependencies. This option may be needed with the --upgrade or --force-reinstall options.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.11/site-packages/urllib3 and /usr/lib/python3.11/site-packages/urllib3-1.26.14.dist-info

Ruby-3.2.1

Introduction to Ruby

The Ruby package contains the Ruby development environment. This is useful for object-oriented scripting.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

  • Download (HTTP): https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.1.tar.xz

  • Download MD5 sum: 23617540ad13c57ed8dd9d4ed32192a5

  • Download size: 14 MB

  • Estimated disk space required: 461 MB (add 1.3 GB for C API docs)

  • Estimated build time: 1.4 SBU (using parallelism=4; add 5.0 SBU for tests; add 0.8 SBU for C API docs)

Ruby Dependencies

Required

libyaml-0.2.5

Optional

Berkeley DB-5.3.28, Doxygen-1.9.6, Graphviz-7.1.0, rustc-1.67.1, Tk-8.6.13, Valgrind-3.20.0, and DTrace

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/ruby

Installation of Ruby

Install Ruby by running the following command:

./configure --prefix=/usr      \
            --enable-shared    \
            --without-valgrind \
            --docdir=/usr/share/doc/ruby-3.2.1 &&
make

Optionally, build the CAPI documents by running the following commands:

make capi

To test the results, issue: make check. There are over 25,000 tests. Some tests related to ipv6 may indicate errors. If the tests are run in a directory that has a world writable component (e.g. /tmp) then several additional tests may fail. A few tests may fail due to system configuration expectations.

Now, as the root user:

make install

Note

If you have Ruby-On-Rails applications installed and did an upgrade of Ruby by installing this package, you might need to run an update there, too (as the root user):

cd /path/to/web/app
bundle update rake

and restart the webserver which serves the application.

Command Explanations

--enable-shared: This switch enables building the libruby shared library.

--disable-install-doc: This switch disables building and installing rdoc indexes and C API documents.

--disable-install-rdoc: This switch disables building and installing rdoc indexes.

--disable-install-capi: This switch disables building and installing C API documents.

--without-baseruby: This switch prevents using the system ruby if it is already installed. The build system will use the newly built version instead.

Contents

Installed Programs: bundle, bundler, erb, gem, irb, racc, rake, rbs, rdbg, rdoc, ri, ruby, and typeprof
Installed Libraries: libruby.so
Installed Directories: /usr/include/ruby-3.2.0, /usr/lib/ruby, /usr/share/doc/ruby-3.2.1 and /usr/share/ri

Short Descriptions

bundle

creates bundles of Ruby Gems

bundler

manages an application's dependencies throughout it's lifecycle

erb

is a command line front-end for eRuby, which provides a templating system for Ruby

gem

is the command for RubyGems, which is a sophisticated package manager for Ruby. This is similar to Python's 'pip' command

irb

is the interactive interface for Ruby

rake

is a make-like build utility for Ruby

rdbg

is an interactive debugger for Ruby

rdoc

generates Ruby documentation

ri

displays documentation from a database on Ruby classes, modules, and methods

ruby

is an interpreted scripting language for quick and easy object-oriented programming

libruby.so

contains the API functions required by Ruby

Rustc-1.67.1

Introduction to Rust

The Rust programming language is designed to be a safe, concurrent, practical language.

This package is updated on a six-weekly release cycle. Because it is such a large and slow package to build, is at the moment only required by a few packages in this book, and particularly because newer versions tend to break older mozilla packages, the BLFS editors take the view that it should only be updated when that is necessary (either to fix problems, or to allow a new version of a package to build).

As with many other programming languages, rustc (the rust compiler) needs a binary from which to bootstrap. It will download a stage0 binary at the start of the build, so you cannot compile it without an Internet connection.

Note

Although BLFS usually installs in /usr, when you later upgrade to a newer version of rust the old libraries in /usr/lib/rustlib will remain, with various hashes in their names, but will not be usable and will waste space. The editors recommend placing the files in the /opt directory. In particular, if you have reason to rebuild with a modified configuration (e.g. using the shipped LLVM after building with shared LLVM, perhaps to compile crates for architectures which the BLFS LLVM build does not support) it is possible for the install to leave a broken cargo program. In such a situation, either remove the existing installation first, or use a different prefix such as /opt/rustc-1.67.1-build2.

If you prefer, you can of course change the prefix to /usr.

The current rustbuild build-system will use all processors, although it does not scale well and often falls back to just using one core while waiting for a library to compile. However it can be mostly limited to a specified number of processors by a combination of adding the switch --jobs <N> (e.g. '--jobs 4' to limit to 4 processors) on each invocation of python3 ./x.py and using an environment variable CARGO_BUILD_JOBS=<N>. At the moment this is not effective when some of the rustc tests are run.

The current version of rust's num_cpus crate now recognizes that cgroups can be used to restrict which processors it is allowed to use. So if your machine lacks DRAM (typically, less than 2GB DRAM per core) that might be an alternative to taking CPUs offline. In sysv systems cgroups requires libcgroup.

At the moment Rust does not provide any guarantees of a stable ABI.

Note

Rustc defaults to building for ALL supported architectures, using a shipped copy of LLVM. In BLFS the build is only for the X86 architecture. If you intend to develop rust crates, this build may not be good enough for your purposes.

The build times of this version when repeated on the same machine are often reasonably consistent, but as with all compilations using rustc there can be some very slow outliers.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

  • Download (HTTP): https://static.rust-lang.org/dist/rustc-1.67.1-src.tar.xz

  • Download MD5 sum: e5e47e53c52574ce89ea200e52819f81

  • Download size: 136 MB

  • Estimated disk space required: 8.5 GB (501 MB installed); add 7.5 GB if running the tests

  • Estimated build time: 13 SBU (including download time; add 16 SBU for tests, both using parallelism=4)

Rust Dependencies

Required

CMake-3.25.2

Recommended

Note

If a recommended dependency is not installed, a shipped copy in the Rustc source tarball will be built and used.

Optional

GDB-13.1 (used by the test suite if it is present) and libgit2

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/rust

Installation of Rust

Note

Currently Rust compiler produces SSE2 instructions for 32-bit x86, causing the generated code broken on 32-bit systems without a SSE2-capable processor. All x86 processor models released after 2004 should be SSE2-capable. Run lscpu | grep sse2 as a test. If it outputs anything, your CPU is SSE2-capable and OK. Otherwise you may try to build this package on a SSE2-capable system with the following fix applied:

sed 's@pentium4@pentiumpro@' -i \
    compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs

And copy the resulting /opt/rustc-1.67.1 to the system without SSE2 capability. But this change is still under upstream review and not tested by BLFS editors.

To install into the /opt directory, remove any existing /opt/rustc symlink and create a new directory (i.e. with a different name if trying a modified build of the same version). As the root user:

mkdir -pv /opt/rustc-1.67.1      &&
ln -svfn rustc-1.67.1 /opt/rustc

Note

If multiple versions of Rust are installed in /opt, changing to another version only requires changing the /opt/rustc symbolic link and then running ldconfig.

Create a suitable config.toml file which will configure the build.

cat << EOF > config.toml
# see config.toml.example for more possible options
# See the 8.4 book for an old example using shipped LLVM
# e.g. if not installing clang, or using a version before 13.0

# tell x.py to not keep printing an annoying warning
changelog-seen = 2

[llvm]
# by default, rust will build for a myriad of architectures
targets = "X86"

# When using system llvm prefer shared libraries
link-shared = true

[build]
# omit docs to save time and space (default is to build them)
docs = false

# install extended tools: cargo, clippy, etc
extended = true

# Do not query new versions of dependencies online.
locked-deps = true

# Specify which extended tools (those from the default install).
tools = ["cargo", "clippy", "rustfmt"]

# Use the source code shipped in the tarball for the dependencies.
# The combination of this and the "locked-deps" entry avoids downloading
# many crates from Internet, and makes the Rustc build more stable.
vendor = true

[install]
prefix = "/opt/rustc-1.67.1"
docdir = "share/doc/rustc-1.67.1"

[rust]
channel = "stable"
description = "for BLFS 11.3"

# BLFS used to not install the FileCheck executable from llvm,
# so disabled codegen tests.  The assembly tests rely on FileCheck
# and cannot easily be disabled, so those will anyway fail if
# FileCheck has not been installed.
#codegen-tests = false

[target.x86_64-unknown-linux-gnu]
# NB the output of llvm-config (i.e. help options) may be
# dumped to the screen when config.toml is parsed.
llvm-config = "/usr/bin/llvm-config"

[target.i686-unknown-linux-gnu]
# NB the output of llvm-config (i.e. help options) may be
# dumped to the screen when config.toml is parsed.
llvm-config = "/usr/bin/llvm-config"


EOF

Compile Rust by running the following commands:

{ [ ! -e /usr/include/libssh2.h ] ||
  export LIBSSH2_SYS_USE_PKG_CONFIG=1; } &&
python3 ./x.py build

Note

The test suite will generate some messages in the system log for traps on invalid opcodes, and for segmentation faults. In themselves these are nothing to worry about, just a way for the test to be terminated.

To run the tests (again using all available CPUs) issue:

python3 ./x.py test --verbose --no-fail-fast | tee rustc-testlog

If FileCheck from LLVM has not been installed, all 47 tests from the assembly suite will fail.

As with all large test suites, other tests might fail on some machines - if the number of additional failures is in the single digits, check the log for 'failures:' and review lines above that, particularly the 'stderr:' lines. Any mention of SIGSEGV or signal 11 in a failing test is a cause for concern.

If you get any other failing test which reports an issue number then you should search for that issue. For example, when rustc >= 1.41.1 was built with a version of sysllvm before 10.0 the test for issue 69225 failed https://github.com/rust-lang/rust/issues/69225 and that should be regarded as a critical failure (they released 1.41.1 because of it). Most other failures will not be critical.

Therefore, you should determine the number of failures.

The number of tests which passed and failed can be found by running:

grep '^test result:' rustc-testlog |
 awk '{sum1 += $4; sum2 += $6} END { print sum1 " passed; " sum2 " failed" }'

The other available fields are $8 for those which were ignored (i.e. skipped), $10 for 'measured' and $12 for 'filtered out' but both those last two are probably zero.

Now, as the root user, install the package:

Note

If sudo or su is invoked for switching to the root user, ensure LIBSSH2_SYS_USE_PKG_CONFIG is correctly passed or the following command may completely rebuild this package. For sudo, use the --preserve-env=LIBSSH2_SYS_USE_PKG_CONFIG option. For su, do not use the - or --login.

python3 ./x.py install

Command Explanations

ln -svfn rustc-1.67.1 /opt/rustc: if this is not the first use of the /opt/rustc symlink, overwrite it by forcing, and use the '-n' flag to avoid getting confusing results from e.g. ls -l.

targets = "X86": this avoids building all the available linux cross-compilers (AArch64, MIPS, PowerPC, SystemZ, etc). Unfortunately, rust insists on installing source files for these below /opt/rustc/lib/src.

extended = true: this installs several tools (specified by the tools entry) alongside rustc.

tools = ["cargo", "clippy", "rustfmt"]: if the tools are not scecified, the absence of Miri now causes the install to fail. But Miri is not built in the stable channel. Some of the other tools are unlikely to be useful unless using (old) code analyzers or editing the standard library. This set match those from the 'default' profile in binary command rustup which are recommended for most users, except that the documentation was disabled at the start of the '[build]' section.

channel = "stable": this ensures only stable features can be used, the default in config.toml is to use development features, which is not appropriate for a released version.

[target.x86_64-unknown-linux-gnu]: the syntax of config.toml requires an llvm-config entry for each target for which system-llvm is to be used. Change the target to [target.i686-unknown-linux-gnu] if you are building on 32-bit x86. This whole section may be omitted if you wish to build against the shipped llvm, or do not have clang, but the resulting build will be larger and take longer.

export LIBSSH2_SYS_USE_PKG_CONFIG=1: Allow cargo to link to system libssh2.

--verbose: this switch can sometimes provide more information about a test which fails.

--no-fail-fast: this switch ensures that the test suite will not stop at the first error.

Configuring Rust

Configuration Information

If you installed rustc in /opt, you need to update the following configuration files so that rustc is correctly found by other packages and system processes.

As the root user, create the /etc/profile.d/rustc.sh file:

cat > /etc/profile.d/rustc.sh << "EOF"
# Begin /etc/profile.d/rustc.sh

pathprepend /opt/rustc/bin           PATH

# Include /opt/rustc/man in the MANPATH variable to access manual pages
pathappend  /opt/rustc/share/man     MANPATH

# End /etc/profile.d/rustc.sh
EOF

Immediately after installation, update the current PATH for your current shell as a normal user:

source /etc/profile.d/rustc.sh

Contents

Installed Programs: cargo-clippy, cargo-fmt, cargo, clippy-driver, rust-gdb, rust-gdbgui, rust-lldb, rustc, rustdoc, and rustfmt
Installed Libraries: librustc-driver-<16-byte-hash>.so, libstd-<16-byte-hash>.so, and libtest-<16-byte-hash>.so
Installed Directories: ~/.cargo, /opt/rustc, symbolic link to /opt/rustc-1.67.1

Short Descriptions

cargo-clippy

provides lint checks for a cargo package

cargo-fmt

formats all bin and lib files of the current crate using rustfmt

cargo

is the Package Manager for Rust

clippy-driver

provides lint checks for Rust

rust-gdb

is a wrapper script for gdb, pulling in Python pretty-printing modules installed in /opt/rustc-1.67.1/lib/rustlib/etc

rust-gdbgui

is a wrapper script for a graphical front end to gdb that runs in a browser

rust-lldb

is a wrapper script for LLDB (the LLVM debugger) pulling in the Python pretty-printing modules

rustc

is the rust compiler

rustdoc

generates documentation from rust source code

rustfmt

formats rust code

libstd-<16-byte-hash>.so

is the Rust Standard Library, the foundation of portable Rust software

SCons-4.4.0

Introduction to SCons

SCons is a tool for building software (and other files) implemented in Python.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

SCons Dependencies

Optional

docbook-xsl-nons-1.79.2 and libxslt-1.1.37

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/scons

Installation of SCons

Install SCons by running the following commands as the root user:

sed -i 's/env python/&3/' SCons/Utilities/*.py &&

python3 setup.py install --prefix=/usr \
                         --optimize=1  &&

mv -v /usr/lib/python3.11/site-packages/SCons-4.4.0-py3.11.egg/*.1 \
      /usr/share/man/man1

Contents

Installed Programs: scons, scons-configure-cache, and sconsign
Installed Libraries: None
Installed Directory: /usr/lib/python3.11/site-packages/SCons

Short Descriptions

scons

is a software construction tool

scons-configure-cache

shows or converts the configuration of an SCons cache directory

sconsign

prints SCons .sconsign file information

slang-2.3.3

Introduction to slang

S-Lang (slang) is an interpreted language that may be embedded into an application to make the application extensible. It provides facilities required by interactive applications such as display/screen management, keyboard input and keymaps.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Slang Dependencies

Optional

libpng-1.6.39, PCRE-8.45, and Oniguruma

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/slang

Installation of Slang

Note

This package does not support parallel build.

Install slang by running the following commands:

./configure --prefix=/usr \
            --sysconfdir=/etc \
            --with-readline=gnu &&
make -j1

To test the results, issue: make check.

Now, as the root user:

make install_doc_dir=/usr/share/doc/slang-2.3.3   \
     SLSH_DOC_DIR=/usr/share/doc/slang-2.3.3/slsh \
     install &&

chmod -v 755 /usr/lib/slang/v2/modules/*.so

Command Explanations

--with-readline=gnu: This parameter sets GNU Readline to be used by the parser interface instead of the slang internal version.

make install_doc_dir=/usr/share/doc/slang-2.3.3 SLSH_DOC_DIR=/usr/share/doc/slang-2.3.3/slsh install: This command installs this package with a versioned documentation installation directory.

Configuring slang

Config Files

~/.slshrc and /etc/slsh.rc

Contents

Installed Program: slsh
Installed Libraries: libslang.so and numerous support modules
Installed Directories: /usr/lib/slang, /usr/share/doc/slang-2.3.3 and /usr/share/slsh

Short Descriptions

slsh

is a simple program for interpreting slang scripts. It supports dynamic loading of slang modules and includes a Readline interface for interactive use

Subversion-1.14.2

Introduction to Subversion

Subversion is a version control system that is designed to be a compelling replacement for CVS in the open source community. It extends and enhances CVS' feature set, while maintaining a similar interface for those already familiar with CVS. These instructions install the client and server software used to manipulate a Subversion repository. Creation of a repository is covered at Running a Subversion Server.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

  • Download (HTTP): https://archive.apache.org/dist/subversion/subversion-1.14.2.tar.bz2

  • Download MD5 sum: 9927b167d1c67d663ca63125907f6f69

  • Download size: 8.3 MB

  • Estimated disk space required: 208 MB (add 228 MB for bindings, 52 MB for docs, 1.3 GB for tests)

  • Estimated build time: 0.5 SBU (Using parallelism=4; add 1.9 SBU for bindings, 35 SBU for tests)

Subversion Dependencies

Required

Apr-Util-1.6.3 and SQLite-3.40.1

Recommended
Optional

Apache-2.4.55, Boost-1.81.0, Cyrus SASL-2.1.28, dbus-1.14.6, Doxygen-1.9.6 (for generating HTML documentation), gnome-keyring-42.1, libsecret-0.20.5, Py3c-1.4 (for the python bindings, and tests) Python-2.7.18 (with sqlite support for the tests), Ruby-3.2.1, SWIG-4.1.1 (for building Perl, Python and Ruby bindings), LZ4, and UTF8proc

Optional (for the Java Bindings)

One of OpenJDK-19.0.2, Dante or Jikes, JUnit 4 (to test the Java bindings) and apache-ant-1.10.13.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/subversion

Installation of Subversion

First, adapt some Python scripts to use python3:

grep -rl '^#!.*python$' | xargs sed -i '1s/python/&3/'

Next, adapt the Ruby bindings to Ruby-3.2:

sed -e 's/File.exists?/File.exist?/'               \
    -i subversion/bindings/swig/ruby/svn/util.rb   \
       subversion/bindings/swig/ruby/test/test_wc.rb

Install Subversion by running the following commands:

PYTHON=python3 ./configure --prefix=/usr             \
            --disable-static          \
            --with-apache-libexecdir  \
            --with-lz4=internal       \
            --with-utf8proc=internal &&
make

If you have Doxygen-1.9.6 installed and you wish to build the API documentation, issue:

doxygen doc/doxygen.conf

If you wish to build the Java bindings pass the --enable-javahl parameter to the configure command. In addition, if you want to run the Java test suite, you have to specify the location of the JUnit file by adding --with-junit=<path to junit jar> (for instance --with-junit=/usr/local/java/lib/junit-4.13.jar) to configure. The JUnit jar file is no longer included in apache-ant-1.10.13 and must be downloaded separately. To build the Java bindings, issue the following command:

make -j1 javahl

If you want to compile Perl, Python, or Ruby bindings, issue any of the following command:

make swig-pl # for Perl
make swig-py \
     swig_pydir=/usr/lib/python3.11/site-packages/libsvn \
     swig_pydir_extra=/usr/lib/python3.11/site-packages/svn # for Python
make swig-rb # for Ruby

To test the results, issue: make check. Four tests in the commit_tests.py, prop_tests.py, and update_tests.py suites are known to fail.

To test the results of any of the SWIG bindings, you can use any of the following commands: make check-swig-pl, make check-swig-py, or make check-swig-rb.

Now, as the root user:

make install &&

install -v -m755 -d /usr/share/doc/subversion-1.14.2 &&
cp      -v -R doc/* /usr/share/doc/subversion-1.14.2

If you built the Java bindings, issue the following command as the root user to install them:

make install-javahl

If you built the Perl, Python, or Ruby bindings, issue any of the following commands as the root user to install them:

make install-swig-pl
make install-swig-py \
      swig_pydir=/usr/lib/python3.11/site-packages/libsvn \
      swig_pydir_extra=/usr/lib/python3.11/site-packages/svn
make install-swig-rb

The java bindings need to be installed in order for the tests to run, since the tests attempt to look for them in CLASSPATH. To test the results of the Java bindings build, issue LANG=C make check-javahl.

Command Explanations

--disable-static: This switch prevents installation of static versions of the libraries.

--with-apache-libexecdir: If Apache-2.4.55 is installed, the shared Apache modules are built. This switch allows to have those modules installed to Apache's configured module dir instead of /usr/libexec. It has no effect if Apache is not installed.

--with-lz4=internal, --with-utf8proc=internal: Remove these switches if you have installed the optional dependencies.

--enable-javahl: enables compilation of Java high level bindings. Running make javahl is necessary to do the compilation.

--with-junit=<location of the junit jar file>: gives the location of the junit jar, otherwise the javahl tests cannot be run.

--disable-gmock: Do not use the Googlemock testing framework.

Configuring Subversion

Config Files

~/.subversion/config and /etc/subversion/config

Configuration Information

/etc/subversion/config is the Subversion system-wide configuration file. This file is used to specify defaults for different svn commands.

~/.subversion/config is the user's personal configuration file. It is used to override the system-wide defaults set in /etc/subversion/config.

Contents

Installed Programs: svn, svnadmin, svnbench, svndumpfilter, svnfsfs, svnlook, svnmucc, svnrdump, svnserve, svnsync, and svnversion
Installed Libraries: libsvn_*-1.so and optionally, a Java library, the mod_dav_svn.so and and mod_authz_svn.so Apache HTTP DSO modules and various Perl, Python and Ruby modules.
Installed Directories: /usr/include/subversion-1, /usr/lib/perl5/site_perl/5.36/{,auto/}SVN, /usr/lib/python3.11/site-packages/{libsvn,svn}, /usr/lib/ruby/site_ruby/<x.y.z>/{,<arch-linux>-linux/}svn, /usr/lib/svn-javahl, and /usr/share/doc/subversion-1.14.2

Short Descriptions

svn

is a command-line client program used to access Subversion repositories

svnadmin

is a tool for creating, tweaking or repairing a Subversion repository

svnbench

is a benchmarking tool

svndumpfilter

is a program for filtering Subversion repository dumpfile format streams

svnfsfs

is the FSFS (FileSystem atop of the FileSystem - Subversion filesystem implementation) repository manipulation tool

svnlook

is a tool for inspecting a Subversion repository

svnmucc

is a Multiple URL Command Client for Subversion

svnrdump

is a tool for dumping or loading a remote Subversion repository

svnserve

is a custom standalone server program, able to run as a daemon process or invoked by SSH

svnsync

is a Subversion repository synchronisation tool

svnversion

is used to report the version number and state of a working Subversion repository copy

libsvn_*-1.so

are the support libraries used by the Subversion programs

mod_authz_svn.so

is a plug-in module for the Apache HTTP server, used to authenticate users to a Subversion repository over the Internet or an intranet

mod_dav_svn.so

is a plug-in module for the Apache HTTP server, used to make a Subversion repository available to others over the Internet or an intranet

Running a Subversion Server

Running a Subversion Server

This section will describe how to set up, administer and secure a Subversion server.

Subversion Server Dependencies

Required

Subversion-1.14.2 and OpenSSH-9.2p1

Setting up a Subversion Server.

The following instructions will install a Subversion server, which will be set up to use OpenSSH as the secure remote access method, with svnserve available for anonymous access.

Configuration of the Subversion server consists of the following steps:

1. Set Uup Users, Groups, and Permissions

You'll need to be user root for the initial portion of configuration. Create the svn user and group with the following commands:

groupadd -g 56 svn &&
useradd -c "SVN Owner" -d /home/svn -m -g svn -s /bin/false -u 56 svn

If you plan to have multiple repositories, you should have a group dedicated to each repository for ease of administration. Create the svntest group for the test repository and add the svn user to that group with the following commands:

groupadd -g 57 svntest &&
usermod -G svntest -a svn

Additionally you should set umask 002 while working with a repository so that all new files will be writable by owner and group. This is made mandatory by creating a wrapper script for svn and svnserve:

mv /usr/bin/svn /usr/bin/svn.orig &&
mv /usr/bin/svnserve /usr/bin/svnserve.orig &&
cat >> /usr/bin/svn << "EOF"
#!/bin/sh
umask 002
/usr/bin/svn.orig "$@"
EOF
cat >> /usr/bin/svnserve << "EOF"
#!/bin/sh
umask 002
/usr/bin/svnserve.orig "$@"
EOF
chmod 0755 /usr/bin/svn{,serve}

Note

If you use Apache for working with the repository over HTTP, even for anonymous access, you should wrap /usr/sbin/httpd in a similar script.

2. Create a Subversion repository.

There are several ways to set up a subversion repository. It is recommended to have a look at the SVN Book corresponding chapter. A basic repository can be set up with the instructions below.

Create a new Subversion repository with the following commands (as the root user):

install -v -m 0755 -d /srv/svn &&
install -v -m 0755 -o svn -g svn -d /srv/svn/repositories &&
svnadmin create /srv/svn/repositories/svntest

Now that the repository is created, it should be populated with something useful. You'll need to have a predefined directory layout set up exactly as you want your repository to look. For example, here is a sample BLFS layout setup with a root of svntest/. You'll need to set up a directory tree similar to the following:

svntest/            # The name of the repository
   trunk/           # Contains the existing source tree
      BOOK/
      bootscripts/
      edguide/
      patches/
      scripts/
   branches/        # Needed for additional branches
   tags/            # Needed for tagging release points

Once you've created your directory layout as shown above, you are ready to do the initial import:

svn import -m "Initial import." \
    </path/to/source/tree>      \
    file:///srv/svn/repositories/svntest

Now change owner and group information on the repository, and add an unprivileged user to the svn and svntest groups:

chown -R svn:svntest /srv/svn/repositories/svntest    &&
chmod -R g+w         /srv/svn/repositories/svntest    &&
chmod g+s            /srv/svn/repositories/svntest/db &&
usermod -G svn,svntest -a <username>

svntest is the group assigned to the svntest repository. As mentioned earlier, this eases administration of multiple repositories when using OpenSSH for authentication. Going forward, you'll need to add your unprivileged user, and any additional users that you wish to have write access to the repository, to the svn and svntest groups.

In addition, you'll notice that the new repository's db directory is set-groupID. If the reasoning is not immediately obvious, when using any external authentication method (such as ssh), the sticky bit is set so that all new files will be owned by the user, but group of svntest. Anyone in the svntest group can create files, but still give the entire group write access to those files. This avoids locking out other users from the repository.

Now, return to an unprivileged user account, and take a look at the new repository using svnlook:

svnlook tree /srv/svn/repositories/svntest/

Note

You may need to log out and back in again to refresh your group memberships. su <username> should work as well.

3. Configure the Server

As mentioned previously, these instructions will configure the server to use only ssh for write access to the repository and to provide anonymous access using svnserve. There are several other ways to provide access to the repository. These additional configurations are best explained at https://svnbook.red-bean.com/.

Access configuration needs to be done for each repository. Create the svnserve.conf file for the svntest repository using the following commands:

cp /srv/svn/repositories/svntest/conf/svnserve.conf \
   /srv/svn/repositories/svntest/conf/svnserve.conf.default &&

cat > /srv/svn/repositories/svntest/conf/svnserve.conf << "EOF"
[general]
anon-access = read
auth-access = write
EOF

There is not a lot to the configuration file at all. You'll notice that only the general section is required. Take a look at the svnserve.conf.default file for information on using svnserve's built-in authentication method.

4. Starting the Server

To start the server at boot time, install the svn bootscript included in the blfs-bootscripts-20230101 package:

make install-svn

SWIG-4.1.1

Introduction to SWIG

SWIG (Simplified Wrapper and Interface Generator) is a compiler that integrates C and C++ with languages including Perl, Python, Tcl, Ruby, PHP, Java, C#, D, Go, Lua, Octave, R, Scheme, and Ocaml. SWIG can also export its parse tree into Lisp s-expressions and XML.

SWIG reads annotated C/C++ header files and creates wrapper code (glue code) in order to make the corresponding C/C++ libraries available to the listed languages, or to extend C/C++ programs with a scripting language.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

  • Download (HTTP): https://downloads.sourceforge.net/swig/swig-4.1.1.tar.gz

  • Download MD5 sum: c7d55a1bca26752f3846c85b43c1a69c

  • Download size: 8.2 MB

  • Estimated disk space required: 82 MB (2.1 GB with tests)

  • Estimated build time: 0.1 SBU (add 7.8 SBU for tests; both using parallelism=4)

SWIG Dependencies

Required

pcre2-10.42

Optional

Boost-1.81.0 for tests, and any of the languages mentioned in the introduction, as run-time dependencies

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/swig

Installation of SWIG

Install SWIG by running the following commands:

./configure --prefix=/usr                      \
            --without-javascript               \
            --without-maximum-compile-warnings &&
make

To test the results, issue: PY3=1 make -k check TCL_INCLUDE=. The unsetting of the variable TCL_INCLUDE is necessary since it is not correctly set by configure. The tests are only executed for the languages installed on your machine, so the disk space and SBU values given for the tests may vary, and should be considered as mere orders of magnitude. According to SWIG's documentation, the failure of some tests should not be considered harmful. The go tests are buggy and may generate a lot of meaningless output.

Now, as the root user:

make install &&
install -v -m755 -d /usr/share/doc/swig-4.1.1 &&
cp -v -R Doc/* /usr/share/doc/swig-4.1.1

Command Explanations

--without-maximum-compile-warnings: disables compiler ansi conformance enforcement, which triggers errors in the Lua headers (starting with Lua 5.3).

--without-<language>: allows disabling the building of tests and examples for <language>, but all the languages capabilities of SWIG are always built.

Contents

Installed Programs: swig and ccache-swig
Installed Library: None
Installed Directories: /usr/share/doc/swig-4.1.1 and /usr/share/swig

Short Descriptions

swig

takes an interface file containing C/C++ declarations and SWIG special instructions, and generates the corresponding wrapper code needed to build extension modules

ccache-swig

is a compiler cache, which speeds up re-compilation of C/C++/SWIG code

Sysprof-3.46.0

Introduction to Sysprof

The sysprof package contains a statistical and system-wide profiler for Linux.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Sysprof Dependencies

Required

desktop-file-utils-0.26, GTK-4.8.3, itstool-2.0.7, JSON-GLib-1.6.6, libadwaita-1.2.2, libdazzle-3.44.0, libunwind-1.6.2, Polkit-122 , and elogind-246.10

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/sysprof

Installation of Sysprof

Install Sysprof by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release -Dsystemdunitdir=/tmp .. &&
ninja

To test the results, issue: ninja test.

Now, as the root user:

ninja install &&
rm -v /tmp/*.service

Command Explanations

rm -v /tmp/*.service: This command removes systemd units which have no use on SysV systems.

-Dsystemdunitdir=/tmp: This parameter puts systemd units in /tmp on SysV systems so that they can be removed. It also bypasses a check for systemd in the meson.build file.

Contents

Installed Programs: sysprof, sysprof-agent, and sysprof-cli
Installed Libraries: libsysprof-4.so, libsysprof-capture-4.a, libsysprof-memory-4.so, libsysprof-speedtrack-4.so, and libsysprof-ui-5.so
Installed Directories: /usr/include/sysprof-4, /usr/include/sysprof-ui-5, and /usr/share/help/*/sysprof

Short Descriptions

sysprof

is a graphical interface to sysprof

sysprof-agent

is used to profile applications in containers

sysprof-cli

is a command line interface to sysprof

libsysprof-4.so

provides API functions for profiling processes running on a system

libsysprof-capture-4.a

provides a hook used to capture statistics from a process

libsysprof-memory-4.so

provides API functions for capturing memory statistics

libsysprof-speedtrack-4.so

provides API functions for tracking the speed of a running process

libsysprof-ui-4.so

provides API functions for the sysprof GUI

Tk-8.6.13

Introduction to Tk

The Tk package contains a TCL GUI Toolkit.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Tk Dependencies

Required

Xorg Libraries

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/tk

Installation of Tk

Install Tk by running the following commands:

cd unix &&
./configure --prefix=/usr \
            --mandir=/usr/share/man \
            $([ $(uname -m) = x86_64 ] && echo --enable-64bit) &&

make &&

sed -e "s@^\(TK_SRC_DIR='\).*@\1/usr/include'@" \
    -e "/TK_B/s@='\(-L\)\?.*unix@='\1/usr/lib@" \
    -i tkConfig.sh

Running the tests is not recommended. Failures will be reported during the tests, depending on the screen resolution/capabilities, fonts installed and other X related parameters, but the end report can show 0 failures. Some tests will steal focus and some might crash your X Server. To test the results anyway, issue: make test. Ensure you run it from an X Window display device with the GLX extensions loaded, but even so, tests might hang.

Now, as the root user:

make install &&
make install-private-headers &&
ln -v -sf wish8.6 /usr/bin/wish &&
chmod -v 755 /usr/lib/libtk8.6.so

Command Explanations

$([ $(uname -m) = x86_64 ] && echo --enable-64bit): This switch is used to enable 64 bit support in Tk on 64 bit operating systems.

make install-private-headers: This command is used to install the Tk library interface headers used by other packages if they link to the Tk library.

ln -v -sf wish8.6 /usr/bin/wish: This command is used to create a compatibility symbolic link to the wish8.6 file as many packages expect a file named wish.

sed -e ... tkConfig.sh: The Tk package expects that its source tree is preserved so that packages depending on it for their compilation can utilize it. This sed removes the references to the build directory and replaces them with saner system-wide locations.

Contents

Installed Programs: wish and wish8.6
Installed Libraries: libtk8.6.so and libtkstub8.6.a
Installed Directory: /usr/lib/tk8.6

Short Descriptions

wish

is a symlink to the wish8.6 program

wish8.6

is a simple shell containing the Tk toolkit that creates a main window and then processes Tcl commands

libtk8.6.so

contains the API functions required by Tk

Vala-0.56.4

Introduction to Vala

Vala is a new programming language that aims to bring modern programming language features to GNOME developers without imposing any additional runtime requirements and without using a different ABI compared to applications and libraries written in C.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Vala Dependencies

Required

GLib-2.74.5

Recommended
Optional

dbus-1.14.6 (Required for the tests), libxslt-1.1.37 (Required for generating the documentation), help2man, jing, and weasyprint

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/vala

Installation of Vala

Install Vala by running the following commands:

./configure --prefix=/usr &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

--disable-valadoc: This option is required if Graphviz-7.1.0 is not installed.

Contents

Installed Programs: vala, vala-0.56, valac, valadoc, vala-gen-introspect, and vapigen (symlinks); valac-0.56, valadoc-0.56, vala-gen-introspect-0.56, and vapigen-0.56
Installed Library: libvala-0.56.so and libvaladoc-0.56.so
Installed Directories: /usr/include/vala-0.56, /usr/include/valadoc-0.56, /usr/lib/vala-0.56, /usr/lib/valadoc-0.56, /usr/share/vala, /usr/share/vala-0.56, /usr/share/valadoc-0.56, and /usr/share/devhelp/books/vala-0.56

Short Descriptions

valac

is a compiler that translates Vala source code into C source and header files

valadoc

is a documentation generator for generating API documentation from Vala source code based on libvala

vala-gen-introspect

generates a GI file for GObject and GLib based packages

vapigen

is an utility which generates Vala API (VAPI) files from GI files

libvala-0.56.so

contains the Vala API functions

Valgrind-3.20.0

Introduction to Valgrind

Valgrind is an instrumentation framework for building dynamic analysis tools. There are Valgrind tools that can automatically detect many memory management and threading bugs, and profile programs in detail. Valgrind can also be used to build new tools.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Valgrind Dependencies

Optional

GDB-13.1 (for tests), LLVM-15.0.7 (with Clang), and Which-2.21 (for tests)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/valgrind

Installation of Valgrind

Install Valgrind by running the following commands:

sed -i 's|/doc/valgrind||' docs/Makefile.in &&

./configure --prefix=/usr \
            --datadir=/usr/share/doc/valgrind-3.20.0 &&
make

To test the results, issue: make regtest. The tests may hang forever if GDB-13.1 is not installed. Some tests are known to hang also, depending on the version of glibc. A few tests can fail in various suites. Problematic tests can be disabled by changing the prereq: line in the corresponding .vgtest file to prereq: false. For example:

sed -e 's@prereq:.*@prereq: false@' \
    -i {helgrind,drd}/tests/pth_cond_destroy_busy.vgtest

Note

The OpenMP tests are skipped if libgomp has been compiled with --enable-linux-futex (the default). If needed, just recompile the libgomp library from the gcc build tree, passing --disable-linux-futex to configure, storing the library to some place and changing the link from /usr/lib/libgomp.so.1 to point to the new library.

Now, as the root user:

make install

Command Explanations

sed -i ... docs/Makefile.in : This sed provides for installing the documentation in a versioned directory.

--enable-lto=yes: This option allows building Valgrind with LTO (link time optimization). This produces a smaller/faster Valgrind (up to 10%), but build time increases to about 5.5 SBU.

Contents

Installed Programs: callgrind_annotate, callgrind_control, cg_annotate, cg_diff, cg_merge, ms_print, valgrind, valgrind-di-server, valgrind-listener, and vgdb
Installed Libraries: None
Installed Directories: /usr/lib/valgrind, /usr/libexec/valgrind, /usr/include/valgrind, and /usr/share/doc/valgrind-3.20.0

Short Descriptions

valgrind

is a program for debugging and profiling Linux executables

callgrind_annotate

takes an output file produced by the Valgrind tool Callgrind and prints the information in an easy-to-read form

callgrind_control

controls programs being run by the Valgrind tool Callgrind

cg_annotate

is a post-processing tool for the Valgrind tool Cachegrind

cg_diff

compares two Cachegrind output files

cg_merge

merges multiple Cachegrind output files into one

ms_print

takes an output file produced by the Valgrind tool Massif and prints the information in an easy-to-read form

valgrind-di-server

is a server that reads debuginfo from objects stored on a different machine

valgrind-listener

listens on a socket for Valgrind commentary

vgdb

is an intermediary between Valgrind and GDB or a shell

yasm-1.3.0

Introduction to yasm

Yasm is a complete rewrite of the NASM-2.16.01 assembler. It supports the x86 and AMD64 instruction sets, accepts NASM and GAS assembler syntaxes and outputs binary, ELF32 and ELF64 object formats.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

yasm Dependencies

Optional

Python-2.7.18 and cython-0.29.33

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/yasm

Installation of yasm

Install yasm by running the following commands:

sed -i 's#) ytasm.*#)#' Makefile.in &&

./configure --prefix=/usr &&
make

To test the results, issue: make check.

Now, as the root user:

make install

Command Explanations

sed -i 's#) ytasm.*#)#' Makefile.in: This sed prevents it compiling 2 programs (vsyasm and ytasm) that are only of use on Microsoft Windows.

Contents

Installed Program: yasm
Installed Library: libyasm.a
Installed Directory: /usr/include/libyasm

Short Descriptions

yasm

is a portable, retargetable assembler that supports the x86 and AMD64 instruction sets, accepts NASM and GAS assembler syntaxes and outputs binaries in ELF32 and ELF64 object formats

libyasm.a

provides all of the core functionality of yasm, for manipulating machine instructions and object file constructs

Java

Java-19.0.2

About Java

Java is different from most of the packages in LFS and BLFS. It is a programming language that works with files of bytecode to obtain instructions and executes them in a Java Virtual Machine (JVM). An introductory java program looks like:

public class HelloWorld
{
    public static void main(String[] args)
    {
        System.out.println("Hello, World");
    }
}

This program is saved as HelloWorld.java. The file name, HelloWorld, must match the class name. It is then converted into byte code with javac HelloWorld.java. The output file is HelloWorld.class. The program is executed with java HelloWorld. This creates a JVM and runs the code. The 'class' extension must not be specified.

Several class files can be combined into one file with the jar command. This is similar to the standard tar command. For instance, the command jar cf myjar.jar *.class will combine all class files in a directory into one jar file. These act as library files.

The JVM can search for and use classes in jar files automatically. It uses the CLASSPATH environment variable to search for jar files. This is a standard list of colon-separated directory names similar to the PATH environment variable.

Binary JDK Information

Creating a JVM from source requires a set of circular dependencies. The first thing that's needed is a set of programs called a Java Development Kit (JDK). This set of programs includes java, javac, jar, and several others. It also includes several base jar files.

To start, we set up a binary installation of the JDK created by the BLFS editors. It is installed in the /opt directory to allow for multiple installations, including a source based version.

This package is known to build and work properly using an LFS 11.3 platform.

Binary Package Information

Java Binary Runtime Dependencies

alsa-lib-1.2.8, Cups-2.4.2, giflib-5.2.1, and Xorg Libraries

Installation of the Java BinaryJDK

Begin by extracting the appropriate binary tarball for your architecture and changing to the extracted directory. Install the binary OpenJDK with the following commands as the root user:

install -vdm755 /opt/OpenJDK-19.0.2-bin &&
mv -v * /opt/OpenJDK-19.0.2-bin         &&
chown -R root:root /opt/OpenJDK-19.0.2-bin

The binary version is now installed. You may create a symlink to that version by issuing, as the root user:

ln -sfn OpenJDK-19.0.2-bin /opt/jdk

You may now proceed to Configuring the JAVA environment, where the instructions assume that the above link exists.

OpenJDK-19.0.2

Introduction to OpenJDK

OpenJDK is an open-source implementation of Oracle's Java Standard Edition platform. OpenJDK is useful for developing Java programs, and provides a complete runtime environment to run Java programs.

This package is known to build and work properly using an LFS 11.3 platform.

OpenJDK is GPL'd code, with a special exception made for non-free projects to use these classes in their proprietary products. In similar fashion to the LGPL, which allows non-free programs to link to libraries provided by free software, the GNU General Public License, version 2, with the Classpath Exception allows third party programs to use classes provided by free software without the requirement that the third party software also be free. As with the LGPL, any modifications made to the free software portions of a third party application, must also be made freely available.

Note

The OpenJDK source includes a very thorough, open source test suite using the JTreg test harness. The testing instructions below allow testing the just built JDK for reasonable compatibility with the proprietary Oracle JDK. However, in order for an independent implementation to claim compatibility, it must pass a proprietary JCK/TCK test suite. No claims of compatibility, or even partial compatibility, may be made without passing an approved test suite.

Oracle does provide free community access, on a case by case basis, to a closed toolkit to ensure 100% compatibility with its proprietary JDK. Neither the binary version provided on the Java-19.0.2 page nor the JVM built with the instructions below have been tested against the TCK. Any version that is built using the instructions given, cannot claim to be compatible with the proprietary JDK, without the user applying for, and completing the compatibility tests themselves.

With that in mind, the binaries produced using this build method are regularly tested against the TCK by the members listed on the site above. In addition to the community license above, an educational, non-commercial license for the TCK can be obtained here.

Package Information

Additional Downloads

Optional test harness

OpenJDK Dependencies

Required Dependencies

An existing binary (Java-19.0.2 or an earlier built version of this package. The instructions below assume that you are using Configuring the JAVA environment), alsa-lib-1.2.8, cpio-2.13, Cups-2.4.2, UnZip-6.0, Which-2.21, Xorg Libraries, and Zip-3.0

Recommended
Optional

git-2.39.2, Graphviz-7.1.0, Mercurial-6.3.2, pandoc, and pigz

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/openjdk

Installation of OpenJDK

If you have downloaded the optional test harness, unpack it now:

tar -xf ../jtreg-6.1+1.tar.gz

Note

Before proceeding, you should ensure that your environment PATH variable contains the location of the Java compiler used for bootstrapping OpenJDK. This is the only requirement for the environment. Modern Java installations do not need JAVA_HOME and CLASSPATH is not used here. Furthermore, OpenJDK developers recommend unsetting JAVA_HOME.

The build system does not allow the -j switch in MAKEFLAGS. See the command explanation for --with-jobs= for more information on customizing parallelization.

Configure and build the package with the following commands:

unset JAVA_HOME                             &&
bash configure --enable-unlimited-crypto    \
               --disable-warnings-as-errors \
               --with-stdc++lib=dynamic     \
               --with-giflib=system         \
               --with-jtreg=$PWD/jtreg      \
               --with-lcms=system           \
               --with-libjpeg=system        \
               --with-libpng=system         \
               --with-zlib=system           \
               --with-version-build="7"     \
               --with-version-pre=""        \
               --with-version-opt=""        \
               --with-cacerts-file=/etc/pki/tls/java/cacerts &&
make images

To test the results, you will need to execute the jtreg program. You can set the number of concurrent tests by adding the -conc:<X> value in the below command (tests will run sequentially otherwise):

export JT_JAVA=$(echo $PWD/build/*/jdk) &&
jtreg/bin/jtreg -jdk:$JT_JAVA -automatic -ignore:quiet -v1 \
    test/jdk:tier1 test/langtools:tier1 &&
unset JT_JAVA

For more control over the test suite, review the documentation available in jtreg/doc/jtreg/usage.txt. To review the results, see the files JTreport/test_{jdk,langtools}/text/stats.txt and JTreport/test_{jdk,langtools}/text/summary.txt. You should expect to see around 60 failures and 10 errors.

Install the package with the following commands as the root user:

install -vdm755 /opt/jdk-19.0.2+7             &&
cp -Rv build/*/images/jdk/* /opt/jdk-19.0.2+7 &&
chown -R root:root /opt/jdk-19.0.2+7          &&
for s in 16 24 32 48; do
  install -vDm644 src/java.desktop/unix/classes/sun/awt/X11/java-icon${s}.png \
                  /usr/share/icons/hicolor/${s}x${s}/apps/java.png
done

Note

If you only wish to install the Java Runtime Environment, you can substitute build/*/images/jre in the above cp command.

There are now two OpenJDK SDKs installed in /opt. You should decide on which one you would like to use as the default. Normally, you would opt for the just installed OpenJDK. If so, do the following as the root user:

ln -v -nsf jdk-19.0.2+7 /opt/jdk

If desired, you can create .desktop files to add entries in the menu for java and jconsole. The needed icons have already been installed. As the root user:

mkdir -pv /usr/share/applications &&

cat > /usr/share/applications/openjdk-java.desktop << "EOF" &&
[Desktop Entry]
Name=OpenJDK Java 19.0.2 Runtime
Comment=OpenJDK Java 19.0.2 Runtime
Exec=/opt/jdk/bin/java -jar
Terminal=false
Type=Application
Icon=java
MimeType=application/x-java-archive;application/java-archive;application/x-jar;
NoDisplay=true
EOF
cat > /usr/share/applications/openjdk-jconsole.desktop << "EOF"
[Desktop Entry]
Name=OpenJDK Java 19.0.2 Console
Comment=OpenJDK Java 19.0.2 Console
Keywords=java;console;monitoring
Exec=/opt/jdk/bin/jconsole
Terminal=false
Type=Application
Icon=java
Categories=Application;System;
EOF

Command Explanations

bash configure...: the top level configure is a wrapper around the autotools one. It is not executable and must be run through bash.

--enable-unlimited-crypto: Because of limitations on the usage of cryptography in some countries, there is the possibility to limit the size of encryption keys and the use of some algorithms in a policy file. This switch allows to ship a policy file with no restriction. It is the responsibility of the user to ensure proper adherence to the law.

--disable-warnings-as-errors: This switch disables use of -Werror in the build.

--with-stdc++lib=dynamic: This switch forces the build system to link to libstdc++.so (dynamic) instead of libstdc++.a (static).

--with-jobs=<X>: The -j passed to make does not work with make as invoked here. By default, the build system will use the number of CPUs - 1.

--with-jtreg=$PWD/jtreg: This switch tells configure where to find jtreg. Omit if you have not downloaded the optional test suite.

--with-{giflib,lcms,libjpeg,libpng,zlib}=system: These switches force the build system to use the system libraries instead of the bundled versions.

--with-version-build: Currently, the build system does not include the build number in the version string. It has to be specified here.

--with-version-pre: This switch allows you to prefix the version string with a custom string.

--with-version-opt: This switch allows you to add an optional build description to the version string.

--with-cacerts-file=/etc/pki/tls/java/cacerts: Specifies where to find a cacerts file, /etc/pki/tls/java/ on a BLFS system. Otherwise, an empty one is created. You can use the /usr/sbin/make-ca --force command to generate it, once you have installed the Java binaries.

--with-boot-jdk: This switch provides the location of the temporary JDK. It is normally not needed if java is found in the PATH.

Configuring OpenJDK

Configuration Information

Normally, the JAVA environment has been configured after installing the binary version, and can be used with the just built package as well. Review Configuring the JAVA environment in case you want to modify something.

To test if the man pages are correctly installed, issue source /etc/profile and man java to display the respective man page.

Setting up the JRE Certificate Authority Certificates (cacerts) file

If you have run the instructions on the make-ca-1.12 page, you only need to create a symlink in the default location for the cacerts file. As user root:

ln -sfv /etc/pki/tls/java/cacerts /opt/jdk/lib/security/cacerts

To check the installation, issue:

cd /opt/jdk
bin/keytool -list -cacerts

At the prompt Enter keystore password:, enter changeit (the default) or just press the Enter key. If the cacerts file was installed correctly, you will see a list of the certificates with related information for each one. If not, you need to reinstall them.

Contents

Installed Programs: jar, jarsigner, java, javac, javadoc, javap, jcmd, jconsole, jdb, jdeprscan, jdeps, jfr, jhsdb, jimage, jinfo, jlink, jmap, jmod, jpackage, jps, jrunscript, jshell, jstack, jstat, jstatd, jwebserver, keytool, rmiregistry, and serialver
Installed Libraries: /opt/jdk-19.0.2/lib/*
Installed Directory: /opt/jdk-19.0.2

Short Descriptions

jar

combines multiple files into a single jar archive

jarsigner

signs jar files and verifies the signatures and integrity of a signed jar file

java

launches a Java application by starting a Java runtime environment, loading a specified class and invoking its main method

javac

reads class and interface definitions, written in the Java programming language, and compiles them into bytecode class files

javadoc

parses the declarations and documentation comments in a set of Java source files and produces a corresponding set of HTML pages describing the classes, interfaces, constructors, methods, and fields

javap

disassembles a Java class file

jcmd

is a utility to send diagnostic command requests to a running Java Virtual Machine

jconsole

is a graphical console tool to monitor and manage both local and remote Java applications and virtual machines

jdb

is a simple command-line debugger for Java classes

jdeprscan

scans class or jar files for uses of deprecated API elements

jdeps

shows the package-level or class-level dependencies of Java class files

jfr

is a tool for working with Flight Recorder files

jhsdb

is a tool to analyze the content of a core dump from a crashed Java Virtual Machine (JVM)

jimage

is used to list, extract, verify, or get information about modules in jimage format

jinfo

prints Java configuration information for a given Java process, core file, or a remote debug server

jlink

is used to assemble and optimize a set of modules and their dependencies into a custom runtime image

jmap

prints shared object memory maps or heap memory details of a given process, core file, or a remote debug server

jmod

creates JMOD files and lists the content of existing JMOD files

jpackage

generates java application packages and images

jps

lists the instrumented JVMs on the target system

jrunscript

is a command line script shell

jshell

is an interactive tool for learning the Java programming language and prototyping Java code

jstack

prints Java stack traces of Java threads for a given Java process, core file, or a remote debug server

jstat

displays performance statistics for an instrumented JVM

jstatd

is an RMI server application that monitors for the creation and termination of instrumented JVMs

jwebserver

provides a minimal HTTP server, designed to be used for prototyping, testing, and debugging

keytool

is a key and certificate management utility

rmiregistry

creates and starts a remote object registry on the specified port on the current host

serialver

returns the serialVersionUID for one or more classes in a form suitable for copying into an evolving class

Configuring the JAVA environment

Setting up the environment

After the package installation is complete, the next step is to make sure that the system can properly find the files. If you set up your login scripts as recommended in The Bash Shell Startup Files, update the environment by creating the openjdk.sh script, as the root user:

cat > /etc/profile.d/openjdk.sh << "EOF"
# Begin /etc/profile.d/openjdk.sh

# Set JAVA_HOME directory
JAVA_HOME=/opt/jdk

# Adjust PATH
pathappend $JAVA_HOME/bin

# Add to MANPATH
pathappend $JAVA_HOME/man MANPATH

# Auto Java CLASSPATH: Copy jar files to, or create symlinks in, the
# /usr/share/java directory.

AUTO_CLASSPATH_DIR=/usr/share/java

pathprepend . CLASSPATH

for dir in `find ${AUTO_CLASSPATH_DIR} -type d 2>/dev/null`; do
    pathappend $dir CLASSPATH
done

for jar in `find ${AUTO_CLASSPATH_DIR} -name "*.jar" 2>/dev/null`; do
    pathappend $jar CLASSPATH
done

export JAVA_HOME
unset AUTO_CLASSPATH_DIR dir jar

# End /etc/profile.d/openjdk.sh
EOF

If Sudo-1.9.13p1 is installed, the super user should have access to the above variables. Execute the following commands as the root user:

cat > /etc/sudoers.d/java << "EOF"
Defaults env_keep += JAVA_HOME
Defaults env_keep += CLASSPATH
EOF

To use mandb to include the OpenJDK man pages in its database, issue, as the root user:

cat >> /etc/man_db.conf << "EOF" &&
# Begin Java addition
MANDATORY_MANPATH     /opt/jdk/man
MANPATH_MAP           /opt/jdk/bin     /opt/jdk/man
MANDB_MAP             /opt/jdk/man     /var/cache/man/jdk
# End Java addition
EOF

mkdir -p /var/cache/man &&
mandb -c /opt/jdk/man

Setting up the Certificate Authority Certificates for Java

OpenJDK uses its own format for the CA certificates. The Java security modules use $JAVA_HOME/lib/security/cacerts by default. In order to keep all the certificates in one place, we use /etc/ssl/java/cacerts. The instructions on the make-