On 05/23/2016 05:55 PM, Bruce Dubbs wrote:
DJ Lucas wrote:
On 05/22/2016 01:31 PM, Bruce Dubbs wrote:
DJ Lucas wrote:
I might have missed the first message here. I had a minor issue with my
mail filter (after moving my mail host last week) and it was right
around
the time the second message came in. Are you discussing merging the
books,
or moving to profiled XML to make two targets from one source?
Two targets from one source so we can share those files that are the
same for both books.
What I had in mind is a different indexd.xml for the systemd book along
with a systemd target in the Makefile. I want to try to prototype this
today in a new branch. If I get it working I'll commit that branch for
further review. For file naming, I plan to just append a 'd' to the
different files, ie indexd.xml vs index.xml.
If it works out, it should make the maintenance work for the systemd
version of the book a lot easier.
It should, and avoids adding anything specific for each book directly in
the XML source as proposed here:
http://archive.linuxfromscratch.org/mail-archives/blfs-dev/2014-February/026800.html
The part I had no creative ideas about was the split changelog (ie:
having
to put changes in both changelogs), which is why I had ultimately
suggested the above simple changes.
I see what is being suggested, and I did get it to work. What I did was
to add an attribute to a tag, for example I added the following to the
changelog:
<para revision="systemd">A test</para>
And then I changed the build instructions in the Makefile to:
$(Q)xsltproc --nonet \
--output $(RENDERTMP)/lfs-html2.xml \
--stringparam profile.revision sysv \
stylesheets/lfs-xsl/profile.xsl \
$(RENDERTMP)/lfs-html.xml
xsltproc --nonet \
--stringparam chunk.quietly $(CHUNK_QUIET) \
--stringparam rootid "$(ROOT_ID)" \
--stringparam base.dir $(BASEDIR)/ \
stylesheets/lfs-chunked.xsl \
$(RENDERTMP)/lfs-html.xml
The book still builds, and the test paragraph is missing. If I change
the two instances of sysv above to systemd, then the paragraph prints.
My knowledge of xsl is still pretty weak but here are some references I
have been using:
http://www.dpawson.co.uk/docbook/markup.html#ConditionalText
http://www.sagehill.net/docbookxsl/AlternateText.html#ProfileFilter
------
In other areas, I've been able to merge the two books in a bit more
cumbersome method than the above. I had to have separate systemd pages
for about 30 out of 255 xml files. With the above, I should be able to
reduce those 30 separate pages substantially.
I'd be leery of littering the books with it. I mean, it's fine
technically, I just didn't want to increase the work for the guys not
already working on systemd. I don't know if it's overstepping, but if we
were to bring trunk into line with the build order of systemd, it might
reduce a handful of those, as well as combining text in the few
instances where we can.
For the change log, it appears we just need to add the appropriate
revision= to the entries for those that only affect one book.
You'll also need to do that at <itemizedlist> on days when there is only
an entry for one or the other book. First instance of this will possibly
be in a few days...still holding on systemd-230 for a few more days at
least, waiting to see if upstream handles the potential of a security
issue, or if they expect distributions to write a policy to handle it.
My goal is to just run 'make' to build the sysv book and 'make systemd'
for the other. I think the method may work for BLFS also.
-- Bruce
Excellent! Above will work, I worry about jhalfs now though. I don't
know much about it, but IIUC, jhalfs will have to do a first pass with
xsltproc now, and obviously, config entries have to be added and what
not. I've never used BLFS-tool either. Also, minor stuff...I'd change
the make target for sysv and just depend "all:" on it, so that if a
person who normally runs systemd build accidentally does "make sysv" it
still works, but so does plain make, just add another make target for
the existing with sysv: as a dependency so not to break anything else in
the Makefile and done.
--DJ
--
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page