Packagemanager-LFS-PackageUser-System git · main
Package-user based package manager for LFS/BLFS
Shell 63.7% Markdown 35.8%git clone https://git.christianimmanuel.de/linux-from-scratch/Packagemanager-LFS-PackageUser-System.gitwget https://git.christianimmanuel.de/linux-from-scratch/Packagemanager-LFS-PackageUser-System/archive/Packagemanager-LFS-PackageUser-System.tar.gzstacks/machine.conf raw
# machine.conf -- THIS machine's build options, merged into generated
# scripts' `meson setup` lines as -Dkey=value the moment the script is born.
# The stack file stays portable; this file changes per computer.
# HOW MANY JOBS, ONCE. make reads MAKEFLAGS, cmake reads
# CMAKE_BUILD_PARALLEL_LEVEL, cargo reads CARGO_BUILD_JOBS -- and ninja reads
# nothing at all, defaulting to nproc+2, which is why the number has to be
# patched into its command line. [all] covers every package here; a named
# section below overrides it (webkitgtk keeps 8 for RAM reasons).
#
# [all]
# jobs = 13
#
# `jobs` is patched into `ninja`, `./x.py` and `cargo build|install` lines
# when the script is generated -- rust's page says plainly that only the
# COMBINATION of --jobs on x.py and CARGO_BUILD_JOBS limits it. A package
# built before you set this needs --regenerate to pick it up.
#
# ...and for make/cmake/cargo, one line in /etc/pkgusr/build.env:
# MAKEFLAGS=-j13
# (lfs-helper derives the cmake and cargo variables from it, or from --jobs.)
# A HARDWARE-ONLY MESA HAS NOTHING TO FALL BACK TO.
#
# `gallium-drivers = radeonsi` alone means that when the hardware path
# cannot be set up for some EGL platform, there is no software renderer
# behind it and the app gets
# libEGL warning: egl: failed to create dri2 screen
# and then nothing. The book says it twice, in its own words: for
# gallium-drivers "You should probably add the softpipe or llvmpipe option
# as a backup driver", and for vulkan-drivers "You should probably add the
# swrast option as a backup driver unless you don't need Vulkan at all".
#
# llvmpipe (not softpipe) because llvm is enabled below: it is the faster of
# the two software rasterisers and it is built from the same LLVM this
# machine already has.
# READ ONE PACKAGE FROM A DIFFERENT BOOK.
#
# The systemd book's linux-pam page lists systemd as REQUIRED; the 12.4
# SysV book's page has no Required section at all -- it wants only Shadow.
# Same package, two books, two dependency graphs, and this machine is SysV.
# `book =` points one package at another book, for everything: versions,
# dependencies and the generated script.
#
# Import the book once, then uncomment:
# blfs import /path/to/BLFS-BOOK-12_4-nochunks.html
#
# [somepackage]
# book = /usr/share/blfs/books/BLFS-BOOK-12_4-nochunks.html
#
# AND linux-pam IS NOT THE CASE FOR IT, on the evidence. Both pages were
# compared command by command:
# 13.1: Linux-PAM-1.7.2; systemd is in the REQUIRED list and in NO command
# 12.4: Linux-PAM-1.7.1; its commands include `rm -rf /usr/lib/systemd`
# So the newer page needs nothing from systemd to build -- the requirement
# is metadata -- and since 1.14.234 `install` drops avoided packages from a
# plan anyway. Pointing linux-pam at 12.4 would cost a version (1.7.2 ->
# 1.7.1) and buy nothing. Use `book =` where the COMMANDS differ, not
# where only the dependency list does.
#
# NOT a merge of two pages: taking the dependency list from one book and the
# commands from another gives a script neither book has tested -- the
# versions differ (1.7.1 vs 1.7.2), the switches differ, the doc tarball
# differs. A whole page from the older book is something upstream shipped
# and someone ran.
# SHADOW: --disable-logind, because there is no libsystemd here.
#
# shadow 4.20 auto-detects logind and the book's page (written for a systemd
# host, where libsystemd is simply present) passes no switch either way, so
# configure stops:
# checking for sd_session_get_remote_host in -lsystemd... no
# configure: error: libsystemd not found. If logind integration is not
# required, disable it using the --disable-logind option.
# configure names the flag itself. This is the case `book =` exists for --
# a page whose COMMANDS do not suit this machine -- but the 12.4 page would
# also mean shadow 4.18.0, and one switch is cheaper than four versions
# back.
[shadow]
configure_args = --disable-logind
[mesa]
platforms = x11,wayland
gallium-drivers = radeonsi,llvmpipe
vulkan-drivers = amd,swrast
video-codecs = all
# glvnd: the GL dispatcher (libglvnd, wayland.stack, before mesa). Enabled so
# pkg-config `opengl` exists (libdecor's demo, some games and toolkits ask
# for it by that name) and a second GL vendor could be added. Changing it
# means rebuilding libglvnd and mesa together -- see the libglvnd entry.
glvnd = enabled
libunwind = disabled
llvm = enabled
valgrind = disabled
egl = enabled
opengl = true
# gbm: Mesa's default is auto, which on Linux means built -- and wlroots,
# sway and every Wayland compositor need it. Named so that a Mesa build
# which cannot provide it FAILS at configure, instead of finishing without
# it and leaving sway to fail at start.
gbm = enabled
# Per-package build options. Same mechanism as [mesa]: every key is merged
# into that package's generated `meson setup` line as -Dkey=value.
# iptables: the book configures --disable-nftables, which builds the legacy
# backend only. The nft backend needs this flag and libnftnl (a tar entry in
# network.stack, since BLFS has no page for it).
[iptables]
configure_args = --enable-nftables
# cairomm/pangomm/glibmm build TEST PROGRAMS by default, and those need
# Boost Test. Boost is in avoid.stack -- an hour of build for a desktop
# that wants none of it -- so meson stops at configure:
# ERROR: Building the test programs requires Boost Test ... and Fontconfig
# Install them or use -Dbuild-tests=false
# The library itself needs neither. (lfs-helper takes this option from the
# error by itself since 1.14.337; this is where it STAYS, because a
# regenerated script would lose it.)
[cairomm-1.0]
build-tests = false
[pangomm-2.48]
build-tests = false
[glibmm-2.68]
build-tests = false
# GST_DEBUG=<level> ONLY WORKS WITH THIS. The book builds the core with
# -D gst_debug=false, which compiles the whole debug-log system out; this
# replaces that switch (the script's -D gst_debug=false becomes =true).
# Cost: a slightly larger library and one integer compare per log site while
# logging is off -- upstream's own default, what distributions ship.
# `gstreamer:gst_debug` is the same switch for a build that bundles the core
# as a meson SUBPROJECT; BLFS builds the core as its own package, so only
# this one applies (the subproject key would be dropped as unknown).
#
# THE PLUGINS MUST BE REBUILT AFTERWARDS. gstconfig.h carries
# GST_DISABLE_GST_DEBUG from the core's build, and each plugin package
# compiled against it has its own log calls compiled out.
[gstreamer10]
gst_debug = true
# ---------------------------------------------------------------------------
# TURNING AUTODETECT INTO A REQUIREMENT.
#
# gst-plugins-bad decides at configure time whether to build each plugin,
# from what it can find. Built before libnice existed, it produced
# libgstwebrtc-1.0.so (the library, always built) and no webrtcbin element --
# and said nothing, because nothing went wrong. `-Dwebrtc=enabled` makes the
# same situation a build FAILURE, which is the outcome worth having.
#
# COMMENTED OUT because these are option names, and an option name is
# machine-checkable rather than memorable. Confirm them against the source
# you actually have, then uncomment:
#
# grep -n '^option(' /usr/src/pkgusr/p_gst10-plugins-bad/src/*/meson_options.txt
# meson configure /usr/src/pkgusr/p_gst10-plugins-bad/src/*/build | less
#
# A wrong name is not dangerous -- meson stops with
# ERROR: Unknown option: "..."
# before anything is built -- but it costs you a run.
#
# # x264enc EXISTS ONLY WITH THIS. The book: "Without this switch, plugins
# with dependencies on (A)GPL licensed libraries are not built" -- and
# x264enc is the H.264 encoder every camera site wants for publishing.
[gst10-plugins-ugly]
gpl = enabled
# alsa IS A -BASE OPTION, NOT A -BAD ONE. It reads perfectly well under
# [gst10-plugins-bad] and meson fails the whole build on it ("Unknown
# option: alsa"); the ALSA source/sink plugin lives in gst-plugins-base.
# (packagemanager checks this against the package's own meson.options now
# and drops a key the package does not have, with the near misses.)
[gst10-plugins-base]
alsa = enabled
# CHECKED against gst-plugins-bad's own meson.options: webrtc, dtls, srtp,
# sctp and openh264 are all real options of THIS package. Enabled rather
# than left on auto, so a missing dependency fails the build instead of
# silently dropping the plugin.
[gst10-plugins-bad]
webrtc = enabled
dtls = enabled
srtp = enabled
sctp = enabled
openh264 = enabled
#
# [gst10-plugins-good]
# v4l2 = enabled
# vpx = enabled
# libdisplay-info builds v4l-utils as a SUBPROJECT for its edid-decode
# comparison tests: it clones the repo and installs libdvbv5,
# libv4lconvert and a dozen locale files -- every one of them already owned
# by p_v4l-utils. The book passes --wrap-mode=nofallback, which only blocks
# fallbacks for dependency() lookups; an explicit subproject() still
# downloads. nodownload blocks that.
[libdisplay-info]
wrap_mode = nodownload
# WEBKITGTK: THE SWITCHES THE BOOK TURNS OFF.
#
# Each of these is off in the book's own cmake line, and each is invisible
# when missing -- no error, just a feature that does not work:
#
# USE_WOFF2=OFF a .woff2 icon font renders as a blank square
# ENABLE_WEB_RTC=OFF no camera or screen share in the browser
# ENABLE_MEDIA_STREAM the getUserMedia half of the same thing
# USE_GSTREAMER_WEBRTC which backend does the WebRTC
#
# woff2 must be INSTALLED first (media.stack builds it just before
# webkitgtk), or the switch turns on support for a library that is not there.
#
# jobs = 8 rather than [all]'s 13: webkitgtk's link step is the biggest
# memory consumer in the stack, and the OOM killer takes the compiler.
# USE_LIBRICE=ON, and media.stack builds librice just before webkitgtk.
#
# webkitgtk 2.52 can take its ICE from librice instead of libnice, and with
# the GStreamer WebRTC backend on it defaults to librice:
# Could NOT find Rice (missing: Io Proto)
# librice-{io,proto} is needed for USE_LIBRICE.
# The BLFS page never hits this -- it does not enable USE_GSTREAMER_WEBRTC,
# so librice is not in the book at all (checked: the 13.1 book does not
# mention it). libnice IS installed here and is what the rest of the
# WebRTC chain already uses, so this says "keep using it".
#
# To go the other way instead -- libnice, which the rest of the chain uses
# and which is already installed -- set this to OFF and nothing needs
# building.
# POPPLER WITHOUT THE SIGNATURE STACK.
#
# poppler's cmake calls these "soft mandatory": absent, they stop configure
# and name the switch themselves --
# Could not find the 3.98 version of NSS3. If you're not interested in
# the features it provides set the cmake ENABLE_NSS3 option to OFF
# nss, boost and gpgmepp are all in avoid.stack AS POPPLER'S CHILDREN (they
# were avoided because poppler was), so each would fail the same way in
# turn. They serve PDF signature verification and the splash backend;
# zathura's poppler-glib backend needs none of it.
#
# OBSERVED: ENABLE_NSS3 -- the failure above.
# ANTICIPATED: ENABLE_GPGME and ENABLE_BOOST, from the same avoid list and
# the same "soft mandatory" mechanism. If a later poppler stops on one of
# these with a different spelling, its message will name the real one.
[poppler]
# ENABLE_GLIB=ON: the whole reason poppler is here is zathura's
# poppler-glib backend --
# Run-time dependency poppler-glib found: NO
# -- and cmake autodetects that frontend. The thing a chain exists for
# should be asked for, not inferred (the gst-plugins-ugly gpl rule again).
ENABLE_GLIB = ON
ENABLE_NSS3 = OFF
ENABLE_GPGME = OFF
ENABLE_BOOST = OFF
ENABLE_QT6 = OFF
#
# FOUR OF THEM, FOUND ONE CONFIGURE AT A TIME. NSS3, then GPGME and BOOST
# (guessed from the avoid list), then QT6 -- each a full cmake run apart.
# The list is not a guessing game: poppler's own CMakeLists names every one
# of them, and on this machine that file is right there --
#
# grep -n find_soft_mandatory_package \
# /usr/src/pkgusr/p_poppler/src/poppler-*/CMakeLists.txt
#
# Read that once when poppler moves version, instead of discovering them
# one failed configure at a time. The book's page passes ENABLE_QT5=OFF
# and nothing else, because a BLFS system is expected to have qt6.
[webkitgtk]
# ENABLE_JOURNALD_LOG=OFF, or the build stops thousands of files in:
# wtf/Assertions.h:64: fatal error: systemd/sd-journal.h: No such file
# webkit autodetects journald and there is no systemd here. This was in the
# machine's own conf and NOT in the section shipped at 1.14.203 -- my
# omission, and it cost a nine-thousand-file build.
ENABLE_JOURNALD_LOG = OFF
# and the sandbox: bubblewrap is installed, but it also wants xdg-dbus-proxy
# and a working /proc setup; OFF is what this machine had and what it built
# with before. Turn it ON deliberately, not by inheriting a default.
ENABLE_BUBBLEWRAP_SANDBOX = OFF
USE_GTK4 = ON
USE_LIBRICE = ON
USE_WOFF2 = ON
ENABLE_WEB_RTC = ON
ENABLE_MEDIA_STREAM = ON
USE_GSTREAMER_WEBRTC = ON
jobs = 8
[wlroots]
werror = false