Changeset 4467b18d


Ignore:
Timestamp:
09/22/2021 09:11:52 PM (3 years ago)
Author:
Pierre Labastie <pierre.labastie@…>
Branches:
11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, arm, bdubbs/gcc13, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
784fdaed
Parents:
2f14259
git-author:
Pierre Labastie <pierre.labastie@…> (09/01/2021 09:08:49 AM)
git-committer:
Pierre Labastie <pierre.labastie@…> (09/22/2021 09:11:52 PM)
Message:

Add a conditional entity for sysv/systemd

This removes the need for versiond, and other xxxd entities. Those
entities will be removed in the next commits.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • .gitignore

    r2f14259 r4467b18d  
    11lfs-bootscripts-*.tar.xz
     2conditional.ent
    23version.ent
    34appendices/*.script
  • Makefile

    r2f14259 r4467b18d  
    190190
    191191version:
    192         $(Q)./git-version.sh
     192        $(Q)./git-version.sh $(REV)
    193193
    194194#dump-commands: validate
  • general.ent

    r2f14259 r4467b18d  
     1<!-- Automatically generated by git-version.sh -->
     2<!ENTITY % conditional-entities SYSTEM "conditional.ent">
     3%conditional-entities;
     4
    15<!-- version info automatically generated by git
    2      comment the following two lines for release -->
     6     comment out the following two lines for release -->
    37<!ENTITY % version-entities SYSTEM "version.ent">
    48%version-entities;
     
    711     for releases (including -rc) -->
    812<!--
     13<![ %sysv; [
    914<!ENTITY version         "10.2-rc1">
    10 <!ENTITY versiond        "10.2-systemd-rc1">
     15]]>
     16<![ %systemd; [
     17<!ENTITY version         "10.2-systemd-rc1">
     18]]>
    1119<!ENTITY releasedate     "August 26th, 2021">
    1220<!ENTITY copyrightdate   "1999-2021">
    1321-->
    1422
    15 <!ENTITY short-version   "svn">  <!-- Used below in &blfs-book;
     23<![ %sysv; [
     24<!ENTITY short-version   "svn">  <!-- Used below in &blfs-book;
    1625                                      Change to x.y for release but not -rc releases -->
    1726<!ENTITY generic-version "development"> <!-- Use "development"  or "x.y[-pre{x}]" -->
    18 
    19 <!ENTITY short-versiond  "systemd">  <!--Change to stable-systemd for release  -->
    20 <!ENTITY generic-versiond "systemd">
     27]]>
     28<![ %systemd; [
     29<!ENTITY short-version  "systemd">  <!--Change to stable-systemd for release  -->
     30<!ENTITY generic-version "systemd">
     31]]>
    2132
    2233<!ENTITY lfs-root        "https://www.linuxfromscratch.org/">
    2334<!ENTITY blfs-root       "&lfs-root;blfs/">
    2435<!ENTITY blfs-book       "&blfs-root;view/&short-version;/">
    25 <!ENTITY blfs-systemd-book "&blfs-root;view/&short-versiond;/">
     36<!ENTITY blfs-book       "&blfs-root;view/&short-version;/">
    2637<!ENTITY faq-root        "&lfs-root;faq/">
    2738<!ENTITY hints-root      "&lfs-root;hints/downloads/files/">
     
    3445<!ENTITY secadv          "&lfs-root;lfs/advisories/">
    3546<!ENTITY min-kernel      "3.2">
    36 
     47<!--
    3748<!ENTITY patches-rootd   "&lfs-root;patches/lfs/&generic-versiond;/">
    3849<!ENTITY downloads-rootd "&lfs-root;lfs/downloads/&generic-versiond;/">
    3950<!ENTITY test-resultsd   "&lfs-root;lfs/build-logs/&generic-versiond;/">
    4051<!ENTITY erratad         "&lfs-root;lfs/errata/&generic-versiond;/">
    41 
     52-->
    4253<!ENTITY lfs-ticket-root "https://wiki.linuxfromscratch.org/lfs/ticket/">
    4354
  • git-version.sh

    r2f14259 r4467b18d  
    11#!/bin/sh
     2
     3if [ "$1" = sysv ]; then
     4        SYSV="INCLUDE"
     5        SYSTEMD="IGNORE "
     6elif [ "$1" = systemd ]; then
     7        SYSV="IGNORE "
     8        SYSTEMD="INCLUDE"
     9else
     10        echo You must provide either \"sysv\" or \"systemd\" as argument
     11        exit 1
     12fi
     13
     14echo "<!ENTITY % sysv    \"$SYSV\">"     >  conditional.ent
     15echo "<!ENTITY % systemd \"$SYSTEMD\">"  >> conditional.ent
    216
    317if ! git status > /dev/null; then
    418        # Either it's not a git repository, or git is unavaliable.
    519        # Just workaround.
    6         echo "<!ENTITY version           \"unknown\">"         >  version.ent
    7         echo "<!ENTITY versiond          \"unknown-systemd\">" >> version.ent
     20        echo "<![ %sysv; ["                                    >  version.ent
     21        echo "<!ENTITY version           \"unknown\">"         >> version.ent
     22        echo "]]>"                                             >> version.ent
     23        echo "<![ %systemd; ["                                 >> version.ent
     24        echo "<!ENTITY version           \"unknown-systemd\">" >> version.ent
     25        echo "]]>"                                             >> version.ent
    826        echo "<!ENTITY releasedate       \"unknown\">"         >> version.ent
    927        echo "<!ENTITY copyrightdate     \"1999-2021\">"       >> version.ent
     
    4260fi
    4361
    44 echo "<!ENTITY version           \"$version\">"            >  version.ent
    45 echo "<!ENTITY versiond          \"$versiond\">"           >> version.ent
     62echo "<![ %sysv; ["                                        >  version.ent
     63echo "<!ENTITY version           \"$version\">"            >> version.ent
     64echo "]]>"                                                 >> version.ent
     65echo "<![ %systemd; ["                                     >> version.ent
     66echo "<!ENTITY version          \"$versiond\">"            >> version.ent
     67echo "]]>"                                                 >> version.ent
    4668echo "<!ENTITY releasedate       \"$full_date\">"          >> version.ent
    4769echo "<!ENTITY copyrightdate     \"1999-$year\">"          >> version.ent
Note: See TracChangeset for help on using the changeset viewer.