openSUSE / daps

DocBook Authoring and Publishing Suite (DAPS)
https://openSUSE.github.io/daps
Other
62 stars 19 forks source link

daps fails when building assemblies on Debian #726

Closed tbazant closed 6 months ago

tbazant commented 10 months ago

Problem description

i'm running daps on debian stable 12, sources taken from 4.0beta2 branch, updated geekodoc, docbook5 and docbook-xsl packages to use the latest code. When running

STYLEASSEMBLY=/usr/share/xml/docbook/stylesheet/nwalsh5/current/assembly/assemble.xsl \
daps -vvv --debug --styleroot /home/tbazant/devel/suse-xsl/suse2022-ns/ -d DC-alp-dolomite html

the result fails on

---------------

        DAPS VERSION: 4.0.beta1

                BOOK: alp-dolomite
                MAIN: /home/tbazant/doc/doc-modular/articles/alp-dolomite.asm.xml
           BUILD_DIR: /home/tbazant/doc/doc-modular/build
            DAPSROOT: /usr/share/daps
             DOCCONF: /home/tbazant/doc/doc-modular/DC-alp-dolomite
             PRJ_DIR: /home/tbazant/doc/doc-modular
             SRC_DIR: /home/tbazant/doc/doc-modular/articles
         IMG_SRC_DIR: /home/tbazant/doc/doc-modular/images

       PROFCONDITION: alp-deployment-all
              PROFOS: alp-dolomite

     DOCBOOK_VERSION: 5
        DOCBOOK5_RNG: /usr/share/xml/geekodoc/rng/2_5.2/geekodoc-v2-flat.rng
        DBSTYLE_VERS: snapshot

           STYLEROOT: /home/tbazant/devel/suse-xsl/suse2022-ns
      STYLEROOT_VERS: '@@#version@@'
  FALLBACK_STYLEROOT: /usr/share/xml/docbook/stylesheet/docbook-xsl-ns
   FB_STYLEROOT_VERS: Not available
            EPUB_CSS: 
            HTML_CSS: 

       PDF FORMATTER: fop
[warning] /usr/bin/fop: JVM flavor 'sun' not understood
   FORMATTER VERSION: FOP Version 2.8
   FORMATTER WRAPPER: /usr/share/daps/libexec/daps-fop
    FORMATTER CONFIG: /etc/daps/fop/fop-daps.xml

            MAKE_CMD: /usr/bin/remake -f /usr/share/daps/make/selector.mk --debug=b -j4 --always-make html 
       XSLTPROCESSOR: /usr/bin/xsltproc
   XML_CATALOG_FILES: /etc/xml/catalog

---------------

Reading makefiles...
Updating makefiles...
Updating goal targets...
 File 'html' does not exist.
   File '/home/tbazant/doc/doc-modular/build/alp-dolomite/html/alp-dolomite/index.html' does not exist.
      Must remake target '/home/tbazant/doc/doc-modular/build/.profiled/alp-deployment-all_alp-dolomite'.
mkdir -p /home/tbazant/doc/doc-modular/build/.profiled/alp-deployment-all_alp-dolomite
   File 'list-images-multisrc' does not exist.
  Must remake target 'list-images-multisrc'.
  Successfully remade target file 'list-images-multisrc'.
   File 'list-images-missing' does not exist.
  Must remake target 'list-images-missing'.
  Successfully remade target file 'list-images-missing'.
   File 'copy_static_images_html' does not exist.
    Must remake target '/home/tbazant/doc/doc-modular/build/alp-dolomite/html/alp-dolomite/static'.
mkdir -p /home/tbazant/doc/doc-modular/build/alp-dolomite/html/alp-dolomite/static
 File 'html' does not exist.
   File '/home/tbazant/doc/doc-modular/build/alp-dolomite/html/alp-dolomite/index.html' does not exist.
    Must remake target '/home/tbazant/doc/doc-modular/build/.profiled/alp-deployment-all_alp-dolomite/alp-dolomite.asm.xml'.
   File 'copy_static_images_html' does not exist.
 File 'html' does not exist.
   File '/home/tbazant/doc/doc-modular/build/alp-dolomite/html/alp-dolomite/index.html' does not exist.
   File 'copy_static_images_html' does not exist.
  Must remake target 'copy_static_images_html'.
tar cph --exclude-vcs -C /home/tbazant/devel/suse-xsl/suse2022-ns/ static | \
  (cd /home/tbazant/doc/doc-modular/build/alp-dolomite/html/alp-dolomite; tar xpv) >/dev/null
   Profiling /home/tbazant/doc/doc-modular/articles/alp-dolomite.asm.xml
