The problem is that TIC_PATH is nor honored anymore in chapter
6, so that tic from the host is used to create the terminfo
database in chapter 6. The problem is that old versions of
tic create symlinks in the database, while newer versions
create hardlinks. Since we use a DESTDIR install in chapter 8
(with a recent version of ncurses, so with hardlinks), and copy
it in place with cp -a, then it seems that copying hardlinks to
symlinks. If an old version of tic has been used in chapter 6,
this copies hardlinks to symlinks, which creates symlinks
pointing to themselves (cp bug?).
Anyway, the solution is to copy the auxilliary tic built
in chapter 6 to $LFS/tools/bin (suggestion by Xi Ruoyao).
Now, there is no need to set TIC_PATH or whatever because this
tic is in the PATH.
Bug first reported by Marcin Dulak. Analysis with the help of
Bruce Dubbs and Thomas Trepl.
Fixes https://wiki.linuxfromscratch.org/lfs/ticket/5744
Without it, in the final system
/usr/lib/python3.13/config-3.13-$triple/libpython3.13.a is a remnant
from chapter 7 instead of being absent, defeating our will to save
space.
Make this consistent with addinguser.
Applying chown to a symlink actually affects its target, and here the
targets are in $LFS/usr and already covered.
Update to iana-etc-20250519.
Update to vim-9.1.1418.
Update to kbd-2.8.0.
Update to systemd-257.6.
Update to setuptools-80.9.0.
Update to meson-1.8.1.
Update to automake-1.18.
Update to gcc-15.1.0.
Update build instructions to accomodate gcc-15.
Update to less-678.
Update to readline-8.3-rc1.
Update to bash-5.3-rc1.
Update to systemd-257.6.
Update to setuptools-80.9.0.
Update to meson-1.8.1.
Update to automake-1.18.
Add Python-3.13.3-security_fixes-1.patch
Add coreutils-9.7-upstream_fix-1.patch
Add perl-5.40.2-upstream_fix-1.patch
Someone is really insistant on "you cannot have any extra whitespace" so
the hack will just not work. Let's drop it and simply move the
--enable-kernel= switches to the last line.
Update to vim-9.1.1353.
Update to setuptools-80.0.1.
Update to packaging-25.0.
Update to meson-1.8.0.
Update to linux-6.14.4.
Update to iana-etc-20250407.
Update to gperf-3.3.
Update to elfutils-0.193.
When we use -strip-unneeded it removes some symbols that are needed in static
libraries that may be needed in addition to debugging symbols. Changing the
stripping to the more conservative --strip-debug retains thise symbols.
In the case of libc.a the unstripped file size is 22.4 MB. Using
--strip-debug reduces the file size by 74 percent to 5.9 MB.
Using --strip-unneeded only reduces the file further by 89 KB,
so any gain is relatively trivial.
Update to libcap-2.76.
Update to perl-5.40.2 (Security update).
Add packaging-24.2 (Python module). Needed for wheel.
Update to xz-5.8.1.
Update to wheel-0.46.1 (Python Module).
Update to sysklogd-2.7.2.
Update to Python3-3.13.3.
Update to openssl-3.5.0.
Update to meson-1.7.2.
Update to linux-6.14.2.
Update to libffi-3.4.8.
Update to iproute2-6.14.0.
Update to gzip-1.14.
Update to grep-3.12.
Update to gperf-3.2.1.
Update to gawk-5.3.2.
Update to diffutils-3.12.
Update to coreutils-9.7.
This seems just a remnant from the pre-cross-chap5 era. Now with the cross-
toolchain the build system cannot find guile headers and libraries, thus
guile should be disabled by default.
I've also tried this on a host distro with guile installed.
The autoconf-based build system of kmod needs this, but we've switched
to meson where this is the default.
Also it's to be decided if we should put "lsmod" back to bin.
Update to vim-9.1.1263.
Update to iana-etc-20250328.
Update to xz-5.8.0.
Update to util-linux-2.41.
Update to tzdata-2025b.
Update to shadow-4.17.4.
Update to setuptools-78.1.0.
Update to patch-2.8.
Update to mpfr-4.2.2.
Update to kmod-34.2.
Update to gdbm-1.25.
Update to flit_core-3.12.0.
Update to expat-3.7.1.
I cannot see why this is ever needed. The default is "the compiler
default" which should be correct as the compiler has been configured
--with-sysroot. And the explanation for this switch is just repeating a
common misunderstanding. In fact glibc **never** attempts to figure out
what features the kernel has from the headers. Instead it depends on
the kernel-features.h files in the source tree and the --with-kernel
value to determine the kernel features that it can rely on.
- Document the autoconf behavior about "the cross-compilation mode," to
explain the necessity of --build=$(path/to/config.guess) added for
#5304.
- Mention the libtool fallout regrading cross-compilation.
- Remove the explanation for CC_FOR_TARGET, which is already removed
much earlier.
- Note the cross-toolchain cannot be used anymore after installing gcc
pass 2.
- "Stage 3" (i.e. the final LFS system) is NOT optional.
Update to vim-9.1.1202.
Update to iana-etc-20250304.
Update to sysklogd-2.7.1.
Update to setuptools-76.0.0.
Update to pkgconf-2.4.3.
Update to man-pages-6.13.
Update to linux-6.13.7.
Update to libcap-2.75.
Update to kmod-34.1.
Update to jinja2-3.1.6.
Update to expat-2.7.0.
Update to dbus-1.16.2.
There was two problems:
- the sect1 template did not process the footnote
- footnote processing needed to use a template matching
footnote/para[1], but we had a template matching para
at a higher precendence level.
So:
- call process.footnotes at the end of the sect1 template
- Add a templates matching footnote/para[1] at the same import
level as the template matching para (this just call the original
template)
We also add a priority 1 to the sect1 template in chunk-code.xsl,
although it is not strictly necessary. This is what upstream
recommends...
Update to zstd-1.5.7.
Update to systemd-257.3.
Update to shadow-4.17.3.
Update to setuptools-75.8.1.
Update to linux-6.13.4.
Update to kmod-34.
Update to inetutils-2.6.
Update to gettext-0.24.
Update to flit_core-3.11.0.
Remove $LFS/{bin,lib,sbin} from the chown commands
This applies to 'Section 4.3. Adding the LFS User'
Remove static library in sysklogd
Accomplished with adding --disable-static to the configure options.
They were measured when we used -j1 and/or had not running the test
suite with parallel jobs yet. Now the values are even larger than the
total SBU including the test time, so they are just ridiculous.
The dependency has been dropped since the 2.1.0 release. It seems
nothing uses check in LFS as at now, maybe we should consider moving it
to BLFS or even just removing it.
Link: https://github.com/legionus/kbd/commit/6ff5f4e64c50
Some user using a slow system complained (off-list) to me that the long
no-output period seemed like a hang (esp. combined with the warning
about missing re2c).
Also explain the "basic functionality test" is already done, so no need
to run "./ninja" again for testing.
This reverts commit dc8572f241.
The permission issue seems fixed upstream: after I untar the tarball
with --no-same-owner --no-same-permissions as root, all files are 644
and all directories are 755 (proven via find -type f -not -perm 644 and
find -type d -not -perm 755).
Update to vim-9.1.1071.
Update to iana-etc-20250123.
Update to binutils-2.44.0.
Update to coreutils-9.6.
Update to e2fsprogs-1.47.2.
Update to glibc-2.41.
Update to iproute2-6.13.0.
Update to libxcrypt-4.4.38.
Update to linux-6.13.1.
Update to man-pages-6.10.
Update to meson-1.7.0.
Update to perl-5.40.1.
Update to tcl8.6.16.
Update to tzdata2025a.
Update to xz-5.6.4.
Update to vim-9.1.1016.
Update to iana-etc-20250108.
Update to util-linux-2.40.4.
Update to sysvinit-3.13.
Update to sysklogd-2.7.0.
Update to shadow-4.17.2.
Update to setuptools-75.8.0.
Update to linux-6.12.9.
Update to gettext-0.23.1.
The host distro may have an insane default for root_owner and/or
root_perms in /etc/mke2fs.conf, so let's make it sane on our own. Note
that MKE2FS_CONFIG=/dev/null makes mke2fs refuse to run so we cannot
suppress the host mke2fs.conf.
I know some distros are using a different default and we are having
reports of some mysterious permission issue via lfs-support those I
highly suspect as some umask issue. Let's just explicitly set it (like
setting $LFS) to protect us from such distros without changing every
"mkdir -pv" to "install -vdm755".
The preceding commit uses <systemitem> elements to mark the lfs
user and group in commands. Unfortunately, this change the
rendering in html, because now lfs appears in an italic font.
Using <userinput remap='group'> or <userinput remap='user'> allows
parsing the XML for jhalfs, but does not change the html rendering.
I still think it's cleaner for jhalfs to just use a different user name
(for example "lfs1") if the user lfs already exists. This will allow
jhalfs to easily use a different user name.
Update to iana-etc-20241220.
Update to texinfo-7.2.
Update to sysvinit-3.12.
Update to shadow-4.17.0.
Update to procps-ng-4.0.5.
Update to meson-1.6.1.
Update to linux-6.12.7.
Update to kbd-2.7.1.
Update to jinja2-3.1.5.
This field was introduced with systemd-257. For development books, we'll
use "development" here, but when we do the next release we should change
this to say "stable".
This reverts commit 8f493a6377.
When I was building LFS, I somehow forgot to mount /dev/sdb7 to
/mnt/lfs on my system. I ended up chrooting into /mnt/lfs, and it was a
directory, not a filesystem.
This happens from time to time, not sure why I did it this time!
The tests that I had marked as failed no longer fail, but at the same
time, now test-namespace does. Let's undo this commit...
The upstream fix is explicitly checking libxml2 version so it's not
practical to be turned into a sed. But I don't want to upload another
patch just for such a "temporary" issue (as it'll be fixed for 0.23.1
anyway). This alternative fix relies on:
1. The fact that the return type of xmlCtxtGetLastError and the arg type
of xmlStructuredErrorFunc are changed in the same commit
61034116d0a3 ("error: Make more xmlError structs constant").
2. GCC supports typeof(expr) to get the type of expr w/o really
evaluating it.
So it should have the same effect as the upstream fix.
Tested with both --with-included-libxml2 and --without-included-libxml2
on BLFS.
The second expression
's/xmlError *err/const &/'
does nothing, because " *" actually matches zero, one, or several white
spaces, not a white space and an asterisk.
And the first expression
'/libxml\/xmlerror.h/i #include <libxml/xmlversion.h>'
includes a header, but we are not using anything in the header.
The intention of the sed command is fix a compatibility issue with
system libxml, but LFS does not have a system libxml so the fix is not
needed for LFS. And, if we just fix up the second expression to
's/xmlError \*err/const &/'
making it actually work, it'll cause a FTBFS with shipped libxml (used
in LFS because system does not have libxml), so we cannot easily fix it
either.
For now just remove the sed. If gettext-0.23.1 isn't released before
LFS 12.3 freeze, we can either apply the upstream patch to make it work
for both shipped libxml and system libxml, or add the corrected sed with
"nodump" and some alarming texts.
Update to vim-9.1.0927.
Update to iana-etc-20241206.
Update to systemd-257.
Update to Python-3.13.1.
Update to libcap-2.73.
Update to linux-6.12.5.
Update to kbd-2.7.
Update to gettext-0.23.
Besides Rainer's suggestion, also use a vague "not stored in the
repository" instead of the over-precise "generated": there are also
vendored external source copies (as Git submodules or manually embedded
during Release Engineering, for example the gnulib copies in many
GNU packages); and maybe other cases.
Suggested-by: Rainer Fiebig <jrf@mailbox.org>
Since the previous commit, we've ensured the kernel displaying via DRM
even in the early stage. Now enable DRM_PANIC so the kernel will
correctly show the last lines of the kernel messages in case a panic
happens.
Tested with an incorrect root= line in 3 configurations:
- A QEMU VM booted via BIOS
- A real machine booted via BIOS
- A real machine booted via UEFI
And in all configurations the panic message is correctly dumped.
In 1024x768 we can get 48 lines (twice of 24 lines in VGA console).
Currently on a LFS system booted via legacy BIOS (intead of UEFI), the
users can make two different configurations:
1. The DRM driver for the GPU is built as a module. Then before the
module is loaded (i.e. the root fs is properly mounted) the kernel
messages are displayed via the VGA console.
2. The DRM driver for the GPU is built into the kernel image. Then the
kernel messages are displayed via the DRM-emulated framebuffer
console since a very early stage (before the root fs is properly
mounted).
When the system is booted via UEFI, we use SimpleDRM on the EFI
framebuffer for displaying kernel messages, thus it's always the case 2.
Both are not good for diagnostic in case the root fs cannot be mounted
properly (it's very frequent on lfs-support):
- With 1 the VGA console can only fit 80x24 characters, so the relevent
information is often flushed away.
- With 2 the panic message is often displayed improperly when a DRM
driver is running.
The "DRM panic" feature introduced since Linux 6.11 (but it'll only
become usable for LFS since Linux 6.12) can fix the case 2, while case
1 just cannot be fixed. So start to make LFS booted via legacy BIOS
to use method 2 now, then we can enable DRM panic and fix this
long-standing issue.
Update to file-5.46.
Update to iproute2-6.12.0.
Update to libtool-2.5.4.
Update to linux-6.12.1.
Update to setuptools-75.6.0 (Python Module).
Update to wheel-0.45.1 (Python Module).
It's not needed now and I don't know why it was added in the first place
(at r10573-g2e8cbe04cdac). I'd say it likely just covered up some user
error (for e.g. simply forgetting "make" before "make install").
Removing it anyway and if it turns out something bad is happening we can
always revert.
Update to vim-9.1.0866.
Update to iana-etc-20241024.
Update to wheel-0.45.0 (Python Module).
Update to setuptools-75.5.0 (Python Module).
Update to linux-6.11.8.
Update to libcap-2.72.
Update to iana-etc-20241015.
Update to vim-9.1.0813.
Update to xz-5.6.3.
Update to sysvinit-3.11.
Update to setuptools-75.2.0.
Update to Python3-3.13.0.
Update to openssl-3.4.0.
Update to meson-1.6.0.
Update to markupsafe-3.0.2.
Update to linux-6.11.5.
Update to less-668.
Update to elfutils-0.192.
Update to Python3-3.12.7.
Update to tcl9.0.0.
Update to linux-6.11.1.
Update to libtool-2.5.3.
Update to iproute2-6.11.0.
Update to bash-5.2.37.
Update to bc-7.0.3.
The info has been severly outdated. And some info is even incorrect
from day one, for example even Glibc and GCC are not listed for LSB core
(they provide libc.so.6, libstdc++.so.6, etc.).
Update to vim-9.1.0738.
Update to texinfo-7,1,1.
Update to tcl8.6.15.
Update to sysklogd-2.6.2.
Update to setuptools-75.1.0.
Update to meson-1.5.2.
Update to iana-etc-20240912.
Update to gawk-5.3.1.
Update to bc-7.0.2.
Update to tzdata-2024b. Fixes
Update to systemd-256.5. Fixes
Update to setuptools-74.1.2. Fixes
Update to python3-3.12.6. Fixes
Update to openssl-3.3.2. Fixes
Update to man-db-2.13.0. Fixes
Update to linux-6.10.8. Fixes
Update to libpipeline-1.5.8. Fixes
Update to expat-2.6.3. Fixes
Update to bc-7.0.1. Fixes
+
I've had doubts on this "ulimit -s 32768" command for years. After
reading GCC code (libiberty/stack-limit.c) I'm pretty sure this command
is not doing what we expected.
In a typical Linux distro, the default "soft" stack limit is 8 MiB and
the default "hard" stack limit is infinite. And GCC will automatically
increase the soft limit to 64 MiB if the original soft limit is smaller
than 64 MiB, and the hard limit is at least 64 MiB. So with a typical
default configuration, the real stack limit of GCC is 64 MiB.
But our "ulimit -s 32768" command sets both the soft limit and the hard
limit to 32 MiB. Thus we are actually *decreasing* the real stack
limit. Fortunately this has not caused any test failures, but it's just
wrong (contradicting with the explanation of the command).
Thus just raise the hard limit to infinite in case the host distro uses
a not so typical configuration where the hard limit is tight, and let
GCC to set up the soft limit to the expected value on its own. It's
more future-proof than "ulimit -s 65536" in case GCC changes the
expected stack limit in the future.
It should be safe to make the change in freeze because in jhalfs it only
affects the test suite, and even in a manual build the user can skip
this command if not running the GCC test suite.
If CONFIG_FB is not set but CONFIG_DRM_FBDEV_EMULATION is set to y, on a
DRM-drived graphic card (anything from AMD/ATI, Intel, or NVIDIA in
recent 20 years) we'd be using a fb console but without
/sys/class/graphics/fb0. Then the script won't run setfont for VT 2-6.
Check /sys/class/graphics/fbcon instead of /sys/class/graphics/fb0 to
fix the issue.
Closes: https://lists.linuxfromscratch.org/sympa/arc/lfs-support/2024-08/msg00001.html
Reported-by: Alan Ianson <agianson@gmail.com>
It's added after 12.1 release and removed before 12.2 release, so when
we compare 12.1 and 12.2 it's neither added nor removed and it just
seems never existed.
Pass 2 libstdc++ still links to libgcc.a even with LDFLAGS_FOR_TARGET=,
despite this libgcc.a is from pass 2 instead of pass 1.
The difference between pass 2 libgcc and pass 1 libgcc is Glibc wasn't
installed when the pass 1 libgcc was built. This difference causes both
consequences (1) pass 1 libgcc lacks shared library and (2) pass 1
libgcc cannot support C++ EH, but it's not (1) causing (2).
Update to bash-5.2.32.
Update to iana-etc-20240801.
Update to vim-9.1.0660.
Update to binutils-2.43.
Update to linux-6.10.3.
Update to readline-8.2.13.
Update to wheel-0.44.0.
Update to iana-etc-20240723.
Update to glibc-2.40.
Update to iproute2-6.10.0.
Update to linux-6.10.2.
Update to lz4-1.10.0.
Update to meson-1.5.1.
Update to setuptools-71.1.0.
Update to sysklogd-2.6.1.
Update to systemd-256.4.
Update to sysvinit-3.10.
This option makes ld use DT_RUNPATH instead of DT_RPATH. DT_RPATH is
generally considered bad because it takes precedence over
LD_LIBRARY_PATH. For example, eog is linked with -rpath /usr/lib/eog,
and with DT_RPATH if an old eog is already installed we are basically
impossible to debug a new eog build w/o overwriting the system
installation first or explicitly using "ld.so --inhibit-rpath" to
invoke it.
This "new" actually means "new in 2000," it's 24 years ago and all other
distros has enabled it. Thus I guess some unexplainable "test suite
uses installed library instead of the just built one" issues in BLFS are
actually caused by this difference: the package author just assumes
everyone is using DT_RUNPATH thus they just set LD_LIBRARY_PATH and
consider it enough to test with the just built libraries, but DT_RPATH
breaks this expectation.
Let's eliminate the difference as it seems not doing anything good and
doing so just takes one switch.
Update to iana-etc-20240701.
Update to vim-9.1.0580.
Update to automake-1.17.
Update to gdbm-1.24.
Update to linux-6.9.9.
Update to less-661.
Update to meson-1.5.0.
Update to setuptools-70.3.0.
Update to util-linux-2.40.2.
It's needed to enable Rust-based features in the kernel.
Rustc is also needed but it's required by rust-bindgen so I'm skipping
it (like BLFS).
LLVM (Clang) is also a required dependency of rust-bindgen but it's
listed here for different purposes (LTO and CFI).
Update to iana-etc-20240612.
Update to bc-6.7.6.
Update to man-pages-6.9.1.
Update to linux-6.9.7.
Update to sysklogd-2.5.2.
Update to shadow-4.16.0.
Update to systemd-256.1.
Update to setuptools-70.1.1.
Also change the formatting of options '-Dsomething' to '-D something'.
Update to vim-9.1.0478.
Update to iana-etc-20240607.
Update to systemd-256.
Update to python3-3.12.4.
Update to perl-5.40.0.
Update to openssl-3.3.1 (Security fix).
Update to linux-6.9.4.
Update to findutils-4.10.0.
Update to meson-1.4.1.
Update to xz-5.6.2.
Add linux-6.9.x compatibility instructions to systemd and udev.
Update to setuptools-70.0.0 (python module).
Update to ninja-1.12.1.
Update to man-pages-6.8.
Update to linux-6.9.3.
Update to libcap-2.70.
Update to iproute2-6.9.0.
Update to e2fsprogs-1.47.1.
GCC 14 libsanitizer no longer depends on crypt.h. But let's keep this
option for reducing build time, just update the explanation.
Also remove libxcrypt from GCC depedency list.
This reverts commit 760d28c809.
As we've discussed in #5490:
LFS 9.0 (released 2019) downloads vim-8.1.1846 from GitHub directly, and
the URL still works today and results a tarball with the same md5 as LFS
9.0 documents. Thus GitHub download seems stable enough from vim.
Also note that "vim-9.1.0405.tar.gz" on anduin is actually a
vim-9.1.0330 release tarball.
The glibc-2.39-upstream_fix-1.patch file contains a broken
tst-iconv-iso-2022-cn-ext.c file. It causes:
FAIL: iconvdata/tst-iconv-iso-2022-cn-ext
Revise the patch to fix it.
(cherry picked from commit 9b39be4268)
Reapply this change which is mistakenly reverted in
340e17adc6.
Add security fix to glibc.
Update to linux-6.8.8.
Update to ncurses-6.5.
(cherry picked from commit d0ca5ead46)
Reapply this change which is mistakenly reverted in
340e17adc6.
Update to vim-9.1.0405.
Update to util-linux-2.40.1.
Update to linux-6.8.9.
Update to jinja2-3.1.4 (Python mpdule).
Update to iana-etc-20240502.
Update to gcc-14.1.0.
The glibc-2.39-upstream_fix-1.patch file contains a broken
tst-iconv-iso-2022-cn-ext.c file. It causes:
FAIL: iconvdata/tst-iconv-iso-2022-cn-ext
Revise the patch to fix it.
So if the user has not set $LFS properly, chown will do nothing instead
of wreak havoc in the host distro.
--from <user> has been available for Coreutils chown since 2000 so we
don't need to raise the host system requirement.
Update to setuptools-69.5.1.
Update to python3-3.12.3.
Update to openssl-3.3.0.
Update to ninja-1.12.0.
Update to man-db-2.12.1.
Update to linux-6.8.6.
Update to iana-etc-20240412.
Update to vim-9.1.0330.
It's just wrong (at least with all recent Coreutils releases).
Note that hard links are really destroyed, but AFAIK tar does not keep
hard links correctly anyway and destroying hard links won't cause
packages fail to build at all.
The test hang issue is not related to partial environment. It's just a
known issue (for eg https://github.com/python/cpython/issues/91155) and
happens when we are unlucky.
So just run the test suite with a timeout. 1 SBU should be enough: it's
approximately 4 times of the time used by the slowest test case, on both
an old Athlon 64 3000+ and a Core i5-11300H.
I've not seen any test failure on a complete system (the expat-related
failure seems fixed by expat-2.6.2 or 2.6.1). TODO: really test this
with LFS chroot and document failures if any.
Update to iana-etc-20240318.
Update to zstd-1.5.6.
Update to util-linux-2.40.
Update to shadow-4.15.1.
Update to pkgconf-2.2.0.
Update to linux-6.8.2.
Update to coreutils-9.5.
Vladimir has reported that the link target of this <ulink> is wrong.
Note that the link target and the displayed text should be the same,
thus use <ulink ... /> instead of <ulink ...> ... </ulink> to simplify
it.
Update to wheel-0.43.0.
Update to setuptools-69.2.0 (Python module).
Update to meson-1.4.0.
Update to expat-2.6.2 (Security fix).
Update to iana-etc-20240305.
Update to vim-9.1.0161.
Update to xz-5.6.1.
Update to shadow-4.15.0.
Update to psmisc-23.7.
Update to kmod-32.
Update to elfutils-0.191.
Update to iana-etc-20240222.
Update to vim-9.1.0145.
Update to xz-5.6.0.
Update to tcl-8.6.14.
Update to shadow-4.14.6.
Update to setuptools-69.1.1.
Update to linux-6.7.7.
Update to libffi-3.4.6.
Update to gettext-0.22.5.
Update to expat-2.6.1.
The incompatibilty between systemd and CONFIG_AUDIT has been fixed since
Linux kernel 3.14, thus there is no reason to disable it on LFS. And we
are referring to pam_loginuid.so from /etc/pam.d in BLFS, which is
completely useless if CONFIG_AUDIT is disabled.
Link: https://github.com/systemd/systemd/commit/db999e0f923c
So if a test times out, it will be noted in jhalfs log.
Also remove "-l" so the output will be something like
./nptl/tst-thread-affinity-pthread: Timed out ...
instead of just a puzzling "./nptl/tst-thread-affinity-pthread".
As we've already concluded, overwriting a shared object can crash
running processes using code or data from this shared object. For
example if gdm is crashed, we may leave the system unusable :(.
I spent some time investigating the difference of vim test results from
different editors. It turns out the value of TERM can affect the test
results in a deterministic way: when TERM=xterm-256color all tests pass,
when TERM=linux one test fails, and when TERM=vt100 20+ tests fail.
As we are redirecting the output to a file, the actual type of the
terminal does not matter and we can just specify a value known to work.
The book already mentions the vlock program needs PAM to be built, but
in dependencies page we say Kbd has no external optional dependencies.
This is obviously incorrect...
Glibc tests occansionally fail due to a timeout because:
1. The hardware is slower than the developers expected.
2. Some tests use multiple or even all CPU cores internally, for e.g.
with 8 active CPU cores we may end up running 8 tests (due to -j8)
each of them uses 8 cores in the worst case, resulting a severe
congestion.
I'm almost sure nptl/tst-thread-affinity* are cases of 2.
Let's document how to rule out the timed out tests instead of making the
list of known failures longer and longer.
Update to shadow-4.14.4.
Update to setuptools-69.1.0 (Python module).
Update to python-3.12.2.
Update to pkgconf-2.1.1.
Update to MarkupSafe-2.1.5 (Python module).
Update to man-pages-6.06.
Update to expat-2.6.0.
Update to linux-6.7.4.
Upstream documentation has been changed a few years ago to point to
https rather than http, but for example ubuntu-2023.10 still has only
http in its catalog file. So use http here, and change the catalog file
in blfs to have both http and https...
We want expect to return the return code of "make test" (stored in
$value), but $value is expanded too early to nothing by Bash. Quote EOF
so Bash won't expand $xxx.
We used to run "expect -c 'spawn ls'" for this in Binutils, but then we
thought expect test suite was enough as such a simple PTY test. However
expect test can fail due to some different reason, so add back a simple
test using Python pty module before building expect. Now we no longer
need to consider expect test critical (IIRC there was a report saying
one expect test failed for unknown reason but all other things OK).
IIRC we switched from separate devpts to bind mount, and matched the UID
of tester with the host UID owning the TTY, to satisify the Bash test
suite. But now we are always using UID 101 for tester and expect to
spawn a PTY for Bash test suite (so when building LFS in a TTY owned by
the root user of the host tester won't be UID 0). Thus we can switch
back to a separate devpts mount which is cleaner and safer.
And we are already using a separate devpts mount in Chapter 11.
$(realpath /dev/shm) will return the absolute path of the target of
/dev/shm, thus the command will work for both absolute symlink and
relative symlink.
A Glibc update may contain locale updates, so keep
/usr/lib/locale/locale-archive synced.
Other distros are also doing this when Glibc is updated with the package
manager.
It does no good: normally we have -v for chown so once it no longer has
an effect we can know, but in this case these chown commands will never
have no effect. And a huge amount of output with -v wastes the server
storage and bandwidth (for both the server and the people reading the
build logs).
Let's change our policy to match other "rolling release" distros and
ease the procedure to fix Glibc security vulnerabilities.
Squashed the commits in xry111/update-glibc branch to keep the history
clean.
Co-Authored-By: Pierre Labastie <pierre.labastie@neuf.fr>
Co-Authored-By: Douglas R. Reno <renodr@linuxfromscratch.org>
Per a discussion in the team, we only consider an upgradation dangerous
if it may render the system unusable. "Causing something not able to
build" is never considered dangerous. Thus upgrading some headers
cannot be dangerous.
The Glibc portion will need an update too (it can be upgraded safely
with some caution) to ease security updates. But let's do the easy
change first...
Update to openssl-3.2.1.
Update to zlib-1.3.1.
Update to xz-5.4.6.
Update to linux-6.7.2.
Update to iana-etc-20240125.
Update to binutils-2.42.
Update to acl-2.3.2.
Update upstream fixes for readline-8.2.
Apply upstream fix for bash-5.2.21.
The Glibc INSTALL file says:
‘--with-headers=DIRECTORY’
Look for kernel header files in DIRECTORY, not ‘/usr/include’. ...
So --with-headers=/usr/include seems just doing nothing.
Use <quote> instead of '"' if possible. Use <literal>,
<computeroutput>, etc. instead of <quote> if possible. Replace
<quote>alpha</quote> with a UTF-8 Greek alpha character.
BTW decorate ".link" with <filename class='extension'>.
Do not duplicate large paragraphs of texts.
Always use C locale if running in a Linux console. Create /etc/profile
for systemd too, but reading the locale setting from /etc/locale.conf.
- remove some useless --xinclude
- write only one option per line
- use --encode UTF-8 instead of --noent (which is useless after
profiling anyway
- try to be consistent in option order
- use --output instead of -o
If in a series of commands, and not the last, true has no effect
If in the last command, it is better to exit if there is a real
error in tidy, so use "|| test $$? -le 1", but only when tidy is
the last in a series of commands
Part of a patch by Boian Berberov
"gcc(1)" is really not a file name.
Use <ulink> and link to the online man page on
https://man.archlinux.org/ so the user can refer to the man pages more
easily.
The change is done via a sed command and long lines are wrapped
manually.
"Fatal error" is no longer outputted, but "Python requires OpenSSL
1.1.1 or newer" is bad as well because it's not really "required" (at
least in BLFS definition).
libcpp is the preprocessor library, but it's a static library which is
only used by GCC itself and not installed.
libcc1 is actually a library for GDB to "compile" expressions, so we can
use fancy expressions in commands, like "print sin(x + 2.0)": the
expression sin(x + 2.0) needs to be "compiled" for evaluation.
- Update to jinja2-3.1.3 (#5411)
- Update to bc-6.7.5 (#5408)
- Update to attr-2.5.2 (#5412)
- Update to ncurses-6.4-20230520 (#5416)
- Update to markupsafe-2.1.4 (#5418)
- Update to linux-6.7.1 (#5406)
- Update to iproute2-6.7.0 (#5410)
- Update to vim-9.1.0041 (#4500)
- Update to iana-etc-20240117 (#5006)
- Update to shadow-4.14.3 (#5413)
The effect will not change, but with symlinks ld can save some time
invoking open(), read(), etc. syscalls and parsing the linker scripts.
Note that I've also removed "libcursesw" symlink because this library
has never existed. Instead libcurses.so is created as a symlink
direct to libncursesw.so.
instead of the 8-bit ncurses.
We don't provide the 8-bit ncurses library and we are "faking" it using
ncursesw. Thus innocent package may be compiled with the 8-bit ABI
(because it does not know what we are doing and so it does not use
the "expected" preprocessor definitions to enable the wide ABI) but
linked against ncursesw, causing a potential ABI mismatch.
- replace some characters by their utf-8 encoded equivalent (and change
encoding in the <?xml?> line
- replace 
 with a true newline char. This is somewhat more readable
anyway.
We don't use it and it uses ( for opening parenthesis.
I am not sure whether this has some reason or not, but
we want to get reed of &#xx; chars in our change to utf-8,
so easier to remove than to find out why...
In chapter 6, patch configure outputs:
libattr development library was not found or not usable.
GNU patch will be built without xattr support.
While this is normal in chapter 6 (building a temporary patch), we
should mention this dependency in the dependencies page.
The template named generate-basic-index in
{docbook-xsl}/xhtml/autoidx.xsl has a bug that generates a div element
with a wrong xmlns:xlink attribute. See
https://github.com/docbook/xslt10-stylesheets/issues/239.
Rather than fixing docbook-xsl, which would work only in LFS (but we
want to be able to render on other distros), copy the faulty template
to our customization files (lfs-index.xsl), so that this one is used.
We can also simplify it a lot since we don't need all the cases
covered in general docbook-xsl.
For some reason, the stylesheets generate a
<div xmlns:xlink="http://www.w3.org/1999/xlink" ...> element in
longindex.html, but this is not valid in xhtml (the attribute
xmlns=xlink is not defined in the DTD). The problem is that tidy then
thinks it is not a true xhtml and removes the doctype declaration.
But when a browser receives a file without doctype declaration, it
thinks it uses an old standard, and switches to "quirks mode"
(for firefox, this can be seen by typing ctrl-I on the page).
- according to our typography, referring to a manual page should be
<filename>page(x)</filename>
- don't enclose punctuation into quotes
- use <option> for option
Since it is needed for both building and installing, exporting it
allows to have it defined even if building as a regular user (so that
sudo is run for installing) or using a package manager (which usually
runs in a new shell and forgets unexported variables)
- Update to meson-1.3.1 (#5402)
- Update to vim-9.0.2189 (#4500)
- Update to inetutils-2.5 (#5404)
- Update to xml-parser-2.47 (#5403)
- Update to linux-6.6.8 (#5397)
- Update to tzdata-2023d (#5399)
- Update to setuptools-69.0.3 (#5400)
- Update to iana-etc-20231205 (#5006)
- Update to autoconf-2.72 (#5398)
- Update to grub-2.12 (#5396)
In Linux 6.6 DRM_FBDEV_EMULATION no longer depends on FB, so we no
longer need to select FB (tested in a QEMU VM).
But if DRM is selected, we must select both DRM_FBDEV_EMULATION and
FRAMEBUFFER_CONSOLE or we'll see only blank screen. And now
FRAMEBUFFER_CONSOLE is not selected by default, be warned!!
I don't see a reason to upload vim tarball onto anduin. And now anduin
does not have vim-9.0.2136.tar.gz.
I tried downloading vim-8.0.0586 (shipped by LFS 8.2) from GitHub and it
worked fine. So it seems the GitHub storage is stable enough.
Update to vim-9.0.2136.
Update to iana-etc-20231117.
Update to bc-6.7.3.
Update to wheel-0.42.0 (Python Module).
Update to perl-5.38.2.
Update to pkgconf-2.1.0.
Update to readline patches 002 through 007.
Update to openssl-3.2.0.
Update to setuptools-69.0.2.
Update to linux-6.6.3.
Update to meson-1.3.0.
This is more consistent, and it reduces the number of different
translatable strings for translators. Most of the package names in
whatsnew has already been aligned with <title>s, now make these two
"from ..." packages so.
When /dev/shm is a symlink we need to create its target or some tests
will fail and Python 3 will be misconfigured. We wrote it as:
mkdir -pv $LFS/$(readlink $LFS/dev/shm)
But if $LFS/dev/shm is a relative symlink (say ../run/shm), we end up:
mkdir -pv /mnt/lfs/../run/shm
This command will create /mnt/run/shm, not $LFS/mnt/shm as we expected.
Twist it a little to make it work for both absolute symlinks and
relative symlinks.
The sed command has changed ../rules.d/70-power-switch.rules to
"../rules.d", causing the install command to fail.
Change the command enumerating ../rules.d/*.rules but
70-power-switch.rules to a "find" command. Edit another "find" command
so the styles of them are the same.
Mistakenly removed the remote WIP branch while it's not fully merged
yet. Cherry-pick the discarded commit.
(cherry picked from commit 2f3f0e9e813f60a88e9f557842a7b9a50cdec50b)
There are some suspicious "nptl/tst-robust" test failures in Glibc, but
all other test results are clean. To be diagnosed...
And note that jhalfs needs an update to work with the merged parallelism
changes.
- Update to elfutils-0.190 (#5373)
- Update to vim-9.0.2103
- Update to linux-6.6.1 (#5369)
- Update to xz-5.4.5 (#5371)
- Update to iana-etc-20231107
- Update to gawk-5.3.0 (#5372)
- Update to bash-5.2.21 (#5375)
- Update to iproute2-6.6.0 (#5374)
We'll use nproc for setting MAKEFLAGS and TESTSUITEFLAGS. And if nproc
is not available, we'll end up with "MAKEFLAGS=-j" which is very
dangerous because it allows make to spawn infinite number of jobs.
Check it early.
The nproc program is added in Coreutils 8.1 so we need to bump the
minimal version.
Set -Dlogind=false -Dvconsole=false to disable out-of-scope udev rules.
Use "ninja -n" to list the targets, so the disabled udev rules won't
show up then we can remove some "rm" commands. Do not remove
70-power-switch.rules from the source directory so we won't break
multilib.
There seems some guy overusing this method so we should add more
caveats.
- Use /opt/foo-x.y instead of /usr/pkg/foo-x.y. /opt/foo-x.y is used in
BLFS for Rustc, Qt5, etc. and /usr/pkg is not FHS-compliant.
- Use /etc/ld.so.conf and LDFLAGS instead of LD_LIBRARY_PATH. Relying
on LD_LIBRARY_PATH is generally a bad idea, and we also don't use it
in BLFS for /opt packages.
- Discourage this method for general use, mention it may not work for
vital packages like Glibc.
We'd fixed#5180 by forcing LN='ln -f'. But this has stopped to work
with gawk-5.2.2 (and 5.3.0) because now the building system explicitly
checks the existence of gawk-&gawk-version; and refuses to update it if
it exists.
Now removing the file before "make install" seems the easiest solution.
Link: https://git.savannah.gnu.org/cgit/gawk.git/commit/?id=11762f4c0685
Update to iana-etc-20231019.
Update to wheel-0.41.3.
Update to shadow-4.14.2.
Update to openssl-3.1.4.
Update to texinfo-7.1.
Update to meson-1.2.3.
Update to bc-6.7.2.
Update to linux-6.5.9.
Update to Python-3.12.0.
Add setuptools-68.2.2.
By default page numbering in <preface> is in roman numeral. This
is ok for the book preface, but not for the part III preface.
So copy the page.number.format template from docbook stylesheets
to stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl, and modify it.
Reported by: Vladimir Pertsev on lfs-dev list
The output of api.github.com is JSON, thus we should not remove every
<...> for it. For example, strip_tags had trimmed the JSON for
shadow-4.14.1, leading to "Attempt to read property "tag_name" on null".
Commit 27d23b1d has changed the convention that scripts with Sxxx
symlinks should be run with "stop" parameter in runlevels 0 and 6.
They should now be called with the more intuitive "start" parameter.
But a few scripts still call "/etc/init.d/halt stop". Fortunately, this
occurs in code paths that are rarely run (unrecoverable errors). So it
was not noticed until now. Anyway, this is fixed in this commit.
Disable building nscd in glibc.
Update to iana-etc-20230929.
Update to vim-9.0.1968.
Update to openssl-3.1.3.
Update to meson-1.2.2.
Update to man-db-2.12.0.
Update to linux-6.5.5.
Update to kmod-31.
Update to kbd-2.6.3.
Update to gettext-0.22.2.
Update to bc-6.7.0.
For creating a tarball without .git directory easier. The tarball will
include version.ent and LFS-RELEASE files so the book rendered from it
won't show "unknown" for all dates.
Well, I was blaming libtool too much. If the entire Binutils tree uses
libtool this won't happen. The problem is Binutils building system is
using libtool-style idiom on non-libtool components.
And this issue is not related to cross compiling, at all. A native
build can exploit the issue as well (see the updated comment).
Maybe I'll submit a patch to GCC (yes, not a typo, GCC is the upstream
of Binutils building system) to fix the issue when I have the mood...
It makes the package names more consistent, and it reduces the number of
different msgid's for translators.
By the way, move Udev to keep alphabetic order.
It allows binutils to link to zstd, so binutils will have
zstd-compressed debug section support (the compression is not enabled
by default but can be enabled via LDFLAGS etc. if wanted).
We also need to add libzstd.so.&zstd-version; into online_usrlib to
prevent a crash in stripping.
The configure script says:
configure: WARNING: filterdiff not installed; build will not be
reproducible.
The filterdiff program is a part of patchutils.
Update to vim-1837.$
Update to zlib-1.3.$
Update to wheel-0.41.2 (Python Module).$
Update to util-linux-2.39.2.$
Update to sysvinit-3.08.$
Update to shadow-4.14.0.$
Update to Python-3.11.5.$
Update to procps-ng-4.0.4.$
Update to pkgconf-2.0.2.$
Update to mpfr-4.2.1.$
Update to kbd-2.6.2.$
Update to gzip-1.13.$
Update to coreutils-9.4.$
Specify the 'nobody-group' for systemd.$
Remove unused usb group.$
Changelog.xml: Remove additional revision='sysv's for some of the udev
changes
Changelog.xml: Make the previous eudev update SysV only
Changelog.xml: Remove duplicate 'xz' entry and replace it with the glibc
memalign patch entry
Whatsnew.xml: Document changes to gawk, tzdata, and texinfo
Whatsnew.xml: Add the glibc patch to the new list
Update to xz-5.4.4.
Update to less-643.
Update to meson-1.2.1.
Update to linux-6.4.10.
Update to iana-etc-20230810.
Update to pkgconf-2.0.1.
All build times and sizes were also checked and updated as needed.
They look better than "echo >>" and "sed -i". And I think an example
showing how to use groupadd/groupdel is good anyway. The format of
/etc/group is already shown in chapter 7.
Specifying --modversion with multiple packages just does not make sense.
The real problem here is it's erroring out even if the multiple
arguments are for the same package.
In 12.0, pkgconf is a new package so it should be considered "Added"
since 11.3, and it's already in the Added section.
Also make the first letter captialized to be consistent with other
entries.
Update to xz-5.4.4.
Update to wheel-0.41.1 (Python Module).
Update to man-pages-6.05.01.
Update to linux-6.4.8.
Update to iana-etc-20230804.
Update to pkgconf 2.0.0.
This will install dbus.service and dbus.socket into
/usr/lib/systemd/user. In a base LFS installation the systemd per-user
daemon is not usable at all, so they may seem useless. But if we
install them, we can start to use them once systemd is rebuilt with PAM
in BLFS (without rebuilding dbus).
Well, the analyzer failures are introduced by literally *my* Glibc
change [1] and I'll sort them out for GCC 14...
And the ASAN failures seem caused by the introduction of
__isoc23_strtol (the libsanitizer does not know to intercept it). I'll
test with LLVM once I reach it in BLFS (LLVM is the upstream of
libsanitizer) and make a bug report.
limits-exprparen.c also fails to me, it needs "ulimit -s 65536" instead
of "ulimit -s 32768" in my build but maybe it's caused by my custom
*FLAGS.
[1]:https://sourceware.org/git/?p=glibc.git;a=commit;h=71d9e0fe766a
Import kernel-config infrastructure from BLFS and use it for kernel
configuration. Note that kernel-config.py is slightly different from
BLFS: we need role="nodump" for <screen> here.
A couple of the newer kernel options overflow past 80 columns on
the kernel page. It's not optimal, but insert newlines for these
options.
Also reorder the options to to same ordeer as they appear in
menuconfig and add some blank lines between major setions for
clarity.
Well, I forgot to create the man pages tarball as root, so if we don't
use --no-same-owner the man pages will be owned by UID 1000 :(.
Instead of regenerating the tarball again let's just fix this in the
book.
Update udev-lfs tarball to remove obsolete
cdrom rules and references to ISDN devices.
Update to wheel-0.41.0 (Python Module).
Update to tar-1.35.
Update to systemd-254.
Update to meson-1.2.0.
Update to linux-6.4.7.
Update to gcc-13.2.0.
Update to file-5.45.
I've seen two cases of invalid upstream "bug" reports this month because
the user has (mis)built LFS. Let's stop this before irritating the
upstream maintainers.
This partially reverts commit 1053282e5f.
There is actually only one test suite in LFS build even with -k, but on
my complete system there are many test failures with "-k". I guess some
tests depend on non-LFS packages.
The text change is reverted, but the command change is preserved as
generally we should use -k for any make check command known to fail.
This makes udevd send log entries to kmsg buffer and sysklogd will
pick them up.
Ideally we should use "syslog" here, but at the time udevd starts,
sysklogd has not started yet and /dev/log does not exist. So udevd
cannot open /dev/log and it will still use stderr as a fallback. We
cannot make udevd depending on sysklogd either, because it would cause a
circular dependency...
The Udev build dependencies are directly copied from systemd. Though
they might be unneeded for a Udev-only build, meson will check them
anyway. And I'm sure Jinja2 is really used.
In systemd dependencies Attr is dropped because Attr is not used
directly, it's just Acl needs Attr. OpenSSL is added because udevadm
links to libcrypto.
As "S" and "U" are closer, create a "systemd-udev" entity to simplify
the <phrase> choices.
In Util-linux, lsblk and findmnt links to libudev so it depends on
&systemd-udev;.
We are switching from eudev to systemd-udev for SysV. Systemd installs
udevadm into /usr/bin, and at least a part of its function can be used
as non-root user, so we'll no longer put it into /usr/sbin.
I've not bothered to write an explanation for --disable-crypt because it
will likely be the default of Glibc-2.38, then we may drop it from the
command lines.
It does not make too much sense to list GNAT but not GDC. They are for
same purpose (building optional languages with bootstrap from binary
requirement).
There are many packages using pkg-config (pkgconf actually) or systemd
(systemd revision only) in the configure stage but we've not documented
them yet.
- D-Bus uses pkgconf to detect systemd.
- E2fsprogs uses pkgconf to detect libblkid (in util-linux).
eudev (in sysv revision) and systemd (in systemd revision).
- IProute2 uses pkgconf to detect libcap and libelf.
- Man-DB uses pkgconf to detect libpipeline and systemd.
- Procps-ng uses pkgconf to detect ncurses and systemd (or elogind,
but it's an external dependency).
- Python uses pkgconf to detect libuuid (in util-linux from Ch 07),
zlib, bzip2, xz, and openssl (and some external dependencies).
- Systemd uses pkgconf to detect Zlib, Xz, etc.
- Util-linux uses ncurses and systemd (and some external dependencies)
Add all of them.
There are also several packages finding for pkg-config but only uses it
for external dependencies, for eg grep and vim. I've not added them here.
Update the rationale for min-kernel in hostreqs. Add a note in
general.ent about the EOL of current min-kernel. Realign the
backslashes in glibc instructions.
Use "library name" (instead of "library version") for SONAME (for now).
And "conflicting locations" may not be a problem if the symbol is at two
locations but they are exactly same (or ABI compatible).
For the details see lfs-dev discussion.
The current word is still not perfect (we've not defined "the name of a
shared library" at all), so I guess we'll need to make a major revision
for the entire "upgrading issue with shared libraries" thing in the
future.
Update to iana-etc-20230524.
Update to MarkupSafe-2.1.3 (Python Module)
Update to linux-6.3.5.
Update to openssl-3.1.1.
Update to meson-1.1.1.
Update to diffutils-3.10.
Update to bc-6.6.0.
remap="configure" means it is for configuring the build before
running make (or ninja), not for configuring the system
after the package is installed. We don't have a special attribute
for that.
TODO: HWAsan needs Linux 6.4 (not released yet) and a recent Intel CPU.
So it the kernel and hardware support is available, we may see more
test failures. I'll try it out on my new system...
This reverts commit 01a8a15a96.
We don't list the versioned SONAME symlink for any shared libraries.
TODO: should we remove libelf-0.189.so from the list as well? It sounds
like "libz.so.1.2.13" which is not listed too.
Update to vim-9.0.1452.
Update to iana-etc-20230405.
Update to zstd-1.5.5.
Update to Python-3.11.3.
Update to meson-1.1.0.
Update to man-pages-6.04.
Update to linux-6.2.11.
The default /dev/kvm mode is 0666 and we consider it "not so safe".
Like Tim said: "I'm also authenticating to my system all the time and
don't do a chmod -R 777 / after every boot."
With this option, the /dev/kvm mode is set to 0660 and it's tagged
"uaccess" so systemd-logind will add an ACL entry for users logged-in
locally.
The thread functions are in POSIX.1c, not POSIX.1b.
Both POSIX.1b and POSIX.1c are named "extensions" (plural form). And
POSIX.1b is titled "Real-time" instead of "Realtime".
Update to linux-6.2.8 (#5230)
Update to xz-5.4.2 (#5233)
Update to coreutils-9.2 (#5232)
Update to libcap-2.68 (#5236)
Update to bc-6.5.0 (#5228)
Update to openssl-3.1.0 (#5227)
Update to texinfo-7.0.3 (#5235)
Update to grep-3.10 (#5234)
Update to tzdata-2023c (#5237)
Update to wheel-0.40.0 (#5229)
Add flit-core-3.8.0
- Mention NVME.
- Mention PAE (CONFIG_HIGHMEM64G) for 32-bit.
- Don't repeat the link to BLFS kernel config index twice on SysV.
And don't display the long URL for it.
- Emphasis that BLFS UEFI kernel config is needed even if you'll use the
UEFI bootloader of the host distro.
This reverts commit de679165f9.
localmodconfig does not work very well. It can only *un*select things
already enabled as modules if the module is not loaded by the host. It
won't select anything new, nor unselect unneeded things already set to
"y" instead of "m".
Maybe you think we can copy .config from a "mainstream" distro
(producing a highly modular kernel) and use "make localmodconfig", but
when we tested it with a Debian host kernel config, the resulted kernel
refuses to boot.
"make allmodconfig && make localmodconfig" does not work well either:
"allmodconfig" selects many things as y (these thing are not available
as a module) but "localmodconfig" fails to unselect them.
1. Declare UNIX98 PTY requirement in host system requirements and check
it in the script. All desktop or server distros should have it now,
but let's stop anyone from building on a embedded distro w/o UNIX98
PTY early...
2. Use Expect test suite as a guard against mishandled $LFS/dev/pts.
3. No need to test the basic function of Expect in Binutils anymore
because if ($LFS)/dev/pts is not good, the Expect test suite would
have failed.
Let's not encourage users to try tricky things and shoot their own foot.
For systemd, if CONFIG_EXPERT is disable, CONFIG_FHANDLE will be enabled
automatically. So there is no need to enable CONFIG_EXPERT and then set
CONFIG_FHANDLE manually.
libelf.so links to libbz2.so.1.0, liblzma.so.5, and libz.so.1. libz is
really used, but to me liblzma and libbz2 are "unneeded dependencies":
the building system apparently thinks they are needed by zstd but
actually not. I don't want to "fix the upstream" so just list them here
anyway.
- Update to systemd-253
- Update to bc-6.3.1
- Update to linux-6.2.2
- Update to procps-ng-4.0.3
- Update to iproute2-6.2.0
- Update to meson-1.0.1
- Update to make-4.4.1
- Update to elfutils-0.189
- Remove an extra whitespace breaking shebang (though our instruction
does not use the shebang).
- Adjust the regex to allow several letters after the version number,
and match grep version to the text.
- Raise Coreutils to 7.0 (for the host requirement script itself). It
was released in 2008 so I don't think it's a problem.
- Add a colon after the text "Compiler check" to match "Aliases:".
- Use grep -o instead of sed to make kernel version check simpler.
The upstream has splitted [DHCP] into [DHCPv4] and [DHCPv6]. While we
are only enabling DHCPv4 in the example setting (in most scenario DHCPv6
is not strictly needed as SLAAC is sufficient), just use [DHCPv4]
instead of [DHCP].
This update changes the default number of cores used to build
packages to 4. A section is also added to host requirements
to recommend a minumum number of cores and memory size.
Update to iana-etc-20230202.
Update to zstd-1.5.4.
Update to Python3-3.11.2.
Update to e2fsprogs-1.47.0.
Update to dbus-1.14.6.
Update to linux-6.1.11.
Update to libcap-2.67.
Update to bc-6.2.4.
* Update to Glibc-2.37 (#5203)
* Update to bc-6.2.3 (#5204)
- Update bc homepage as upstream requested
* Update to linux-6.1.9 (#5205)
* Update to vim-9.0.1273 (#4500)
"The command below shows an example of nested command substitution
using two methods: backquotes and a $() construct. It could be
rewritten using the same method for both substitutions, but is
shown this way to demonstrate how they can be mixed. Generally
the $() method is preferred."
Update to iana-etc-20230109.
Update to binutils-2.40.
Update to bc-6.2.2.
Update to linux-6.1.6.
Update to man-db-2.11.2.
Update to mpfr-4.2.0.
Update to ncurses-6.4.
Update to xz-5.4.1.
Altered references to "a startup file" to "startup files".
Added detail to a reference to the bash info page. Tweaked
description of mafunctions caused by invalid locales. Clarified
descripton of extended ASCII characters. Every byte has the
high-order bit *set*; in extended ASCII, that bit is *on*.
Update to iana-etc-20221220.
Update to sysvinit-3.06.
Update to mpc-1.3.1.
Update to meson-1.0.0.
Update to man-pages-6.02.
Update to linux-6.1.1.
Update to file-5.44.
Update to bc-6.2.1.
Clarify discussion of "eth0" vs "enp5s0". Remove superfluous verbiage.
Improve punctuation. Patch grammatical errors (subject / verb).
Improve English idiom in a few places.
Regularized capital letters in <title> lines. Changed a dependent
clause and made it independent. Smoothed out some bumpy verbiage
in the "History" section. Removed superfluous verbiage. Clarified
some trounbleshooting advice.
"ext{234}" file systems. Clean up English idiom here and there.
Standardize the spelling of "file system"; unless it's part of a
command or something like that, it should be written as two words.
of installed programs. Added (link to setarch) to the five items that
link to setarch. Corrected erroneous description of swapoff. Clarified
some of the "short descriptions". Changed the imperative mood to the
indicative mood, and added an "s" to a couple of possessive nouns.
Ensure a gawk hard link is updated in Chapter 8.
Update to iana-etc-20221209.
Update to vim-9.0.1060.
Update to iproute2-6.1.0.
Update to xz-5.4.0.
Update to bash-5.2.15.
Update to psmisc-23.6.
Update to mpc-1.3.0.
Update to python3-3.11.1.
Update to procps-ng-4.0.2.
help screen doesn't match the man page. Also, there's an action
("tc chain") in the synopsis section that is not further explained
in the body of man tc. Documentation may be inaccurate.
end" -- it's twp words, not one. Changed square brackets to parentheses;
square brackets should only be used to delimit editorial remarks. Removed
one definite article referring to the plural; "the" implies a single
object. Changed "amount" to "number". In English, an amount refers to
a continuous quantity, while a number refers to discrete objects (like
networking packetts). Added a qualifier in the description of "ip":
the list of commands is not exhaustive. Modified a few program
descriptons to improve consistency of style. Changed QOS and COS
to QoS and CoS after researching these abbreviations on the internet.
"Quality of Service" and "Class of Service" appear, to me, to be the
most common way of writing these phrases.
idiomatic. Clarified meaning of configure options. Made several minor
revisions in program descriptions to improve readability. Added a
little explanatory material. Changed imperative mood to indicative
mood where that was appropriate.
text and images. Patched English idiom. Added a little information
about Pinyin (Chinese spelled like English) and grap (an old Unix
command for creating graphs).
We are already using "MAJOR" and "MINOR" in OpenSSL, do the same here.
The semantic versioning documentation (https://semver.org/) always use
"patch level", not "Patch level". But let's explain it a little to
prevent puzzling people.
On wikipedia, "dlopen" redirects to "dynamic loading" and there is a
specific warning:
"Dynamically loaded library" redirects here. Not to be confused with
dynamically linked library.
pip3 -- the pip program processes both commands (e.g., install) and
options (e.g., --no-index). Expressed option / command descriptions
in the iindicative mood. The imperative mood should only be used to
tell the reader what to do, not in explanatory verbiage. Inserted
the definite article here and there. Corrected a misspelled instance
of the indefinite article: we don't say "an utility" because the
initial phoneme in "utility" is pronounced as YOO.
Inserted the definite article where idiom requires it. Added more
detail to an option description. Broke an extremely long paragraph
into three pieces; cleaned up English idiom and punctuation all the
way through this section. In "Short Descriptions", inserted periods
where appropriate, and clarified the description of python3, which
is a program, not a language.
appears once. Improved idiom ("as shown below"). "command line" is
two words; "front end" is two words. "Swiss Army" is a trademark;
it should be caputalized.
perfect tense when appropriate. Replace "dlopening" with "opening
dynamically linked libraries" ... "dlopen" may be a Linux command,
but that doesn't make it a verb in English.
Update to iana-etc-20221122.
Update to xz-5.2.9.
Update to tzdata-2022g.
Update to texinfo-7.0.1.
Update to tcl-8.6.13.
Update to meson-0.64.1.
Update to linux-6.0.10.
Update to gawk-5.2.1.
Otherwise, As Xi has noticed, the password set for root at the end
of lfs may use the value 5000 for rounds, and not be changed, even
if later the number of rounds is increased.
names of packages. Clarified verbiage in re PIE & ASLR. Improved the
description of SSP, and tightened it up. Clarified the instructions
for running tests concurrently. Modified descriptions of tests that
fail. Patched up punctuation. Spelled "set up" correctly: "setup" is
a noun. The phrasal verb used here is spelled as two words. Use the
word "directives" to describe "#include" and similar preprocessor
instructions. Add periods to some otherwise complete sentences.
I was using the transitive verb "process" here, not the noun. Use
another word to avoid the ambiguity. Also add "and groups" because
there is also subgid alongside subuid.
sort-NaN-infloop no longer fails now, it seems covered up by PIE or SSP.
test-getlogin keeps failing in Bruce's build. Not sure how to reproduce
the failure deterministically.
We need to enable decimal float here or MPFR will be built w/o decimal
float support. Then 2 of 183 tests will be skipped, and this will also
cause an ICA issue.
Q: Why we need decimal float in pass 1?
A: We need pass-1 GCC with decimal float support to build decimal float
routines in pass-2 libgcc.
verbiage. Used the subjunctive mood once. "Test suite" is two words, not
one. Patched some unidiomatic English. Used the plural "headers" when
discussing ELF objects. Used singular verbs to describe "gprofng", for
consistency with other items.
modifies the plural noun "libraries"; it must use a plural verb.
Clarified how many "configure" options Readline uses. Tightened the
prose, and used the definite article in lieu of the indefinite article,
because only one readline.pc file can possibly be the "correct" one.
We don't recommend customizing optimizations, but we use optimizations
provided by package default or release build mode.
Reword the paragraph so the people won't be puzzled once they see
"--enable-optimizations" in Python, or "--buildtype=release" (to prevent
unoptimized build) in BLFS meson commands.
"Duplicated copy" is wrong IMO. If you copy A to B, B won't be changed
when you modify A. But if you bind mount A to B, B will reflect any
change made to A.
Again copy something from mount(2):
A bind mount makes a file or a directory subtree visible at another
point within the single directory hierarchy.
Things are a little tricky:
1. If the host is "modern" (any desktop distro after 2013), the kernel
supports devtmpfs and the host udev will do adjustments to the
devtmpfs. All instances of devtmpfs shares the same content so we'll
see the work of both the kernel and the host udev in chroot.
2. If the host is old but the kernel supports devtmpfs (i. e. the host
is not using devtmpfs for its /dev), when we mount devtmpfs on
$LFS/dev we'll see the work of the kernel in chroot, but not the work
of udev. **Building LFS does not need any work of udev.**
3. If the host is very old and the kernel does not support devtmpfs at
all, we can't mount devtmpfs.
Mounting a devtmpfs will work for 1 and 2, while bind mounting will work
for 1, 2, and 3. So we use bind mounting here.
I don't want to squash all these details into the book, so just remove
the false statement here.
Technically chroot command "tells" bash nothing. It basically calls
chroot("$LFS"), then chdir("/"), then
execve(["/usr/bin/env", "-i", ...]). The kernel also does not tell bash
something like "hey, the root is now $LFS" but just executes (almost) all
system calls from bash as-if $LFS is /.
The man page of chroot says:
DESCRIPTION
Run COMMAND with root directory set to NEWROOT.
Just use the same grammar construction here.
Please try not to use the "replace" feature of the text editor blindly.
Appendix C of the GNU C Library Reference Manual clearly says:
'--disable-werror'
By default, the GNU C Library is built with '-Werror'. If you wish
to build without this option (for example, if building with a newer
version of GCC than this version of the GNU C Library was tested
with, so new warnings cause the build with '-Werror' to fail), you
can configure with '--disable-werror'.
Fix make-4.4 bug.
Update to wheel-0.38.4 (Python Module).
Update to texinfo-7.0.
Update to sysvinit-3.05.
Update to shadow-4.13.
Update to sed-4.9.
Update to meson-0.64.0.
Update to linux-6.0.7.
Update to elfutils-0.188.
Update to bc-6.1.1.
We only need a one-line change in upstream fix (because we don't use
"make --shuffle"). Add it as a sed for both Chapter 5 and Chapter 8.
Note that the "minimal" sed would be '/MAEKFLAGS :=/s/r/ -r/'. I
included an additional ')' so it won't modify "-r" again to "- -r".
Tested "make" and "make check" on a x86_64 with -j8 and an arm64 with
-j24.
Link: https://sourceware.org/git/?p=glibc.git;a=commit;h=2d7ed98add14
Update to iana-etc-20221025.
Update to tzdata-2022f.
Update to Python3-3.11.0.
Update to procps-ng-4.0.1.
Update to man-pages-6.01.
Update to man-db-2.11.0.
Update to make-4.4.
Update to linux-6.0.6.
Update to libffi-3.4.4.
Update to inetutils-2.4.
Update to expat-2.5.0.
Note: I had to run glibc in Chapter 8 at -j1 to avoid an apparant race
condition. With a little more investigation I may be able to find a
better solution.
The problem is not "gcc building system doesn't know cc-lfs can run on
pc", but "cc-lfs really cannot run on pc".
Let's stop anyone from thinking about "why not just tell the gcc
building system the fact".
Do not use "whether there are any known security vulnerabilities"
because it's highly unlikely there was none.
Many people just build LFS for an experiment, then they don't need to
maintain their system. The maintaining is only necessary for a real
desktop or server system.
RFC 3986:
URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
hier-part = "//" authority path-abempty
/ path-absolute
/ path-rootless
/ path-empty
So "linuxfromscratch.org" is not a URI, nor "irc.libera.chat".
Well, somehow this paragraph has become too imprecise.
1. We don't support IA64. Both Intel and AMD uses x86_64 now, which is
referred as "AMD64" because it's first proposed by AMD. Intel
attempted to use IA64 (which is a VLIW architecture completely
different with x86_64) to compete with AMD64, but failed. Then Intel
adapted x86_64.
2. The architecture specific part belongs to Core and Desktop.
3. LFS cannot conform to both AMD64 and IA32 because we don't support
multilib. It's "or", not "and".
Update to iana-etc-20221007.
Update to vim-9.0.0739.
Add upstream patches to readline and bash.
Update to zlib-1.2.13.
Update to man-pages-6.00.
Update to gettext-0.21.1.
Update to iproute2-6.0.0.
Update to meson-0.63.3.
Update to Python-3.10.8.
Update to xz-5.2.7.
Update to tzdata-2022e.
Update to linux-6.0.1.
Update to dbus-1.14.4.
When I changed the sanity check to remove the "dummy.c" file, I
inadvertently used "gcc" instead of "$LFS_TGT-gcc". Which of course
finds the host gcc...
Update to Linux-5.19.13
If you are using a laptop with an Intel GPU, it's imperative that you
update immediately if you are running Linux-5.19.12. Failure to upgrade
may result in permanent damage to the LCD display on your laptop.
The root cause of this is improper backporting of bugfixes for the i915
DRM driver in the kernel.
I have:
2 FAIL
5092 PASS
67 UNSUPPORTED
16 XFAIL
4 XPASS
Let's not be too precise (or we'll need to explain the meaning of
"UNSUPPORTED"). IMO "over 5000" is fine (until we get 5500 tests).
Many users will create a user with the same username and UID so the
files will still be owned by his/her. So make it optional by "If you
won't assign the same UID for your user in the LFS system".
If you are using a "modern" distro (with devtmpfs and a modern udev
implementation), a bind mounting is actually not needed because you can
mount devtmpfs anyway. The only reason for bind mounting is to be
compatible with old host distros where /dev is a directory containing
many static device nodes, or is a tmpfs (not same as devtmpfs) popluated
by bootscript or an old udev (modern udev implementations, including
eudev and systemd-udev used by LFS, strictly requires a devtmpfs on
/dev).
So update the explanation to match the status quo.
Chroot command itself does not require kernel VFS mounted. You can mount
/proc, /sys, and /run after entering chroot with
"mount -v -t proc proc /proc" etc. For /dev, if the host kernel
supports devtmpfs, you can also mount /dev in chroot with
"mount -v -t devtmpfs devtmpfs /dev". Even if the host does not support
devtmpfs, it's still possible to mount /proc in chroot, then use
"mount --bind /proc/1/dev /dev".
It's just LFS editors decide to mount them before chroot. So reword
some untrue assertions.
I'm pretty sure "stage 2" libstdc++ (installed in ch6) is already fully
featured. The reason to rebuild the stage 3 libstdc++ (or entire
stage 3 gcc) is same as the reason to rebuild every packages in multiple
chapters: to "settle down" it.
Merge the content of
https://www.linuxfromscratch.org/lfs/faq.html#rebuild-ch8 into the book
as an explanation.
- Don't say "most building system", refine the dicussion for autoconf.
Other building systems may use a variant of triplet, or use a
completely different system designation.
- Explain why a triplet may contain 4 fields in detail. "Histroical
reason" is not really correct because 3-field triplet is still used
today for BSD, Fuchsia, IOS, Mac OS X (darwin), Solaris, etc.
- "machine" triplet to "system" triplet (strictly speaking, only the
first field in the triplet is for the machine).
Why we need to say "vendor can be omitted" explicitly: we mention "gcc
-dumpmachine". On some distros (like Ubuntu) the output has no vendor
field. If you think this is too nasty, please remove both.
Update to iana-etc-20220922.
Update to tzdata-2022d.
Update to readline-8.2.
Update to linux-5.19.11.
Update to libffi-3.4.3.
Update to libcap-2.66.
Update to dbus-1.14.2.
Update to bc-6.0.3.
Update to bash-5.2.
"need to be cross compiled" alone does not make too much sense: we
compile these packages in chapter 8 anyway. The real reason forcing a
cross compilation is circular dependency: if building A needs B but
building B needs A, we'll have to cross compile at least one of A and B
or we won't be able to build either in the chroot.
Many distros have some customized things in gcc -dumpmachine. RHEL uses
x86_64-redhat-linux-gnu, and Ubuntu uses x86_64-linux-gnu ("vendor"
field omitted). So don't use "same" here, and also mention the "vendor"
field is sometimes omitted.
And, don't recommended to "log in as lfs through a DM" anymore: if you
log in through a DM then start a terminal emulator, the first shell in
the emulator is often a non-login shell. It's not something we expect.
"log in" is a specifically defined action on UNIces. When you log in
as a user, an entry will be added into /run/utmp and /var/log/wtmp.
But when you switch to lfs with "su", this won't happen.
"man su" also describes "--login" as:
Provide an environment similar to what the user would expect had
the user logged in directly.
It's "similar to" logged in, not "really" logged in.
So, don't say "log in" or the users may assume they must really log in
as lfs in a VT or DM.
LFS and the host may use different /boot configuration, so do not assume
they'll share a /boot partition (two different /boot partition or only one
with separate /boot are possible).
For example, a swap partition does not contain any FS. And, if you want
to clone a partition, you can use
dd if=/dev/<old-partition> of=/dev/<new-partition>
then it's unnecessary to create a FS on new-partition before operation.
This is sometimes faster than creating a new FS, mounting both
partition, then "cp -av" if the old-partition contains many small files.
Some host create /dev/shm as a tmpfs. Some have is as
a symlink to a location in another directory. This
change handles both cases.
The change to the sysV bootscripts now creates /dev/shm
as a separate tmpfs from /run. This makes LFS sysV and
systemd versions treat /dev/shm the same.
Don't emphasis "static library" at all, to prevent anyone from thinking
"I need to use static libraries so I'll keep these .la files". And warn
that .la files are known to break BLFS packages.
- Use <emphasis role="bold"> for bold, instead of <command>.
- Remove "X window" as some graphical environments are Wayland-based.
- "Full BLFS" -> "BLFS", and "partial BLFS" -> "basic LFS" (I guess some
content is copied from Basic BLFS).
This reverts commit 395eb462ba.
Not needed as grep is "patched".
Note that I'm still against "patching" grep. All the complains for the
warnings are from only several people and IMO the complains are not
valid. But as bdubbs has made the decision let's keep it for now and
review after some time...
Update to file-5.43.
Update to linux-5.19.8.
Update to gawk-5.2.0.
Update to meson-0.63.2.
Update to ninja-1.11.1.
Update to bc-6.0.2.
Fix the location of udev rules in eudev.
Remove a warning for egrep and fgrep that
Delete an empty binutils man page.
Expand tabs to 8 spaces like everywhere else in the book.
Explain that shared libraries are already covered by ASLR, PIE expands
the ASLR to cover the exetutables.
In 2022, stack smashing attackings are mostly constructing a sequence of
faked returning addresses to exectute a series of function already
existing in the programs or libraries itself (ret2lib). Returning into
the code injected by the attacker is almost impossible because on
i686 (with a PAE/NX enabled kernel) or x86_64, running injected code
needs W/X mappings and those are very rare these days.
Committing only the commands for now, so that others can test the
build. TODO:
- add command explanations
- add changelog
- comment on failing tests in binutils and gcc
Bugtraq is dead since 2021, use oss-sec instead.
For CERT, cert.org redirects to CMU and us-cert.gov redirects to US
CISA (https://www.cisa.gov/uscert/). I'm not familiar with those so
left those for a US citizen to add :).
It seems glibc creates dummy.c for its own use. This leaves some
dummy.xxx files in the directory, that may lead some users to think that
the directory is not properly cleaned up after the test (I did :)
So use a pipe so that only a.out is created
Text change only.
Since 11.0, /lib is a symlink to usr/lib. With libc_cv_slibdir=/usr/lib,
/lib won't be searched by default anymore (if someone mess up the system
by removing /lib symlink and create an real directory there, for example
the initramfs before r10.1-439).
It's recommended for CVE-2022-21233 mitigation. And, if the BIOS has
enabled x2APIC but CONFIG_X86_X2APIC=n, the kernel will panic on boot.
If x2APIC is disabled or not available, the kernel with
CONFIG_X86_X2APIC=y can still boot normally.
No need to tag anything again because interrupt handling cannot affect
userspace.
Text change only.
Add tst-arc4random-thread failure recently reported to upstream, remove
namespace related failures as they are UNSUPPORTED now in 2.36.
They are really harmful. In Binutils pass 2, libstdc++.la caused the
building system to use host /usr/lib/libstdc++.so for gprofng. We now
has disabled gprofng for pass 2, but the similar issue also exists in
GCC pass 2. In a normal LFS build, the building system silently uses
/usr/lib/libstdc++.so (I guess it does not blow up simply because some
blind luck); in a real cross build (x86 -> ARM for example) the build
will fail.
Remove the .la files to fix this issue. Instead of only modifying
clfs-ng, it makes more sense to apply the change for trunk: though
the build does not fail, using host library is still a contamination.
It works out of box with glibc-2.35. I think this issue is already
fixed at glibc side, by the commit:
commit 0b5ca7c3e551e5502f3be3b06453324fe8604e82
Author: Paul Eggert <eggert@cs.ucla.edu>
Date: Tue Sep 21 07:47:45 2021 -0700
regex: copy back from Gnulib
Copy regex-related files back from Gnulib, to fix a problem with
static checking of regex calls noted by Martin Sebor. This merges the
following changes:
* New macro __attribute_nonnull__ in misc/sys/cdefs.h, for use later
when copying other files back from Gnulib.
... ... (unrelated things trimmed)
Presently we let the build system generate static C++ bindings, and
then we remove them. Note that we could also prevent generating
any C++ binding, since nothing in LFS/BLFS use them, but it seems to
me that generating the shared ones is closer to what is done for
other packages.
The c_rehash script, shipped by OpenSSL versions in current LFS trunk
and all previous LFS releases, is vulnerable to CVE-2022-2068. It's
fixed in 3.0.4, but OpenSSL 3.0.4 is completely broken on CPU models with
AVX-512 extension [1]. So we'd like to defer OpenSSL update and wait for
upstream consensus about "would 3.0.5 be released in urgency".
But, the upstream has announced that use of c_rehash is obsolete now [2].
So we can tell people not to use it.
[1]: https://github.com/openssl/openssl/issues/18625
[2]: https://www.openssl.org/news/secadv/20220621.txt
Using readline can improve line editing feature of bc, but it's not
enabled by default.
As readline is already installed before bc, let's pick up this
improvement with no cost.
I've observed some failures building LFS on my old i3-3217U (at 1.8 GHz
with -j4), but forgot to update the book. Just got reminded by a
lfs-support post.
It's irrational to force a sysv builder to download systemd, or vice
versa. But we cannot simply make wget-list specific for revision: IIRC
the wget-list file with all packages in either revision is used by some
scripts on rivendell. So we keep wget-list as is, and provide a new
wget-list-$(REV) file which only contains the packages for one revision.
BLFS no longer contains ConsoleKit, and ConsoleKit can be considered
dead now (the ConsoleKit2 fork has no action in the recent year).
In BLFS systemd (with PAM) or elogind provide a similar functionality.
I can see no reason to mention ConsoleKit in the book now.
Q: Why not just move the note after the creation of root-level
directories?
A: Root-level directories may be already created as well: if a
root-level directory is a mount point it should have been created in
section "Mounting the New Partition".
Reported-by: Vladimir Pertsev <info@linuxfromscratch.ru>
With the construct used in save_usrlib, if ld-linux-...dbg already
exists, it is stripped again and a file ld-linux-...dbg.dbg is
created. Prevent this by not listing files ending in "g".
The help of this options says:
"However, if you have a new compiler with ..., you may need to disable
this config option in order to successfully build the kernel."
As we are having state-of-art GCC-12, and Linux-5.18 release candidate
FTBFS with GCC-12 and CONFIG_WERROR=y [1], and <rant>the kernel developers
are making stupid and meaningless discussion instead of fixing the building
failure</rant> [2], I don't think enabling this option makes any sense
building LFS.
[1]:https://lkml.org/lkml/2022/4/14/1676
[2]:https://lkml.org/lkml/2022/4/21/254
The other stats have not changed significantly (usually only
+/- 0.1 SBU).
By the way, the changes for gcc-pass2 also include the change
from merging libstdc++-pass2 into gcc-pass2.
Change nobody/nogroup uid/git to 65534.
Update to meson-0.62.1.
Update to libpipeline-1.5.6.
Update to elfutils-0.187.
Update to Jinja2-3.1.2.
Update to vim-8.2.4814.
Update to sysvinit-3.03.
Update to linux-5.17.5.
Update to gcc-11.3.0.
Update to coreutils-9.1.
Update to bc-5.2.4.
In serveral places we use the pip3 command to install Python 3 programs
and modules for all users as root. This conflicts with the Python
developers' recommendation to build packages in a virtual environment as
a regular user. To this end, a multi-line warning is written when using
pip3 as the root user.
This change shows users how to avoid this warning.
Update to sysvinit-3.02.
Update to zlib-1.2.12.
Update to expat-2.4.8.
Update to Jinja2-3.1.1.
Update to Python-3.10.4.
Update to procps-ng-4.0.0.
Update to iproute2-5.17.0.
Update to meson-0.62.0.
Update to linux-5.17.1.
Update to util-linux-2.38.
Telling the user to override CFLAGS and CXXFLAGS may cause two problems:
1. We've added --with-gcc-arch=native, so the configure script will add
"-march=native" into CFLAGS. Then we've not really verified which
-march= value is the last one in the GCC command line and being really
used.
2. User may just export CFLAGS="-march=x86_64", without "-O2". This
will produce unoptimized binaries.
Otherwise, warnings are issued when changing runlevel. "ip route"
is a good test of whether network is already up. If users want to
change some config, they should use ifup/down, not the network
bootscript.
Now start and reboot should be called as "script start", and they
should be the last in their runlevel. Note that install_initd
needs to be patched for this to work; see
https://github.com/lfs-book/LSB-Tools/pull/12
Presently, there are a lot of special cases:
- runlevel 0 and 6 unconditionally run "script stop" if they
find a Kxxscript symlink. This may lead to trying to stop an
already stopped device if for example switching to runlevel 0/6
from runlevel 1. This can be fixed by stating the convention
that it is the responsability of scripts to check that the service
is running before killing it (or not running before starting it).
Still, we shouldn't try to stop a service if it was marked K in
the previous runlevel. And same for S files: we shouldn't try to
start a service that was marked S in the previous runlevel. Note
that changing runlevel is not a "reset": if a user has manually
changed the state of a daemon, this state will remain the same
upon changing runlevel if the S/K status of that dameon is
the same in both runlevels.
- Sxxscript symlinks in runlevel 0/6 are run as "script stop"
instead of the more intuitive "script start". This does not interact
well with LSB-tools (some scripts would need "Default-Start: S 0 6"
but then it is impossible to get correct "Required-Start" or
"Should-Start" fields). Furthermore, having a counter-intuitive
behavior is error prone. So now runlevel 0/6 will run "script
sart" for a Sxxscript.
Since the kernel can mount /dev if given the proper config
parameter, and we tell users to set this parameter when building
the kernel, this should be mentioned in the script
* Update to Python-3.10.3 (#5028)
* Update to libtool-2.4.7 (#5029)
* Update to linux-5.16.16 (#5030)
* Update to tzdata-2022a (#5031)
* Update to man-db-2.10.2 (#5032)
If run once (as it is now), the only possibility after hitting
control-D is to reboot. Note that init treats the S runlevel
differently:
when the last daemon to be run n runlevel S exits, init switches
to the default runlevel. This is not the case for other runlevels.
* update to expat-2.4.7 (#5019)
* update to bc-5.2.3 (#5020)
* update to linux-5.16.14 (#5021)
* update to perl-5.34.1 (#5022)
* update to vim-8.2.4567 (#4500)
Change pdf generation to use 9 point fonts for monospace
sections of the book. Otherwise texy overflows, especially
in Chapter 8, Stripping.
Fix a minor spacing issue in the stripping issue.
MAke a minor grammar fix in creatingfiles.xml.
This prevents a reference to /var/run in /usr/lib/tmpfiles.d/dbus.conf,
which would cause a warning from systemd-tmpfiles.
--with-system-pid-file=/run/dbus/pid is not needed with this, but
--with-console-auth-dir and --with-system-socket are still needed.
This is to match the "new" way of device handling with devtmpfs (already
widely used in recent ten years).
In a normal booting process, the kernel mounts devtmpfs at very early
stage. So the static nodes won't be used at all. The only situation
where the kernel can't mount devtmpfs is "/dev is missing", but it means
those two static nodes can't exist anyway, and a normal LFS system
(without initramfs) won't boot in such a bad situation.
Removing static /dev/console and /dev/null may cause trouble for those
people or scripts chroot into LFS tree without mounting devtmpfs. But
entering a chroot with only console and null in /dev is already
problematic. For a reference, If a systemd service is started with
PrivateDevices=true, systemd will create 18 nodes and symlinks to form a
"minimal" /dev.
It should have been removed in 10.1, and in 11.0 there should have been
"the version of LFS has switched to a merged-/usr layout". But we just
forgot to update this all the time :).
Now adjusting.xml only serves as a historical reference, and a "snip
library" for gcc.xml. Put all relevant content into gcc.xml directly
and remove adjusting.xml. If someone needs a historical reference, he
can always get adjusting.xml in Git history.
This is the issue preventing us from cross-compiling libstdc++ in
Chapter 6. By fixing this issue we can remove a seperate pass 2 for
libstdc++ and simplify the instruction.
The upstream fix will be released in 11.3 and 12.0, so we can remove the
first sed upgrading gcc next time.
on the systems without non-loopback IP address
We'd observed this long ago with "unknown reason". I just saw it again
and did some investigation, found it depends on getaddrinfo() with
AI_ADDRCONFIG, which requires a non-loopback address.
A requirement on Glibc is not needed at all. It's enough once
$LFS_TGT-* is runnable. A test on Alpine (using musl as libc) has
practically proved this.
We'd raised binutils and GCC requirements mostly for Glibc. But now
Glibc is cross compiled by our cross toolchain with latest GCC and
binutils release, the host tools really does not matter. In the Glibc
building process only two .c files are build with BUILD_CC (the C
compiler from the host), and they are highly conservative (mostly
unchanged for years).
Binutils does not have too much requirement on host GCC & Binutils:
there is even a Binutils commit in this week fixing a build failure with
GCC-4.2!
So the most strict limitation comes from GCC. GCC requires host GCC to
support ISO C++ 11 so GCC >= 4.8 is needed. And both GCC-4.8 and latest
GCC-11.2 claims a requirement for Binutils-2.12 (for x86_64) or 2.13.1
(for 32-bit x86), so we make minimal Binutils version 2.13.1.
And, host bzip2 is never used now: the only .tar.bz2 files are elfutils
and python docs. They are not decompressed before entering chroot.
Approved by bdubbs for 11.1.
To editors: no need to rebuild system and re-tag anything, AFAIK nothing
in BLFS uses libsubid now. You may delete /usr/lib/libsubid.a on your
system manually.
Add libc_malloc_check.so (it's like libmcheck.a, but should be used with
LD_PRELOAD).
Add description for libmvec.
"libnss" -> "libnss_*", and reword the description.
Add binutils-2.38 LTO patch.
Update to util-linux-2.37.4.
Update to man-db-2.10.1.
Update to linux-5.16.9.
Update to vim-8.2.4383.
Update to iana-etc-20220207.
A very old libtool copy (2009-11-29) is shipped in binutils tarball. It
does not support sysroot, so the cross-built binutils binaries may link
to libraries from the host distro, if certain libraries are available.
The ideal solution should be updating libtool, as libtool-2.4.6 (in LFS)
has sysroot support. However, updating libtool for binutils is not
trivial: it would require to rerun autoconf and binutils building system
sticks to autoconf-2.69. Another issue is the sysroot support for
libtool has introduced a configure option "--with-sysroot", which
conflicts with an already existing option with the same name in
GCC and binutils building system (we are using the GCC/binutils version
of --with-sysroot in chapter 5).
GCC building system has --with-build-sysroot (we are using this for GCC
pass 2) for this issue. Binutils copied GCC building system, but it
does not respect --with-build-sysroot.
So for now we just edit libtool code to prevent "-L/usr/lib" in
$LFS_TGT_gcc command line. It should fix the issue about host libiberty
(reported in #lfs-support) as well, but it still need to be confirmed by
someone having such a host.
Tested with a jhalfs run on LFS.
In the new cross-compilation approach, the $PATH in chroot does not
contain '/tools/bin'. So "+h" is useless in chroot as the newly
installed tools always replace the temporary counterpart at the same
location.
"+h" in chapter4/settingenviron.xml is kept deliberately. Currently
$LFS/tools/bin only contains programs prefixed with
"x86_64-lfs-linux-gnu-", and it's highly unlikely that any distro will
ever ship a program named with such prefix. So it may seems that we can
remove this "+h" as well. However, the situation may change in future
and we can take this oppertunity to teach the advantage and disvantage
of bash hash feature.
* tailf is removed completely
* fdformat is disabled by default, and we don't really have any reason
to enable it (and we'll need to workaround the missing man page issue
if we want to enable it)
* irqtop, lsirq, scriptreplay, and uclampset added
Add coreutils-9.0 chmod patch.
Update to glibc-2.35.
Update to linux-5.16.5.
Update to findutils-4.9.0.
Update to expat-2.4.4.
Update to iana-etc-20220128.
Update to vim-8.2.4236.
Update to zstd-1.5.2.
Update to util-linux-2.37.3 (security fix).
Update to Python-3.10.2.
Update to linux-5.16.2.
Update to libcap-2.63.
Update to iproute2-5.16.0.
Update to iana-etc-20220120.
Report on #lfs-support by "r1c0n3r0": the libhistory and libreadline
filenames have been wrong on the "stripping" page since realine
version bump. Fix taken (with slight modification) from William
Harrington's port to arm:
05a2cd35aa
This is needed so that /etc/default/useradd is not removed by package
managers when rebuilding shadow in BLFS. Change the explanations in
the text accordingly.
Update to e2fsprogs-1.46.5.
Update to zstd-1.5.1.
Update to expat-2.4.2.
Update to shadow-4.10.
Update to sysvinit-3.01.
Update to linux-5.15.12.
Update to iana-etc-20211224.
Update to openssl-3.0.1.
Update to eudev-3.2.11.
Update lfs-latest-git.php currency for new eudev location.
Update to systemd-250 (BLFS coming shortly)
Update to meson-0.60.3
Kernel Configuration: Enable the framebuffer since it's disabled by
default in Linux-5.15.
Kernel Configuration: Add a note about CONFIG_DEFAULT_HOSTNAME on
systemd.
"info gccinstall" says:
'--with-glibc-version=MAJOR.MINOR'
Tell GCC that when the GNU C Library (glibc) is used on the target
it will be version MAJOR.MINOR or later. Normally this can be
detected from the C library's header files, but this option may be
needed when bootstrapping a cross toolchain without the header
files available for building the initial bootstrap compiler.
So it can, and should be set to the version of glibc which will be built
for the chroot environment.
On x86_64, currently it does not make any difference with values >=
2.13. But it may make a difference if a new feature is added to glibc,
or on other platforms.
Update to iana-etc-20211112.
Update to elfutils-0.186.
Update to jinja2-3.0.3.
Update to bc-5.2.0.
Update to ncurses-6.3.
Update to libpipeline-1.5.4.
Update to meson-0.60.1.
Update to iproute2-5.15.0.
Update to linux-5.15.2.
One change was needed to systemd-249 due to changes in the linux
keernel version 5.14 and later.
A change to ncurses was needed to ensure the .pc files are placed in
the right location (/usr/lib/pkgconfig).
There are some discussion on gcc-help from someone (mis)using LFS to
build a "general" toolchain. Let's stop it before off-topic message got
into lfs-support.
It was moved to chapter 4 during merged-/usr update. However the ln
commands in chapater 4 are "trivial", so move it back to chapter 5 glibc
where we start to use a "different syntactic version" of it.
Update to gawk-5.1.1.
Update to meson-0.60.0.
Update to libcap-2.60.
Update to gdbm-1.22.
Update to file-5.41.
Update to linux-5.14.15.
Update to iana-etc-20211025.
Update to tzdata-2021e.
Change /bin to /usr/bin in passwd, and revisedchroot.
Fix systemd for new meson.
Update to vim-8.2.3508.
Update to tzdata-2021c.
Update to Python-3.10.0.
Update to Jinja2-3.0.2.
Update to linux-5.14.12.
Update to iana-etc-20211004.
Update to bc-5.1.1.
Update to automake-1.16.5.
Update to vim-8.2.3458.
Update to iana-etc-20210924.
Update to tzdata-2021b.
Update to sysvinit-3.0.0.
Update to meson-0.59.2.
Update to linux-5.14.8.
Update to libcap-2.59.
Update to coreutils-9.0.
Update to bison-3.8.2.
Ensure tcl documentation install instructions are present.
Update to Python3-3.9.7.
Update to linux-5.14.3.
Update to libcap-2.57.
Update to iproute2-5.14.0.
Update to inetutils-2.2.
Update to gzip-1.11.
Update to gdbm-1.21.
Update to bison-3.8.1.
Update to bc-5.0.2.
Those packages only in sysv book should appear after a "<![ %sysv; ["
conditional. But since the entity must always be defined when
profiling (the revision attribute removes text in the output, not
when parsing), there are the same entities with text "not-used"
after "<![ %systemd; [" conditional. Of course, the preceding is
reversed for packages only in the systemd book.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.