Opened 3 years ago

Closed 3 years ago

#4924 closed task (fixed)

Use conditional XML to simplify systemd vs sysv

Reported by: pierre Owned by: lfs-book
Priority: normal Milestone: 11.1
Component: Book Version: git
Severity: normal Keywords:
Cc:

Description

An implementation proposal is in branch plabs/condxml. Basically, the entity &version; is set to svn (legacy for sysv) or systemd based on the value of entities &sysv; and &systemd;, which are set to INCLUDE or IGNORE in the file conditional.ent (INCLUDE and IGNORE are the only values possible for conditional in dtd's). This file itself is generated by git-version.sh, which receives the REV makefile variable as an argument.

With this, any use of versiond vs version is removed. All links to the BLFS book automatically point to the right revision.

Also, the conditional may be used in packages.ent, so that only the needed packages are used in wget-list.

Change History (8)

comment:1 by pierre, 3 years ago

The aim of this ticket is to have it reviewed. It works well for the development version, but I am not sure what modifications exactly have to be done for releases. We may want to add a few comments...

comment:2 by pierre, 3 years ago

Note that using conditionals with &release; and &development; set to INCLUDE/IGNORE according to what we want, might reduce the amount of editing of general.ent when doing a release (and automate it in some way: just set release to INCLUDE and development to IGNORE and set the release number. We might have a third entity rc-release if something is different for a rc...

comment:3 by Bruce Dubbs, 3 years ago

Looking at git-version.sh, why are we using TZ=US/Pacific?

I will note that the currency scripts depend on wget-list having ALL the files.

I think it is a little problematic that the md5sums file is specific to the book version and has the same name for both versions.

Here are the version specific files and their sizes:

sysV
  eudev              2    MB
  lfs-bootscripts    0.03 MB
  sysklogd           0.1  MB
  sysvinit           0.1  MB
  udev-lfs           0.01 MB

systemd
  jinja2             0.3  MB
  markupsafe         0.02 MB
  dbus               2    MB
  systemd           10    MB
  systemd-manpages   0.6  MB

Downloading an extra 5 files when using wget-list or in the file mirrors tarballs (about 444 MB total) is negligible. The extra files do not show up in the list of individual files for each book.

I will also note that eudev may go away for sysV and make systemd required for both books. That would make the extra files for systemd neglitible and for sysV less than 3 MB.

I am OK with a note in Section 3.1 of the book that says the wget-list downloads a consolidated list of packages for both variations of the book.

in reply to:  3 ; comment:4 by Xi Ruoyao, 3 years ago

Replying to Bruce Dubbs:

Looking at git-version.sh, why are we using TZ=US/Pacific?

So each editor will see same date. If we don't have TZ= we'll see different dates in our locally rendered book.

comment:5 by pierre, 3 years ago

In branch plabs/condxml, I've removed the conditionals in packages.ent, so that the same consolidated wget-list is generated for both books.

comment:6 by pierre, 3 years ago

I've tested differences between books in the following way:

# clone the git lfs repo if not done yet
# we suppose we are on branch trunk
make BASEDIR=~/LFS-TRUNK-SYSV
make BASEDIR=~/LFS-TRUNK-SYSTEMD REV=systemd
# change to the plabs/condxml branch
git checkout plabs/conxml # sets local branch to follow remote
make BASEDIR=~/LFS-CONDXML-SYSV
make BASEDIR=~/LFS-CONDXML-SYSTEMD REV=systemd
# do a diff, removing (almost) all changes in version
diff -ur  -Ir11.0 ~/LFS-TRUNK-SYSV ~/LFS-CONDXML-SYSV | less
# the above should only have changes in generated indices, and
# in some places where <phrase> is used in trunk
diff -ur  -Ir11.0 ~/LFS-TRUNK-SYSTEMD ~/LFS-CONDXML-SYSTEMD | less
# in addition, the above should show all the places where the
# sysv (svn) BLFS book is referenced in the LFS systemd book.

in reply to:  4 comment:7 by Bruce Dubbs, 3 years ago

Replying to Xi Ruoyao:

Replying to Bruce Dubbs:

Looking at git-version.sh, why are we using TZ=US/Pacific?

So each editor will see same date. If we don't have TZ= we'll see different dates in our locally rendered book.

We don't have any editors in that TZ. Personally I'd prefer to use Chicago (3 editors) or GMT.

comment:8 by pierre, 3 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.