RFR: 8269131: Update libxml2 to version 2.9.12

Kevin Rushforth kcr at openjdk.java.net
Thu Jul 1 23:28:59 UTC 2021


On Thu, 1 Jul 2021 15:46:53 GMT, Ambarish Rapte <arapte at openjdk.org> wrote:

> We currently use libxml2 version 2.9.10. It should be updated to latest stable release, which is version 2.9.12.
> The steps to update libxml are documented in UPDATING.txt.

The changes look good except for the expansion of tags in `Makefile.am` (we don't want to expand tabs in Makefiles). I recommend re-copying `Makefile.am` from the original sources of libxml 2.9.12. I left a couple questions on the new instructions in `UPDATING.txt` as well.

I did a build / test on all 3 platforms. No issues observed.

modules/javafx.web/src/main/native/Source/ThirdParty/libxml/UPDATING.txt line 3:

> 1: Updating libxml in OpenJFX:
> 2: 
> 3: 1. Download respective libxml source tarball from here: http://xmlsoft.org/sources

As an alternative, the source can be downloaded by cloning:
https://gitlab.gnome.org/GNOME/libxml2.git
They tag each release. Maybe it isn't worth noting here.

modules/javafx.web/src/main/native/Source/ThirdParty/libxml/UPDATING.txt line 18:

> 16: 
> 17: 5. Remove files & directories which are not relevant to JavaFX WebKit.
> 18:    Use git clean command. (git clean -df modules/)

This presumes everything that isn't already tracked is unwanted. If they ever add a new file (e.g., a new utility) that is referenced by methods in existing files, the build would fail.

modules/javafx.web/src/main/native/Source/ThirdParty/libxml/UPDATING.txt line 43:

> 41:     > find src/ -name "*.h" -type f -exec bash -c 'expand -t 4 "$0" | sponge "$0"' {} \;
> 42: 7.3 Remove trailing whitespaces:
> 43:     > find . -type f -exec sed -i '' 's/[[:space:]]\{1,\}$//' {} \+

Can you check whether this has caused any problems with the non-source files (e.g., the Makefiles)? It might be safer to just do this on the same set of files for which you expand tabs. See my comment on the `Makefile.am` file.

modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/Makefile.am line 49:

> 47: 
> 48: libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c  \
> 49:         parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c  \

It looks like this file has had its tabs expanded which is not what we want for a `Makefile` (only for source files, as you noted in `UPDATING.txt`).

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

PR: https://git.openjdk.java.net/jfx/pull/562


More information about the openjfx-dev mailing list