Skip to content

Commit b546c7c

Browse files
committed
Updated libxml to 2.11.1
1 parent 9ea54da commit b546c7c

File tree

410 files changed

+14637
-21201
lines changed

Some content is hidden

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

410 files changed

+14637
-21201
lines changed

.editorconfig

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# EditorConfig : http://EditorConfig.org
2+
3+
root = true
4+
5+
[Makefile*]
6+
indent_style = tab
7+
8+
[CMakeLists.txt]
9+
indent_style = tab
10+
indent_size = 4
11+
12+
[*.{c,h}]
13+
indent_style = space
14+
indent_size = 4
15+
tab_width = 8

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ libxml-2.0-uninstalled.pc
6464
libxml-2.0.pc
6565
libxml2-config.cmake
6666
libxml2.la
67-
libxml2.spec
6867
list
6968
ltmain.sh
7069
log
@@ -96,7 +95,6 @@ runxmlconf.log
9695
stamp-h1
9796
tags
9897
test.out
99-
testAutomata
10098
testModule
10199
testThreads
102100
testapi

.gitlab-ci.yml

+82-115
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,13 @@
11
.test:
2-
# The image was generated with the following Dockerfile. It is also used
3-
# for libxslt, that's why we need git and libgcrypt-dev.
4-
#
5-
# FROM ubuntu:20.04
6-
# ENV DEBIAN_FRONTEND=noninteractive
7-
# RUN apt-get update && \
8-
# apt-get upgrade -y && \
9-
# apt-get install -y --no-install-recommends \
10-
# curl git ca-certificates \
11-
# autoconf automake libtool pkg-config \
12-
# make gcc clang llvm \
13-
# zlib1g-dev liblzma-dev libgcrypt-dev \
14-
# python-dev python3-dev \
15-
# cmake
16-
# WORKDIR /tests
17-
# RUN curl https://www.w3.org/XML/Test/xmlts20080827.tar.gz |tar xz
182
image: registry.gitlab.gnome.org/gnome/libxml2
193
variables:
204
BASE_CONFIG: "--with-ftp --with-legacy --with-xptr-locs"
5+
before_script:
6+
- rm -rf libxml2-build
7+
- mkdir libxml2-build
8+
- ln -s /tests/xmlconf libxml2-build
219
script:
22-
- |
23-
rm -rf build
24-
mkdir build
25-
cd build
26-
ln -s /tests/xmlconf
27-
sh ../autogen.sh $BASE_CONFIG $CONFIG
28-
make -j$(nproc) V=1
29-
make check
10+
- sh .gitlab-ci/test.sh
3011

3112
gcc:
3213
extends: .test
@@ -42,60 +23,92 @@ gcc:minimum:
4223
gcc:python3:
4324
extends: .test
4425
variables:
45-
# TODO: Re-enable the warning after #208 is fixed.
46-
CFLAGS: "-O2 -Wno-error=deprecated-declarations"
26+
CFLAGS: "-O2"
4727
PYTHON: "/usr/bin/python3"
4828

4929
gcc:static:
5030
extends: .test
5131
variables:
52-
CONFIG: "--disable-shared --without-python"
32+
CONFIG: "--disable-shared --without-python --without-modules"
5333
CFLAGS: "-O2"
5434

5535
clang:asan:
5636
extends: .test
37+
tags:
38+
- asan
5739
variables:
5840
CONFIG: "--without-python"
5941
CC: clang
60-
CFLAGS: "-O2 -g -fno-omit-frame-pointer -fsanitize=address,undefined,unsigned-integer-overflow,implicit-conversion -fno-sanitize-recover=all -Wno-error=cast-align"
61-
# LeakSanitizer requires SYS_CAP_PTRACE
62-
ASAN_OPTIONS: "detect_leaks=0"
42+
CFLAGS: "-O2 -g -fno-omit-frame-pointer -fsanitize=address,undefined,integer -fno-sanitize-recover=all -Wno-error=cast-align"
6343
UBSAN_OPTIONS: "print_stacktrace=1"
44+
ASAN_SYMBOLIZER_PATH: "$CI_PROJECT_DIR/.gitlab-ci/llvm-symbolizer"
6445

