[jhalfs] 05/06: LFS: use a scriptlet for chapter "Finalizing" too
"Git Owner" ([email protected] via alfs-discuss Mailing List) <[email protected]> Sat, 25 Apr 2026 16:46:51 +0000
| Newsgroups | gmane.linux.lfs.automated |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format... ------------=_1777135624-2136-26086 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit This is an automated email from the git hooks/post-receive script. git pushed a commit to branch trunk in repository jhalfs. commit 6b1fd184b8531bec8b931d83caf5d82424cd634d Author: Pierre Labastie <[email protected]> AuthorDate: Sat Apr 25 15:32:02 2026 +0200 LFS: use a scriptlet for chapter "Finalizing" too This will generate two more scriptlets, one for the various /etc/*release files, and another for rebooting. We need to create something sensible for the version code, so we use "jhalfs-hostname" with hostname set by user. We remove creating the various /etc/*release files in the Makefile. --- LFS/lfs.xsl | 13 ++++++++++--- LFS/master.sh | 22 +--------------------- 2 files changed, 11 insertions(+), 24 deletions(-) diff --git a/LFS/lfs.xsl b/LFS/lfs.xsl index a9364f8..4da7a72 100644 --- a/LFS/lfs.xsl +++ b/LFS/lfs.xsl @@ -121,7 +121,8 @@ otherwise it is in /bin.--> @id='chapter-building-system' or @id='chapter-config' or @id='chapter-bootscripts' or - @id='chapter-bootable']"/> + @id='chapter-bootable' or + @id='chapter-finalizing']"/> </xsl:template> <xsl:template match="chapter"> @@ -171,7 +172,8 @@ otherwise it is in /bin.--> <xsl:text>set -e
</xsl:text> </xsl:if> <xsl:text>
</xsl:text> - <xsl:if test="ancestor::chapter/@id != 'chapter-final-preps'"> + <xsl:if test="ancestor::chapter/@id != 'chapter-final-preps' and + ancestor::chapter/@id != 'chapter-finalizing'"> <xsl:call-template name="start-script"> <xsl:with-param name="order" select="$order"/> </xsl:call-template> @@ -193,7 +195,8 @@ otherwise it is in /bin.--> ]//userinput" mode="pkgmngt"/> </xsl:if> - <xsl:if test="ancestor::chapter/@id != 'chapter-final-preps'"> + <xsl:if test="ancestor::chapter/@id != 'chapter-final-preps' and + ancestor::chapter/@id != 'chapter-finalizing'"> <xsl:text>echo -e "\n\nTotalseconds: $SECONDS\n"
</xsl:text> <xsl:call-template name="end-script"> <xsl:with-param name="chap-num" select="$chap-num"/> @@ -666,6 +669,10 @@ unset OLD_PKGDIR <xsl:when test="contains(string(.),'$(nproc)')"> <xsl:value-of select="$jobs"/> </xsl:when> + <xsl:when test="contains(string(.),'your name here')"> + <xsl:text>jhalfs-</xsl:text> + <xsl:value-of select="$hostname"/> + </xsl:when> <xsl:otherwise> <xsl:text>**EDITME</xsl:text> <xsl:apply-templates/> diff --git a/LFS/master.sh b/LFS/master.sh index 61d0c3a..52ea8da 100644 --- a/LFS/master.sh +++ b/LFS/master.sh @@ -327,27 +327,7 @@ fi ( cat << EOF @sudo make do_housekeeping - @echo $VERSION > lfs-release && \\ - sudo mv lfs-release \$(MOUNT_PT)/etc && \\ - sudo chown root:root \$(MOUNT_PT)/etc/lfs-release - @/bin/echo -e -n \\ - DISTRIB_ID=\\"Linux From Scratch\\"\\\\n\\ - DISTRIB_RELEASE=\\"$VERSION\\"\\\\n\\ - DISTRIB_CODENAME=\\"$(whoami)-jhalfs\\"\\\\n\\ - DISTRIB_DESCRIPTION=\\"Linux From Scratch\\"\\\\n\\ - > lsb-release && \\ - sudo mv lsb-release \$(MOUNT_PT)/etc && \\ - sudo chown root:root \$(MOUNT_PT)/etc/lsb-release - @/bin/echo -e -n \\ - NAME=\\"Linux From Scratch\\"\\\\n\\ - VERSION=\\"$VERSION\\"\\\\n\\ - ID=lfs\\\\n\\ - PRETTY_NAME=\\"Linux From Scratch $VERSION\\"\\\\n\\ - VERSION_CODENAME=\\"$(whoami)-jhalfs\\"\\\\n\\ - > os-release && \\ - sudo mv os-release \$(MOUNT_PT)/etc && \\ - sudo chown root:root \$(MOUNT_PT)/etc/os-release - @\$(call echo_finished,$VERSION) + @\$(call echo_finished,"$VERSION") ck_UID: @if [ \`id -u\` = "0" ]; then \\ -- To stop receiving notification emails like this one, please contact the administrator of this repository. ------------=_1777135624-2136-26086 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- http://lists.linuxfromscratch.org/sympa/info/alfs-discuss Unsubscribe: See the above information page ------------=_1777135624-2136-26086--