From 9eb3dbe1c4a7cab8f9c22edbba911ce4375550a0 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Wed, 30 Aug 2023 20:04:38 +0200 Subject: [PATCH 01/12] Don't build Xorg components that are commented out gen-special.sh uses the list of files and md5 from the cat instructions to generate an xml page for each of the individual components. Until now, there were no commented out component, so gen-special.sh was not prepared to handle comments. Now, it removes lines containing comments. --- BLFS/gen-special.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BLFS/gen-special.sh b/BLFS/gen-special.sh index adaac4c..4dcd904 100755 --- a/BLFS/gen-special.sh +++ b/BLFS/gen-special.sh @@ -116,7 +116,7 @@ EOF # So we have to read that command too, since it may be assumed # that the preceding package is a dependency of the following, # except the first. - list_cat="$(sed -n '/>cat/,/EOF Date: Wed, 30 Aug 2023 20:20:59 +0200 Subject: [PATCH 02/12] Hide DEL_LA_FILES in internal settings This prevent normal users to change the default while preserving the possibility to set it to "n" for tests or whatever. Fixes ticket #1734 --- Config.in | 15 ++++++++------- common/libs/func_validate_configs.sh | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Config.in b/Config.in index 4bf1091..c44bebb 100644 --- a/Config.in +++ b/Config.in @@ -556,13 +556,6 @@ depends on !BOOK_BLFS bool "Strip Installed Binaries/Libraries" default n - config DEL_LA_FILES - bool "Remove libtool .la files" - default y - help - #-- Remove files libxxx.la installed by libtool. For a rationale - # see https://blog.flameeyes.eu/tags/lafiles/ - config NO_PROGRESS_BAR bool "DO NOT use/display progress_bar" default n @@ -913,6 +906,14 @@ depends on !BOOK_BLFS string "Package contents list" default "unpacked" + config DEL_LA_FILES + bool "Remove libtool .la files" + default y + help + #-- Remove files libxxx.la installed by libtool. Only set to + # "n" if you know what you are doing. For a rationale + # see https://blog.flameeyes.eu/tags/lafiles/ + #--- End Internal Settings endmenu diff --git a/common/libs/func_validate_configs.sh b/common/libs/func_validate_configs.sh index b14cf81..ec21656 100644 --- a/common/libs/func_validate_configs.sh +++ b/common/libs/func_validate_configs.sh @@ -29,7 +29,7 @@ inline_doc local -r LFS_book="$BOOK_common INITSYS BLFS_TOOL" # Build Settings by book - local -r LFS_build="$BUILD_chroot NCURSES5 DEL_LA_FILES $BUILD_common PKGMNGT FULL_LOCALE WRAP_INSTALL" + local -r LFS_build="$BUILD_chroot NCURSES5 $BUILD_common PKGMNGT FULL_LOCALE WRAP_INSTALL" # System Settings by book local -r LFS_system="HOSTNAME INTERFACE IP_ADDR GATEWAY PREFIX BROADCAST DOMAIN DNS1 DNS2 FONT KEYMAP LOCAL LOG_LEVEL" From 45f82b13263570f04ac4ef91b5002035e9b58503 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sun, 3 Sep 2023 23:35:33 +0200 Subject: [PATCH 03/12] Use /usr for XORG_PREFIX unconditionally: This is possible now that instruction for non /usr XORG_PREFIX have been made role="nodump". --- BLFS/xsl/process-replaceable.xsl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/BLFS/xsl/process-replaceable.xsl b/BLFS/xsl/process-replaceable.xsl index e3e2331..6a9bdd1 100644 --- a/BLFS/xsl/process-replaceable.xsl +++ b/BLFS/xsl/process-replaceable.xsl @@ -123,6 +123,11 @@ $USER + + + /usr + **EDITME From 06b731490f368817ed489800d3409419b2156452 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Tue, 5 Sep 2023 13:14:26 +0200 Subject: [PATCH 04/12] Allow two names for scriptlet containing "userdel" It used to be named "revised_chroot", it is now named "cleanup" Allow both names by testing whether revised something is present. --- common/libs/func_compare.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/libs/func_compare.sh b/common/libs/func_compare.sh index fb368b8..2b6f9d1 100644 --- a/common/libs/func_compare.sh +++ b/common/libs/func_compare.sh @@ -22,9 +22,11 @@ wrt_compare_targets() { # local dir printf -v dir chapter%02d "$1" - sed -i '/userdel/d' $dir/*revised* + REVISED=cleanup + if ls $dir/*revised* 2>/dev/null; then REVISED=revised; fi + sed -i '/userdel/d' $dir/*$REVISED* for (( N = 2; N < ITERATIONS; N++ )); do - sed -i '/userdel/d' $dir-build_$N/*revised* + sed -i '/userdel/d' $dir-build_$N/*$REVISED* done } From 3b27f9376431be4add70a47315769c4bf8c2a848 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Fri, 8 Sep 2023 16:50:05 +0200 Subject: [PATCH 05/12] Apply a timeout to kernel config in LFS If the kernel-config file is not up to date (missing options or whatever), the kernel "make" will hang, waiting for input. So run "make oldconfig" explicitly, with a timeout. Fixes: #1736 --- LFS/lfs.xsl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/LFS/lfs.xsl b/LFS/lfs.xsl index c6075d6..782e9ee 100644 --- a/LFS/lfs.xsl +++ b/LFS/lfs.xsl @@ -415,6 +415,8 @@ echo -e "\n\nTotalseconds: $SECONDS\n" make mrproper cp -v ../kernel-config .config + timeout 60 make oldconfig ||\ + { echo kernel config is not up to date; exit 124; } From aceacf2f8596069e6e66e18fb6fa828efa2feecb Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Tue, 12 Sep 2023 22:54:51 +0200 Subject: [PATCH 06/12] Modify kernfs scripts to be able to run them twice Those scripts could only be run once, because mount errors out if it tries to mount an already mounted fs (or unmount a non mounted fs). This changes generation of the scripts so that any mount is preceded with "mountpoint -q || ", and any umount is preceded with "mountpoint -q && ". --- common/kernfs.xsl | 62 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/common/kernfs.xsl b/common/kernfs.xsl index f47f665..d7043a0 100644 --- a/common/kernfs.xsl +++ b/common/kernfs.xsl @@ -16,9 +16,69 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + mountpoint -q + + || + + + + + + + + + mountpoint -q + + && + + + + + + + + + + + + + + + + + + + + + From 200cc0151e7be09cd85ad2ae9b06f2f1e619a763 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Tue, 12 Sep 2023 22:58:55 +0200 Subject: [PATCH 07/12] All the targets after mk_SUDO depend on "devices" Now that devices.sh can be run even if the fs are already mounted all the targets after mounting the virtual kernel fs can depend on "devices". This way, if for some reason a partial build is restarted after a reboot, the virtual kernel fs are automatically re-mounted. Fixes #1737 --- LFS/master.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/LFS/master.sh b/LFS/master.sh index ba06e7e..7e4e919 100644 --- a/LFS/master.sh +++ b/LFS/master.sh @@ -368,24 +368,24 @@ mk_SUDO: mk_LUSER @sudo make BREAKPOINT=\$(BREAKPOINT) SUDO @touch \$@ -mk_CHROOT: mk_SUDO +mk_CHROOT: mk_SUDO devices @\$(call echo_CHROOT_request) @( sudo \$(CHROOT1) -c "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) CHROOT") @touch \$@ -mk_BOOT: mk_CHROOT +mk_BOOT: mk_CHROOT devices @\$(call echo_CHROOT_request) @( sudo \$(CHROOT1) -c "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) BOOT") @touch \$@ -mk_BLFS_TOOL: create-sbu_du-report +mk_BLFS_TOOL: create-sbu_du-report devices @if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\ \$(call sh_echo_PHASE,Building BLFS_TOOL); \\ (sudo \$(CHROOT1) -c "make -C $BLFS_ROOT/work"); \\ fi; @touch \$@ -mk_CUSTOM_TOOLS: mk_BLFS_TOOL +mk_CUSTOM_TOOLS: mk_BLFS_TOOL devices @if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\ \$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\ sudo mkdir -p ${BUILDDIR}${TRACKING_DIR}; \\ From c552eabe636ca27aa33c04c083a27c51c2958ffe Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Thu, 14 Sep 2023 16:03:37 +0200 Subject: [PATCH 08/12] Always run "teardown" after chroot If the shell exits with an error, teardown is not run in target chroot, which may lead to unwanted effects, such as preventing unmounting the $BUILD_DIR. Tell make to ignore the error. --- LFS/master.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LFS/master.sh b/LFS/master.sh index 7e4e919..2aa9843 100644 --- a/LFS/master.sh +++ b/LFS/master.sh @@ -437,11 +437,11 @@ fi cat << EOF chroot1: devices - sudo \$(CHROOT1) + -sudo \$(CHROOT1) \$(MAKE) teardown chroot: devices - sudo \$(CHROOT1) + -sudo \$(CHROOT1) \$(MAKE) teardown SETUP: $SETUP_TGT From 9a89ba79defccb5011b128ab412b90771ab182fa Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sat, 16 Sep 2023 09:39:53 +0200 Subject: [PATCH 09/12] ablfs: new pattern for config recognition chgrp -v mail ... is found in mutt and shouldn't considered an install command. --- BLFS/xsl/process-install.xsl | 1 + 1 file changed, 1 insertion(+) diff --git a/BLFS/xsl/process-install.xsl b/BLFS/xsl/process-install.xsl index 619c72a..1f15028 100644 --- a/BLFS/xsl/process-install.xsl +++ b/BLFS/xsl/process-install.xsl @@ -16,6 +16,7 @@ contains(string($current-instr),'tracker-miner') or contains(string($current-instr),'gtweak') or contains(string($current-instr),'query-immodules') or + contains(string($current-instr),'chgrp -v mail') or contains(string($current-instr),'gnome-control-center')"> ]> From 1c22535b2e2da8b27484cc2b1ec6e375a78bcd38 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sat, 16 Sep 2023 13:39:39 +0200 Subject: [PATCH 10/12] Process two more tags - one for libreoffice (use the xreflabel to set LO_PREFIX) - one for abiword (installation of normal.awt-ll_CC files) --- BLFS/xsl/process-replaceable.xsl | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/BLFS/xsl/process-replaceable.xsl b/BLFS/xsl/process-replaceable.xsl index 6a9bdd1..ca61b60 100644 --- a/BLFS/xsl/process-replaceable.xsl +++ b/BLFS/xsl/process-replaceable.xsl @@ -128,6 +128,28 @@ ancestor::sect1[@id='xorg-env']"> /usr + + + /opt/ + + + + + + + + en_GB + + + + + _ + + + + **EDITME From 6d9bd8e8e87190ac8f57cd007c8ad34d24504911 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sun, 17 Sep 2023 09:39:52 +0200 Subject: [PATCH 11/12] Add help about kernel config Now, there is a timeout if the config file is not up to date. Say so in the help. --- Config.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Config.in b/Config.in index c44bebb..b420534 100644 --- a/Config.in +++ b/Config.in @@ -604,6 +604,13 @@ menu "System configuration" #-- Fully qualified path to a kernel config file # The config file will be copied to ${BUILD_DIR}/sources # and renamed 'kernel-config' + # + # Important: if the config file is out of date (missing + # option), the kernel build will timeout instead of + # waiting forever for an input. This will generate error + # 124. In this case, update your config file, + # copy it to $BUILD_DIR/sources/kernel-config, and + # restart the build. #--- End Kernel config NCURSES5 From 5ed69f823f28db12a5f56eb709ed8446f5070df0 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Thu, 19 Oct 2023 17:35:25 +0200 Subject: [PATCH 12/12] Dependency on xorg7-* only on last package Our gen-special.sh transforms a dependency on compound packages (xorg7-*) on a dependency on the list of packages. This generates a lot of trials when removing circular dependencies, because if the dependency on xorg7-* is optional, all packages in the list are tried in turn, while it is sure that anyway the dependecy must be eliminated. If the dependency is only on the last package, the circular dep is eliminated at first try. --- BLFS/gen-special.sh | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/BLFS/gen-special.sh b/BLFS/gen-special.sh index 4dcd904..8b61d68 100755 --- a/BLFS/gen-special.sh +++ b/BLFS/gen-special.sh @@ -170,7 +170,25 @@ EOF EOF - cat >> tmpfile << EOF +# cat >> tmpfile << EOF +# +# +# +# +# +# +# +# $packname +# ref +# +#EOF + precpack=$packname + done + cat >>$SPECIAL_FILE << EOF + + +EOF + cat >> tmpfile << EOF @@ -181,13 +199,6 @@ EOF $packname ref -EOF - done - cat >>$SPECIAL_FILE << EOF - - -EOF - cat >> tmpfile << EOF EOF done