package/postgresql: workaround documentation build failure

Since the bump of Postgresql to version 17.2 in commit
cc77be28fc, the build fails when
host-libxml2 and host-libxslt have been built prior to Postgresql, or
when xmllint and xsltproc are available on the host machine, with:

I/O error : Attempt to load network entity: http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
../doc/src/sgml/postgres.sgml:22: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
]>
  ^
../doc/src/sgml/postgres.sgml:24: element book: validity error : No declaration for attribute id of element book
<book id="postgres">

As this happens when building the documentation, this commit proposes
to disable building the documentation. Unfortunately, passing
-Ddocs=disabled -Ddocs_pdf=disabled is not sufficient, as the
documentation building logic still does stuff when it detects xmllint
and xsltproc, so we "poison" the detection of those tools so that they
do not get used.

This issue has been reported upstream as of bug #18760:
https://www.postgresql.org/message-id/18760-82d1b83da31b898d%40postgresql.org

Fixes:

  http://autobuild.buildroot.net/results/b061e6a68c885e47a254e66dbc073e2b548b8cd3/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[Julien: add link to bug report]
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Thomas Petazzoni
2024-12-31 10:10:18 +01:00
committed by Julien Olivain
parent b3f7c104ca
commit f0422b41df

View File

@@ -14,7 +14,15 @@ POSTGRESQL_SELINUX_MODULES = postgresql
POSTGRESQL_INSTALL_STAGING = YES
POSTGRESQL_CONFIG_SCRIPTS = pg_config
POSTGRESQL_CONF_ENV = LIBS=$(TARGET_NLS_LIBS)
POSTGRESQL_CONF_OPTS = -Drpath=false
# We have to force invalid paths for xmllint and xsltproc, otherwise
# if detected they get used, even with -Ddocs=disabled and
# -Ddocs_pdf=disabled, and it causes build failures
POSTGRESQL_CONF_OPTS = \
-Drpath=false \
-Ddocs=disabled \
-Ddocs_pdf=disabled \
-DXMLLINT=/nowhere \
-DXSLTPROC=/nowhere
POSTGRESQL_DEPENDENCIES = \
$(TARGET_NLS_DEPENDENCIES) \
host-bison \