pcre2/pcre2.spec
2024-12-04 11:55:36 +08:00

224 lines
8.5 KiB
RPMSpec

Name: pcre2
Version: 10.35
Release: 10
Summary: Perl Compatible Regular Expressions
License: BSD
URL: http://www.pcre.org/
Source0: https://ftp.pcre.org/pub/pcre/%{name}-%{version}.tar.bz2
# Do no set RPATH if libdir is not /usr/lib
Patch6000: pcre2-10.10-Fix-multilib.patch
# 1/2 Enable shadow stack built-in functions if -fcf-protection compiler flag is
Patch6001: pcre2-10.35-Apply-H.J.-Lu-s-patch-to-pass-mshstk-to-the-compiler.patch
# 2/2 Enable shadow stack built-in functions if -fcf-protection compiler flag is
Patch6002: pcre2-10.35-Fix-previous-commit-include-CET_CFLAGS-in-16-bit-and.patch
# Fix an infinite loop when a single-byte newline is search in JIT if an
Patch6003: pcre2-10.35-Fix-inifinite-loop-when-a-single-byte-newline-is-sea.patch
# Fix a buffer overread when parsing an unterminated VERSION condition with
# a single-digit minor number at the end of a regular expression,
Patch6004: pcre2-10.35-Fix-read-overflow-for-invalid-VERSION-test-with-one-.patch
# Fix an early fail optimization with character ranges and a buffer overread
Patch6005: pcre2-10.35-Fix-an-early-fail-optimization-issue-and-a-buffer-ov.patch
Patch6006: backport-CVE-2022-1586-1.patch
Patch6007: backport-CVE-2022-1586-2.patch
Patch6008: backport-CVE-2022-1587.patch
Patch6009: backport-Fix-Bugzilla-2642-no-match-bug-in-8-bit-mode-for-cas.patch
Patch6010: backport-Fixed-a-bug-in-character-set-matching-when-JIT-is-en.patch
Patch6011: backport-Fixed-a-word-boundary-check-bug-in-JIT-when-partial-.patch
Patch6012: backport-Fix-some-numerical-checking-bugs-Bugzilla-2690.patch
Patch6013: backport-Fix-K-within-recursion-bug-in-interpreter.patch
Patch6014: backport-jit-avoid-integer-wraparound-in-stack-size-definitio.patch
Patch6015: backport-jit-use-correct-type-when-checking-for-max-value-73.patch
Patch6016: backport-match-avoid-crash-if-subject-NULL-and-PCRE2_ZERO_TER.patch
Patch6017: backport-Fix-recursion-issue-in-JIT.patch
Patch6018: backport-Fixed-race-condition-that-occurs-when-initializing-t.patch
Patch6019: backport-Fixed-an-issue-in-the-backtracking-optimization-of-c.patch
Patch6020: backport-jit-fail-early-in-ffcps_-if-subject-shorter-than-off.patch
Patch6021: backport-jit-fix-pcre2_jit_free_unused_memory-if-sljit-not-us.patch
Patch6022: backport-fix-CVE-2022-41409.patch
Patch6023: backport-fix-a-possible-integer-overflow-in-DFA-matching-305.patch
Patch6024: backport-Fix-oversight-in-DFA-when-changing-OP_REVERSE-also-a.patch
Patch6025: backport-Fix-32-bit-quantifier-following-a-character-larger-t.patch
Patch6026: backport-Fix-z-behaviour-when-matching-within-invalid-UTF.patch
Patch6027: backport-Fix-incorrect-patch-in-c1306126.patch
Patch6028: backport-Fix-another-oversight-in-c1306126.patch
Patch6029: backport-Fix-X-matching-in-32-bit-mode-without-UTF-in-JIT.patch
Patch6030: backport-Fix-bad-patch-in-05206d66.-The-interpreter-was-handl.patch
Patch6031: backport-Fix-backref-iterators-when-PCRE2_MATCH_UNSET_BACKREF.patch
Patch6032: backport-Fix-compile-loop-in-32-bit-mode-for-characters-above.patch
Patch6033: backport-Fix-incorrect-matching-of-0xffffffff-to-any-characte.patch
Patch6034: backport-Fix-accept-and-endanchored-interaction-in-JIT.patch
Patch6035: backport-Fix-backreferences-with-unset-backref-and-non-greedy.patch
Patch6036: backport-Sanity-checks-for-ctype-functions-342.patch
Patch6037: backport-Fix-incorrect-class-character-matches-in-JIT.patch
Patch6038: backport-Fixing-an-issue-using-empty-character-sets-in-jit.patch
Patch6039: backport-Fix-non-recognition-of-some-octal-escapes-in-substitute.patch
Patch6040: backport-Guard-against-out-of-bounds-memory-access-when-parsing.patch
Patch6041: backport-Add-Perl-titlecasing-475.patch
Patch6042: backport-Fix-incorrect-positive-error-code-from-pcre2_substitute.patch
Patch6043: backport-pcre2_compile-avoid-1-byte-buffer-overread-parsing-V.patch
Patch6044: backport-Improve-error-message-for-N-name-in-character-classes.patch
BuildRequires: autoconf libtool automake coreutils gcc make readline-devel
Obsoletes: pcre2-utf16 pcre2-utf32 pcre2-tools
Provides: pcre2-utf16 pcre2-utf32 pcre2-tools
Provides: bundled(sljit)
%description
PCRE2 is a re-working of the original PCRE1 library to provide an entirely new
API. Since its initial release in 2015, there has been further development of
the code and it now differs from PCRE1 in more than just the API.
PCRE2 is written in C, and it has its own API. There are three sets of
functions, one for the 8-bit library, which processes strings of bytes, one for
the 16-bit library, which processes strings of 16-bit values, and one for the
32-bit library, which processes strings of 32-bit values. Unlike PCRE1, there
are no C++ wrappers.
The distribution does contain a set of C wrapper functions for the 8-bit
library that are based on the POSIX regular expression API (see the pcre2posix
man page). These are built into a library called libpcre2-posix. Note that this
just provides a POSIX calling interface to PCRE2; the regular expressions
themselves still follow Perl syntax and semantics. The POSIX API is restricted,
and does not give full access to all of PCRE2's facilities.
%package devel
Summary: Development files for %{name}
Requires: %{name} = %{version}-%{release}
Obsoletes: pcre2-static
Provides: pcre2-static
%description devel
%{summary}.
%package help
Summary: Man pages for %{name}
BuildArch: noarch
%description help
%{summary}.
%prep
%autosetup -n %{name}-%{version} -p1
autoreconf -vif
%build
%configure \
%ifarch riscv64
--disable-jit \
%else
--enable-jit \
%endif
--enable-pcre2grep-jit \
--disable-bsr-anycrlf \
--disable-coverage \
--disable-ebcdic \
--disable-fuzz-support \
--disable-jit-sealloc \
--disable-never-backslash-C \
--enable-newline-is-lf \
--enable-pcre2-8 \
--enable-pcre2-16 \
--enable-pcre2-32 \
--enable-pcre2grep-callout \
--enable-pcre2grep-jit \
--disable-pcre2grep-libbz2 \
--disable-pcre2grep-libz \
--disable-pcre2test-libedit \
--enable-pcre2test-libreadline \
--disable-rebuild-chartables \
--enable-shared \
--enable-static \
--enable-unicode \
--disable-valgrind \
--disable-silent-rules
%make_build
%install
%make_install
#Unpacked files
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
%check
make check
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%license %{_pkgdocdir}/{COPYING,LICENCE}
%doc AUTHORS ChangeLog NEWS HACKING README
%{_libdir}/libpcre2-8.so.*
%{_libdir}/libpcre2-posix.so.*
%{_libdir}/libpcre2-16.so.*
%{_libdir}/libpcre2-32.so.*
%{_bindir}/pcre2grep
%{_bindir}/pcre2test
%files devel
%{_includedir}/*.h
%{_libdir}/*.so
%{_libdir}/*.a
%{_libdir}/pkgconfig/*
%{_bindir}/pcre2-config
%doc ./src/pcre2demo.c
%files help
%{_mandir}/man1/*
%{_mandir}/man3/*
%{_pkgdocdir}/*.txt
%{_pkgdocdir}/html/
%changelog
* Wed Dec 4 2024 hugel <gengqihu2@h-partners.com> - 10.35-10
- DESC:sync patches from upstream
* Tue May 07 2024 xujing <xujing125@huawei.com> - 10.35-9
- DESC:Fixing an issue using empty character sets in jit
* Tue Feb 06 2024 xujing <xujing125@huawei.com> - 10.35-8
- DESC:Sanity checks for ctype functions
Fix incorrect class character matches in JIT
* Mon Jan 22 2024 xujing <xujing125@huawei.com> - 10.35-7
- DESC:sync patches from upstream to fix some bugs
* Thu Dec 14 2023 xujing <xujing125@huawei.com> - 10.35-6
- DESC:fix a possible integer overflow in DFA matching (#305)
* Mon Jul 31 2023 yangmingtai <yangmingtai@huawei.com> - 10.35-5
- DESC:fix CVE-2022-41409
* Wed Apr 19 2023 yangmingtai <yangmingtai@huawei.com> - 10.35-4
- DESC:sync community patches
backport-jit-fail-early-in-ffcps_-if-subject-shorter-than-off.patch
backport-jit-fix-pcre2_jit_free_unused_memory-if-sljit-not-us.patch
* Tue Oct 18 2022 yangmingtai <yangmingtai@huawei.com> - 10.35-3
- DESC:sync community patchs
* Sat May 28 2022 yangmingtai <yangmingtai@huawei.com> - 10.35-2
- DESC:fix CVE-2022-1586 and CVE-2022-1587
* Mon Aug 3 2020 openEuler Buildteam <buildteam@openeuler.org> - 10.35-1
- Type:update
- ID:NA
- SUG:NA
- DESC:update to 10.35
* Tue Apr 7 2020 openEuler Buildteam <buildteam@openeuler.org> - 10.33-3
- Type:cves
- ID:CVE-2019-20454
- SUG:NA
- DESC:fix CVE-2019-20454
* Mon Feb 3 2020 openEuler Buildteam <buildteam@openeuler.org> - 10.33-2
- Fix stack buffer overflow
* Sat Sep 14 2019 openEuler Buildteam <buildteam@openeuler.org> - 10.33-1
- Package init