diff --git a/.cvsignore b/.cvsignore index 37ed20c..36fd3fc 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -grep-2.5.3.tar.bz2 +grep-2.5.4.tar.bz2 diff --git a/grep-2.5.1a-utf8.patch b/grep-2.5.1a-utf8.patch deleted file mode 100644 index fd55f6a..0000000 --- a/grep-2.5.1a-utf8.patch +++ /dev/null @@ -1,14 +0,0 @@ -From latin1 to utf8 - -diff -up grep-2.5.1a/AUTHORS.utf8 grep-2.5.1a/AUTHORS ---- grep-2.5.1a/AUTHORS.utf8 2008-10-01 18:42:53.000000000 +0200 -+++ grep-2.5.1a/AUTHORS 2008-10-01 18:43:12.000000000 +0200 -@@ -40,7 +40,7 @@ send me email. - - Alain Magloire maintained GNU grep until version 2.5e. - --Bernhard "Bero" Rosenkr�nzer maintained GNU grep until -+Bernhard "Bero" Rosenkränzer maintained GNU grep until - version 2.5.1, ie. from Sep 2001 till 2003. - - Stepan Kasal maintains GNU grep since Feb 2004. diff --git a/grep-2.5.4-dfa-optional.patch b/grep-2.5.4-dfa-optional.patch new file mode 100644 index 0000000..a01a99a --- /dev/null +++ b/grep-2.5.4-dfa-optional.patch @@ -0,0 +1,68 @@ +--- ./src/search.c.old 2010-02-12 14:29:01.000000000 +0100 ++++ ./src/search.c 2010-02-12 14:29:18.207410166 +0100 +@@ -278,6 +278,8 @@ + char eol = eolbyte; + int backref, start, len, best_len; + struct kwsmatch kwsm; ++ static int use_dfa; ++ static int use_dfa_checked = 0; + size_t i, ret_val; + #ifdef MBS_SUPPORT + int mb_cur_max = MB_CUR_MAX; +@@ -285,6 +287,26 @@ + memset (&mbs, '\0', sizeof (mbstate_t)); + #endif /* MBS_SUPPORT */ + ++ if (!use_dfa_checked) ++ { ++ char *grep_use_dfa = getenv ("GREP_USE_DFA"); ++ if (!grep_use_dfa) ++ { ++#ifdef MBS_SUPPORT ++ /* Turn off DFA when processing multibyte input. */ ++ use_dfa = (MB_CUR_MAX == 1); ++#else ++ use_dfa = 1; ++#endif /* MBS_SUPPORT */ ++ } ++ else ++ { ++ use_dfa = atoi (grep_use_dfa); ++ } ++ ++ use_dfa_checked = 1; ++ } ++ + buflim = buf + size; + + for (beg = end = buf; end < buflim; beg = end) +@@ -353,7 +375,8 @@ + #endif /* MBS_SUPPORT */ + (kwsm.index < kwset_exact_matches)) + goto success; +- if (dfaexec (&dfa, beg, end - beg, &backref) == (size_t) -1) ++ if (use_dfa && ++ dfaexec (&dfa, beg, end - beg, &backref) == (size_t) -1) + continue; + } + else +@@ -362,7 +385,9 @@ + #ifdef MBS_SUPPORT + size_t bytes_left = 0; + #endif /* MBS_SUPPORT */ +- size_t offset = dfaexec (&dfa, beg, buflim - beg, &backref); ++ size_t offset = 0; ++ if (use_dfa) ++ offset = dfaexec (&dfa, beg, buflim - beg, &backref); + if (offset == (size_t) -1) + break; + /* Narrow down to the line we've found. */ +@@ -404,7 +429,7 @@ + --beg; + } + /* Successful, no backreferences encountered! */ +- if (!backref) ++ if (use_dfa && !backref) + goto success; + } + else diff --git a/grep-2.5.4-utf8.patch b/grep-2.5.4-utf8.patch new file mode 100644 index 0000000..6b31597 --- /dev/null +++ b/grep-2.5.4-utf8.patch @@ -0,0 +1,14 @@ +From latin1 to utf8 + +diff -up grep-2.5.4/AUTHORS.utf8 grep-2.5.4/AUTHORS +--- grep-2.5.1a/AUTHORS.utf8 2008-10-01 18:42:53.000000000 +0200 ++++ grep-2.5.1a/AUTHORS 2008-10-01 18:43:12.000000000 +0200 +@@ -40,7 +40,7 @@ send me email. + + Alain Magloire maintained GNU grep until version 2.5e. + +-Bernhard "Bero" Rosenkr�nzer maintained GNU grep until ++Bernhard "Bero" Rosenkränzer maintained GNU grep until + version 2.5.1, ie. from Sep 2001 till 2003. + + Stepan Kasal maintained GNU grep since Feb 2004. diff --git a/grep.spec b/grep.spec index c6a9718..1d28f32 100644 --- a/grep.spec +++ b/grep.spec @@ -2,8 +2,8 @@ Summary: Pattern matching utilities Name: grep -Version: 2.5.3 -Release: 6%{?dist} +Version: 2.5.4 +Release: 1%{?dist} License: GPLv3+ Group: Applications/Text Source: ftp://ftp.gnu.org/pub/gnu/grep/grep-%{version}.tar.bz2 @@ -13,7 +13,8 @@ Patch3: grep-2.5.3-case.patch Patch4: grep-2.5.3-egf-speedup.patch # bug #460641 (a.k.a. 479152) Patch40: grep-bz460641.patch -Patch5: grep-2.5.1a-utf8.patch +Patch5: grep-2.5.4-utf8.patch +Patch6: grep-2.5.4-dfa-optional.patch URL: http://www.gnu.org/software/grep/ Requires(post): /sbin/install-info Requires(preun): /sbin/install-info @@ -22,9 +23,9 @@ BuildRequires: pcre-devel >= 3.9-10, texinfo, gettext BuildRequires: autoconf automake %description -The GNU versions of commonly used grep utilities. Grep searches through +The GNU versions of commonly used grep utilities. Grep searches through textual input for lines which contain a match to a specified pattern and then -prints the matching lines. GNU's grep utilities include grep, egrep and fgrep. +prints the matching lines. GNU's grep utilities include grep, egrep and fgrep. GNU grep is needed by many scripts, so it shall be installed on every system. @@ -36,9 +37,9 @@ GNU grep is needed by many scripts, so it shall be installed on every system. %patch4 -p1 -b .egf-speedup %patch40 -p1 -b .bz460641 %patch5 -p1 -b .utf8 +%patch6 -p1 -b .dfa-optional %build -./autogen.sh %configure --without-included-regex CPPFLAGS="-I%{_includedir}/pcre" make %{?_smp_mflags} @@ -58,11 +59,11 @@ make check ||: rm -rf ${RPM_BUILD_ROOT} %post -exec >/dev/null 2>&1 +#exec >/dev/null 2>&1 /sbin/install-info --quiet --info-dir=%{_infodir} %{_infodir}/grep.info.gz || : %preun -exec >/dev/null 2>&1 +#exec >/dev/null 2>&1 if [ $1 = 0 ]; then /sbin/install-info --quiet --info-dir=%{_infodir} --delete %{_infodir}/grep.info.gz || : fi @@ -76,6 +77,12 @@ fi %{_mandir}/*/* %changelog +* Wed Feb 10 2010 Jaroslav Škarvada - 2.5.4-1 +- New version: grep-2.5.4 (#502931) +- Fixed typos in %description +- Updated utf-8 patch +- Added dfa-optional patch (#538423) + * Tue Aug 11 2009 Lubomir Rintel 2.5.3-6 - Silence possible scriptlets errors diff --git a/sources b/sources index 85b44da..bddeb32 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -27061ce1fde82876970b6549a156da8b grep-2.5.3.tar.bz2 +5650ee2ae6ea4b39e9459d7d0585b315 grep-2.5.4.tar.bz2