6546
clang:msan:
6647
extends: .test
67-
only:
68-
- schedules
48+
# only:
49+
# - schedules
6950
variables:
7051
CONFIG: "--without-python --without-zlib --without-lzma"
7152
CC: clang
7253
CFLAGS: "-O2 -g -fno-omit-frame-pointer -fsanitize=memory -Wno-error=cast-align"
54+
MSAN_SYMBOLIZER_PATH: "$CI_PROJECT_DIR/.gitlab-ci/llvm-symbolizer"
55+
56+
.mingw:
57+
tags:
58+
- win32-ps
59+
variables:
60+
BASE_CONFIG: "--with-ftp --with-legacy --with-xptr-locs"
61+
CHERE_INVOKING: "yes"
62+
before_script:
63+
- $Env:Path="C:\msys64\usr\bin;$Env:Path"
64+
- bash -lc 'sh .gitlab-ci/setup_mingw.sh autotools'
65+
script:
66+
- bash -lc 'sh .gitlab-ci/test.sh'
67+
cache:
68+
key: "$MSYSTEM"
69+
paths:
70+
- libxml2-build/xmlconf/
71+
72+
mingw:w64-x86_64:shared:
73+
extends: .mingw
74+
variables:
75+
CFLAGS: "-O2"
76+
MSYSTEM: MINGW64
77+
78+
mingw:w64-i686:shared:
79+
extends: .mingw
80+
only:
81+
- schedules
82+
variables:
83+
CFLAGS: "-O2"
84+
MSYSTEM: MINGW32
85+
86+
# Disabled, GCC missing?
87+
.mingw:msys:shared:
88+
extends: .mingw
89+
variables:
90+
CFLAGS: "-O2"
91+
MSYSTEM: MSYS
7392

7493
.cmake:linux:
7594
image: registry.gitlab.gnome.org/gnome/libxml2
95+
before_script:
96+
- rm -rf libxml2-build
97+
- mkdir libxml2-build
98+
- ln -s /tests/xmlconf libxml2-build
7699
script:
77-
- cmake -DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS -DCMAKE_INSTALL_PREFIX=libxml2-install -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLIBXML2_XMLCONF_WORKING_DIR=/tests -S . -B libxml2-build
78-
- cmake --build libxml2-build --target install
79-
- mkdir -p libxml2-install/share/libxml2
80-
- cp Copyright libxml2-install/share/libxml2
81-
- cd libxml2-build
82-
- ctest -VV
83-
after_script:
84-
- cd libxml2-install
85-
- tar -czf ../libxml2-$CI_COMMIT_SHORT_SHA-$CC-$SUFFIX.tar.gz *
100+
- sh .gitlab-ci/test_cmake.sh
86101
artifacts:
87102
paths:
88-
- libxml2-$CI_COMMIT_SHORT_SHA-$CC-$SUFFIX.tar.gz
103+
- libxml2-$CI_COMMIT_SHORT_SHA-$SUFFIX.tar.gz
89104
expire_in: 1 day
90105

91106
cmake:linux:gcc:shared:
92107
extends: .cmake:linux
93-
only:
94-
- schedules
95108
variables:
96109
BUILD_SHARED_LIBS: "ON"
97110
CC: gcc
98-
SUFFIX: shared
111+
SUFFIX: linux-gcc-shared
99112

100113
cmake:linux:gcc:static:
101114
extends: .cmake:linux
@@ -104,7 +117,7 @@ cmake:linux:gcc:static:
104117
variables:
105118
BUILD_SHARED_LIBS: "OFF"
106119
CC: gcc
107-
SUFFIX: static
120+
SUFFIX: linux-gcc-static
108121

109122
cmake:linux:clang:shared:
110123
extends: .cmake:linux
@@ -113,7 +126,8 @@ cmake:linux:clang:shared:
113126
variables:
114127
BUILD_SHARED_LIBS: "ON"
115128
CC: clang
116-
SUFFIX: shared
129+
CFLAGS: "-Wno-error=cast-align"
130+
SUFFIX: linux-clang-shared
117131

118132
cmake:linux:clang:static:
119133
extends: .cmake:linux
@@ -122,48 +136,26 @@ cmake:linux:clang:static:
122136
variables:
123137
BUILD_SHARED_LIBS: "OFF"
124138
CC: clang
125-
SUFFIX: static
139+
CFLAGS: "-Wno-error=cast-align"
140+
SUFFIX: linux-clang-static
126141

