i10ce
changed/i10ce/tre-0.8.0-45.20140228gitc2f5d13.el10
commit
649c8531ac
@ -0,0 +1 @@
|
||||
SOURCES/tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca.tar.gz
|
@ -0,0 +1 @@
|
||||
c9ac5adb05e0830cdfeb1fd236008bd79c41c5ff SOURCES/tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca.tar.gz
|
@ -0,0 +1,109 @@
|
||||
From 35f61f40d6b68928ca5d409fa9fc204ea77e2199 Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fvogt@suse.de>
|
||||
Date: Tue, 11 Oct 2022 11:35:53 +0200
|
||||
Subject: [PATCH] Remove broken agrep test entry
|
||||
|
||||
It's meant to cause agrep to return with exit code 2, but asserts that it's
|
||||
exit code 1 instead.
|
||||
|
||||
It's meant to ensure that using ".*" as pattern results in exit code 2 because
|
||||
it matches also an empty string. However, glob expansion results in ".*"
|
||||
picking up files such as "." and ".." from the CWD, which get interpreted as
|
||||
valid pattern. This results in exit status 1 (no match found) which is what
|
||||
the .ok file expects, but that's invalid.
|
||||
|
||||
With bash 5.2, glob expansion no longer matches "." and ".." by default, so
|
||||
the test works as intended by accident, causing a mismatch with the expected
|
||||
wrong exit code.
|
||||
|
||||
It's unfortunately not easily possible to avoid glob expansion in this case.
|
||||
|
||||
Just remove the test for now.
|
||||
---
|
||||
tests/agrep/exitstatus.args | 1 -
|
||||
tests/agrep/exitstatus.ok | 61 -------------------------------------
|
||||
2 files changed, 62 deletions(-)
|
||||
|
||||
diff --git a/tests/agrep/exitstatus.args b/tests/agrep/exitstatus.args
|
||||
index 808ae77..2f53e97 100644
|
||||
--- a/tests/agrep/exitstatus.args
|
||||
+++ b/tests/agrep/exitstatus.args
|
||||
@@ -5,6 +5,5 @@ this-wont-be-found
|
||||
.
|
||||
-v .
|
||||
# Some errors which should give exit status 2.
|
||||
--d .* dummy
|
||||
-d {1 dummy
|
||||
\
|
||||
diff --git a/tests/agrep/exitstatus.ok b/tests/agrep/exitstatus.ok
|
||||
index 28427bb..bd23b4c 100644
|
||||
--- a/tests/agrep/exitstatus.ok
|
||||
+++ b/tests/agrep/exitstatus.ok
|
||||
@@ -521,67 +521,6 @@ Exit status 1.
|
||||
Exit status 1.
|
||||
#### TEST: agrep -H -n -s --color --show-position -v . < exitstatus.in
|
||||
|
||||
-Exit status 1.
|
||||
-#### TEST: agrep -d .* dummy exitstatus.in
|
||||
-
|
||||
-Exit status 1.
|
||||
-#### TEST: agrep -d .* dummy < exitstatus.in
|
||||
-
|
||||
-Exit status 1.
|
||||
-#### TEST: agrep -c -d .* dummy exitstatus.in
|
||||
-exitstatus.in:0
|
||||
-
|
||||
-Exit status 1.
|
||||
-#### TEST: agrep -c -d .* dummy < exitstatus.in
|
||||
-
|
||||
-Exit status 1.
|
||||
-#### TEST: agrep -H -d .* dummy exitstatus.in
|
||||
-
|
||||
-Exit status 1.
|
||||
-#### TEST: agrep -H -d .* dummy < exitstatus.in
|
||||
-
|
||||
-Exit status 1.
|
||||
-#### TEST: agrep -l -d .* dummy exitstatus.in
|
||||
-
|
||||
-Exit status 1.
|
||||
-#### TEST: agrep -l -d .* dummy < exitstatus.in
|
||||
-
|
||||
-Exit status 1.
|
||||
-#### TEST: agrep -n -d .* dummy exitstatus.in
|
||||
-
|
||||
-Exit status 1.
|
||||
-#### TEST: agrep -n -d .* dummy < exitstatus.in
|
||||
-
|
||||
-Exit status 1.
|
||||
-#### TEST: agrep -s -d .* dummy exitstatus.in
|
||||
-
|
||||
-Exit status 1.
|
||||
-#### TEST: agrep -s -d .* dummy < exitstatus.in
|
||||
-
|
||||
-Exit status 1.
|
||||
-#### TEST: agrep -M -d .* dummy exitstatus.in
|
||||
-
|
||||
-Exit status 1.
|
||||
-#### TEST: agrep -M -d .* dummy < exitstatus.in
|
||||
-
|
||||
-Exit status 1.
|
||||
-#### TEST: agrep --show-position -d .* dummy exitstatus.in
|
||||
-
|
||||
-Exit status 1.
|
||||
-#### TEST: agrep --show-position -d .* dummy < exitstatus.in
|
||||
-
|
||||
-Exit status 1.
|
||||
-#### TEST: agrep --color -d .* dummy exitstatus.in
|
||||
-
|
||||
-Exit status 1.
|
||||
-#### TEST: agrep --color -d .* dummy < exitstatus.in
|
||||
-
|
||||
-Exit status 1.
|
||||
-#### TEST: agrep -H -n -s --color --show-position -d .* dummy exitstatus.in
|
||||
-
|
||||
-Exit status 1.
|
||||
-#### TEST: agrep -H -n -s --color --show-position -d .* dummy < exitstatus.in
|
||||
-
|
||||
Exit status 1.
|
||||
#### TEST: agrep -d {1 dummy exitstatus.in
|
||||
|
@ -0,0 +1,36 @@
|
||||
diff -up tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/lib/tre-match-parallel.c.CVE-2016-8859 tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/lib/tre-match-parallel.c
|
||||
--- tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/lib/tre-match-parallel.c.CVE-2016-8859 2014-02-28 19:55:36.000000000 +0100
|
||||
+++ tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/lib/tre-match-parallel.c 2016-11-02 22:07:41.984468354 +0100
|
||||
@@ -59,6 +59,9 @@ char *alloca ();
|
||||
#ifdef HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif /* HAVE_MALLOC_H */
|
||||
+#ifdef HAVE_STDINT_H
|
||||
+#include <stdint.h>
|
||||
+#endif /* HAVE_STDINT_H */
|
||||
|
||||
#include "tre-internal.h"
|
||||
#include "tre-match-utils.h"
|
||||
@@ -153,7 +156,7 @@ tre_tnfa_run_parallel(const tre_tnfa_t *
|
||||
everything in a single large block from the stack frame using alloca()
|
||||
or with malloc() if alloca is unavailable. */
|
||||
{
|
||||
- int tbytes, rbytes, pbytes, xbytes, total_bytes;
|
||||
+ size_t tbytes, rbytes, pbytes, xbytes, total_bytes;
|
||||
char *tmp_buf;
|
||||
/* Compute the length of the block we need. */
|
||||
tbytes = sizeof(*tmp_tags) * num_tags;
|
||||
@@ -168,11 +171,11 @@ tre_tnfa_run_parallel(const tre_tnfa_t *
|
||||
#ifdef TRE_USE_ALLOCA
|
||||
buf = alloca(total_bytes);
|
||||
#else /* !TRE_USE_ALLOCA */
|
||||
- buf = xmalloc((unsigned)total_bytes);
|
||||
+ buf = xmalloc(total_bytes);
|
||||
#endif /* !TRE_USE_ALLOCA */
|
||||
if (buf == NULL)
|
||||
return REG_ESPACE;
|
||||
- memset(buf, 0, (size_t)total_bytes);
|
||||
+ memset(buf, 0, total_bytes);
|
||||
|
||||
/* Get the various pointers within tmp_buf (properly aligned). */
|
||||
tmp_tags = (void *)buf;
|
@ -0,0 +1,21 @@
|
||||
diff -up tre-0.8.0/python/setup.py.chicken tre-0.8.0/python/setup.py
|
||||
--- tre-0.8.0/python/setup.py.chicken 2009-09-20 09:51:01.000000000 +0200
|
||||
+++ tre-0.8.0/python/setup.py 2009-09-20 15:43:45.000000000 +0200
|
||||
@@ -10,7 +10,8 @@ import shutil
|
||||
|
||||
version = "0.8.0"
|
||||
data_files = []
|
||||
-include_dirs = ["../lib"]
|
||||
+include_dirs = ["../include"]
|
||||
+library_dirs = ["../lib/.libs"]
|
||||
libraries = ["tre"]
|
||||
|
||||
if sys.platform == "win32":
|
||||
@@ -31,6 +32,7 @@ setup(name = "tre",
|
||||
sources = ["tre-python.c"],
|
||||
define_macros = [("HAVE_CONFIG_H", None)],
|
||||
include_dirs = include_dirs,
|
||||
+ library_dirs = library_dirs,
|
||||
libraries = libraries
|
||||
),
|
||||
],
|
@ -0,0 +1,12 @@
|
||||
diff -up tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/lib/tre-parse.c.issue37 tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/lib/tre-parse.c
|
||||
--- tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/lib/tre-parse.c.issue37 2014-02-28 19:55:36.000000000 +0100
|
||||
+++ tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/lib/tre-parse.c 2016-11-02 21:01:51.705351218 +0100
|
||||
@@ -1480,6 +1480,8 @@ tre_parse(tre_parse_ctx_t *ctx)
|
||||
ctx->re++;
|
||||
while (ctx->re_end - ctx->re >= 0)
|
||||
{
|
||||
+ if (i == sizeof(tmp))
|
||||
+ return REG_EBRACE;
|
||||
if (ctx->re[0] == CHAR_RBRACE)
|
||||
break;
|
||||
if (tre_isxdigit(ctx->re[0]))
|
@ -0,0 +1,12 @@
|
||||
diff -up tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/lib/tre-parse.c.issue50 tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/lib/tre-parse.c
|
||||
--- tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/lib/tre-parse.c.issue50 2019-02-23 17:36:40.940463693 +0100
|
||||
+++ tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/lib/tre-parse.c 2019-02-23 18:40:41.111544430 +0100
|
||||
@@ -1341,7 +1341,7 @@ tre_parse(tre_parse_ctx_t *ctx)
|
||||
|
||||
case CHAR_RPAREN: /* end of current subexpression */
|
||||
if ((ctx->cflags & REG_EXTENDED && depth > 0)
|
||||
- || (ctx->re > ctx->re_start
|
||||
+ || (!(ctx->cflags & REG_EXTENDED) && ctx->re > ctx->re_start
|
||||
&& *(ctx->re - 1) == CHAR_BACKSLASH))
|
||||
{
|
||||
DPRINT(("tre_parse: empty: '%.*" STRF "'\n",
|
@ -0,0 +1,10 @@
|
||||
diff -up tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/tre.pc.in.ldflags tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/tre.pc.in
|
||||
--- tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/tre.pc.in.ldflags 2014-02-28 19:55:36.000000000 +0100
|
||||
+++ tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/tre.pc.in 2015-06-08 22:55:39.316078801 +0200
|
||||
@@ -6,5 +6,5 @@ includedir=@includedir@
|
||||
Name: TRE
|
||||
Description: TRE regexp matching library
|
||||
Version: @PACKAGE_VERSION@
|
||||
-Libs: -L${libdir} -ltre @LDFLAGS@ @LIBINTL@ @LIBS@
|
||||
+Libs: -L${libdir} -ltre @LIBINTL@ @LIBS@
|
||||
Cflags: -I${includedir} @CPPFLAGS@
|
@ -0,0 +1,21 @@
|
||||
diff -up tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/python/tre-python.c.pep623 tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/python/tre-python.c
|
||||
--- tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/python/tre-python.c.pep623 2023-09-28 18:14:11.839914165 +0200
|
||||
+++ tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/python/tre-python.c 2023-09-28 18:26:22.469156493 +0200
|
||||
@@ -365,7 +365,7 @@ PyTrePattern_search(TrePatternObject *se
|
||||
|
||||
if (PyUnicode_Check(pstring))
|
||||
{
|
||||
- Py_ssize_t len = PyUnicode_GetSize(pstring);
|
||||
+ Py_ssize_t len = PyUnicode_GetLength(pstring);
|
||||
wchar_t *buf = calloc(sizeof(wchar_t), len);
|
||||
if(!buf)
|
||||
{
|
||||
@@ -502,7 +502,7 @@ PyTre_ncompile(PyObject *self, PyObject
|
||||
|
||||
if (upattern != NULL)
|
||||
{
|
||||
- Py_ssize_t len = PyUnicode_GetSize(upattern);
|
||||
+ Py_ssize_t len = PyUnicode_GetLength(upattern);
|
||||
wchar_t *buf = calloc(sizeof(wchar_t), len);
|
||||
if(!buf)
|
||||
{
|
@ -0,0 +1,193 @@
|
||||
diff -up tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/python/example.py.py3 tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/python/example.py
|
||||
--- tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/python/example.py.py3 2014-02-28 19:55:36.000000000 +0100
|
||||
+++ tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/python/example.py 2019-02-24 00:13:35.372854041 +0100
|
||||
@@ -1,7 +1,7 @@
|
||||
import tre
|
||||
|
||||
fz = tre.Fuzzyness(maxerr = 3)
|
||||
-print fz
|
||||
+print (fz)
|
||||
|
||||
pt = tre.compile("Don(ald( Ervin)?)? Knuth", tre.EXTENDED)
|
||||
data = """
|
||||
@@ -16,5 +16,5 @@ typefaces.
|
||||
m = pt.search(data, fz)
|
||||
|
||||
if m:
|
||||
- print m.groups()
|
||||
- print m[0]
|
||||
+ print (m.groups())
|
||||
+ print (m[0])
|
||||
diff -up tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/python/tre-python.c.py3 tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/python/tre-python.c
|
||||
--- tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/python/tre-python.c.py3 2014-02-28 19:55:36.000000000 +0100
|
||||
+++ tre-c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca/python/tre-python.c 2019-02-24 00:13:35.373854053 +0100
|
||||
@@ -86,9 +86,9 @@ TreFuzzyness_repr(PyObject *obj)
|
||||
TreFuzzynessObject *self = (TreFuzzynessObject*)obj;
|
||||
PyObject *o;
|
||||
|
||||
- o = PyString_FromFormat("%s(delcost=%d,inscost=%d,maxcost=%d,subcost=%d,"
|
||||
+ o = PyUnicode_FromFormat("%s(delcost=%d,inscost=%d,maxcost=%d,subcost=%d,"
|
||||
"maxdel=%d,maxerr=%d,maxins=%d,maxsub=%d)",
|
||||
- self->ob_type->tp_name, self->ap.cost_del,
|
||||
+ Py_TYPE(self)->tp_name, self->ap.cost_del,
|
||||
self->ap.cost_ins, self->ap.max_cost,
|
||||
self->ap.cost_subst, self->ap.max_del,
|
||||
self->ap.max_err, self->ap.max_ins,
|
||||
@@ -118,8 +118,7 @@ static PyMemberDef TreFuzzyness_members[
|
||||
};
|
||||
|
||||
static PyTypeObject TreFuzzynessType = {
|
||||
- PyObject_HEAD_INIT(NULL)
|
||||
- 0, /* ob_size */
|
||||
+ PyVarObject_HEAD_INIT(NULL, 0)
|
||||
TRE_MODULE ".Fuzzyness", /* tp_name */
|
||||
sizeof(TreFuzzynessObject), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
@@ -193,7 +192,7 @@ PyTreMatch_groups(TreMatchObject *self,
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
-PyTreMatch_groupi(PyObject *obj, int gn)
|
||||
+PyTreMatch_groupi(PyObject *obj, Py_ssize_t gn)
|
||||
{
|
||||
TreMatchObject *self = (TreMatchObject*)obj;
|
||||
PyObject *result;
|
||||
@@ -220,7 +219,7 @@ PyTreMatch_group(TreMatchObject *self, P
|
||||
PyObject *result;
|
||||
long gn;
|
||||
|
||||
- gn = PyInt_AsLong(grpno);
|
||||
+ gn = PyLong_AsLong(grpno);
|
||||
|
||||
if (PyErr_Occurred())
|
||||
return NULL;
|
||||
@@ -277,8 +276,7 @@ static PySequenceMethods TreMatch_as_seq
|
||||
};
|
||||
|
||||
static PyTypeObject TreMatchType = {
|
||||
- PyObject_HEAD_INIT(NULL)
|
||||
- 0, /* ob_size */
|
||||
+ PyVarObject_HEAD_INIT(NULL, 0)
|
||||
TRE_MODULE ".Match", /* tp_name */
|
||||
sizeof(TreMatchObject), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
@@ -380,8 +378,8 @@ PyTrePattern_search(TrePatternObject *se
|
||||
}
|
||||
else
|
||||
{
|
||||
- targ = PyString_AsString(pstring);
|
||||
- tlen = PyString_Size(pstring);
|
||||
+ targ = PyBytes_AsString(pstring);
|
||||
+ tlen = PyBytes_Size(pstring);
|
||||
|
||||
rc = tre_reganexec(&self->rgx, targ, tlen, &mo->am, fz->ap, eflags);
|
||||
}
|
||||
@@ -433,8 +431,7 @@ PyTrePattern_dealloc(TrePatternObject *s
|
||||
}
|
||||
|
||||
static PyTypeObject TrePatternType = {
|
||||
- PyObject_HEAD_INIT(NULL)
|
||||
- 0, /* ob_size */
|
||||
+ PyVarObject_HEAD_INIT(NULL, 0)
|
||||
TRE_MODULE ".Pattern", /* tp_name */
|
||||
sizeof(TrePatternObject), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
@@ -467,7 +464,7 @@ static PyTypeObject TrePatternType = {
|
||||
};
|
||||
|
||||
static TrePatternObject *
|
||||
-newTrePatternObject()
|
||||
+newTrePatternObject(void)
|
||||
{
|
||||
TrePatternObject *self;
|
||||
|
||||
@@ -482,7 +479,7 @@ static PyObject *
|
||||
PyTre_ncompile(PyObject *self, PyObject *args)
|
||||
{
|
||||
TrePatternObject *rv;
|
||||
- PyUnicodeObject *upattern = NULL;
|
||||
+ PyObject *upattern = NULL;
|
||||
char *pattern = NULL;
|
||||
int pattlen;
|
||||
int cflags = 0;
|
||||
@@ -537,9 +534,8 @@ static PyMethodDef tre_methods[] = {
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
-static char *tre_doc =
|
||||
-"Python module for TRE library\n\nModule exports "
|
||||
-"the only function: compile";
|
||||
+
|
||||
+#define tre_doc "Python module for TRE library\n\nModule exports the only function: compile"
|
||||
|
||||
static struct _tre_flags {
|
||||
char *name;
|
||||
@@ -556,40 +552,57 @@ static struct _tre_flags {
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
+
|
||||
+static struct PyModuleDef moduledef = {
|
||||
+ PyModuleDef_HEAD_INIT,
|
||||
+ TRE_MODULE ".Module", /* m_name */
|
||||
+ tre_doc, /* m_doc */
|
||||
+ -1, /* m_size */
|
||||
+ tre_methods, /* m_methods */
|
||||
+ NULL, /* m_reload */
|
||||
+ NULL, /* m_traverse */
|
||||
+ NULL, /* m_clear */
|
||||
+ NULL, /* m_free */
|
||||
+};
|
||||
+
|
||||
+
|
||||
PyMODINIT_FUNC
|
||||
-inittre(void)
|
||||
+PyInit_tre(void)
|
||||
{
|
||||
PyObject *m;
|
||||
struct _tre_flags *fp;
|
||||
|
||||
if (PyType_Ready(&TreFuzzynessType) < 0)
|
||||
- return;
|
||||
+ return NULL;
|
||||
if (PyType_Ready(&TreMatchType) < 0)
|
||||
- return;
|
||||
+ return NULL;
|
||||
if (PyType_Ready(&TrePatternType) < 0)
|
||||
- return;
|
||||
+ return NULL;
|
||||
|
||||
/* Create the module and add the functions */
|
||||
- m = Py_InitModule3(TRE_MODULE, tre_methods, tre_doc);
|
||||
+
|
||||
+ m = PyModule_Create (&moduledef);
|
||||
+
|
||||
if (m == NULL)
|
||||
- return;
|
||||
+ return NULL;
|
||||
|
||||
Py_INCREF(&TreFuzzynessType);
|
||||
if (PyModule_AddObject(m, "Fuzzyness", (PyObject*)&TreFuzzynessType) < 0)
|
||||
- return;
|
||||
+ return NULL;
|
||||
Py_INCREF(&TreMatchType);
|
||||
if (PyModule_AddObject(m, "Match", (PyObject*)&TreMatchType) < 0)
|
||||
- return;
|
||||
+ return NULL;
|
||||
Py_INCREF(&TrePatternType);
|
||||
if (PyModule_AddObject(m, "Pattern", (PyObject*)&TrePatternType) < 0)
|
||||
- return;
|
||||
+ return NULL;
|
||||
ErrorObject = PyErr_NewException(TRE_MODULE ".Error", NULL, NULL);
|
||||
Py_INCREF(ErrorObject);
|
||||
if (PyModule_AddObject(m, "Error", ErrorObject) < 0)
|
||||
- return;
|
||||
+ return NULL;
|
||||
|
||||
/* Insert the flags */
|
||||
for (fp = tre_flags; fp->name != NULL; fp++)
|
||||
if (PyModule_AddIntConstant(m, fp->name, fp->val) < 0)
|
||||
- return;
|
||||
+ return NULL;
|
||||
+ return m;
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
diff -up tre-0.7.6/tests/agrep/run-tests.sh.tests tre-0.7.6/tests/agrep/run-tests.sh
|
||||
--- tre-0.7.6/tests/agrep/run-tests.sh.tests 2009-03-11 10:44:44.000000000 +0100
|
||||
+++ tre-0.7.6/tests/agrep/run-tests.sh 2009-08-22 20:20:15.885084058 +0200
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
+export LD_LIBRARY_PATH=$top_builddir/lib/.libs
|
||||
agrep="$top_builddir/src/agrep"
|
||||
|
||||
echo "$builddir $top_builddir $srcdir"
|
@ -0,0 +1,373 @@
|
||||
%global commit c2f5d130c91b1696385a6ae0b5bcfd5214bcc9ca
|
||||
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
||||
|
||||
Name: tre
|
||||
Version: 0.8.0
|
||||
Release: 45.20140228git%{shortcommit}%{?dist}
|
||||
License: BSD
|
||||
Source0: https://github.com/laurikari/tre/archive/%{commit}/tre-%{commit}.tar.gz
|
||||
# based on https://github.com/laurikari/tre/pull/19
|
||||
Patch0: %{name}-chicken.patch
|
||||
# make internal tests of agrep work with just-built shared library
|
||||
Patch1: %{name}-tests.patch
|
||||
# don't force build-time LDFLAGS into tre.pc
|
||||
Patch2: %{name}-ldflags.patch
|
||||
# CVE-2016-8859, based on http://seclists.org/oss-sec/2016/q4/att-183/0001-fix-missing-integer-overflow-checks-in-regexec-buffe.patch
|
||||
Patch3: %{name}-CVE-2016-8859.patch
|
||||
# last hunk from the patch from https://github.com/laurikari/tre/issues/37
|
||||
Patch4: %{name}-issue37.patch
|
||||
# https://github.com/laurikari/tre/issues/50
|
||||
# https://github.com/wch/r-source/commit/55f210ad56828ba2c63ccf027cb64e95adde7119
|
||||
Patch5: %{name}-issue50.patch
|
||||
# based on https://github.com/laurikari/tre/pull/49
|
||||
Patch10: %{name}-python3.patch
|
||||
# Remove broken agrep test entry (fails with bash >= 5.2)
|
||||
Patch11: https://github.com/laurikari/tre/pull/87.patch
|
||||
# Deprecated PyUnicode APIs
|
||||
Patch12: %{name}-pep623.patch
|
||||
Summary: POSIX compatible regexp library with approximate matching
|
||||
URL: http://laurikari.net/tre/
|
||||
# rebuild autotools for bug #926655
|
||||
BuildRequires: make
|
||||
BuildRequires: gettext-devel
|
||||
# required for tests
|
||||
BuildRequires: glibc-langpack-en
|
||||
BuildRequires: libtool
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
Requires: %{name}-common = %{version}-%{release}
|
||||
|
||||
%description
|
||||
TRE is a lightweight, robust, and efficient POSIX compatible regexp
|
||||
matching library with some exciting features such as approximate
|
||||
matching.
|
||||
|
||||
%package common
|
||||
Summary: Cross-platform files for use with the tre package
|
||||
BuildArch: noarch
|
||||
|
||||
%description common
|
||||
This package contains platform-agnostic files used by the TRE
|
||||
library.
|
||||
|
||||
%package devel
|
||||
Requires: tre = %{version}-%{release}
|
||||
Summary: Development files for use with the tre package
|
||||
|
||||
%description devel
|
||||
This package contains header files and static libraries for use when
|
||||
building applications which use the TRE library.
|
||||
|
||||
%package -n python3-%{name}
|
||||
Summary: Python bindings for the tre library
|
||||
%{?python_provide:%python_provide python3-tre}
|
||||
|
||||
%description -n python3-%{name}
|
||||
This package contains the python bindings for the TRE library.
|
||||
|
||||
%package -n agrep
|
||||
Summary: Approximate grep utility
|
||||
|
||||
%description -n agrep
|
||||
The agrep tool is similar to the commonly used grep utility, but agrep
|
||||
can be used to search for approximate matches.
|
||||
|
||||
The agrep tool searches text input for lines (or records separated by
|
||||
strings matching arbitrary regexps) that contain an approximate, or
|
||||
fuzzy, match to a specified regexp, and prints the matching lines.
|
||||
Limits can be set on how many errors of each kind are allowed, or
|
||||
only the best matching lines can be output.
|
||||
|
||||
Unlike other agrep implementations, TRE agrep allows full POSIX
|
||||
regexps of any length, any number of errors, and non-uniform costs.
|
||||
|
||||
%prep
|
||||
%setup -q -n tre-%{commit}
|
||||
%patch -P0 -p1 -b .chicken
|
||||
%patch -P1 -p1 -b .tests
|
||||
%patch -P2 -p1 -b .ldflags
|
||||
%patch -P3 -p1 -b .CVE-2016-8859
|
||||
%patch -P4 -p1 -b .issue37
|
||||
%patch -P5 -p1 -b .issue50
|
||||
%patch -P10 -p1
|
||||
%patch -P11 -p1
|
||||
%patch -P12 -p1 -b .pep623
|
||||
# rebuild autotools for bug #926655
|
||||
touch ChangeLog
|
||||
autoreconf -vif
|
||||
|
||||
%build
|
||||
%configure --disable-static --disable-rpath
|
||||
%make_build
|
||||
pushd python
|
||||
%py3_build
|
||||
popd
|
||||
|
||||
%install
|
||||
%make_install
|
||||
pushd python
|
||||
%py3_install
|
||||
popd
|
||||
rm $RPM_BUILD_ROOT%{_libdir}/*.la
|
||||
%find_lang %{name}
|
||||
|
||||
%check
|
||||
%{__make} check
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%files
|
||||
%{_libdir}/libtre.so.*
|
||||
|
||||
%files common -f %{name}.lang
|
||||
%license LICENSE
|
||||
%doc AUTHORS ChangeLog NEWS README THANKS TODO
|
||||
%doc doc/*.html doc/*.css
|
||||
|
||||
%files devel
|
||||
%{_libdir}/libtre.so
|
||||
%{_libdir}/pkgconfig/*
|
||||
%{_includedir}/*
|
||||
|
||||
%files -n python3-%{name}
|
||||
%attr(0755,root,root) %{python3_sitearch}/tre%{python3_ext_suffix}
|
||||
%{python3_sitearch}/tre-%{version}-py%{python3_version}.egg-info
|
||||
|
||||
%files -n agrep
|
||||
%{_bindir}/agrep
|
||||
%{_mandir}/man1/agrep.1*
|
||||
|
||||
%changelog
|
||||
* Sat Jan 04 2025 Arkady L. Shane <tigro@msvsphere-os.ru> - 0.8.0-45.20140228gitc2f5d13
|
||||
- Rebuilt for MSVSphere 10
|
||||
|
||||
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-45.20140228gitc2f5d13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 0.8.0-44.20140228gitc2f5d13
|
||||
- Rebuilt for Python 3.13
|
||||
|
||||
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-43.20140228gitc2f5d13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Thu Sep 28 2023 Dominik Mierzejewski <dominik@greysector.net> 0.8.0-42.20140228gitc2f5d13
|
||||
- Fix deprecated PyUnicode API usage (PEP-623)
|
||||
|
||||
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-41.20140228gitc2f5d13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 0.8.0-40.20140228gitc2f5d13
|
||||
- Rebuilt for Python 3.12
|
||||
|
||||
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-39.20140228gitc2f5d13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Wed Jan 04 2023 Dominik Mierzejewski <dominik@greysector.net> 0.8.0-38.20140228gitc2f5d13
|
||||
- remove broken agrep test entry (fails with bash >= 5.2) (https://github.com/laurikari/tre/pull/87)
|
||||
|
||||
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-37.20140228gitc2f5d13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.8.0-36.20140228gitc2f5d13
|
||||
- Rebuilt for Python 3.11
|
||||
|
||||
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-35.20140228gitc2f5d13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-34.20140228gitc2f5d13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.8.0-33.20140228gitc2f5d13
|
||||
- Rebuilt for Python 3.10
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-32.20140228gitc2f5d13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-31.20140228gitc2f5d13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.8.0-30.20140228gitc2f5d13
|
||||
- Rebuilt for Python 3.9
|
||||
|
||||
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-29.20140228gitc2f5d13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.8.0-28.20140228gitc2f5d13
|
||||
- Rebuilt for Python 3.8
|
||||
|
||||
* Thu Aug 15 2019 Orion Poplawski <orion@nwra.com> - 0.8.0-27.20140228gitc2f5d13
|
||||
- Use newer make macro, %%license
|
||||
|
||||
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-26.20140228gitc2f5d13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Sun Feb 24 2019 Dominik Mierzejewski <rpm@greysector.net> 0.8.0-25.20140228gitc2f5d13
|
||||
- improve python bindings build patch based on upstream PR
|
||||
- fix infinite loop for certain regexps (upstream issue #50)
|
||||
- switch to python3 (#1634955)
|
||||
|
||||
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-24.20140228gitc2f5d13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-23.20140228gitc2f5d13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-22.20140228gitc2f5d13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-21.20140228gitc2f5d13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-20.20140228gitc2f5d13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-19.20140228gitc2f5d13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Wed Nov 02 2016 Dominik Mierzejewski <rpm@greysector.net> 0.8.0-18.20140228gitc2f5d13
|
||||
- fix CVE-2016-8859 (#1387112, #1387113)
|
||||
- probably fix CVE-2015-3796 (see upstream issue #37 and
|
||||
https://bugs.chromium.org/p/project-zero/issues/detail?id=428)
|
||||
- update python bindings subpackage to current guidelines
|
||||
- fix parallel installation of multilib packages (patch by joseba.gar at gmail.com)
|
||||
(bug #1275830)
|
||||
|
||||
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-17.20140228gitc2f5d13
|
||||
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
||||
|
||||
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-16.20140228gitc2f5d13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
* Tue Jan 05 2016 Dominik Mierzejewski <rpm@greysector.net> 0.8.0-15.20140228gitc2f5d13
|
||||
- keep old timestamps embedded in .mo files (bug #1275830)
|
||||
|
||||
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-14.20140228gitc2f5d13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
* Mon Jun 08 2015 Dominik Mierzejewski <rpm@greysector.net> 0.8.0-13.20140228gitc2f5d13
|
||||
- update to latest snapshot from github
|
||||
- drop patches merged upstream
|
||||
- fix broken LDFLAGS in tre.pc (#1224203)
|
||||
|
||||
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||
|
||||
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
* Thu Mar 06 2014 Dominik Mierzejewski <rpm@greysector.net> 0.8.0-10
|
||||
- fix build on aarch64 (bug #926655)
|
||||
- drop obsolete specfile parts
|
||||
- fix deprecated python macro usage
|
||||
|
||||
* Tue Feb 4 2014 Tom Callaway <spot@fedoraproject.org> - 0.8.0-9
|
||||
- add missing changes from R to be able to use tre in R as system lib (and resolve arm fails)
|
||||
Credit to Orion Poplawski.
|
||||
|
||||
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||
|
||||
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||
|
||||
* Fri Jul 27 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||
|
||||
* Wed Oct 26 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-4
|
||||
- Rebuilt for glibc bug#747377
|
||||
|
||||
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.8.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
|
||||
|
||||
* Sun Sep 20 2009 Dominik Mierzejewski <rpm@greysector.net> 0.8.0-1
|
||||
- updated to 0.8.0 (ABI change)
|
||||
|
||||
* Sat Aug 22 2009 Dominik Mierzejewski <rpm@greysector.net> 0.7.6-2
|
||||
- added missing defattr for python subpackage
|
||||
- dropped conditionals for Fedora <10
|
||||
- used alternative method for rpath removal
|
||||
- fixed internal testsuite to run with just-built shared library
|
||||
- dropped unnecessary build dependencies
|
||||
|
||||
* Tue Jul 28 2009 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 0.7.6-1
|
||||
- new version 0.7.6
|
||||
|
||||
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.5-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||
|
||||
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.5-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||
|
||||
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.7.5-6
|
||||
- Rebuild for Python 2.6
|
||||
|
||||
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.7.5-5
|
||||
- Autorebuild for GCC 4.3
|
||||
|
||||
* Tue Jan 01 2008 Dominik Mierzejewski <rpm@greysector.net> 0.7.5-4
|
||||
- fix build in rawhide (include python egg-info file)
|
||||
|
||||
* Wed Oct 31 2007 Dominik Mierzejewski <rpm@greysector.net> 0.7.5-3
|
||||
- include python bindings (bug #355241)
|
||||
- fix chicken-and-egg problem when building python bindings
|
||||
|
||||
* Wed Aug 29 2007 Dominik Mierzejewski <rpm@greysector.net> 0.7.5-2
|
||||
- rebuild for BuildID
|
||||
- update license tag
|
||||
|
||||
* Mon Jan 29 2007 Dominik Mierzejewski <rpm@greysector.net> 0.7.5-1
|
||||
- update to 0.7.5
|
||||
- remove redundant BRs
|
||||
- add %%check
|
||||
|
||||
* Thu Sep 14 2006 Dominik Mierzejewski <rpm@greysector.net> 0.7.4-6
|
||||
- remove ExcludeArch, the bug is in crm114
|
||||
|
||||
* Tue Aug 29 2006 Dominik Mierzejewski <rpm@greysector.net> 0.7.4-5
|
||||
- mass rebuild
|
||||
|
||||
* Fri Aug 04 2006 Dominik Mierzejewski <rpm@greysector.net> 0.7.4-4
|
||||
- bump release to fix CVS tag
|
||||
|
||||
* Thu Aug 03 2006 Dominik Mierzejewski <rpm@greysector.net> 0.7.4-3
|
||||
- per FE guidelines, ExcludeArch only those problematic arches
|
||||
|
||||
* Wed Aug 02 2006 Dominik Mierzejewski <rpm@greysector.net> 0.7.4-2
|
||||
- fixed rpmlint warnings
|
||||
- ExclusiveArch: %%{ix86} until amd64 crash is fixed and somebody
|
||||
tests ppc(32)
|
||||
|
||||
* Wed Jul 26 2006 Dominik Mierzejewski <rpm@greysector.net> 0.7.4-1
|
||||
- 0.7.4
|
||||
- disable evil rpath
|
||||
- added necessary BRs
|
||||
- license changed to LGPL
|
||||
|
||||
* Sun Feb 19 2006 Dominik Mierzejewski <rpm@greysector.net> 0.7.2-1
|
||||
- \E bug patch
|
||||
- FE compliance
|
||||
|
||||
* Sun Nov 21 2004 Ville Laurikari <vl@iki.fi>
|
||||
- added agrep man page
|
||||
|
||||
* Sun Mar 21 2004 Ville Laurikari <vl@iki.fi>
|
||||
- added %%doc doc
|
||||
|
||||
* Wed Feb 25 2004 Ville Laurikari <vl@iki.fi>
|
||||
- removed the .la file from devel package
|
||||
|
||||
* Mon Dec 22 2003 Ville Laurikari <vl@iki.fi>
|
||||
- added %%post/%%postun ldconfig scriplets.
|
||||
|
||||
* Fri Oct 03 2003 Ville Laurikari <vl@iki.fi>
|
||||
- included in the TRE source tree as `tre.spec.in'.
|
||||
|
||||
* Tue Sep 30 2003 Matthew Berg <mberg@synacor.com>
|
||||
- tagged release 1
|
||||
- initial build
|
Loading…
Reference in new issue