Обсуждение: Compile docs on ArchLinux

Поиск
Список
Период
Сортировка

Compile docs on ArchLinux

От
Michael Paquier
Дата:
Hi all,

Under Arch, I am not able to compile Postgres docs.

By having a look at config.log, it cannot find the docbook folder:
configure:29356: checking for DocBook V4.2
onsgmls:/etc/xml/catalog:2:78:E: name expected
onsgmls:/etc/xml/catalog:2:18:E: cannot find "PUBLIC"; tried "/etc/xml/PUBLIC", "/usr/share/sgml/PUBLIC", "/usr/share/xml/PUBLIC"
onsgmls:conftest.sgml:1:54:W: cannot generate system identifier for public text "-//OASIS//DTD DocBook V4.2//EN"

The stylesheets are correctly set up.
configure:29391: checking for DocBook stylesheets
configure:29427: result: /usr/share/sgml/stylesheets/dsssl/docbook

It looks that the correct packages are installed:
$ pacman -Q | grep docbook
docbook-dsssl 1.79-3
docbook-sgml 4.5-1
docbook-xml 4.5-5
docbook-xsl 1.76.1-2
docbook2x 0.8.8-11
Well, docbook-sgml 4.5 is installed, not 4.2, but I would suppose that it is enough.

Is it necessary to setup a variable like DOCBOOKSTYLE?
Thanks in advance!
--
Michael Paquier
http://michael.otacoo.com

Re: Compile docs on ArchLinux

От
hubert depesz lubaczewski
Дата:
On Wed, Apr 18, 2012 at 01:25:14PM +0900, Michael Paquier wrote:
> Hi all,
>
> Under Arch, I am not able to compile Postgres docs.
>
> By having a look at config.log, it cannot find the docbook folder:
> configure:29356: checking for DocBook V4.2
> onsgmls:/etc/xml/catalog:2:78:E: name expected
> onsgmls:/etc/xml/catalog:2:18:E: cannot find "PUBLIC"; tried
> "/etc/xml/PUBLIC", "/usr/share/sgml/PUBLIC", "/usr/share/xml/PUBLIC"
> onsgmls:conftest.sgml:1:54:W: cannot generate system identifier for public
> text "-//OASIS//DTD DocBook V4.2//EN"
>
> The stylesheets are correctly set up.
> configure:29391: checking for DocBook stylesheets
> configure:29427: result: /usr/share/sgml/stylesheets/dsssl/docbook
>
> It looks that the correct packages are installed:
> $ pacman -Q | grep docbook
> docbook-dsssl 1.79-3
> docbook-sgml 4.5-1
> docbook-xml 4.5-5
> docbook-xsl 1.76.1-2
> docbook2x 0.8.8-11
> Well, docbook-sgml 4.5 is installed, not 4.2, but I would suppose that it
> is enough.
>
> Is it necessary to setup a variable like DOCBOOKSTYLE?
> Thanks in advance!

I don't think it will be solved - I reported it in november 2009
: http://archives.postgresql.org/pgsql-general/2009-11/msg00325.php
then asked on serverfault
: http://serverfault.com/questions/83206/how-to-build-docbook-4-2-docs-on-arch-linux

but the general idea (for now) is that I simply download ready made
docs from daily snapshots.

Best regards,

depesz

--
The best thing about modern society is how easy it is to avoid contact with it.
                                                             http://depesz.com/

Re: Compile docs on ArchLinux

От
Michael Paquier
Дата:
I don't think it will be solved - I reported it in november 2009
: http://archives.postgresql.org/pgsql-general/2009-11/msg00325.php
then asked on serverfault
: http://serverfault.com/questions/83206/how-to-build-docbook-4-2-docs-on-arch-linux
Thanks, I saw those posts while looking for a solution, but I was just wondering if someone has found a trick to solve that.
 
but the general idea (for now) is that I simply download ready made
docs from daily snapshots.
Well, in my case, I need to compile the docs myself for Postgres-XC, as it uses the same doc structure as postgres.
I am sure there is a trick able to solve that just by looking at the structure of arch files...