127142
.cmake:mingw:
128143
tags:
129144
- win32-ps
145+
variables:
146+
CHERE_INVOKING: "yes"
130147
before_script:
131-
- "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12"
132-
- $Env:Path="C:\msys64\$Env:MINGW_PATH\bin;C:\msys64\usr\bin;$Env:Path"
133-
- pacman --noconfirm -Syu
134-
- pacman --noconfirm -S
135-
$Env:MINGW_PACKAGE_PREFIX-cmake
136-
$Env:MINGW_PACKAGE_PREFIX-libiconv
137-
$Env:MINGW_PACKAGE_PREFIX-ninja
138-
$Env:MINGW_PACKAGE_PREFIX-python
139-
$Env:MINGW_PACKAGE_PREFIX-python2
140-
$Env:MINGW_PACKAGE_PREFIX-xz
141-
$Env:MINGW_PACKAGE_PREFIX-zlib
142-
- if (-not (Test-Path 7za.exe)) {
143-
Invoke-WebRequest -Uri https://www.7-zip.org/a/7z1900-extra.7z -OutFile 7z1900-extra.7z ;
144-
cmake -E tar xf 7z1900-extra.7z 7za.exe
145-
}
146-
- if (-not (Test-Path libxml2-build/xmlconf)) {
147-
Invoke-WebRequest -Uri https://www.w3.org/XML/Test/xmlts20080827.tar.gz -OutFile xmlts20080827.tar.gz ;
148-
.\7za.exe x xmlts20080827.tar.gz -olibxml2-build
149-
}
148+
- $Env:Path="C:\msys64\usr\bin;$Env:Path"
149+
- bash -lc 'sh .gitlab-ci/setup_mingw.sh cmake ninja'
150150
script:
151-
- cmake -G Ninja -DBUILD_SHARED_LIBS="$Env:BUILD_SHARED_LIBS" -DCMAKE_INSTALL_PREFIX=libxml2-install -DCMAKE_BUILD_TYPE=RelWithDebInfo -S . -B libxml2-build
152-
- cmake --build libxml2-build --target install
153-
- New-Item -ItemType Directory libxml2-install\share\libxml2
154-
- Copy-Item Copyright libxml2-install\share\libxml2
155-
- cd libxml2-build
156-
- ctest -VV
157-
after_script:
158-
- .\7za.exe a libxml2-$Env:CI_COMMIT_SHORT_SHA-$Env:MINGW_PACKAGE_PREFIX-$Env:SUFFIX.7z .\libxml2-install\*
151+
- bash -lc 'sh .gitlab-ci/test_cmake.sh -G Ninja'
159152
cache:
160-
key: "$MINGW_PACKAGE_PREFIX"
153+
key: "$MSYSTEM"
161154
paths:
162155
- libxml2-build/xmlconf/
163-
- 7za.exe
164156
artifacts:
165157
paths:
166-
- libxml2-$Env:CI_COMMIT_SHORT_SHA-$Env:MINGW_PACKAGE_PREFIX-$Env:SUFFIX.7z
158+
- libxml2-$Env:CI_COMMIT_SHORT_SHA-$Env:SUFFIX.tar.gz
167159
expire_in: 1 day
168160

169161
cmake:mingw:w64-i686:shared:
@@ -172,69 +164,44 @@ cmake:mingw:w64-i686:shared:
172164
- schedules
173165
variables:
174166
BUILD_SHARED_LIBS: "ON"
175-
MINGW_PACKAGE_PREFIX: mingw-w64-i686
176-
MINGW_PATH: mingw32
177-
SUFFIX: shared
167+
MSYSTEM: MINGW32
168+
SUFFIX: mingw-w64-i686-shared
178169

179170
cmake:mingw:w64-i686:static:
180171
extends: .cmake:mingw
181172
only:
182173
- schedules
183174
variables:
184175
BUILD_SHARED_LIBS: "OFF"
185-
MINGW_PACKAGE_PREFIX: mingw-w64-i686
186-
MINGW_PATH: mingw32
187-
SUFFIX: static
176+
MSYSTEM: MINGW32
177+
SUFFIX: mingw-w64-i686-static
188178

189179
cmake:mingw:w64-x86_64:shared:
190180
extends: .cmake:mingw
191181
variables:
192182
BUILD_SHARED_LIBS: "ON"
193-
MINGW_PACKAGE_PREFIX: mingw-w64-x86_64
194-
MINGW_PATH: mingw64
195-
SUFFIX: shared
183+
MSYSTEM: MINGW64
184+
SUFFIX: mingw-w64-x86_64-shared
196185

