Compare commits

..

No commits in common. 'epel9' and 'i8c' have entirely different histories.
epel9 ... i8c

13
.gitignore vendored

@ -1,12 +1 @@
libxml2-2.7.6.tar.gz SOURCES/libxml2-2.9.3.tar.gz
/libxml2-2.7.8.tar.gz
/libxml2-2.8.0.tar.gz
/libxml2-2.9.0.tar.gz
/libxml2-2.9.1.tar.gz
/libxml2-2.9.2.tar.gz
/libxml2-2.9.3.tar.gz
/libxml2-2.9.9.tar.gz
/libxml2-2.9.10.tar.gz
/libxml2-v2.9.12.tar.bz2
/libxml2-v2.9.13.tar.bz2
/libxml2-v2.9.14.tar.bz2

@ -0,0 +1 @@
0301ce933637e0ceda049047dbefd18714f59b6e SOURCES/libxml2-2.9.3.tar.gz

@ -0,0 +1,11 @@
--- threads.c.orig 2009-09-10 17:03:39.000000000 +0200
+++ threads.c 2009-09-11 19:00:59.660192916 +0200
@@ -993,7 +993,7 @@
#elif defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
#if defined(LIBXML_STATIC_FOR_DLL)
BOOL XMLCALL
-xmlDllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+xmlDllMain(void *hinstDLL, unsigned long fdwReason, void *lpvReserved)
#else
BOOL WINAPI
DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)

