From ce07f91d5e89ca8ddf80c9e388190b631af2623e Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 14 Jan 2024 17:38:41 +0800 Subject: [PATCH 1/5] udev: Drop duplicated udevadm in the ninja command --- chapter08/udev.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter08/udev.xml b/chapter08/udev.xml index 832bf803c..32c0e97a7 100644 --- a/chapter08/udev.xml +++ b/chapter08/udev.xml @@ -137,7 +137,7 @@ meson setup \ ninja udevadm systemd-hwdb \ $(ninja -n | grep -Eo '(src/(lib)?udev|rules.d|hwdb.d)/[^ ]*') \ $(realpath libudev.so --relative-to .) \ - $udev_helpers udevadm + $udev_helpers Install the package: From ec18a3872af00cfaa9ad2530b407940eba30fde7 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sun, 14 Jan 2024 22:25:07 +0100 Subject: [PATCH 2/5] Makefile: Set tabs to 3 spaces when editing with vi This allows all editors to have the same settings... --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 71b82d0c6..9cddff915 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ +# vim:ts=3 #BASEDIR = ~/lfs-book #SYSDDIR = ~/lfs-systemd #DUMPDIR = ~/lfs-commands From 855d0c957459a7015fbfcecdcc006e2fa251e104 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sun, 14 Jan 2024 22:27:37 +0100 Subject: [PATCH 3/5] Remove an invalid attribute in longindex.html For some reason, the stylesheets generate a
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). --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 9cddff915..00eeb2748 100644 --- a/Makefile +++ b/Makefile @@ -48,6 +48,7 @@ book: validate profile-html $(Q)mkdir -p $(BASEDIR)/stylesheets $(Q)cp stylesheets/lfs-xsl/*.css $(BASEDIR)/stylesheets $(Q)sed -i 's|../stylesheet|stylesheet|' $(BASEDIR)/index.html + $(Q)sed -i 's/xmlns:xlink.*xlink"//' $(BASEDIR)/longindex.html $(Q)mkdir -p $(BASEDIR)/images $(Q)cp images/*.png $(BASEDIR)/images From 0432a3a1a8cb9090408e0359ec16d1222bda6d7a Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sun, 14 Jan 2024 22:36:12 +0100 Subject: [PATCH 4/5] Generate utf-8 for lfs-nochunks too This involves: - removing the element from nochunks.xsl - adding a sed for rmoving the invalid xmlns:xlink attribute - removing the sed for "©" --- Makefile | 2 +- stylesheets/lfs-xsl/nochunks.xsl | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 00eeb2748..433bb86da 100644 --- a/Makefile +++ b/Makefile @@ -101,6 +101,7 @@ nochunks: validate profile-html $(RENDERTMP)/lfs-html.xml # $(RENDERTMP)/lfs-html2.xml + $(Q)sed 's/xmlns:xlink.*xlink"//' -i $(BASEDIR)/$(NOCHUNKS_OUTPUT) @echo "Running Tidy..." $(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true @@ -109,7 +110,6 @@ nochunks: validate profile-html $(Q)sed -i -e "s@text/html@application/xhtml+xml@g" $(BASEDIR)/$(NOCHUNKS_OUTPUT) $(Q)sed -i -e "s@../wget-list@wget-list@" $(BASEDIR)/$(NOCHUNKS_OUTPUT) $(Q)sed -i -e "s@../md5sums@md5sums@" $(BASEDIR)/$(NOCHUNKS_OUTPUT) - $(Q)sed -i -e "s@\xa9@\©@" $(BASEDIR)/$(NOCHUNKS_OUTPUT) @echo "Output at $(BASEDIR)/$(NOCHUNKS_OUTPUT)" diff --git a/stylesheets/lfs-xsl/nochunks.xsl b/stylesheets/lfs-xsl/nochunks.xsl index 3ff0ebc72..351c6dbb3 100644 --- a/stylesheets/lfs-xsl/nochunks.xsl +++ b/stylesheets/lfs-xsl/nochunks.xsl @@ -10,9 +10,6 @@ - - - From b8194e059c3255c11fe6dc057dc049f723edf56b Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sun, 14 Jan 2024 22:44:14 +0100 Subject: [PATCH 5/5] make default BASEDIR in public_html that is: - ~/public_html/lfs-book for sysv - ~/public_html/lfs-systemd for systemd --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 433bb86da..dc6ee93ba 100644 --- a/Makefile +++ b/Makefile @@ -24,12 +24,12 @@ ifneq ($(REV), sysv) endif ifeq ($(REV), sysv) - BASEDIR ?= ~/lfs-book + BASEDIR ?= ~/public_html/lfs-book PDF_OUTPUT ?= LFS-BOOK.pdf NOCHUNKS_OUTPUT ?= LFS-BOOK.html DUMPDIR ?= ~/lfs-commands else - BASEDIR ?= ~/lfs-systemd + BASEDIR ?= ~/public_html/lfs-systemd PDF_OUTPUT ?= LFS-SYSD-BOOK.pdf NOCHUNKS_OUTPUT ?= LFS-SYSD-BOOK.html DUMPDIR ?= ~/lfs-sysd-commands