197186
cmake:mingw:w64-x86_64:static:
198187
extends: .cmake:mingw
199188
only:
200189
- schedules
201190
variables:
202191
BUILD_SHARED_LIBS: "OFF"
203-
MINGW_PACKAGE_PREFIX: mingw-w64-x86_64
204-
MINGW_PATH: mingw64
205-
SUFFIX: static
192+
MSYSTEM: MINGW64
193+
SUFFIX: mingw-w64-x86_64-static
206194

207195
.cmake:msvc:
208196
tags:
209197
- win32-ps
210198
variables:
199+
# MSVC warns when casting `const char **` to `void *` which is wrong.
200+
# Disable warning C4090.
201+
CFLAGS: /WX /wd4090
211202
CMAKE_VERSION: 3.19.4
212-
before_script:
213-
- "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12"
214-
- if (-not (Test-Path cmake-$Env:CMAKE_VERSION-win64-x64)) {
215-
Invoke-WebRequest -Uri http://github.com/Kitware/CMake/releases/download/v$Env:CMAKE_VERSION/cmake-$Env:CMAKE_VERSION-win64-x64.zip -OutFile cmake-$Env:CMAKE_VERSION-win64-x64.zip ;
216-
Expand-Archive cmake-$Env:CMAKE_VERSION-win64-x64.zip -DestinationPath .
217-
}
218-
- $Env:Path="$Env:CI_PROJECT_DIR\cmake-$Env:CMAKE_VERSION-win64-x64\bin;$Env:Path"
219-
- if (-not (Test-Path 7za.exe)) {
220-
Invoke-WebRequest -Uri https://www.7-zip.org/a/7z1900-extra.7z -OutFile 7z1900-extra.7z ;
221-
cmake -E tar xf 7z1900-extra.7z 7za.exe
222-
}
223-
- if (-not (Test-Path libxml2-build/xmlconf)) {
224-
Invoke-WebRequest -Uri https://www.w3.org/XML/Test/xmlts20080827.tar.gz -OutFile xmlts20080827.tar.gz ;
225-
.\7za.exe x xmlts20080827.tar.gz -olibxml2-build
226-
}
227203
script:
228-
- cmake -DBUILD_SHARED_LIBS="$Env:BUILD_SHARED_LIBS" -DCMAKE_INSTALL_PREFIX=libxml2-install -DLIBXML2_WITH_ICONV=OFF -DLIBXML2_WITH_LZMA=OFF -DLIBXML2_WITH_PYTHON=OFF -DLIBXML2_WITH_ZLIB=OFF -S . -B libxml2-build
229-
- cmake --build libxml2-build --config Debug --target install
230-
- cmake --build libxml2-build --config Release --target install
231-
- New-Item -ItemType Directory libxml2-install\share\libxml2
232-
- Copy-Item Copyright libxml2-install\share\libxml2
233-
- cd libxml2-build
234-
- ctest -C Debug -VV
235-
- ctest -C Release -VV
236-
after_script:
237-
- .\7za.exe a libxml2-$Env:CI_COMMIT_SHORT_SHA-$Env:CMAKE_GENERATOR_TOOLSET-$Env:CMAKE_GENERATOR_PLATFORM-$Env:SUFFIX.7z .\libxml2-install\*
204+
- .gitlab-ci/Test-Msvc
238205
cache:
239206
key: "msvc"
240207
paths:

.gitlab-ci/Dockerfile

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# The image is also used for libxslt, that's why we need git and
2+
# libgcrypt-dev.
3+
4+
FROM ubuntu:22.10
5+
ENV DEBIAN_FRONTEND=noninteractive
6+
RUN apt-get update && \
7+
apt-get upgrade -y && \
8+
apt-get install -y --no-install-recommends \
9+
curl git ca-certificates \
10+
autoconf automake libtool pkg-config \
11+
make gcc clang llvm \
12+
zlib1g-dev liblzma-dev libgcrypt-dev \
13+
python2-dev python3-dev \
14+
cmake
15+
WORKDIR /tests
16+
RUN curl https://www.w3.org/XML/Test/xmlts20080827.tar.gz |tar xz

0 commit comments

Comments
 (0)