Btw, I had another question:
is it possible to compile postgres docs with docbook 4.5? At config step, it looks that only docbook 4.2 is supported.

Regards,
--
Michael Paquier
http://michael.otacoo.com

Re: Compile docs on ArchLinux

От
Tom Lane
Дата:
Michael Paquier <michael.paquier@gmail.com> writes:
> is it possible to compile postgres docs with docbook 4.5? At config step,
> it looks that only docbook 4.2 is supported.

If ArchLinux doesn't provide the 4.2 DTD, you ought to complain to
whoever packages that.  On my Fedora 16 box, for example, a wide range
of docbook versions is supported:

$ ls /etc/sgml
catalog                     sgml-docbook-4.4.cat
docbook/                    sgml-docbook-4.5.cat
docbook-simple.cat          sgml-docbook.cat@
docbook-slides.cat          sgml.conf
openjade-1.3.2-38.fc16.soc  xhtml1-dtds-1.0-20020801.6.soc
openjade.soc@               xhtml1-dtds.soc@
sgml-docbook-3.0.cat        xml-docbook-4.1.2.cat
sgml-docbook-3.1.cat        xml-docbook-4.2.cat
sgml-docbook-4.0.cat        xml-docbook-4.3.cat
sgml-docbook-4.1.cat        xml-docbook-4.4.cat
sgml-docbook-4.2.cat        xml-docbook-4.5.cat
sgml-docbook-4.3.cat        xml-docbook.cat@

I don't believe there is any expectation that documents will get
updated just because there is a new docbook version.

Now having said that, you could certainly try adjusting the
DOCTYPE declaration in the docs and seeing if they'd build with 4.5.
But it's not something the project is likely to worry about soon.

            regards, tom lane

Re: Compile docs on ArchLinux

От
Michael Paquier
Дата:


On Wed, Apr 18, 2012 at 11:08 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Michael Paquier <michael.paquier@gmail.com> writes:
> is it possible to compile postgres docs with docbook 4.5? At config step,
> it looks that only docbook 4.2 is supported.

If ArchLinux doesn't provide the 4.2 DTD, you ought to complain to
whoever packages that.  On my Fedora 16 box, for example, a wide range
of docbook versions is supported:

$ ls /etc/sgml
catalog                     sgml-docbook-4.4.cat
docbook/                    sgml-docbook-4.5.cat
docbook-simple.cat          sgml-docbook.cat@
docbook-slides.cat          sgml.conf
openjade-1.3.2-38.fc16.soc  xhtml1-dtds-1.0-20020801.6.soc
openjade.soc@               xhtml1-dtds.soc@
sgml-docbook-3.0.cat        xml-docbook-4.1.2.cat
sgml-docbook-3.1.cat        xml-docbook-4.2.cat
sgml-docbook-4.0.cat        xml-docbook-4.3.cat
sgml-docbook-4.1.cat        xml-docbook-4.4.cat
sgml-docbook-4.2.cat        xml-docbook-4.5.cat
sgml-docbook-4.3.cat        xml-docbook.cat@

I don't believe there is any expectation that documents will get
updated just because there is a new docbook version. 
I see. I tried to install manually the catalogs of 4.2 but it didn't got recognized either.
 

Now having said that, you could certainly try adjusting the
DOCTYPE declaration in the docs and seeing if they'd build with 4.5.
But it's not something the project is likely to worry about soon.
This one didn't work, but it was worth a try, thanks for the idea.
--
Michael Paquier
http://michael.otacoo.com

Re: Compile docs on ArchLinux

От
Peter Eisentraut
Дата:
On ons, 2012-04-18 at 10:08 -0400, Tom Lane wrote:
> Now having said that, you could certainly try adjusting the
> DOCTYPE declaration in the docs and seeing if they'd build with 4.5.

It should work.

