asciidoc currently broken: fix it

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

asciidoc currently broken: fix it

David Coppa
Hi,

Just found that asciidoc is broken on a clean box.

Here's what I get trying to build x11/i3bar:

gmake -C doc
gmake[1]: Entering directory `/usr/ports/pobj/i3bar-0.6.21/i3bar-0.6.21/doc'
/usr/local/bin/a2x.py -f manpage i3bar.man
a2x: ERROR: xmllint --nonet --noout --valid /usr/ports/pobj/i3bar-0.6.21/i3bar-0.6.21/doc/i3bar.xml returned non-zero exit status 4
gmake[1]: *** [i3bar.1] Error 1

This is because:

$ xmllint --nonet --noout --valid /usr/ports/pobj/i3bar-0.6.21/i3bar-0.6.21/doc/i3bar.xml
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
/usr/ports/pobj/i3bar-0.6.21/i3bar-0.6.21/doc/i3bar.xml:2: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
D DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
                                                                               ^
/usr/ports/pobj/i3bar-0.6.21/i3bar-0.6.21/doc/i3bar.xml:5: validity error : Validation failed: no DTD found !
<refentry lang="en">

                   ^


The following diff fixes it for me.
OK?

Index: Makefile
===================================================================
RCS file: /cvs/ports/textproc/asciidoc/Makefile,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile
--- Makefile 15 Jan 2011 22:29:18 -0000 1.12
+++ Makefile 27 Apr 2011 09:44:07 -0000
@@ -3,6 +3,7 @@
 COMMENT= text document format for writing documents and man pages
 
 DISTNAME= asciidoc-8.6.3
+REVISION= 0
 CATEGORIES= textproc
 
 MAINTAINER= Robert Nagy <[hidden email]>
@@ -18,7 +19,9 @@ PERMIT_DISTFILES_FTP= Yes
 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=asciidoc/}
 
 MODULES= lang/python
-RUN_DEPENDS= textproc/libxslt
+RUN_DEPENDS= textproc/libxslt \
+ textproc/docbook \
+ textproc/docbook-xsl
 
 MODPY_ADJ_FILES=a2x.py \
  asciidoc.py \

Reply | Threaded
Open this post in threaded view
|

Re: asciidoc currently broken: fix it

David Coppa
On Wed, 27 Apr 2011, David Coppa wrote:

> Hi,
>
> Just found that asciidoc is broken on a clean box.
>
> Here's what I get trying to build x11/i3bar:
>
> gmake -C doc
> gmake[1]: Entering directory `/usr/ports/pobj/i3bar-0.6.21/i3bar-0.6.21/doc'
> /usr/local/bin/a2x.py -f manpage i3bar.man
> a2x: ERROR: xmllint --nonet --noout --valid /usr/ports/pobj/i3bar-0.6.21/i3bar-0.6.21/doc/i3bar.xml returned non-zero exit status 4
> gmake[1]: *** [i3bar.1] Error 1
>
> This is because:
>
> $ xmllint --nonet --noout --valid /usr/ports/pobj/i3bar-0.6.21/i3bar-0.6.21/doc/i3bar.xml
> I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
> /usr/ports/pobj/i3bar-0.6.21/i3bar-0.6.21/doc/i3bar.xml:2: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
> D DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
>                                                                                ^
> /usr/ports/pobj/i3bar-0.6.21/i3bar-0.6.21/doc/i3bar.xml:5: validity error : Validation failed: no DTD found !
> <refentry lang="en">
>
>                    ^
>
>
> The following diff fixes it for me.

Or is it every single port that depends on asciidoc (in this case
x11/i3bar) that should also depend on docbook?

-dav

Reply | Threaded
Open this post in threaded view
|

Re: asciidoc currently broken: fix it

Stuart Henderson
On 2011-04-27, David Coppa <[hidden email]> wrote:

