Skip to content

Commit dd78a98

Browse files
committed
Merge commit 'a372cbf5821302ebaf757235b29ba812df78204d'
2 parents 66d2a72 + a372cbf commit dd78a98

File tree

858 files changed

+86397
-91564
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

858 files changed

+86397
-91564
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
/runtest
1414
/runxmlconf
1515
/testModule
16-
/testThreads
1716
/testapi
1817
/testchar
1918
/testdict
@@ -22,7 +21,6 @@
2221
/testrecurse
2322

2423
# Tests
25-
/dba100000.xml
2624
/missing.lst
2725
/runsuite.log
2826
/runxmlconf.log
@@ -32,7 +30,6 @@
3230
# Generated by build system
3331
/config.h
3432
/include/libxml/xmlversion.h
35-
/libxml-2.0-uninstalled.pc
3633
/libxml-2.0.pc
3734
/libxml2-config.cmake
3835
/xml2-config

.gitlab-ci.yml

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ include:
22
- component: "gitlab.gnome.org/GNOME/citemplates/release-service@master"
33
inputs:
44
dist-job-name: "dist"
5-
tarball-artifact-path: "libxml2-dist/libxml2-2.13.7.tar.xz"
5+
tarball-artifact-path: "libxml2-dist/libxml2-2.14.0.tar.xz"
66

77
.test:
88
image: registry.gitlab.gnome.org/gnome/libxml2
99
variables:
10-
BASE_CONFIG: "--with-ftp --with-legacy --with-xptr-locs"
10+
BASE_CONFIG: "--with-http --with-lzma --with-zlib"
1111
before_script:
1212
- rm -rf libxml2-build
1313
- mkdir libxml2-build
14-
- ln -s /tests/xmlconf libxml2-build
14+
- ln -s /tests/xmlconf .
1515
script:
1616
- sh .gitlab-ci/test.sh
1717

@@ -24,7 +24,7 @@ gcc:c89:
2424
extends: .test
2525
variables:
2626
CONFIG: "--without-python"
27-
CFLAGS: "-O2 -std=c89 -D_XOPEN_SOURCE=600"
27+
CFLAGS: "-O2 -std=c89 -D_XOPEN_SOURCE=600 -Wno-error=unused-function"
2828

2929
gcc:minimum:
3030
extends: .test
@@ -36,7 +36,7 @@ gcc:medium:
3636
extends: .test
3737
variables:
3838
BASE_CONFIG: "--with-minimum"
39-
CONFIG: "--with-threads --with-tree --with-xpath --with-output --with-html"
39+
CONFIG: "--with-threads --with-tree --with-xpath --with-output --with-html --with-iso8859x --with-valid"
4040
CFLAGS: "-O2"
4141

4242
gcc:legacy:
@@ -78,7 +78,7 @@ clang:msan:
7878
tags:
7979
- win32-ps
8080
variables:
81-
BASE_CONFIG: "--with-ftp --with-legacy --with-xptr-locs"
81+
BASE_CONFIG: "--with-http --with-lzma --with-zlib"
8282
# Disabled for now, see #658
8383
CONFIG: "--without-python"
8484
CHERE_INVOKING: "yes"
@@ -90,7 +90,7 @@ clang:msan:
9090
cache:
9191
key: "$MSYSTEM"
9292
paths:
93-
- libxml2-build/xmlconf/
93+
- xmlconf/
9494

9595
mingw:w64-x86_64:shared:
9696
extends: .mingw
@@ -118,7 +118,7 @@ mingw:w64-i686:shared:
118118
before_script:
119119
- rm -rf libxml2-build
120120
- mkdir libxml2-build
121-
- ln -s /tests/xmlconf libxml2-build
121+
- ln -s /tests/xmlconf .
122122
script:
123123
- sh .gitlab-ci/test_cmake.sh
124124
artifacts:
@@ -173,7 +173,7 @@ cmake:linux:clang:static:
173173
cache:
174174
key: "$MSYSTEM"
175175
paths:
176-
- libxml2-build/xmlconf/
176+
- xmlconf/
177177
artifacts:
178178
paths:
179179
- libxml2-$Env:CI_COMMIT_SHORT_SHA-$Env:SUFFIX.tar.gz
@@ -190,15 +190,17 @@ cmake:mingw:w64-i686:shared:
190190

191191
cmake:mingw:w64-i686:static:
192192
extends: .cmake:mingw
193-
only:
194-
- schedules
193+
# only:
194+
# - schedules
195195
variables:
196196
BUILD_SHARED_LIBS: "OFF"
197197
MSYSTEM: MINGW32
198198
SUFFIX: mingw-w64-i686-static
199199

