From 8cd1e8e64d8ebbcf30eaf5223e929d055ef4b41d Mon Sep 17 00:00:00 2001 From: Poltern <2363951+Poltern@users.noreply.github.com> Date: Sun, 25 Aug 2024 22:14:05 +0500 Subject: [PATCH] bootscripts: console: Fix fb console detection 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. Typos on comments. These changes are all in comments that do not affect the books in any way. sysklogd Turn off network logging by default Update to lfs-bootscripts-20240825 Fix typos --- aux-file-data.sh | 2 +- bootscripts/ChangeLog | 13 +++++++++++++ bootscripts/lfs/init.d/console | 2 +- bootscripts/lfs/lib/services/init-functions | 3 --- bootscripts/lfs/sbin/ifup.8 | 8 ++++---- chapter01/changelog.xml | 21 +++++++++++++++++++++ chapter01/whatsnew.xml | 2 +- chapter08/sysklogd.xml | 3 +++ git-version.sh | 2 +- lfs-latest-git.php | 2 +- packages.ent | 10 +++++----- stylesheets/lfs-xsl/chunkfast.xsl | 2 +- stylesheets/lfs-xsl/common.xsl | 4 ++-- stylesheets/lfs-xsl/pdf.xsl | 4 ++-- stylesheets/lfs-xsl/pdf/lfs-lists.xsl | 6 +++--- stylesheets/lfs-xsl/pdf/lfs-mixed.xsl | 6 +++--- stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl | 4 ++-- stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl | 8 ++++---- stylesheets/lfs-xsl/xhtml/lfs-sections.xsl | 4 ++-- stylesheets/lfs-xsl/xhtml/lfs-toc.xsl | 2 +- stylesheets/patcheslist.xsl | 2 +- stylesheets/wget-list.xsl | 2 +- udev-lfs/README | 2 +- udev-lfs/init-net-rules.sh | 2 +- 24 files changed, 75 insertions(+), 41 deletions(-) diff --git a/aux-file-data.sh b/aux-file-data.sh index 8be1b1d..01539fe 100755 --- a/aux-file-data.sh +++ b/aux-file-data.sh @@ -15,7 +15,7 @@ base=$(basename $bootscripts .tar.xz) bootsize=$(ls -l --block-size=1024 $bootscripts | cut -f5 -d" ") bootmd5=$(md5sum $bootscripts | cut -f1 -d" ") -# Figure intalled size of bootscripts +# Figure installed size of bootscripts TOPDIR=$(pwd) TMP_DIR=$(mktemp -d /tmp/lfsbootfiles.XXXXXX) pushd $TMP_DIR > /dev/null diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog index 5582302..4157679 100644 --- a/bootscripts/ChangeLog +++ b/bootscripts/ChangeLog @@ -1,3 +1,16 @@ +2024-08-25 Xi Ruoyao + * Remove an empty line and an outdated comment (not valid anymore after + /usr merge) from init-functions. + +2024-08-24 Andrew Kreimer + * Fix typos. + +2024-08-23 Xi Ruoyao + * In console, detect FB console by checking /sys/class/graphics/fbcon + instead of fb0. The latter does not exist if CONFIG_FB=n, but + CONFIG_DRM_FBDEV_EMULATION=y can support a FB console without + CONFIG_FB. + 2024-07-12 Xi Ruoyao * In mountvirtfs, recreate /dev/fd correctly if it's already created by the initramfs. diff --git a/bootscripts/lfs/init.d/console b/bootscripts/lfs/init.d/console index a5338cc..9409e47 100644 --- a/bootscripts/lfs/init.d/console +++ b/bootscripts/lfs/init.d/console @@ -47,7 +47,7 @@ case "${1}" in log_info_msg "Setting up Linux console..." # Figure out if a framebuffer console is used - [ -d /sys/class/graphics/fb0 ] && use_fb=1 || use_fb=0 + [ -d /sys/class/graphics/fbcon ] && use_fb=1 || use_fb=0 # Figure out the command to set the console into the # desired mode diff --git a/bootscripts/lfs/lib/services/init-functions b/bootscripts/lfs/lib/services/init-functions index 2bcadaa..e13bb8a 100644 --- a/bootscripts/lfs/lib/services/init-functions +++ b/bootscripts/lfs/lib/services/init-functions @@ -457,11 +457,8 @@ pidofproc() # If a PID file is set and exists, use it. if [ -n "${pidfile}" -a -e "${pidfile}" ]; then - # Use the value in the first line of the pidfile pidlist=`/bin/head -n1 "${pidfile}"` - # This can optionally be written as 'sed 1q' to repalce 'head -n1' - # should LFS move /bin/head to /usr/bin/head else # Use pidof pidlist=`pidof "${program}"` diff --git a/bootscripts/lfs/sbin/ifup.8 b/bootscripts/lfs/sbin/ifup.8 index 2fb7873..8d08d8c 100644 --- a/bootscripts/lfs/sbin/ifup.8 +++ b/bootscripts/lfs/sbin/ifup.8 @@ -94,7 +94,7 @@ NOTES compound device such as a bridge. ONBOOT - If set to 'yes', the specified interface is - configured by the netowrk boot script. + configured by the network boot script. GATEWAY - The default IP address to use for routing if the destination IP address is not in a static @@ -112,7 +112,7 @@ NOTES This list is normally a single value, e.g. eth0, for use with a virtual host such as kvm. - Other paramters that are service specific include: + Other parameters that are service specific include: ipv4-static @@ -128,7 +128,7 @@ NOTES additional IP addresses to a network device. Example: eth0:2 (optional) - BROADCAST - The brodcast address for this interface, + BROADCAST - The broadcast address for this interface, e.g 192.168.1.255. If not specified, the broadcast address will be calculated from the IP and PREFIX. @@ -154,7 +154,7 @@ NOTES DHCP_START - Optional parameters to pass to the dhcp client at startup. - DHCP_STOP - Optional paremeters to pass to the dhcp client + DHCP_STOP - Optional parameters to pass to the dhcp client at shutdown. PRINTIP - Flag to print the dhcp address to stdout diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 8d9b2e8..0f52847 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -39,6 +39,27 @@ appropriate for the entry or if needed the entire day's listitem. --> + + 2024-08-23 + + + [xry111] - Update to lfs-bootscripts-20240825. Only trivial + non-functional changes. + + + + + + 2024-08-23 + + + [xry111] - Update to lfs-bootscripts-20240823, to fix an + issue causing VT 2-6 not affected by the FONT= setting in + /etc/sysconfig/console. + + + + 2024-08-17 diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index fb932f9..6a4f043 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -297,7 +297,7 @@ - Removed: + Удалены: bash-5.2.21-upstream_fixes-1.patch diff --git a/chapter08/sysklogd.xml b/chapter08/sysklogd.xml index 658028b..2ec59ef 100644 --- a/chapter08/sysklogd.xml +++ b/chapter08/sysklogd.xml @@ -86,6 +86,9 @@ mail.* -/var/log/mail.log user.* -/var/log/user.log *.emerg * +# Do not open any internet ports. +secure_mode 2 + # End /etc/syslog.conf EOF diff --git a/git-version.sh b/git-version.sh index 9ed0a46..278ebfb 100755 --- a/git-version.sh +++ b/git-version.sh @@ -19,7 +19,7 @@ if [ -e LFS-RELEASE ]; then fi if ! git status > /dev/null; then - # Either it's not a git repository, or git is unavaliable. + # Either it's not a git repository or git is unavailable. # Just workaround. echo " version.ent echo "" >> version.ent diff --git a/lfs-latest-git.php b/lfs-latest-git.php index ce76e97..55c634e 100644 --- a/lfs-latest-git.php +++ b/lfs-latest-git.php @@ -322,7 +322,7 @@ function get_current() $file = basename( $line ) . "\n"; if ( preg_match( "/patch$/", $file ) ) { continue; } // Skip patches - $file = preg_replace( "/bz2/", '', $file ); // The 2 confusses the regex + $file = preg_replace( "/bz2/", '', $file ); // The 2 confuses the regex $file = rtrim( $file ); $pkg_pattern = "/(\D*).*/"; diff --git a/packages.ent b/packages.ent index 6d367ca..ac8470d 100644 --- a/packages.ent +++ b/packages.ent @@ -2,7 +2,7 @@ + diff --git a/stylesheets/lfs-xsl/chunkfast.xsl b/stylesheets/lfs-xsl/chunkfast.xsl index 6d9d823..c933882 100644 --- a/stylesheets/lfs-xsl/chunkfast.xsl +++ b/stylesheets/lfs-xsl/chunkfast.xsl @@ -8,7 +8,7 @@ exclude-result-prefixes="cf exsl"> + Dropping unneeded anchors and fo:wrapper elemments. --> @@ -111,7 +111,7 @@ - + diff --git a/stylesheets/lfs-xsl/pdf.xsl b/stylesheets/lfs-xsl/pdf.xsl index c143aa3..866f5c9 100644 --- a/stylesheets/lfs-xsl/pdf.xsl +++ b/stylesheets/lfs-xsl/pdf.xsl @@ -27,7 +27,7 @@ - + @@ -97,7 +97,7 @@ + Addibg a bullet, left alignment, and @kepp-*.* attributes + for packages and patches list. --> @@ -135,7 +135,7 @@ diff --git a/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl b/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl index e5c7ae0..834b705 100644 --- a/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl +++ b/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl @@ -5,7 +5,7 @@ version="1.0"> @@ -128,7 +128,7 @@ + Be sure that literal will use always normal font weight. --> @@ -139,7 +139,7 @@ + literal, option, prompt, systemitem, varname, sgmltag, tag, and uri --> diff --git a/stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl b/stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl index 90dae4c..7316edd 100644 --- a/stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl +++ b/stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl @@ -176,7 +176,7 @@ + Small font size and left alignment. --> diff --git a/stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl b/stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl index f678038..59859c1 100644 --- a/stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl +++ b/stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl @@ -4,9 +4,9 @@ xmlns="http://www.w3.org/1999/xhtml" version="1.0"> - + and that do not affect the chunk algorithm. --> @@ -187,7 +187,7 @@ @@ -208,7 +208,7 @@ - + diff --git a/stylesheets/lfs-xsl/xhtml/lfs-toc.xsl b/stylesheets/lfs-xsl/xhtml/lfs-toc.xsl index 36c4ba3..5dbe213 100644 --- a/stylesheets/lfs-xsl/xhtml/lfs-toc.xsl +++ b/stylesheets/lfs-xsl/xhtml/lfs-toc.xsl @@ -65,7 +65,7 @@ diff --git a/stylesheets/patcheslist.xsl b/stylesheets/patcheslist.xsl index f863edc..94e33b7 100644 --- a/stylesheets/patcheslist.xsl +++ b/stylesheets/patcheslist.xsl @@ -51,7 +51,7 @@ exit - + diff --git a/stylesheets/wget-list.xsl b/stylesheets/wget-list.xsl index eca53a4..09f99cd 100644 --- a/stylesheets/wget-list.xsl +++ b/stylesheets/wget-list.xsl @@ -15,7 +15,7 @@ + duplicated URLs due that may be split for PDF output -->