From ed2611fa6fec142b9c4a87dd7b21b8a3b28a877b Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Thu, 6 Mar 2025 12:55:07 +0800 Subject: [PATCH 1/4] glibc: Remove ja_JP.SJIS (#5669) --- chapter08/glibc.xml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/chapter08/glibc.xml b/chapter08/glibc.xml index c803d0c07..a04bc8ac3 100644 --- a/chapter08/glibc.xml +++ b/chapter08/glibc.xml @@ -393,7 +393,6 @@ localedef -i it_IT -f ISO-8859-1 it_IT localedef -i it_IT -f ISO-8859-15 it_IT@euro localedef -i it_IT -f UTF-8 it_IT.UTF-8 localedef -i ja_JP -f EUC-JP ja_JP -localedef -i ja_JP -f SHIFT_JIS ja_JP.SJIS 2> /dev/null || true localedef -i ja_JP -f UTF-8 ja_JP.UTF-8 localedef -i nl_NL@euro -f ISO-8859-15 nl_NL@euro localedef -i ru_RU -f KOI8-R ru_RU.KOI8-R @@ -415,15 +414,6 @@ localedef -i zh_TW -f UTF-8 zh_TW.UTF-8 make localedata/install-locales - Then use the localedef command to create and - install locales not listed in the - glibc-&glibc-version;/localedata/SUPPORTED file - when you need them. For instance, the following two locales are - needed for some tests later in this chapter: - -localedef -i C -f UTF-8 C.UTF-8 -localedef -i ja_JP -f SHIFT_JIS ja_JP.SJIS 2> /dev/null || true - Glibc now uses libidn2 when resolving internationalized domain names. This is a run time dependency. If this capability is needed, the instructions for installing libidn2 are in the From a2bf74a9b5ec941a61974490ae40e247f2db2e58 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 9 Mar 2025 13:08:32 +0800 Subject: [PATCH 2/4] More info about "deploying LFS" --- chapter08/libffi.xml | 7 +++++-- chapter08/pkgmgt.xml | 12 +++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/chapter08/libffi.xml b/chapter08/libffi.xml index 40af81288..f15d08b07 100644 --- a/chapter08/libffi.xml +++ b/chapter08/libffi.xml @@ -51,11 +51,14 @@ Like GMP, Libffi builds with optimizations specific to the processor in use. If building for another system, change the value of the --with-gcc-arch= parameter in the - following command to an architecture name fully implemented by the + following command to an architecture name fully implemented by + both the host CPU and the CPU on that system. If this is not done, all applications that link to libffi will trigger - Illegal Operation Errors. + Illegal Operation Errors. If you cannot figure out a value + safe for both the CPUs, replace the parameter with + to produce a generic library. Prepare Libffi for compilation: diff --git a/chapter08/pkgmgt.xml b/chapter08/pkgmgt.xml index 10ec5d199..7cda95755 100644 --- a/chapter08/pkgmgt.xml +++ b/chapter08/pkgmgt.xml @@ -370,11 +370,13 @@ make DESTDIR=/usr/pkg/libfoo/1.1 install differences in system hardware and the original kernel configuration. - There have been some reports of issues when copying between - similar but not identical architectures. For instance, the instruction set - for an Intel system is not identical with the AMD processor's instructions, and later - versions of some processors may provide instructions that are unavailable with - earlier versions. + If you want to deploy the LFS system onto a system + with a different CPU, when you build and + you must follow the notes about + overriding the architecture-specific optimization to produce libraries + suitable for both the host system and the system(s) where you'll deploy + the LFS system. Otherwise you'll get Illegal + Instruction errors running LFS. Finally, the new system has to be made bootable via . From e2789b4c66f9e762fb826e6abc24d68e6c2086bb Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Tue, 11 Mar 2025 15:45:14 +0100 Subject: [PATCH 3/4] stylesheets: fix generation of footnotes 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... --- stylesheets/lfs-xsl/chunk-master.xsl | 8 ++++++-- stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl | 10 ++++++++++ stylesheets/lfs-xsl/xhtml/lfs-sections.xsl | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/stylesheets/lfs-xsl/chunk-master.xsl b/stylesheets/lfs-xsl/chunk-master.xsl index 029332162..b353e75ca 100644 --- a/stylesheets/lfs-xsl/chunk-master.xsl +++ b/stylesheets/lfs-xsl/chunk-master.xsl @@ -27,8 +27,12 @@ Prevent creation of dummy sect1 files used to emulate sub-chapters. The original template is in {docbook-xsl}/xhtml/chunk-code.xsl It also matches other sect* tags. The code for those tags are - unchanged. --> - + unchanged. Note that the priority attribute is not strictly + required, because the original template is less restrictive in + matching, so has less precedence. But in case the docbook dev + add a match="sect1" template in their chunk-code.xsl, then it will + be necessary!--> + diff --git a/stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl b/stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl index 59859c12e..d33cd4f12 100644 --- a/stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl +++ b/stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl @@ -43,6 +43,16 @@ + + + + + + diff --git a/stylesheets/lfs-xsl/xhtml/lfs-sections.xsl b/stylesheets/lfs-xsl/xhtml/lfs-sections.xsl index b13e5e11b..0ecfaa4f6 100644 --- a/stylesheets/lfs-xsl/xhtml/lfs-sections.xsl +++ b/stylesheets/lfs-xsl/xhtml/lfs-sections.xsl @@ -166,7 +166,7 @@ - + From 42eaacedbc6ab598b0e4b1a86650f630e64195a7 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 12 Mar 2025 20:55:50 +0800 Subject: [PATCH 4/4] pkgmgmt: Add the definition of "library name" as a footnote --- chapter08/pkgmgt.xml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/chapter08/pkgmgt.xml b/chapter08/pkgmgt.xml index 7cda95755..3640b519d 100644 --- a/chapter08/pkgmgt.xml +++ b/chapter08/pkgmgt.xml @@ -69,10 +69,25 @@ If a package containing a shared library is updated, and - if the name of the library changes, then any packages dynamically + if the name of the libraryThe name of a shared library is + the string coded in the DT_SONAME entry of its + ELF dynamic section. You can get it with the + readelf -d <library file> + | grep SONAME command. In most cases it's suffixed with + .so.<a version + number>, but there are some cases where + it contains multiple numbers for versioning (like + libbz2.so.1.0), contains the version number + before the .so suffix (like + libbfd-&binutils-version;), or does not contain + any version number at all (for example + libmemusage.so). + Generally there is no correlation between the package version and the + version number(s) in the library name. + changes, then any packages dynamically linked to the library must be recompiled, to link against the - newer library. (Note that there is no correlation between the package - version and the name of the library.) For example, consider a package + newer library. + For example, consider a package foo-1.2.3 that installs a shared library with the name libfoo.so.1. Suppose you upgrade the package to a newer version foo-1.2.4 that installs a shared library with the name