@ -1,22 +1,20 @@
%{?mingw_package_header} %{?mingw_package_header}
Name: mingw-libxml2 Name: mingw-libxml2
Version: 2.9.14 Version: 2.9.3
Release: 1%{?dist} Release: 5%{?dist}
Summary: MinGW Windows libxml2 XML processing library Summary: MinGW Windows libxml2 XML processing library
License: MIT License: MIT
Group: Development/Libraries
URL: http://xmlsoft.org/ URL: http://xmlsoft.org/
Source0: https://gitlab.gnome.org/GNOME/libxml2/-/archive/v%{version}/libxml2-v%{version}.tar.bz2 Source0: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz
# Patch from openSUSE. # MinGW-specific patches.
# See: https://bugzilla.gnome.org/show_bug.cgi?id=789714 Patch1001: mingw32-libxml2-static-build-compile-fix.patch
Patch1: libxml2-2.9.8-python3-unicode-errors.patch
BuildArch: noarch BuildArch: noarch
ExclusiveArch: %{ix86} x86_64
BuildRequires: automake autoconf libtool
BuildRequires: make
BuildRequires: mingw32-filesystem >= 95 BuildRequires: mingw32-filesystem >= 95
BuildRequires: mingw32-gcc BuildRequires: mingw32-gcc
@ -48,6 +46,7 @@ MinGW Windows libxml2 XML processing library.
%package -n mingw32-libxml2-static %package -n mingw32-libxml2-static
Summary: Static version of the MinGW Windows XML processing library Summary: Static version of the MinGW Windows XML processing library
Requires: mingw32-libxml2 = %{version}-%{release} Requires: mingw32-libxml2 = %{version}-%{release}
Group: Development/Libraries
%description -n mingw32-libxml2-static %description -n mingw32-libxml2-static
Static version of the MinGW Windows XML processing library. Static version of the MinGW Windows XML processing library.
@ -63,6 +62,7 @@ MinGW Windows libxml2 XML processing library.
%package -n mingw64-libxml2-static %package -n mingw64-libxml2-static
Summary: Static version of the MinGW Windows XML processing library Summary: Static version of the MinGW Windows XML processing library
Requires: mingw64-libxml2 = %{version}-%{release} Requires: mingw64-libxml2 = %{version}-%{release}
Group: Development/Libraries
%description -n mingw64-libxml2-static %description -n mingw64-libxml2-static
Static version of the MinGW Windows XML processing library. Static version of the MinGW Windows XML processing library.
@ -72,42 +72,48 @@ Static version of the MinGW Windows XML processing library.
%prep %prep
%autosetup -p1 -n libxml2-v%{version} %setup -q -n libxml2-%{version}
%patch1001 -p0
%build %build
NOCONFIGURE=1 ./autogen.sh # LibXML2 can't build static and shared libraries in one go, so we
# build LibXML2 twice here
# LibXML2 can't build static and shared libraries in one go, so we build LibXML2 twice here MINGW32_CPPFLAGS="-DLIBXML_STATIC_FOR_DLL"
MINGW32_CPPFLAGS="-DLIBXML_STATIC_FOR_DLL" \ MINGW64_CPPFLAGS="-DLIBXML_STATIC_FOR_DLL"
MINGW64_CPPFLAGS="-DLIBXML_STATIC_FOR_DLL" \
MINGW_BUILDDIR_SUFFIX=static %mingw_configure --without-python --with-modules --enable-static --disable-shared --with-threads=win32 MINGW_BUILDDIR_SUFFIX=static %mingw_configure --without-python --with-modules --enable-static --disable-shared --with-threads=win32
MINGW32_CPPFLAGS=
MINGW64_CPPFLAGS=
MINGW_BUILDDIR_SUFFIX=shared %mingw_configure --without-python --with-modules --disable-static --enable-shared --with-threads=win32 MINGW_BUILDDIR_SUFFIX=shared %mingw_configure --without-python --with-modules --disable-static --enable-shared --with-threads=win32
MINGW_BUILDDIR_SUFFIX=static %mingw_make_build MINGW_BUILDDIR_SUFFIX=static %mingw_make %{?_smp_mflags}
MINGW_BUILDDIR_SUFFIX=shared %mingw_make_build MINGW_BUILDDIR_SUFFIX=shared %mingw_make %{?_smp_mflags}
%install %install
MINGW_BUILDDIR_SUFFIX=static %mingw_make_install # First install all the files belonging to the shared build
MINGW_BUILDDIR_SUFFIX=shared %mingw_make_install MINGW_BUILDDIR_SUFFIX=shared %mingw_make_install DESTDIR=$RPM_BUILD_ROOT
# Then manually install the static libraries to the right location
install -m 0644 build_win32static/.libs/libxml2.a $RPM_BUILD_ROOT%{mingw32_libdir}/
install -m 0644 build_win64static/.libs/libxml2.a $RPM_BUILD_ROOT%{mingw64_libdir}/
# Remove documentation which duplicates Fedora native. # Remove documentation which duplicates Fedora native.
rm -rf %{buildroot}%{mingw32_mandir} rm -rf $RPM_BUILD_ROOT%{mingw32_mandir}
rm -rf %{buildroot}%{mingw32_docdir} rm -rf $RPM_BUILD_ROOT%{mingw32_docdir}
rm -rf %{buildroot}%{mingw32_datadir}/gtk-doc/ rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/gtk-doc/
rm -rf %{buildroot}%{mingw64_mandir} rm -rf $RPM_BUILD_ROOT%{mingw64_mandir}
rm -rf %{buildroot}%{mingw64_docdir} rm -rf $RPM_BUILD_ROOT%{mingw64_docdir}
rm -rf %{buildroot}%{mingw64_datadir}/gtk-doc/ rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/gtk-doc/
# Drop all .la files # Drop all .la files
find %{buildroot} -name "*.la" -delete find $RPM_BUILD_ROOT -name "*.la" -delete
# Win32 # Win32
%files -n mingw32-libxml2 %files -n mingw32-libxml2
%license Copyright %doc AUTHORS ChangeLog COPYING Copyright NEWS README README.tests TODO TODO_SCHEMAS
%{mingw32_bindir}/libxml2-2.dll %{mingw32_bindir}/libxml2-2.dll
%{mingw32_bindir}/xml2-config %{mingw32_bindir}/xml2-config
%{mingw32_bindir}/xmlcatalog.exe %{mingw32_bindir}/xmlcatalog.exe
@ -124,7 +130,7 @@ find %{buildroot} -name "*.la" -delete
# Win64 # Win64
%files -n mingw64-libxml2 %files -n mingw64-libxml2
%license Copyright %doc AUTHORS ChangeLog COPYING Copyright NEWS README README.tests TODO TODO_SCHEMAS
%{mingw64_bindir}/libxml2-2.dll %{mingw64_bindir}/libxml2-2.dll
%{mingw64_bindir}/xml2-config %{mingw64_bindir}/xml2-config
%{mingw64_bindir}/xmlcatalog.exe %{mingw64_bindir}/xmlcatalog.exe
@ -141,61 +147,12 @@ find %{buildroot} -name "*.la" -delete
%changelog %changelog
* Tue May 03 2022 Sandro Mani <manisandro@gmail.com> - 2.9.14-1 * Tue Dec 12 2023 Sergey Cherevko <s.cherevko@msvsphere-os.ru> - 2.9.3-5
- Update to 2.9.14 - Rebuilt for MSVSphere 8.8
* Fri Mar 25 2022 Sandro Mani <manisandro@gmail.com> - 2.9.13-3
- Rebuild with mingw-gcc-12
* Tue Mar 15 2022 Sandro Mani <manisandro@gmail.com> - 2.9.13-2
- Rebuild
* Tue Feb 22 2022 Sandro Mani <manisandro@gmail.com> - 2.9.13-1
- Update to 2.9.13
- Cleanup spec
* Fri Feb 18 2022 Sandro Mani <manisandro@gmail.com> - 2.9.12-1
- Update to 2.9.12
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.10-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.10-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.10-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Nov 11 2020 Richard W.M. Jones <rjones@redhat.com> - 2.9.10-8
- Add correct fix for CVE-2020-24977 (RHBZ#1877788), thanks: Jan de Groot.
* Fri Sep 11 2020 Richard W.M. Jones <rjones@redhat.com> - 2.9.10-7
- Add fix for CVE-2020-24977 (RHBZ#1877788, RHBZ#1877789).
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Apr 23 2020 David King <amigadave@amigadave.com> - 2.9.10-1
- Update to 2.9.10
- Fix CVE-2019-19956 (#1788858)
- Fix CVE-2019-20388 (#1799738)
- Fix CVE-2020-7595 (#1799788)
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.9-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Mar 07 2019 Richard W.M. Jones <rjones@redhat.com> - 2.9.9-2
- Resync with Fedora Rawhide libxml2 2.9.9-2.
- Use autosetup.
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.3-5 * Thu Aug 16 2018 Eduardo Lima (Etrunko) <etrunko@redhat.com> - 2.9.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - ExclusiveArch: i686, x86_64
Related: rhbz#1615874
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.3-4 * Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

@ -1,33 +0,0 @@
diff -rupN --no-dereference libxml2-v2.9.14/python/libxml.c libxml2-v2.9.14-new/python/libxml.c
--- libxml2-v2.9.14/python/libxml.c 2022-05-02 13:13:03.000000000 +0200
+++ libxml2-v2.9.14-new/python/libxml.c 2022-05-03 11:42:49.237005241 +0200
@@ -1621,6 +1621,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
PyObject *message;
PyObject *result;
char str[1000];
+ unsigned char *ptr = (unsigned char *)str;
#ifdef DEBUG_ERROR
printf("libxml_xmlErrorFuncHandler(%p, %s, ...) called\n", ctx, msg);
@@ -1637,12 +1638,20 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
str[999] = 0;
va_end(ap);
+#if PY_MAJOR_VERSION >= 3
+ /* Ensure the error string doesn't start at UTF8 continuation. */
+ while (*ptr && (*ptr & 0xc0) == 0x80)
+ ptr++;
+#endif
+
list = PyTuple_New(2);
PyTuple_SetItem(list, 0, libxml_xmlPythonErrorFuncCtxt);
Py_XINCREF(libxml_xmlPythonErrorFuncCtxt);
- message = libxml_charPtrConstWrap(str);
+ message = libxml_charPtrConstWrap(ptr);
PyTuple_SetItem(list, 1, message);
result = PyEval_CallObject(libxml_xmlPythonErrorFuncHandler, list);
+ /* Forget any errors caused in the error handler. */
+ PyErr_Clear();
Py_XDECREF(list);
Py_XDECREF(result);
}

@ -1 +0,0 @@
SHA512 (libxml2-v2.9.14.tar.bz2) = 15a2bcb1b353a047c03ae92dfdb83c298312f22dd630ef8bd93ece3f4cfac1f88b3e4440f1a8f40e89ed2c8d44976e035fa98d1146722fcd89ba86c2af9f73c7
Loading…
Cancel
Save