From 49e360b9b52900bdda162467c1d01244379c093b Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Wed, 28 Apr 2021 16:40:51 -0500 Subject: [PATCH 1/3] Add manual locales needed for tests if using alternate locale installation instructions. Minor changes to boot scripts. --- bootscripts/ChangeLog | 6 ++++++ bootscripts/lfs/lib/services/init-functions | 18 ++++++++++++------ chapter01/changelog.xml | 16 ++++++++++++++++ chapter08/glibc.xml | 6 +++++- packages.ent | 2 +- 5 files changed, 40 insertions(+), 8 deletions(-) diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog index f9e0a5ef4..24fc8319a 100644 --- a/bootscripts/ChangeLog +++ b/bootscripts/ChangeLog @@ -1,3 +1,9 @@ +2021-04-28 Bruce Dubbs + * Make check_signal more robust. + * Use a better methog for killproc to remove a dead pid file. + * Clarify what signals killproc accepts. + * Thanks to input an ddiscussion from Scott Andrews. + 2021-02-01 Bruce Dubbs * Tweak mountfs to properly exit when an error is found. diff --git a/bootscripts/lfs/lib/services/init-functions b/bootscripts/lfs/lib/services/init-functions index 2e9b15b98..0a7ca4da1 100644 --- a/bootscripts/lfs/lib/services/init-functions +++ b/bootscripts/lfs/lib/services/init-functions @@ -283,7 +283,13 @@ killproc() 1) # Program is not running, but an invalid pid file exists # Remove the pid file. - rm -f "${pidfile}" + + progname=${program##*/} + + if [[ -e "/run/${progname}.pid" ]]; then + pidfile="/run/${progname}.pid" + rm -f "${pidfile}" + fi # This is only a success if no signal was passed. if [ -n "${nosig}" ]; then @@ -713,13 +719,13 @@ evaluate_retval() ################################################################################ # check_signal() # -# Usage: check_signal [ -{signal} | {signal} ] # +# Usage: check_signal [ -{signal} ] # # # # Purpose: Check for a valid signal. This is not defined by any LSB draft, # # however, it is required to check the signals to determine if the # # signals chosen are invalid arguments to the other functions. # # # -# Inputs: Accepts a single string value in the form or -{signal} or {signal} # +# Inputs: Accepts a single string value in the form of -{signal} # # # # Return values: # # 0 - Success (signal is valid # @@ -730,11 +736,11 @@ check_signal() local valsig # Add error handling for invalid signals - valsig="-ALRM -HUP -INT -KILL -PIPE -POLL -PROF -TERM -USR1 -USR2" + valsig=" -ALRM -HUP -INT -KILL -PIPE -POLL -PROF -TERM -USR1 -USR2" valsig="${valsig} -VTALRM -STKFLT -PWR -WINCH -CHLD -URG -TSTP -TTIN" valsig="${valsig} -TTOU -STOP -CONT -ABRT -FPE -ILL -QUIT -SEGV -TRAP" valsig="${valsig} -SYS -EMT -BUS -XCPU -XFSZ -0 -1 -2 -3 -4 -5 -6 -8 -9" - valsig="${valsig} -11 -13 -14 -15" + valsig="${valsig} -11 -13 -14 -15 " echo "${valsig}" | grep -- " ${1} " > /dev/null @@ -765,7 +771,7 @@ check_sig_type() local valsig # The list of termination signals (limited to generally used items) - valsig="-ALRM -INT -KILL -TERM -PWR -STOP -ABRT -QUIT -2 -3 -6 -9 -14 -15" + valsig=" -ALRM -INT -KILL -TERM -PWR -STOP -ABRT -QUIT -2 -3 -6 -9 -14 -15 " echo "${valsig}" | grep -- " ${1} " > /dev/null diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index a2e057b13..c588665bb 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -43,6 +43,22 @@ appropriate for the entry or if needed the entire day's listitem. --> + + 2021-04-28 + + + [bdubbs] - Add manual locales needed for tests + if using alternate locale installation instructions. Fixes + #4844. + + + [bdubbs] - Minor changes to boot scripts. Fixes + #4842. + Thanks to Scott Andrews for the report. + + + + 2021-04-26 diff --git a/chapter08/glibc.xml b/chapter08/glibc.xml index 6f99a94c5..7fc661dc2 100644 --- a/chapter08/glibc.xml +++ b/chapter08/glibc.xml @@ -280,7 +280,11 @@ localedef -i zh_HK -f BIG5-HKSCS zh_HK.BIG5-HKSCS Then use the localedef command to create and install locales not listed in the glibc-&glibc-version;/localedata/SUPPORTED file - in the unlikely case you need them. + when you need them. For instance, the following two locales are + needed for some tests later in this chapter: + +localedef -i POSIX -f UTF-8 C.UTF-8 2> /dev/null || true +localedef -i ja_JP -f SHIFT_JIS ja_JP.SIJS 2> /dev/null || true Glibc now uses libidn2 when resolving internationalized domain names. This is a run time dependency. If this capability diff --git a/packages.ent b/packages.ent index b230ea0e9..67a838778 100644 --- a/packages.ent +++ b/packages.ent @@ -376,7 +376,7 @@ - + From 99ee345ad67861dbaa41810874f35fbf593a2f50 Mon Sep 17 00:00:00 2001 From: "Douglas R. Reno" Date: Wed, 28 Apr 2021 20:29:58 -0500 Subject: [PATCH 2/3] Patch systemd to build with meson-0.57.2 and Linux-API-Headers-5.11.14 and higher. --- chapter01/changelog.xml | 5 +++++ chapter08/systemd.xml | 2 +- patches.ent | 6 +++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index c588665bb..413b55d0d 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -46,6 +46,11 @@ 2021-04-28 + + [renodr] - Fix building systemd with Linux-API-Headers 5.11.14 + and higher, as well as with meson-0.57.2. Fixes + #4851. + [bdubbs] - Add manual locales needed for tests if using alternate locale installation instructions. Fixes diff --git a/chapter08/systemd.xml b/chapter08/systemd.xml index b52a64e35..d5a9f6bd1 100644 --- a/chapter08/systemd.xml +++ b/chapter08/systemd.xml @@ -50,7 +50,7 @@ First, apply a patch to fix some regressions and fix functionality with future versions of the kernel: -patch -Np1 -i ../systemd-&systemd-version;-upstream_fixes-2.patch +patch -Np1 -i ../systemd-&systemd-version;-upstream_fixes-3.patch Remove tests that cannot be built in chroot: diff --git a/patches.ent b/patches.ent index 5bbfc57ba..62a45216d 100644 --- a/patches.ent +++ b/patches.ent @@ -67,6 +67,6 @@ - - - + + + From 2013a74b0d3c1733c761254a03108e0606f7e396 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Thu, 29 Apr 2021 12:23:59 -0500 Subject: [PATCH 3/3] Add ipv6 localhost in Chapter 7 hosts file --- chapter07/createfiles.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chapter07/createfiles.xml b/chapter07/createfiles.xml index 0cacb76cb..8aec64958 100644 --- a/chapter07/createfiles.xml +++ b/chapter07/createfiles.xml @@ -47,7 +47,10 @@ referenced in some test suites, and in one of Perl's configuration files as well: -echo "127.0.0.1 localhost $(hostname)" > /etc/hosts +cat > /etc/hosts << EOF +"127.0.0.1 localhost $(hostname)" +::1 localhost +EOF In order for user root to be able to login and for the name root to be recognized, there