/usr/share/daps/libexec/daps-xslt --output /home/tbazant/doc/doc-modular/build/.profiled/alp-deployment-all_alp-dolomite/alp-dolomite.asm.xml --stringparam "profile.condition=alp-deployment-all" --stringparam "profile.os=alp-dolomite" --param "show.comments=0"  \
  --stringparam "filename=alp-dolomite.asm.xml" \
  --stylesheet file:///usr/share/xml/daps/stylesheet/profiling/docbook51-profile.xsl --file /home/tbazant/doc/doc-modular/articles/alp-dolomite.asm.xml /usr/bin/xsltproc
 File 'html' does not exist.
   File '/home/tbazant/doc/doc-modular/build/alp-dolomite/html/alp-dolomite/index.html' does not exist.
 File 'html' does not exist.
   File '/home/tbazant/doc/doc-modular/build/alp-dolomite/html/alp-dolomite/index.html' does not exist.
     Prerequisite '/home/tbazant/doc/doc-modular/build/.profiled/alp-deployment-all_alp-dolomite/alp-dolomite.asm.xml' is newer than target '/home/tbazant/doc/doc-modular/build/.profiled/alp-deployment-all_alp-dolomite/.validate'.
    Must remake target '/home/tbazant/doc/doc-modular/build/.profiled/alp-deployment-all_alp-dolomite/.validate'.
   Validating...
   Successfully validated profiled sources.
 File 'html' does not exist.
   File '/home/tbazant/doc/doc-modular/build/alp-dolomite/html/alp-dolomite/index.html' does not exist.
  Must remake target '/home/tbazant/doc/doc-modular/build/alp-dolomite/html/alp-dolomite/index.html'.
Creating HTML pages
/usr/share/daps/libexec/daps-xslt --param "show.comments=0" --param "use.id.as.filename=1" --stringparam "base.dir=/home/tbazant/doc/doc-modular/build/alp-dolomite/html/alp-dolomite/" --stringparam "draft.mode=no" --stringparam "img.src.path=images/"   --stringparam "converter.name=DAPS" --stringparam "converter.version=4.0.beta1" --stringparam "converter.url=https://opensuse.github.io/daps" \
     \
          --xinclude --stylesheet /home/tbazant/devel/suse-xsl/suse2022-ns/xhtml/chunk.xsl \
  --file /home/tbazant/doc/doc-modular/build/.profiled/alp-deployment-all_alp-dolomite/alp-dolomite.asm.xml /usr/bin/xsltproc  
Element assembly in namespace 'http://docbook.org/ns/docbook' encountered, but no template matches.
Element resources in namespace 'http://docbook.org/ns/docbook' encountered in assembly, but no template matches.

the last line is repeated many times. In the output directory /home/tbazant/doc/doc-modular/build/alp-dolomite/html/alp-dolomite/, there is no index.html file.

When manually running

xsltproc --output /tmp/alp-dolomite.xml  \
/usr/share/xml/docbook/stylesheet/nwalsh5/current/assembly/assemble.xsl articles/alp-dolomite.asm.xml

the result is successfull

Expected behavior

daps recognizes which templates to match for transforming the source and produces a valid doc tree with corresponding content.

Steps to reproduce problem

always

tbazant commented 10 months ago

i've dug a little deeper and the /usr/share/daps/libexec/daps-xslt command above runs the following command in fact:

/usr/bin/xsltproc  --xinclude  --stringparam converter.url "https://opensuse.github.io/daps" --stringparam converter.version "4.0.beta1" --stringparam converter.name "DAPS" --stringparam img.src.path "images/" --stringparam draft.mode "no" --stringparam base.dir "/home/tbazant/doc/doc-modular/build/alp-dolomite/html/alp-dolomite/" --stringparam use.id.as.filename "1" --stringparam show.comments "0"  /usr/share/xml/docbook/stylesheet/suse2022-ns/xhtml/chunk.xsl /home/tbazant/doc/doc-modular/build/.profiled/alp-deployment-all_alp-dolomite/alp-dolomite.asm.xml

but there is a glitch: the file /home/tbazant/doc/doc-modular/build/.profiled/alp-deployment-all_alp-dolomite/alp-dolomite.asm.xml should be a profiled bigfile, but it is not. it is the original assembly file only.

tbazant commented 10 months ago

i also tried manual steps:

# xsltproc --output /tmp/bigfile.xml /usr/share/xml/docbook/stylesheet/nwalsh/assembly/assemble.xsl articles/alp-dolomite.asm.xml 
# xsltproc --output /tmp/profiled_bigfile.xml --stringparam profile.os "alp-dolomite" /usr/share/daps/daps-xslt/profiling/docbook51-profile.xsl /tmp/bigfile.xml
# xsltproc /usr/share/xml/docbook/stylesheet/suse2022-ns/xhtml/chunk.xsl /tmp/profiled_bigfile.xml

and it works just fine, hope this helps

dmpop commented 9 months ago

This bug has my upvote!

tbazant commented 6 months ago

@fsundermeyer the problem here is that daps cannot compile a bigfile for assemblies on debian. can you outline to me what daps does or which files it calls to create a bigfile? i may be able to identify the problem myself ?!?

fsundermeyer commented 6 months ago

Fixed with 872b4719d9d306428452