2016-01-12 15:32:35 +00:00
|
|
|
# This is stable release:
|
|
|
|
#%%global rcversion RC1
|
2015-03-16 13:54:41 +00:00
|
|
|
Name: pcre2
|
2016-01-05 16:23:38 +00:00
|
|
|
Version: 10.21
|
2016-06-03 08:24:38 +00:00
|
|
|
Release: %{?rcversion:0.}5%{?rcversion:.%rcversion}%{?dist}
|
2015-03-16 13:54:41 +00:00
|
|
|
%global myversion %{version}%{?rcversion:-%rcversion}
|
|
|
|
Summary: Perl-compatible regular expression library
|
|
|
|
Group: System Environment/Libraries
|
2015-06-19 07:04:12 +00:00
|
|
|
# the library: BSD
|
2015-03-16 13:54:41 +00:00
|
|
|
# pcre2test (linked to GNU readline): BSD (linked to GPLv3+)
|
2016-01-12 15:32:35 +00:00
|
|
|
# COPYING: see LICENCE file
|
|
|
|
# LICENSE: BSD text and declares Public Domain
|
|
|
|
# for testdata
|
2015-06-19 07:04:12 +00:00
|
|
|
#Not distributed in binary package
|
2015-03-16 13:54:41 +00:00
|
|
|
# autotools: GPLv3+ with exception
|
2015-06-19 07:04:12 +00:00
|
|
|
# install-sh: MIT
|
2016-01-12 15:32:35 +00:00
|
|
|
# testdata: Public Domain
|
2015-03-16 13:54:41 +00:00
|
|
|
License: BSD
|
|
|
|
URL: http://www.pcre.org/
|
|
|
|
Source: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%{?rcversion:Testing/}%{name}-%{myversion}.tar.bz2
|
|
|
|
# Do no set RPATH if libdir is not /usr/lib
|
|
|
|
Patch0: pcre2-10.10-Fix-multilib.patch
|
2016-02-11 08:07:37 +00:00
|
|
|
# Report unmatched closing parantheses properly, in upstream after 10.21
|
|
|
|
Patch1: pcre2-10.21-Detect-unmatched-closing-parentheses-in-the-pre-scan.patch
|
2016-02-11 08:23:41 +00:00
|
|
|
# Fix pcre2test for expressions with a callout inside a look-behind assertion,
|
|
|
|
# upstream bug #1783, fixed in upstream after 10.21
|
|
|
|
Patch2: pcre2-10.21-Fix-pcre2test-loop-when-a-callout-is-in-an-initial-l.patch
|
2016-03-18 11:19:08 +00:00
|
|
|
# Fix CVE-2016-3191 (workspace overflow for (*ACCEPT) with deeply nested
|
|
|
|
# parentheses), upstream bug #1791, fixed in upstream after 10.21
|
2016-02-11 08:33:11 +00:00
|
|
|
Patch3: pcre2-10.21-Fix-workspace-overflow-for-deep-nested-parentheses-w.patch
|
2016-02-29 13:49:42 +00:00
|
|
|
# Fix a typo in pcre2_study(), fixed in upstream after 10.21
|
|
|
|
Patch4: pcre2-10.21-Fix-typo-in-pcre2_study.patch
|
2016-06-03 08:24:38 +00:00
|
|
|
# Fix a race in JIT locking condition, fixed in upstream after 10.21
|
|
|
|
Patch5: pcre2-10.21-A-racing-condition-is-fixed-in-JIT-reported-by-Mozil.patch
|
2016-06-03 08:35:41 +00:00
|
|
|
# Fix an ovector check in JIT test program, fixed in upstream after 10.21
|
|
|
|
Patch6: pcre2-10.21-Fix-typo-in-test-program.patch
|
2016-06-03 08:39:09 +00:00
|
|
|
# Enable JIT in the pcre2grep tool, fixed in upstream after 10.21
|
|
|
|
Patch7: pcre2-10.21-Make-pcre2grep-use-JIT-it-was-omitted-by-mistake.patch
|
2015-05-29 15:11:37 +00:00
|
|
|
|
2015-03-16 13:54:41 +00:00
|
|
|
# New libtool to get rid of RPATH and to use distribution autotools
|
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
2015-06-19 07:04:12 +00:00
|
|
|
BuildRequires: coreutils
|
2015-06-19 07:21:42 +00:00
|
|
|
BuildRequires: gcc
|
2015-03-16 13:54:41 +00:00
|
|
|
BuildRequires: libtool
|
2015-06-19 07:04:12 +00:00
|
|
|
BuildRequires: make
|
2015-03-16 13:54:41 +00:00
|
|
|
BuildRequires: readline-devel
|
|
|
|
|
|
|
|
%description
|
|
|
|
PCRE2 is a re-working of the original PCRE (Perl-compatible regular
|
|
|
|
expression) library to provide an entirely new 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. There are no C++
|
2016-03-07 16:14:50 +00:00
|
|
|
wrappers. This package provides support for strings in 8-bit and UTF-8
|
|
|
|
encodings. Install %{name}-utf16 or %{name}-utf32 packages for the other ones.
|
2015-03-16 13:54:41 +00:00
|
|
|
|
|
|
|
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 can be found in a library called libpcre2posix. 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.
|
|
|
|
|
2016-03-07 16:14:50 +00:00
|
|
|
%package utf16
|
|
|
|
Summary: UTF-16 variant of PCRE2
|
|
|
|
Group: Development/Libraries
|
|
|
|
Conflicts: %{name}%{?_isa} < 10.21-4
|
|
|
|
|
|
|
|
%description utf16
|
|
|
|
This is PCRE2 library working on UTF-16 strings.
|
|
|
|
|
|
|
|
%package utf32
|
|
|
|
Summary: UTF-32 variant of PCRE2
|
|
|
|
Group: Development/Libraries
|
|
|
|
Conflicts: %{name}%{?_isa} < 10.21-4
|
|
|
|
|
|
|
|
%description utf32
|
|
|
|
This is PCRE2 library working on UTF-32 strings.
|
2015-03-16 13:54:41 +00:00
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for %{name}
|
|
|
|
Group: Development/Libraries
|
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
2016-03-07 16:14:50 +00:00
|
|
|
Requires: %{name}-utf16%{?_isa} = %{version}-%{release}
|
|
|
|
Requires: %{name}-utf32%{?_isa} = %{version}-%{release}
|
2015-06-19 07:21:42 +00:00
|
|
|
Requires: gcc
|
2015-03-16 13:54:41 +00:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
Development files (headers, libraries for dynamic linking, documentation)
|
|
|
|
for %{name}. The header file for the POSIX-style functions is called
|
|
|
|
pcre2posix.h.
|
|
|
|
|
|
|
|
%package static
|
|
|
|
Summary: Static library for %{name}
|
|
|
|
Group: Development/Libraries
|
|
|
|
Requires: %{name}-devel%{_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description static
|
|
|
|
Library for static linking for %{name}.
|
|
|
|
|
|
|
|
%package tools
|
|
|
|
Summary: Auxiliary utilities for %{name}
|
|
|
|
# pcre2test (linked to GNU readline): BSD (linked to GPLv3+)
|
|
|
|
License: BSD and GPLv3+
|
|
|
|
Group: Development/Tools
|
|
|
|
Requires: %{name}%{_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description tools
|
|
|
|
Utilities demonstrating PCRE2 capabilities like pcre2grep or pcre2test.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{name}-%{myversion}
|
|
|
|
%patch0 -p1
|
2016-02-11 08:07:37 +00:00
|
|
|
%patch1 -p1
|
2016-02-11 08:23:41 +00:00
|
|
|
%patch2 -p1
|
2016-02-11 08:33:11 +00:00
|
|
|
%patch3 -p1
|
2016-02-29 13:49:42 +00:00
|
|
|
%patch4 -p1
|
2016-06-03 08:24:38 +00:00
|
|
|
%patch5 -p1
|
2016-06-03 08:35:41 +00:00
|
|
|
%patch6 -p1
|
2016-06-03 08:39:09 +00:00
|
|
|
%patch7 -p1
|
2015-03-16 13:54:41 +00:00
|
|
|
# Because of multilib patch
|
2015-06-19 07:17:53 +00:00
|
|
|
libtoolize --copy --force
|
|
|
|
autoreconf -vif
|
2015-03-16 13:54:41 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
# There is a strict-aliasing problem on PPC64, bug #881232
|
|
|
|
%ifarch ppc64
|
|
|
|
%global optflags %{optflags} -fno-strict-aliasing
|
|
|
|
%endif
|
|
|
|
%configure \
|
|
|
|
%ifarch s390 s390x sparc64 sparcv9
|
|
|
|
--disable-jit \
|
|
|
|
--disable-pcre2grep-jit \
|
|
|
|
%else
|
|
|
|
--enable-jit \
|
|
|
|
--enable-pcre2grep-jit \
|
|
|
|
%endif
|
|
|
|
--disable-bsr-anycrlf \
|
|
|
|
--disable-coverage \
|
|
|
|
--disable-ebcdic \
|
2016-01-05 16:23:38 +00:00
|
|
|
--disable-never-backslash-C \
|
2015-03-16 13:54:41 +00:00
|
|
|
--enable-newline-is-lf \
|
|
|
|
--enable-pcre2-8 \
|
|
|
|
--enable-pcre2-16 \
|
|
|
|
--enable-pcre2-32 \
|
|
|
|
--disable-pcre2test-libedit \
|
|
|
|
--enable-pcre2test-libreadline \
|
|
|
|
--disable-pcre2grep-libbz2 \
|
|
|
|
--disable-pcre2grep-libz \
|
|
|
|
--disable-rebuild-chartables \
|
|
|
|
--enable-shared \
|
|
|
|
--enable-stack-for-recursion \
|
|
|
|
--enable-static \
|
|
|
|
--enable-unicode \
|
|
|
|
--disable-valgrind
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
# Get rid of unneeded *.la files
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
|
|
|
# These are handled by %%doc in %%files
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{_docdir}/pcre2
|
|
|
|
|
|
|
|
%check
|
|
|
|
make %{?_smp_mflags} check VERBOSE=yes
|
|
|
|
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
2016-03-07 16:14:50 +00:00
|
|
|
%post utf16 -p /sbin/ldconfig
|
|
|
|
%postun utf16 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%post utf32 -p /sbin/ldconfig
|
|
|
|
%postun utf32 -p /sbin/ldconfig
|
|
|
|
|
2015-03-16 13:54:41 +00:00
|
|
|
%files
|
2016-03-07 16:14:50 +00:00
|
|
|
%{_libdir}/libpcre2-8.so.*
|
|
|
|
%{_libdir}/libpcre2-posix.so.*
|
2015-03-16 13:54:41 +00:00
|
|
|
%{!?_licensedir:%global license %%doc}
|
|
|
|
%license COPYING LICENCE
|
2016-03-07 15:52:11 +00:00
|
|
|
%doc AUTHORS ChangeLog NEWS
|
2015-03-16 13:54:41 +00:00
|
|
|
|
2016-03-07 16:14:50 +00:00
|
|
|
%files utf16
|
|
|
|
%{_libdir}/libpcre2-16.so.*
|
|
|
|
%license COPYING LICENCE
|
|
|
|
%doc AUTHORS ChangeLog NEWS
|
|
|
|
|
|
|
|
%files utf32
|
|
|
|
%{_libdir}/libpcre2-32.so.*
|
|
|
|
%license COPYING LICENCE
|
|
|
|
%doc AUTHORS ChangeLog NEWS
|
|
|
|
|
2015-03-16 13:54:41 +00:00
|
|
|
%files devel
|
|
|
|
%{_libdir}/*.so
|
|
|
|
%{_libdir}/pkgconfig/*
|
|
|
|
%{_includedir}/*.h
|
|
|
|
%{_mandir}/man1/pcre2-config.*
|
|
|
|
%{_mandir}/man3/*
|
|
|
|
%{_bindir}/pcre2-config
|
|
|
|
%doc doc/*.txt doc/html
|
2016-03-07 15:52:11 +00:00
|
|
|
%doc README HACKING ./src/pcre2demo.c
|
2015-03-16 13:54:41 +00:00
|
|
|
|
|
|
|
%files static
|
|
|
|
%{_libdir}/*.a
|
|
|
|
%{!?_licensedir:%global license %%doc}
|
|
|
|
%license COPYING LICENCE
|
|
|
|
|
|
|
|
%files tools
|
|
|
|
%{_bindir}/pcre2grep
|
|
|
|
%{_bindir}/pcre2test
|
|
|
|
%{_mandir}/man1/pcre2grep.*
|
|
|
|
%{_mandir}/man1/pcre2test.*
|
|
|
|
|
|
|
|
%changelog
|
2016-06-03 08:24:38 +00:00
|
|
|
* Fri Jun 03 2016 Petr Pisar <ppisar@redhat.com> - 10.21-5
|
|
|
|
- Fix a race in JIT locking condition
|
2016-06-03 08:35:41 +00:00
|
|
|
- Fix an ovector check in JIT test program
|
2016-06-03 08:39:09 +00:00
|
|
|
- Enable JIT in the pcre2grep tool
|
2016-06-03 08:24:38 +00:00
|
|
|
|
2016-03-07 15:52:11 +00:00
|
|
|
* Mon Mar 07 2016 Petr Pisar <ppisar@redhat.com> - 10.21-4
|
|
|
|
- Ship README in devel as it covers API and build, not general info
|
2016-03-07 16:14:50 +00:00
|
|
|
- Move UTF-16 and UTF-32 libraries into pcre-ut16 and pcre-32 subpackages
|
2016-03-07 15:52:11 +00:00
|
|
|
|
2016-02-29 13:49:42 +00:00
|
|
|
* Mon Feb 29 2016 Petr Pisar <ppisar@redhat.com> - 10.21-3
|
|
|
|
- Fix a typo in pcre2_study()
|
|
|
|
|
2016-02-11 08:07:37 +00:00
|
|
|
* Thu Feb 11 2016 Petr Pisar <ppisar@redhat.com> - 10.21-2
|
|
|
|
- Report unmatched closing parantheses properly
|
2016-02-11 08:23:41 +00:00
|
|
|
- Fix pcre2test for expressions with a callout inside a look-behind assertion
|
|
|
|
(upstream bug #1783)
|
2016-03-18 11:19:08 +00:00
|
|
|
- Fix CVE-2016-3191 (workspace overflow for (*ACCEPT) with deeply nested
|
|
|
|
parentheses) (upstream bug #1791)
|
2016-02-11 08:07:37 +00:00
|
|
|
|
2016-02-04 12:02:11 +00:00
|
|
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 10.21-1.1
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
|
|
2016-01-12 15:32:35 +00:00
|
|
|
* Tue Jan 12 2016 Petr Pisar <ppisar@redhat.com> - 10.21-1
|
|
|
|
- 10.21 bump
|
|
|
|
|
2016-01-06 13:14:59 +00:00
|
|
|
* Wed Jan 06 2016 Petr Pisar <ppisar@redhat.com> - 10.21-0.2.RC1
|
|
|
|
- Adapt a test to French locale on RHEL
|
|
|
|
|
2016-01-05 16:23:38 +00:00
|
|
|
* Tue Jan 05 2016 Petr Pisar <ppisar@redhat.com> - 10.21-0.1.RC1
|
|
|
|
- 10.21-RC1 bump
|
|
|
|
|
2015-10-26 09:11:06 +00:00
|
|
|
* Mon Oct 26 2015 Petr Pisar <ppisar@redhat.com> - 10.20-3
|
|
|
|
- Fix compiling patterns with PCRE2_NO_AUTO_CAPTURE (upstream bug #1704)
|
|
|
|
|
2015-10-12 08:41:58 +00:00
|
|
|
* Mon Oct 12 2015 Petr Pisar <ppisar@redhat.com> - 10.20-2
|
|
|
|
- Fix compiling classes with a negative escape and a property escape
|
|
|
|
(upstream bug #1697)
|
2015-10-12 11:00:35 +00:00
|
|
|
- Fix integer overflow for patterns whose minimum matching length is large
|
|
|
|
(upstream bug #1699)
|
2015-10-12 08:41:58 +00:00
|
|
|
|
2015-07-03 08:41:21 +00:00
|
|
|
* Fri Jul 03 2015 Petr Pisar <ppisar@redhat.com> - 10.20-1
|
|
|
|
- 10.20 bump
|
|
|
|
|
2015-06-19 07:04:12 +00:00
|
|
|
* Fri Jun 19 2015 Petr Pisar <ppisar@redhat.com> - 10.20-0.1.RC1
|
|
|
|
- 10.20-RC1 bump
|
2015-06-19 07:21:42 +00:00
|
|
|
- Replace dependency on glibc-headers with gcc (bug #1230479)
|
2015-06-22 10:40:47 +00:00
|
|
|
- Preserve soname
|
2015-06-19 07:04:12 +00:00
|
|
|
|
2015-06-18 00:53:44 +00:00
|
|
|
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 10.10-3.1
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
|
|
2015-05-29 15:37:28 +00:00
|
|
|
* Fri May 29 2015 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 10.10-3
|
|
|
|
- fixed Release field
|
|
|
|
|
2015-05-29 15:11:37 +00:00
|
|
|
* Fri May 29 2015 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 10.10-2.1
|
|
|
|
- Backport fix for AArch64
|
|
|
|
|
2015-05-05 14:56:31 +00:00
|
|
|
* Tue May 05 2015 Petr Pisar <ppisar@redhat.com> - 10.10-2
|
|
|
|
- Package pcre2demo.c as a documentation for pcre2-devel
|
|
|
|
|
2015-03-16 13:54:41 +00:00
|
|
|
* Fri Mar 13 2015 Petr Pisar <ppisar@redhat.com> - 10.10-1
|
|
|
|
- PCRE2 library packaged
|
|
|
|
|