The problem, as I recall it, with DocBook 4.5 was that the are some
problems in the source packaging that would require users who install
from source to do some extra patching.  So it would create more work for
some without any actual benefit.


Re: Compile docs on ArchLinux

От
Michael Paquier
Дата:
On Wed, Apr 18, 2012 at 6:51 PM, hubert depesz lubaczewski <depesz@depesz.com> wrote:
On Wed, Apr 18, 2012 at 01:25:14PM +0900, Michael Paquier wrote:
> Hi all,
>
> Under Arch, I am not able to compile Postgres docs.
>
> By having a look at config.log, it cannot find the docbook folder:
> configure:29356: checking for DocBook V4.2
> onsgmls:/etc/xml/catalog:2:78:E: name expected
> onsgmls:/etc/xml/catalog:2:18:E: cannot find "PUBLIC"; tried
> "/etc/xml/PUBLIC", "/usr/share/sgml/PUBLIC", "/usr/share/xml/PUBLIC"
> onsgmls:conftest.sgml:1:54:W: cannot generate system identifier for public
> text "-//OASIS//DTD DocBook V4.2//EN"
>
> The stylesheets are correctly set up.
> configure:29391: checking for DocBook stylesheets
> configure:29427: result: /usr/share/sgml/stylesheets/dsssl/docbook
>
> It looks that the correct packages are installed:
> $ pacman -Q | grep docbook
> docbook-dsssl 1.79-3
> docbook-sgml 4.5-1
> docbook-xml 4.5-5
> docbook-xsl 1.76.1-2
> docbook2x 0.8.8-11
> Well, docbook-sgml 4.5 is installed, not 4.2, but I would suppose that it
> is enough.
>
> Is it necessary to setup a variable like DOCBOOKSTYLE?
> Thanks in advance!

I don't think it will be solved - I reported it in november 2009
: http://archives.postgresql.org/pgsql-general/2009-11/msg00325.php
then asked on serverfault
: http://serverfault.com/questions/83206/how-to-build-docbook-4-2-docs-on-arch-linux

I found a solution to compile the docs on Arch.
That's tricky, but I get html and man compilation working.
There were 2 issues:
1) docbook-sgml 4.2 was not taken into account
To solve that I downloaded docbook-sgml 4.2 here:
http://www.oasis-open.org/docbook/sgml/4.2/
and installed it manually with those commands to include them in catalogs:
cp docbook.cat docbook.cat.orig &&
sed -e '/ISO 8879/d' docbook.cat.orig > docbook.cat &&
cp docbook.cat docbook.cat.orig &&
sed -e '/gml/d' docbook.cat.orig > docbook.cat &&
install -d /usr/share/sgml/docbook/sgml-dtd-4.2 &&
chown -R root:root . &&
chmod -R 755 . &&
install docbook.cat /usr/share/sgml/docbook/sgml-dtd-4.2/catalog &&
cp -af *.dtd *.mod *.dcl /usr/share/sgml/docbook/sgml-dtd-4.2 &&
install-catalog --add /etc/sgml/sgml-docbook-dtd-4.2.cat \
/usr/share/sgml/docbook/sgml-dtd-4.2/catalog &&
install-catalog --add /etc/sgml/sgml-docbook-dtd-4.2.cat \
/etc/sgml/sgml-docbook.cat

Not sure though if it is the cleanest way to do though... I am not a packager.

2) There is an error in the package jade of ArchLinux. For a reason I don't know why, the catalog files of Jade are not included in package, so html compilation caouldn't work.
So I picked them up from another place, and copied them somewhere, here /usr/share/sgml/jade/ as it is where they should normally be.
I attach them to this email for convenience.

Then you need only to setup SGML_CATALOG_FILES to redirect to catalogs just before configure, here:
export SGML_CATALOG_FILES=/etc/sgml/catalog:/usr/share/sgml/jade/catalog

And you're done! I have "make world" working correctly, man and html are compiled.
That's tricky but efficient.
--
Michael Paquier
http://michael.otacoo.com
Вложения