Skip to content

Commit aa549fb

Browse files
StanFromIrelandgpsheadencukou
committed
gh-144363: Update bundled libexpat to 2.7.4 (#144365)
* Update to 2.7.4 * update expat license copyright year to match and a pedantic #define * include COPYING update in refresh.sh * Update checksum for copying --------- Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Petr Viktorin <encukou@gmail.com>
1 parent e6b8fcc commit aa549fb

File tree

12 files changed

+98
-86
lines changed

12 files changed

+98
-86
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update bundled `libexpat <https://libexpat.github.io/>`_ to 2.7.4

Misc/sbom.spdx.json

Lines changed: 20 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/expat/COPYING

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
2-
Copyright (c) 2001-2022 Expat maintainers
2+
Copyright (c) 2001-2025 Expat maintainers
33

44
Permission is hereby granted, free of charge, to any person obtaining
55
a copy of this software and associated documentation files (the

Modules/expat/expat.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
Copyright (c) 2000-2005 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
1212
Copyright (c) 2001-2002 Greg Stein <gstein@users.sourceforge.net>
1313
Copyright (c) 2002-2016 Karl Waclawek <karl@waclawek.net>
14-
Copyright (c) 2016-2025 Sebastian Pipping <sebastian@pipping.org>
14+
Copyright (c) 2016-2026 Sebastian Pipping <sebastian@pipping.org>
1515
Copyright (c) 2016 Cristian Rodríguez <crrodriguez@opensuse.org>
1616
Copyright (c) 2016 Thomas Beutlich <tc@tbeu.de>
1717
Copyright (c) 2017 Rhodri James <rhodri@wildebeest.org.uk>
@@ -1082,7 +1082,7 @@ XML_SetReparseDeferralEnabled(XML_Parser parser, XML_Bool enabled);
10821082
*/
10831083
# define XML_MAJOR_VERSION 2
10841084
# define XML_MINOR_VERSION 7
1085-
# define XML_MICRO_VERSION 3
1085+
# define XML_MICRO_VERSION 4
10861086

10871087
# ifdef __cplusplus
10881088
}

Modules/expat/expat_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* distribution.
44
*/
55
#ifndef EXPAT_CONFIG_H
6-
#define EXPAT_CONFIG_H
6+
#define EXPAT_CONFIG_H 1
77

88
#include <pyconfig.h>
99
#ifdef WORDS_BIGENDIAN

Modules/expat/expat_external.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
Copyright (c) 2001-2002 Greg Stein <gstein@users.sourceforge.net>
1313
Copyright (c) 2002-2006 Karl Waclawek <karl@waclawek.net>
1414
Copyright (c) 2016 Cristian Rodríguez <crrodriguez@opensuse.org>
15-
Copyright (c) 2016-2019 Sebastian Pipping <sebastian@pipping.org>
15+
Copyright (c) 2016-2025 Sebastian Pipping <sebastian@pipping.org>
1616
Copyright (c) 2017 Rhodri James <rhodri@wildebeest.org.uk>
1717
Copyright (c) 2018 Yury Gribov <tetra2005@gmail.com>
1818
Licensed under the MIT license:
@@ -91,8 +91,7 @@
9191
# ifndef XML_BUILDING_EXPAT
9292
/* using Expat from an application */
9393

94-
# if defined(_MSC_EXTENSIONS) && ! defined(__BEOS__) \
95-
&& ! defined(__CYGWIN__)
94+
# if defined(_MSC_VER) && ! defined(__BEOS__) && ! defined(__CYGWIN__)
9695
# define XMLIMPORT __declspec(dllimport)
9796
# endif
9897

Modules/expat/internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
# elif ULONG_MAX == 18446744073709551615u // 2^64-1
129129
# define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "ld"
130130
# define EXPAT_FMT_SIZE_T(midpart) "%" midpart "lu"
131-
# elif defined(EMSCRIPTEN) // 32bit mode Emscripten
131+
# elif defined(__wasm32__) // 32bit mode Emscripten or WASI SDK
132132
# define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "ld"
133133
# define EXPAT_FMT_SIZE_T(midpart) "%" midpart "zu"
134134
# else

Modules/expat/refresh.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ fi
1212

1313
# Update this when updating to a new version after verifying that the changes
1414
# the update brings in are good. These values are used for verifying the SBOM, too.
15-
expected_libexpat_tag="R_2_7_3"
16-
expected_libexpat_version="2.7.3"
17-
expected_libexpat_sha256="821ac9710d2c073eaf13e1b1895a9c9aa66c1157a99635c639fbff65cdbdd732"
15+
expected_libexpat_tag="R_2_7_4"
16+
expected_libexpat_version="2.7.4"
17+
expected_libexpat_sha256="461ecc8aa98ab1a68c2db788175665d1a4db640dc05bf0e289b6ea17122144ec"
1818

1919
expat_dir="$(realpath "$(dirname -- "${BASH_SOURCE[0]}")")"
2020
cd ${expat_dir}
@@ -24,6 +24,9 @@ curl --location "https://github.com/libexpat/libexpat/releases/download/${expect
2424
echo "${expected_libexpat_sha256} libexpat.tar.gz" | sha256sum --check
2525

2626
# Step 2: Pull files from the libexpat distribution
27+
28+
tar xzvf libexpat.tar.gz "expat-${expected_libexpat_version}/COPYING" --strip-components 2
29+
2730
declare -a lib_files
2831
lib_files=(
2932
ascii.h

0 commit comments

Comments
 (0)