> On Wed, 27 Apr 2011, David Coppa wrote:
>
>> Hi,
>>
>> Just found that asciidoc is broken on a clean box.
>>
>> Here's what I get trying to build x11/i3bar:
>>
>> gmake -C doc
>> gmake[1]: Entering directory `/usr/ports/pobj/i3bar-0.6.21/i3bar-0.6.21/doc'
>> /usr/local/bin/a2x.py -f manpage i3bar.man
>> a2x: ERROR: xmllint --nonet --noout --valid /usr/ports/pobj/i3bar-0.6.21/i3bar-0.6.21/doc/i3bar.xml returned non-zero exit status 4
>> gmake[1]: *** [i3bar.1] Error 1
>>
>> This is because:
>>
>> $ xmllint --nonet --noout --valid /usr/ports/pobj/i3bar-0.6.21/i3bar-0.6.21/doc/i3bar.xml
>> I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
>> /usr/ports/pobj/i3bar-0.6.21/i3bar-0.6.21/doc/i3bar.xml:2: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
>> D DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
>>                                                                                ^
>> /usr/ports/pobj/i3bar-0.6.21/i3bar-0.6.21/doc/i3bar.xml:5: validity error : Validation failed: no DTD found !
>> <refentry lang="en">
>>
>>                    ^
>>
>>
>> The following diff fixes it for me.
>
> Or is it every single port that depends on asciidoc (in this case
> x11/i3bar) that should also depend on docbook?
>
> -dav
>
>

If that's the case then just add the dep in asciidoc.


Reply | Threaded
Open this post in threaded view
|

Re: asciidoc currently broken: fix it

David Coppa
On Thu, Apr 28, 2011 at 12:34 AM, Stuart Henderson <[hidden email]> wrote:

> If that's the case then just add the dep in asciidoc.

After all, I think my diff is right (or at least it won't hurt) ...

$ grep -i docbook /usr/local/bin/a2x.py
        if not (self.keep_artifacts or self.format == 'docbook' or
self.skip_asciidoc):
        Return full path name of file in asciidoc docbook-xsl configuration
        return self.asciidoc_conf_file(os.path.join('docbook-xsl', file_name))
    def to_docbook(self):
        Use asciidoc to convert asciidoc_file to DocBook.
        docbook_file = self.dst_path('.xml')
            if not os.path.isfile(docbook_file):
                die('missing docbook file: %s' % docbook_file)
        shell('"%s" --backend docbook %s --out-file "%s" "%s"' %
             (self.asciidoc, self.asciidoc_opts, docbook_file,
self.asciidoc_file))
            shell('"%s" --nonet --noout --valid "%s"' % (XMLLINT, docbook_file))
        self.to_docbook()
        docbook_file = self.dst_path('.xml')
        exec_xsltproc(self.xsl_stylesheet(), docbook_file,
self.destination_dir, opts)
        self.to_docbook()
        docbook_file = self.dst_path('.xml')
        exec_xsltproc(self.xsl_stylesheet(), docbook_file,
self.destination_dir, opts)
        self.to_docbook()
        docbook_file = self.dst_path('.xml')
        exec_xsltproc(xsl, docbook_file, self.destination_dir, opts)
        self.to_docbook()
        docbook_file = self.dst_path('.xml')
             (DBLATEX, self.format, xsl, sty, self.dblatex_opts, docbook_file))
        self.to_docbook()
        docbook_file = self.dst_path('.xml')
        exec_xsltproc(xsl_file, docbook_file, self.destination_dir, opts)
        self.to_docbook()
        docbook_file = self.dst_path('.xml')
        exec_xsltproc(xsl_file, docbook_file, build_dir, self.xsltproc_opts)
            self.to_docbook()
            docbook_file = self.dst_path('.xml')
            exec_xsltproc(self.xsl_stylesheet(), docbook_file,
                 'xhtml','dvi','ps','tex','docbook'),
        help='chunked, epub, htmlhelp, manpage, pdf, text, xhtml, dvi,
ps, tex, docbook')

Ciao,
David

Reply | Threaded
Open this post in threaded view
|

Re: asciidoc currently broken: fix it

Stuart Henderson
On 2011/04/28 10:54, David Coppa wrote:
> On Thu, Apr 28, 2011 at 12:34 AM, Stuart Henderson <[hidden email]> wrote:
>
> > If that's the case then just add the dep in asciidoc.
>
> After all, I think my diff is right (or at least it won't hurt) ...

i3bar itself doesn't refer to docbook anywhere though; asciidoc does
(in the config files in /etc/asciidoc).

Robert, is this ok with you? Thanks.

Index: Makefile
===================================================================
RCS file: /cvs/ports/textproc/asciidoc/Makefile,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile
--- Makefile 15 Jan 2011 22:29:18 -0000 1.12
+++ Makefile 28 Apr 2011 09:26:25 -0000
@@ -3,13 +3,14 @@
 COMMENT= text document format for writing documents and man pages

 
 DISTNAME= asciidoc-8.6.3
+REVISION= 0
 CATEGORIES= textproc
 
 MAINTAINER= Robert Nagy <[hidden email]>
 
 HOMEPAGE= http://www.methods.co.nz/asciidoc/
 
-# GPL
+# GPLv2+
 PERMIT_PACKAGE_CDROM= Yes
 PERMIT_PACKAGE_FTP= Yes
 PERMIT_DISTFILES_CDROM= Yes
@@ -18,7 +19,8 @@ PERMIT_DISTFILES_FTP= Yes
 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=asciidoc/}
 
 MODULES= lang/python
-RUN_DEPENDS= textproc/libxslt
+RUN_DEPENDS= textproc/libxslt \
+ textproc/docbook
 
 MODPY_ADJ_FILES=a2x.py \
  asciidoc.py \

Reply | Threaded
Open this post in threaded view
|

Re: asciidoc currently broken: fix it

David Coppa
On Thu, Apr 28, 2011 at 11:27 AM, Stuart Henderson <[hidden email]> wrote:

> On 2011/04/28 10:54, David Coppa wrote:
>> On Thu, Apr 28, 2011 at 12:34 AM, Stuart Henderson <[hidden email]> wrote:
>>
>> > If that's the case then just add the dep in asciidoc.
>>
>> After all, I think my diff is right (or at least it won't hurt) ...
>
> i3bar itself doesn't refer to docbook anywhere though; asciidoc does
> (in the config files in /etc/asciidoc).
>
> Robert, is this ok with you? Thanks.
>
> Index: Makefile

Uhm.. Without textproc/docbook-xsl, i3bar's manpage generation fails
with same error.

ciao,
David

Reply | Threaded
Open this post in threaded view
|

Re: asciidoc currently broken: fix it

Robert Nagy
In reply to this post by Stuart Henderson
yeah

On (2011-04-28 10:27), Stuart Henderson wrote:

> On 2011/04/28 10:54, David Coppa wrote:
> > On Thu, Apr 28, 2011 at 12:34 AM, Stuart Henderson <[hidden email]> wrote:
> >
> > > If that's the case then just add the dep in asciidoc.
> >
> > After all, I think my diff is right (or at least it won't hurt) ...
>
> i3bar itself doesn't refer to docbook anywhere though; asciidoc does
> (in the config files in /etc/asciidoc).
>
> Robert, is this ok with you? Thanks.
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/textproc/asciidoc/Makefile,v
> retrieving revision 1.12
> diff -u -p -r1.12 Makefile
> --- Makefile 15 Jan 2011 22:29:18 -0000 1.12
> +++ Makefile 28 Apr 2011 09:26:25 -0000
> @@ -3,13 +3,14 @@
>  COMMENT= text document format for writing documents and man pages
>
>  
>  DISTNAME= asciidoc-8.6.3
> +REVISION= 0
>  CATEGORIES= textproc
>  
>  MAINTAINER= Robert Nagy <[hidden email]>
>  
>  HOMEPAGE= http://www.methods.co.nz/asciidoc/
>  
> -# GPL
> +# GPLv2+
>  PERMIT_PACKAGE_CDROM= Yes
>  PERMIT_PACKAGE_FTP= Yes
>  PERMIT_DISTFILES_CDROM= Yes
> @@ -18,7 +19,8 @@ PERMIT_DISTFILES_FTP= Yes
>  MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=asciidoc/}
>  
>  MODULES= lang/python
> -RUN_DEPENDS= textproc/libxslt
> +RUN_DEPENDS= textproc/libxslt \
> + textproc/docbook
>  
>  MODPY_ADJ_FILES=a2x.py \
>   asciidoc.py \
>