Changeset bd90b9b


Ignore:
Timestamp:
09/01/2021 09:08:49 AM (5 months ago)
Author:
Pierre Labastie <pierre.labastie@…>
Branches:
multilib, trunk
Children:
615f5b8
Parents:
3443abb
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

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

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

    r3443abb rbd90b9b  
     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">
     
    1422<!-- jhalfs needs a literal dash, not &ndash; -->
    1523
     24<![ %sysv; [
    1625<!ENTITY short-version   "svn">  <!-- Used below in &blfs-book;
    1726                                      Change to x.y for release but not -rc releases -->
    1827<!ENTITY generic-version "development"> <!-- Use "development"  or "x.y[-pre{x}]" -->
    19 
    20 <!ENTITY short-versiond  "systemd">  <!--Change to stable-systemd for release  -->
    21 <!ENTITY generic-versiond "systemd">
     28]]>
     29<![ %systemd; [
     30<!ENTITY short-version  "systemd">  <!--Change to stable-systemd for release  -->
     31<!ENTITY generic-version "systemd">
     32]]>
    2233
    2334<!ENTITY lfs-root        "https://www.linuxfromscratch.org/">
    2435<!ENTITY blfs-root       "&lfs-root;blfs/">
    2536<!ENTITY blfs-book       "&blfs-root;view/&short-version;/">
    26 <!ENTITY blfs-systemd-book "&blfs-root;view/&short-versiond;/">
     37<!ENTITY blfs-book       "&blfs-root;view/&short-version;/">
    2738<!ENTITY faq-root        "&lfs-root;faq/">
    2839<!ENTITY hints-root      "&lfs-root;hints/downloads/files/">
     
    3546<!ENTITY secadv          "&lfs-root;lfs/advisories/">
    3647<!ENTITY min-kernel      "3.2">
    37 
     48<!--
    3849<!ENTITY patches-rootd   "&lfs-root;patches/lfs/&generic-versiond;/">
    3950<!ENTITY downloads-rootd "&lfs-root;lfs/downloads/&generic-versiond;/">
    4051<!ENTITY test-resultsd   "&lfs-root;lfs/build-logs/&generic-versiond;/">
    4152<!ENTITY erratad         "&lfs-root;lfs/errata/&generic-versiond;/">
    42 
     53-->
    4354<!ENTITY lfs-ticket-root "https://wiki.linuxfromscratch.org/lfs/ticket/">
    4455
  • git-version.sh

    r3443abb rbd90b9b  
    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.