diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | chapter01/askforhelp.xml | 4 | ||||
-rw-r--r-- | chapter01/changelog.xml | 5 | ||||
-rw-r--r-- | chapter07/cleanup.xml | 11 | ||||
-rw-r--r-- | chapter10/grub.xml | 4 | ||||
-rw-r--r-- | chapter10/kernel.xml | 8 | ||||
-rw-r--r-- | chapter11/reboot.xml | 37 | ||||
-rw-r--r-- | chapter11/theend.xml | 27 | ||||
-rw-r--r-- | chapter11/whatnow.xml | 3 | ||||
-rw-r--r-- | general.ent | 92 | ||||
-rwxr-xr-x | git-version.sh | 30 | ||||
-rwxr-xr-x | make-aux-files.sh | 2 | ||||
-rw-r--r-- | patches.ent | 16 | ||||
-rw-r--r-- | prologue/bookinfo.xml | 3 | ||||
-rw-r--r-- | prologue/errata.xml | 3 |
16 files changed, 147 insertions, 101 deletions
diff --git a/.gitignore b/.gitignore index e5fb52276..0d2478625 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ lfs-bootscripts-*.tar.xz +conditional.ent version.ent appendices/*.script @@ -189,7 +189,7 @@ $(BASEDIR)/md5sums: stylesheets/wget-list.xsl chapter03/chapter03.xml \ $(BASEDIR)/md5sums version: - $(Q)./git-version.sh + $(Q)./git-version.sh $(REV) #dump-commands: validate # @echo "Dumping book commands..." diff --git a/chapter01/askforhelp.xml b/chapter01/askforhelp.xml index 6367d0edd..3412f0a60 100644 --- a/chapter01/askforhelp.xml +++ b/chapter01/askforhelp.xml @@ -38,9 +38,7 @@ <itemizedlist> <listitem> - <para>The version of the book being used (in this case - <phrase revision="sysv">&version;</phrase> - <phrase revision="systemd">&versiond;</phrase>)</para> + <para>The version of the book being used (in this case &version;</para> </listitem> <listitem> <para>The host distribution and version being used to create LFS</para> diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 7b4148ba9..49948fbc9 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -10,10 +10,7 @@ <title>Changelog</title> - <para>This is version - <phrase revision="sysv">&version;</phrase> - <phrase revision="systemd">&versiond;</phrase> - of the Linux From Scratch book, dated + <para>This is version &version; of the Linux From Scratch book, dated &releasedate;. If this book is more than six months old, a newer and better version is probably already available. To find out, please check one of the mirrors via <ulink url="&lfs-root;mirrors.html"/>.</para> diff --git a/chapter07/cleanup.xml b/chapter07/cleanup.xml index 47cf91094..ad5d96992 100644 --- a/chapter07/cleanup.xml +++ b/chapter07/cleanup.xml @@ -127,12 +127,9 @@ umount $LFS/{sys,proc,run,dev}</userinput></screen> </para> </note> -<screen role="nodump" revision="sysv"><userinput>cd $LFS +<screen role="nodump"><userinput>cd $LFS tar -cJpf $HOME/lfs-temp-tools-&version;.tar.xz .</userinput></screen> -<screen role="nodump" revision="systemd"><userinput>cd $LFS -tar -cJpf $HOME/lfs-temp-tools-&versiond;.tar.xz .</userinput></screen> - </sect2> <sect2> @@ -157,14 +154,10 @@ tar -cJpf $HOME/lfs-temp-tools-&versiond;.tar.xz .</userinput></screen> environment variable is not set for the root user, it will destroy your entire host system. YOU ARE WARNED.</para></warning> -<screen role="nodump" revision="sysv"><computeroutput>cd $LFS +<screen role="nodump"><computeroutput>cd $LFS rm -rf ./* tar -xpf $HOME/lfs-temp-tools-&version;.tar.xz</computeroutput></screen> -<screen role="nodump" revision="systemd"><computeroutput>cd $LFS -rm -rf ./* -tar -xpf $HOME/lfs-temp-tools-&versiond;.tar.xz</computeroutput></screen> - <para> Again, double check that the environment has been setup properly and continue building the rest of the system. diff --git a/chapter10/grub.xml b/chapter10/grub.xml index c32783e9a..b35d75540 100644 --- a/chapter10/grub.xml +++ b/chapter10/grub.xml @@ -156,8 +156,8 @@ set timeout=5 insmod ext2 set root=(hd0,2) -menuentry "GNU/Linux, Linux &linux-version;-lfs-&versiond;" { - linux /boot/vmlinuz-&linux-version;-lfs-&versiond; root=/dev/sda2 ro +menuentry "GNU/Linux, Linux &linux-version;-lfs-&version;" { + linux /boot/vmlinuz-&linux-version;-lfs-&version; root=/dev/sda2 ro }</literal> EOF</userinput></screen> diff --git a/chapter10/kernel.xml b/chapter10/kernel.xml index 0aec043ef..f77cc9c5c 100644 --- a/chapter10/kernel.xml +++ b/chapter10/kernel.xml @@ -227,7 +227,7 @@ File systems ---> <screen revision="sysv"><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen> -<screen revision="systemd"><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&versiond;</userinput></screen> +<screen revision="systemd"><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen> <para><filename>System.map</filename> is a symbol file for the kernel. It maps the function entry points of every function in the kernel API, @@ -336,8 +336,7 @@ EOF</userinput></screen> <seglistitem> <seg>config-&linux-version;, - <phrase revision="sysv">vmlinuz-&linux-version;-lfs-&version;,</phrase> - <phrase revision="systemd">vmlinuz-&linux-version;-lfs-&versiond;,</phrase> + vmlinuz-&linux-version;-lfs-&version;, and System.map-&linux-version;</seg> <seg>/lib/modules, /usr/share/doc/linux-&linux-version;</seg> </seglistitem> @@ -359,8 +358,7 @@ EOF</userinput></screen> </varlistentry> <varlistentry id="lfskernel"> - <term revision="sysv"><filename>vmlinuz-&linux-version;-lfs-&version;</filename></term> - <term revision="systemd"><filename>vmlinuz-&linux-version;-lfs-&versiond;</filename></term> + <term><filename>vmlinuz-&linux-version;-lfs-&version;</filename></term> <listitem> <para>The engine of the Linux system. When turning on the computer, the kernel is the first part of the operating system that gets loaded. diff --git a/chapter11/reboot.xml b/chapter11/reboot.xml index e2f0e0c59..adf1a9f3e 100644 --- a/chapter11/reboot.xml +++ b/chapter11/reboot.xml @@ -20,22 +20,19 @@ <itemizedlist> - <listitem><para>A text mode browser such as <ulink revision="sysv" - url='&blfs-book;basicnet/lynx.html'>Lynx</ulink><ulink revision="systemd" - url='&blfs-systemd-book;basicnet/lynx.html'>Lynx</ulink> + <listitem><para>A text mode browser such as <ulink + url='&blfs-book;basicnet/lynx.html'>Lynx</ulink> will allow you to easily view the BLFS book in one virtual terminal, while building packages in another.</para></listitem> - <listitem><para>The <ulink revision="sysv" - url='&blfs-book;postlfs/make-ca.html'>make-ca</ulink><ulink revision="systemd" - url='&blfs-systemd-book;postlfs/make-ca.html'>make-ca</ulink> package + <listitem><para>The <ulink + url='&blfs-book;postlfs/make-ca.html'>make-ca</ulink> package will allow you to set up local trusted anchor certificates, allowing the system to verify SSL certificates provided by remote servers (for example, a website using HTTPS).</para></listitem> - <listitem><para>The <ulink revision="sysv" - url='&blfs-book;general/gpm.html'>GPM</ulink><ulink revision="systemd" - url='&blfs-systemd-book;general/gpm.html'>GPM</ulink> package will allow + <listitem><para>The <ulink + url='&blfs-book;general/gpm.html'>GPM</ulink> package will allow you to perform copy/paste actions in your virtual terminals.</para></listitem> @@ -47,29 +44,21 @@ url='&blfs-book;basicnet/dhcp.html'>dhcp</ulink> may be useful.</para></listitem> - <listitem><para>Installing <ulink revision="sysv" - url='&blfs-book;postlfs/sudo.html'>sudo</ulink><ulink revision="systemd" - url='&blfs-systemd-book;postlfs/sudo.html'>sudo</ulink> may be useful for + <listitem><para>Installing <ulink + url='&blfs-book;postlfs/sudo.html'>sudo</ulink> may be useful for building packages as a non-root user and easily installing the resulting packages in your new system.</para></listitem> <listitem><para>If you want to access your new system from a remote system - within a comfortable GUI environment, install <ulink revision="sysv" - url='&blfs-book;postlfs/openssh.html'>openssh</ulink><ulink revision="systemd" - url='&blfs-systemd-book;postlfs/openssh.html'>openssh</ulink>. - </para></listitem> + within a comfortable GUI environment, install <ulink + url='&blfs-book;postlfs/openssh.html'>openssh</ulink>.</para></listitem> <listitem><para>To make fetching files over the internet easier, install - <ulink - revision="sysv" url='&blfs-book;basicnet/wget.html'>wget</ulink><ulink - revision="systemd" url='&blfs-systemd-book;basicnet/wget.html'>wget</ulink>. - </para></listitem> + <ulink url='&blfs-book;basicnet/wget.html'>wget</ulink>.</para></listitem> <listitem><para>To connect to a wireless access point for networking, - install <ulink revision="sysv" - url='&blfs-book;basicnet/wpa_supplicant.html'>wpa_supplicant</ulink><ulink - revision="systemd" - url='&blfs-systemd-book;basicnet/wpa_supplicant.html'>wpa_supplicant</ulink>. + install <ulink + url='&blfs-book;basicnet/wpa_supplicant.html'>wpa_supplicant</ulink>. </para></listitem> <listitem><para>Finally, a review of the following configuration files diff --git a/chapter11/theend.xml b/chapter11/theend.xml index 6a5f8ad7a..8470948a3 100644 --- a/chapter11/theend.xml +++ b/chapter11/theend.xml @@ -31,37 +31,28 @@ out which LFS version is installed on the system. Create this file by running:</para> -<screen revision="sysv"><userinput>echo &version; > /etc/lfs-release</userinput></screen> +<screen><userinput>echo &version; > /etc/lfs-release</userinput></screen> -<screen revision="systemd"><userinput>echo &versiond; > /etc/lfs-release</userinput></screen> - - <para>Two files describing the installed system may be used by packages - that can be installed on the system later, either in binary form or by building + <para>Two files describing the installed system may be used by packages that + can be installed on the system later, either in binary form or by building them.</para> <para>The first one shows the status of your new system with respect to the Linux Standards Base (LSB). To create this file, run:</para> -<screen revision="sysv"><userinput>cat > /etc/lsb-release << "EOF" +<screen><userinput>cat > /etc/lsb-release << "EOF" DISTRIB_ID="Linux From Scratch" DISTRIB_RELEASE="&version;" DISTRIB_CODENAME="<your name here>" DISTRIB_DESCRIPTION="Linux From Scratch" EOF</userinput></screen> -<screen revision="systemd"><userinput>cat > /etc/lsb-release << "EOF" -DISTRIB_ID="Linux From Scratch" -DISTRIB_RELEASE="&versiond;" -DISTRIB_CODENAME="<your name here>" -DISTRIB_DESCRIPTION="Linux From Scratch" -EOF</userinput></screen> - <para>The second one contains roughly the same information, and is used by systemd and some graphical desktop environments. To create this file, run:</para> -<screen revision="sysv"><userinput>cat > /etc/os-release << "EOF" +<screen><userinput>cat > /etc/os-release << "EOF" NAME="Linux From Scratch" VERSION="&version;" ID=lfs @@ -69,14 +60,6 @@ PRETTY_NAME="Linux From Scratch &version;" VERSION_CODENAME="<your name here>" EOF</userinput></screen> -<screen revision="systemd"><userinput>cat > /etc/os-release << "EOF" -NAME="Linux From Scratch" -VERSION="&versiond;" -ID=lfs -PRETTY_NAME="Linux From Scratch &versiond;" -VERSION_CODENAME="<your name here>" -EOF</userinput></screen> - <para>Be sure to put some sort of customization for the fields 'DISTRIB_CODENAME' and 'VERSION_CODENAME' to make the system uniquely yours.</para> diff --git a/chapter11/whatnow.xml b/chapter11/whatnow.xml index e72f4ca5e..f8672ec69 100644 --- a/chapter11/whatnow.xml +++ b/chapter11/whatnow.xml @@ -57,8 +57,7 @@ <para>The Beyond Linux From Scratch book covers installation procedures for a wide range of software beyond the scope of the LFS - Book. The BLFS project is located at <ulink revision="sysv" - url="&blfs-book;"/><ulink revision="systemd" url="&blfs-systemd-book;"/>. + Book. The BLFS project is located at <ulink url="&blfs-book;"/>. </para> </listitem> diff --git a/general.ent b/general.ent index 836043835..4f15d3fdd 100644 --- a/general.ent +++ b/general.ent @@ -1,44 +1,96 @@ -<!-- version info automatically generated by git - comment the following two lines for release --> +<!-- Editing up to the line of ==== should be enough + to generate a book for development, release, or rc--> +<!ENTITY % development "INCLUDE"><!-- set to INCLUDE for development, + set to IGNORE for release or rc --> +<!ENTITY % release "IGNORE"> <!-- set to INCLUDE for release, + set to IGNORE for development or rc --> +<!ENTITY % rc "IGNORE"> <!-- set to INCLUDE for rc, + set to IGNORE for development or + release --> +<!ENTITY % relnum "11.1"><!-- must be given for release or rc --> +<!ENTITY % reldate "March 1st, 2022"><!-- must ve given for release or rc --> +<!ENTITY % crdate "1999-2022"><!-- must ve given for release or rc --> +<!ENTITY % rcnum "2"><!-- must be given only for rc --> +<!-- ================================================================== --> +<!-- Do not change anything below unless the www or book layouts change --> + +<!-- Automatically generated by git-version.sh. Used for release or dev --> +<!ENTITY % conditional-entities SYSTEM "conditional.ent"> +%conditional-entities; + +<![ %development; [ +<!-- version info automatically generated by git --> <!ENTITY % version-entities SYSTEM "version.ent"> %version-entities; +<![ %sysv; [ +<!ENTITY short-version "svn"> <!-- Used below in &blfs-book; --> +<!ENTITY errata "&lfs-root;lfs/errata/development/"> +]]> +<![ %systemd; [ +<!ENTITY short-version "systemd"> <!-- Used below in &blfs-book; --> +<!ENTITY errata "&lfs-root;lfs/errata/systemd/"> +]]> +<!ENTITY generic-version "development"> <!-- Used below in + &patches-root;, + &donwloads-root;, and + &test-results; --> +]]><!-- End %development --> -<!-- uncomment and edit the following four lines - for releases (including -rc) --> -<!-- -<!ENTITY version "10.2-rc1"> -<!ENTITY versiond "10.2-systemd-rc1"> -<!ENTITY releasedate "August 26th, 2021"> -<!ENTITY copyrightdate "1999-2021"> ---> - -<!ENTITY short-version "svn"> <!-- Used below in &blfs-book; - Change to x.y for release but not -rc releases --> -<!ENTITY generic-version "development"> <!-- Use "development" or "x.y[-pre{x}]" --> +<![ %release; [ +<![ %sysv; [ +<!ENTITY version "%relnum;"> +<!ENTITY short-version "%relnum;"> <!-- Used below in &blfs-book; --> +]]> +<![ %systemd; [ +<!ENTITY version "%relnum;-systemd"> +<!ENTITY short-version "stable-systemd"> <!-- Used below in &blfs-book; --> +]]> +<!ENTITY errata "&lfs-root;lfs/errata/&version;/"> +<!ENTITY generic-version "%relnum;"> <!-- Used below in + &patches-root;, + &donwloads-root;, and + &test-results; --> +<!ENTITY releasedate "%reldate;"> +<!ENTITY copyrightdate "%crdate;"> +]]> -<!ENTITY short-versiond "systemd"> <!--Change to stable-systemd for release --> -<!ENTITY generic-versiond "systemd"> +<![ %rc; [ +<![ %sysv; [ +<!ENTITY version "%relnum;-rc%rcnum;"> +<!ENTITY short-version "svn"> <!-- Used below in &blfs-book; --> +]]> +<![ %systemd; [ +<!ENTITY version "%relnum;-systemd-rc%rcnum;"> +<!ENTITY short-version "systemd"> <!-- Used below in &blfs-book; --> +]]> +<!ENTITY errata "&lfs-root;lfs/errata/&version;/"> +<!ENTITY generic-version "%relnum;-rc%rcnum;"> <!-- Used below in + &patches-root;, + &downloads-root;, and + &test-results; --> +<!ENTITY releasedate "%reldate;"> +<!ENTITY copyrightdate "%crdate;"> +]]> <!ENTITY lfs-root "https://www.linuxfromscratch.org/"> <!ENTITY blfs-root "&lfs-root;blfs/"> <!ENTITY blfs-book "&blfs-root;view/&short-version;/"> -<!ENTITY blfs-systemd-book "&blfs-root;view/&short-versiond;/"> <!ENTITY faq-root "&lfs-root;faq/"> <!ENTITY hints-root "&lfs-root;hints/downloads/files/"> <!ENTITY hints-index "&lfs-root;hints/list.html"> <!ENTITY patches-root "&lfs-root;patches/lfs/&generic-version;/"> +<!-- Only used for sysv (lfs-bootscripts): --> <!ENTITY downloads-root "&lfs-root;lfs/downloads/&generic-version;/"> <!ENTITY livecd-root "&lfs-root;livecd/"> <!ENTITY test-results "&lfs-root;lfs/build-logs/&generic-version;/"> -<!ENTITY errata "&lfs-root;lfs/errata/&generic-version;/"> <!ENTITY secadv "&lfs-root;lfs/advisories/"> <!ENTITY min-kernel "3.2"> - +<!-- <!ENTITY patches-rootd "&lfs-root;patches/lfs/&generic-versiond;/"> <!ENTITY downloads-rootd "&lfs-root;lfs/downloads/&generic-versiond;/"> <!ENTITY test-resultsd "&lfs-root;lfs/build-logs/&generic-versiond;/"> <!ENTITY erratad "&lfs-root;lfs/errata/&generic-versiond;/"> - +--> <!ENTITY lfs-ticket-root "https://wiki.linuxfromscratch.org/lfs/ticket/"> <!ENTITY anduin-sources "https://anduin.linuxfromscratch.org/LFS"> diff --git a/git-version.sh b/git-version.sh index ff0eb6cdd..8f5cdb33b 100755 --- a/git-version.sh +++ b/git-version.sh @@ -1,10 +1,28 @@ #!/bin/sh +if [ "$1" = sysv ]; then + SYSV="INCLUDE" + SYSTEMD="IGNORE " +elif [ "$1" = systemd ]; then + SYSV="IGNORE " + SYSTEMD="INCLUDE" +else + echo You must provide either \"sysv\" or \"systemd\" as argument + exit 1 +fi + +echo "<!ENTITY % sysv \"$SYSV\">" > conditional.ent +echo "<!ENTITY % systemd \"$SYSTEMD\">" >> conditional.ent + if ! git status > /dev/null; then # Either it's not a git repository, or git is unavaliable. # Just workaround. - echo "<!ENTITY version \"unknown\">" > version.ent - echo "<!ENTITY versiond \"unknown-systemd\">" >> version.ent + echo "<![ %sysv; [" > version.ent + echo "<!ENTITY version \"unknown\">" >> version.ent + echo "]]>" >> version.ent + echo "<![ %systemd; [" >> version.ent + echo "<!ENTITY version \"unknown-systemd\">" >> version.ent + echo "]]>" >> version.ent echo "<!ENTITY releasedate \"unknown\">" >> version.ent echo "<!ENTITY copyrightdate \"1999-2021\">" >> version.ent exit 0 @@ -41,7 +59,11 @@ if [ "$(git diff HEAD | wc -l)" != "0" ]; then versiond="$versiond+" fi -echo "<!ENTITY version \"$version\">" > version.ent -echo "<!ENTITY versiond \"$versiond\">" >> version.ent +echo "<![ %sysv; [" > version.ent +echo "<!ENTITY version \"$version\">" >> version.ent +echo "]]>" >> version.ent +echo "<![ %systemd; [" >> version.ent +echo "<!ENTITY version \"$versiond\">" >> version.ent +echo "]]>" >> version.ent echo "<!ENTITY releasedate \"$full_date\">" >> version.ent echo "<!ENTITY copyrightdate \"1999-$year\">" >> version.ent diff --git a/make-aux-files.sh b/make-aux-files.sh index 785ec1b64..27a8674f4 100755 --- a/make-aux-files.sh +++ b/make-aux-files.sh @@ -3,7 +3,7 @@ rm -f lfs-bootscripts*.tar.?z* # Get base file name and move bootscripts directory to that name -version=`grep "ENTITY lfs-bootscripts-version" packages.ent |cut -d'"' -f2` +version=`grep "ENTITY lfs-bootscripts-version" packages.ent | head -n1| cut -d'"' -f2` mv bootscripts lfs-bootscripts-$version # Create the tarball and clean up diff --git a/patches.ent b/patches.ent index d1277e9a1..5bf6f3f36 100644 --- a/patches.ent +++ b/patches.ent @@ -72,10 +72,26 @@ <!ENTITY perl-fix-patch-md5 "fb42558b59ed95ee00eb9f1c1c9b8056"> <!ENTITY perl-fix-patch-size "1.6 KB"> +<![ %sysv; [ <!ENTITY sysvinit-consolidated-patch "sysvinit-&sysvinit-version;-consolidated-1.patch"> <!ENTITY sysvinit-consolidated-patch-md5 "4900322141d493e74020c9cf437b2cdc"> <!ENTITY sysvinit-consolidated-patch-size "2.4 KB"> +]]> +<![ %systemd; [ +<!ENTITY sysvinit-consolidated-patch "not-used"> +<!ENTITY sysvinit-consolidated-patch-md5 "not-used"> +<!ENTITY sysvinit-consolidated-patch-size "not-used"> +]]> + +<![ %systemd; [ <!ENTITY systemd-upstream-fixes-patch "systemd-&systemd-version;-upstream_fixes-1.patch"> <!ENTITY systemd-upstream-fixes-patch-md5 "a4449dedf514486b8995ee501d1bb8cc"> <!ENTITY systemd-upstream-fixes-patch-size "4 KB"> +]]> + +<![ %sysv; [ +<!ENTITY systemd-upstream-fixes-patch "not-used"> +<!ENTITY systemd-upstream-fixes-patch-md5 "not-used"> +<!ENTITY systemd-upstream-fixes-patch-size "not-used"> +]]> diff --git a/prologue/bookinfo.xml b/prologue/bookinfo.xml index 73d06410d..18ba29e02 100644 --- a/prologue/bookinfo.xml +++ b/prologue/bookinfo.xml @@ -7,8 +7,7 @@ <bookinfo> <title>Linux From Scratch</title> - <subtitle revision='sysv' >Version &version; </subtitle> - <subtitle revision='systemd'>Version &versiond;</subtitle> + <subtitle>Version &version;</subtitle> <subtitle>Published &releasedate;</subtitle> <authorgroup> diff --git a/prologue/errata.xml b/prologue/errata.xml index 2ecf71555..fa919bcca 100644 --- a/prologue/errata.xml +++ b/prologue/errata.xml @@ -15,8 +15,7 @@ the LFS book has been released. To check whether the package versions or instructions in this release of LFS need any modifications to accommodate security vulnerabilities or other bug fixes, please visit - <ulink revision="sysv" url="&errata;"/> - <ulink revision="systemd" url="&erratad;"/> + <ulink url="&errata;"/> before proceeding with your build. You should note any changes shown and apply them to the relevant section of the book as you progress with building the LFS system.</para> |