200200
cmake:mingw:w64-x86_64:shared:
201201
extends: .cmake:mingw
202+
# only:
203+
# - schedules
202204
variables:
203205
BUILD_SHARED_LIBS: "ON"
204206
MSYSTEM: MINGW64
@@ -227,7 +229,7 @@ cmake:mingw:w64-x86_64:static:
227229
key: "msvc"
228230
paths:
229231
- cmake-$Env:CMAKE_VERSION-win64-x64/
230-
- libxml2-build/xmlconf/
232+
- xmlconf/
231233
- 7za.exe
232234
artifacts:
233235
paths:
@@ -282,6 +284,8 @@ cmake:msvc:v141:x86:static:
282284

283285
meson:
284286
image: registry.gitlab.gnome.org/gnome/libxml2
287+
before_script:
288+
- ln -s /tests/xmlconf .
285289
script:
286290
- sh .gitlab-ci/test_meson.sh
287291

@@ -312,3 +316,24 @@ pages:
312316
- public/devhelp/*.xsl
313317
only:
314318
- master@GNOME/libxml2
319+
320+
downstream-lxml:
321+
image: registry.gitlab.gnome.org/gnome/libxml2
322+
script:
323+
- sh .gitlab-ci/downstream-lxml.sh
324+
325+
downstream-nokogiri:
326+
# owner: @flavorjones
327+
image: ghcr.io/sparklemotion/nokogiri-test:upstream-libxml
328+
script:
329+
- .gitlab-ci/downstream-nokogiri.sh
330+
331+
downstream-perl:
332+
image: registry.gitlab.gnome.org/gnome/libxml2
333+
script:
334+
- sh .gitlab-ci/downstream-perl.sh
335+
336+
downstream-php:
337+
image: registry.gitlab.gnome.org/gnome/libxml2
338+
script:
339+
- sh .gitlab-ci/downstream-php.sh

.gitlab-ci/Dockerfile

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
# The image is also used for libxslt, that's why we need git and
2-
# libgcrypt-dev.
1+
# The image is also used for libxslt.
2+
#
3+
# package required for
4+
# ------------------------------------------------------------
5+
# libclang-rt-dev sanitizer runtimes
6+
# llvm llvm-symbolizer (for sanitizer backtraces)
7+
# git libxslt
8+
# libgcrypt-dev libxslt
9+
# xz-utils make dist
310

4-
FROM ubuntu:23.10
11+
FROM ubuntu:24.04
512
ENV DEBIAN_FRONTEND=noninteractive
613
RUN apt-get update && \
714
apt-get upgrade -y && \
@@ -11,6 +18,31 @@ RUN apt-get update && \
1118
make gcc clang llvm libclang-rt-dev \
1219
zlib1g-dev liblzma-dev libgcrypt-dev \
1320
python3-dev \
14-
cmake meson
21+
cmake meson \
22+
xz-utils
1523
WORKDIR /tests
1624
RUN curl https://www.w3.org/XML/Test/xmlts20080827.tar.gz |tar xz
25+
26+
# XML::LibXML uses Alien::Libxml2 which has a huge dependency chain.
27+
# We try to install most dependencies with apt. We also require
28+
# libxml2-dev to stop Alien::Libxml2 from downloading and building
29+
# libxml2 on its own.
30+
RUN apt-get install -y --no-install-recommends \
31+
libperl-dev libxml2-dev cpanminus \
32+
libalien-build-perl \
33+
libio-socket-ssl-perl \
34+
libsort-versions-perl \
35+
liburi-perl \
36+
libxml-namespacesupport-perl \
37+
libxml-sax-perl \
38+
libyaml-perl
39+
RUN cpanm -n Alien::Libxml2
40+
RUN apt-get remove -y libxml2-dev
41+
42+
# PHP
43+
RUN apt-get install -y --no-install-recommends \
44+
bison re2c libsqlite3-dev
45+
46+
# lxml
47+
RUN apt-get install -y --no-install-recommends \
48+
cython3

.gitlab-ci/Test-Msvc.ps1

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,18 @@
11
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
22

3-
if (-not (Test-Path cmake-$Env:CMAKE_VERSION-win64-x64)) {
4-
Invoke-WebRequest `
5-
-Uri http://github.com/Kitware/CMake/releases/download/v$Env:CMAKE_VERSION/cmake-$Env:CMAKE_VERSION-win64-x64.zip `
6-
-OutFile cmake-$Env:CMAKE_VERSION-win64-x64.zip
7-
Expand-Archive cmake-$Env:CMAKE_VERSION-win64-x64.zip -DestinationPath .
8-
}
9-
$Env:Path="$Env:CI_PROJECT_DIR\cmake-$Env:CMAKE_VERSION-win64-x64\bin;$Env:Path"
10-
113
if (-not (Test-Path 7za.exe)) {
124
Invoke-WebRequest `
135
-Uri https://www.7-zip.org/a/7z1900-extra.7z `
146
-OutFile 7z1900-extra.7z
157
cmake -E tar xf 7z1900-extra.7z 7za.exe
168
}
179

18-
if (-not (Test-Path libxml2-build/xmlconf)) {
10+
if (-not (Test-Path xmlconf)) {
1911
Invoke-WebRequest `
2012
-Uri https://www.w3.org/XML/Test/xmlts20080827.tar.gz `
2113
-OutFile xmlts20080827.tar.gz ;
22-
.\7za.exe x xmlts20080827.tar.gz -olibxml2-build
14+
.\7za.exe x xmlts20080827.tar.gz
15+
.\7za.exe x xmlts20080827.tar
2316
}
2417

2518
cmake `

.gitlab-ci/downstream-lxml.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
srcdir=$(pwd)
6+
7+
mkdir -p install
8+
installdir="$srcdir/install"
9+
export PKG_CONFIG_PATH="$installdir/lib/pkgconfig"
10+
11+
sh autogen.sh "--prefix=$installdir" --with-http --with-zlib --without-python
12+
make -j$(nproc)
13+
make install
14+
15+
git clone --depth 1 https://gitlab.gnome.org/GNOME/libxslt.git
16+
cd libxslt
17+
sh autogen.sh \
18+
"--prefix=$installdir" \
19+
"--with-libxml-prefix=$installdir" \
20+
--without-python
21+
make -j$(nproc)
22+
make install
23+
cd ..
24+
25+
git clone --depth 1 https://github.com/lxml/lxml.git
26+
cd lxml
27+
make
28+
LD_LIBRARY_PATH="$installdir/lib" make TESTFLAGS='' test

.gitlab-ci/downstream-nokogiri.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
export LIBXML_DIR=$(pwd)
6+
export MAKEFLAGS=-j$(nproc)
7+
export NOCONFIGURE=1
8+
./autogen.sh
9+
10+
git clone https://github.com/sparklemotion/nokogiri
11+
cd nokogiri
12+
bundle install
13+
bundle exec rake compile -- --with-xml2-source-dir=${LIBXML_DIR}
14+
bundle exec rake test

.gitlab-ci/downstream-perl.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
sh autogen.sh --without-python
6+
make -j$(nproc)
7+
8+
srcdir=$(pwd)
9+
incdir=$srcdir/include
10+
libdir=$srcdir/.libs
11+
12+
git clone --depth 1 -b test-suite-libxml2 \
13+
https://github.com/nwellnhof/perl-XML-LibXML.git
14+
cd perl-XML-LibXML
15+
16+
perl Makefile.PL INC="-I$incdir" LIBS="-L$libdir -lxml2"
17+
make
18+
make test

.gitlab-ci/downstream-php.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
srcdir=$(pwd)
6+
7+
mkdir -p install
8+
installdir="$srcdir/install"
9+
export PKG_CONFIG_PATH="$installdir/lib/pkgconfig"
10+
11+
sh autogen.sh "--prefix=$installdir" --without-python
12+
make -j$(nproc)
13+
make install
14+
15+
git clone --depth 1 https://gitlab.gnome.org/GNOME/libxslt.git
16+
cd libxslt
17+
sh autogen.sh \
18+
"--prefix=$installdir" \
19+
"--with-libxml-prefix=$installdir" \
20+
--without-python
21+
make -j$(nproc)
22+
make install
23+
cd ..
24+
25+
git clone --depth 1 https://github.com/php/php-src.git
26+
cd php-src
27+
./buildconf
28+
./configure --with-xsl --enable-soap --enable-debug
29+
make -j$(nproc)
30+
make TESTS=" \
31+
-g FAIL \
32+
--no-progress \
33+
ext/dom \
34+
ext/libxml \
35+
ext/simplexml \
36+
ext/soap \
37+
ext/xml \
38+
ext/xmlreader \
39+
ext/xmlwriter \
40+
ext/xsl \
41+
" test

.gitlab-ci/setup_mingw.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ for module in libiconv python xz zlib "$@"; do
1010
pacman --noconfirm -S --needed ${prefix}$module
1111
done
1212

13-
if [ ! -e libxml2-build/xmlconf ]; then
14-
mkdir -p libxml2-build
13+
mkdir -p libxml2-build
14+
15+
if [ ! -e xmlconf ]; then
1516
wget https://www.w3.org/XML/Test/xmlts20080827.tar -O - |
16-
tar -x -C libxml2-build
17+
tar -x
1718
fi

.gitlab-ci/test_meson.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ meson setup \
1111
--werror \
1212
--buildtype=debugoptimized \
1313
--default-library shared \
14+
-Dlegacy=enabled \
1415
builddir
1516

16-
ninja -C builddir test
17+
ninja -C builddir
1718

19+
meson test --verbose -C builddir

0 commit comments

Comments
 (0)