commit b334e9fd7765d06fd903fab7a2cf4f2f6cd6a278
Author: Elan Ruusamäe <[email protected]>
Date:   Thu May 14 16:06:51 2015 +0300

    up to 2.1.0.
    Notice: PECL Solr 2.x is not compatible with Apache Solr Server 3.x

 do-not-screw-with-random-seed.patch | 36 ------------------------------------
 php-pecl-solr.spec                  | 24 +++++++++---------------
 2 files changed, 9 insertions(+), 51 deletions(-)
---
diff --git a/php-pecl-solr.spec b/php-pecl-solr.spec
index fd95afd..1353f3f 100644
--- a/php-pecl-solr.spec
+++ b/php-pecl-solr.spec
@@ -7,13 +7,12 @@
 Summary:       Object oriented API to Apache Solr
 Summary(fr.UTF-8):     API orientée objet pour Apache Solr
 Name:          %{php_name}-pecl-solr
-Version:       1.0.2
-Release:       7
-License:       PHP
+Version:       2.1.0
+Release:       1
+License:       PHP v3.01
 Group:         Development/Languages
 Source0:       http://pecl.php.net/get/%{modname}-%{version}.tgz
-# Source0-md5: 1632144b462ab22b91d03e4d59704fab
-Patch0:                do-not-screw-with-random-seed.patch
+# Source0-md5: 258865d4517312afda6890827f18f93f
 URL:           http://pecl.php.net/package/solr
 BuildRequires: %{php_name}-cli
 %{?with_tests:BuildRequires:   %{php_name}-curl}
@@ -49,6 +48,8 @@ for connecting to Solr servers secured behind HTTP 
Authentication or
 HTTP proxy servers. It is also able to connect to SSL-enabled
 containers.
 
+Notice: PECL Solr 2.x is not compatible with Apache Solr Server 3.x
+
 %description -l fr.UTF-8
 Bibliothèque riche en fonctionnalités qui permet aux développeurs PHP
 de communiquer facilement et efficacement avec des instances du
@@ -70,22 +71,14 @@ authentification HTTP ou par un serveur mandataire. Il est 
également
 possible de se connecter à des serveurs via SSL.
 
 %prep
-%setup -q -c
+%setup -qc
 mv %{modname}-%{version}/* .
 
-# avoid 1970 dates in doc
-find -newer TODO -o -print | xargs touch --reference %{SOURCE0}
-
-%patch0 -p1
-
-# Fix version
-sed -i -e '/PHP_SOLR_DOTTED_VERSION/s/1.0.1/1.0.2/' php_solr_version.h
-
 %build
 packagexml2cl package.xml > ChangeLog
 
 # Check version
-extver=$(sed -n '/#define PHP_SOLR_DOTTED_VERSION/{s/.* "//;s/".*$//;p}' 
php_solr_version.h)
+extver=$(awk -F'"' '/define PHP_SOLR_VERSION / {print $2}' php_solr_version.h)
 if test "x${extver}" != "x%{version}"; then
        : Error: Upstream version is ${extver}, expecting %{version}.
        exit 1
@@ -112,6 +105,7 @@ install -d 
$RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
 %{__make} install \
        EXTENSION_DIR=%{php_extensiondir} \
        INSTALL_ROOT=$RPM_BUILD_ROOT
+
 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
 ; Enable Solr extension module
 extension=%{modname}.so
diff --git a/do-not-screw-with-random-seed.patch 
b/do-not-screw-with-random-seed.patch
deleted file mode 100644
index 0b387dd..0000000
--- a/do-not-screw-with-random-seed.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-DO NOT SCREW WITH RANDOM SEED
-
-Do not initialize the seed with srand or mt_srand, it is already initialized
-since PHP 4.2.0 (See the docs). And if you initialize it with time or microtime
-you make it only more worse (predictable).
-
-And initializing random seed with predictable value is extremely stupid.
-
-I had situation that three machines simulatenously produced temporary directory
-names based on random generator, and they all got same results, this is utterly
-screwed up up the application!
-
-Jul  6 10:37:26 segusilm php.fcgi: PHP Fatal error:  Uncaught exception 
'Exception' with message 'Can't mkdir '/tmp/foo_UZNHCMUDWZ/archive': mkdir(): 
File exists' in /usr/share/foo/lib/plugins/Plugin.php:127
-Jul  6 10:37:26 lordi php.fcgi: PHP Warning:  
unlink(/tmp/foo_UZNHCMUDWZ/archive/title.inc): No such file or directory in 
/usr/share/foo/lib/helper/OutputHelper.php on line 68
-
-it is strongly recommended for PHP application developers to keep their fingers
-away from srand() or mt_srand() and to never ever use rand() or mt_rand() for
-cryptographic secrets:
-http://www.suspekt.org/2008/08/17/mt_srand-and-not-so-random-numbers/
-
-Bugreport: https://bugs.php.net/bug.php?id=62835
-Source: 
http://cvs.pld-linux.org/packages/php-pecl-solr/do-not-screw-with-random-seed.patch
-Signed-Off-By: Elan Ruusamäe <[email protected]>
-Tested-By: Elan Ruusamäe <[email protected]>
---- php-pecl-solr-1.0.2/php_solr.c~    2011-11-29 04:50:07.000000000 +0200
-+++ php-pecl-solr-1.0.2/php_solr.c     2012-07-06 18:15:25.730180032 +0300
-@@ -1082,9 +1082,6 @@
-       /* Always NULL. Kept for API backward compatibility purposes only */
-       hash_func_t pHashFunction    = NULL;
- 
--      /* initialize random seed */
--      srand(time(NULL));
--
-       ALLOC_HASHTABLE(SOLR_GLOBAL(documents));
-       ALLOC_HASHTABLE(SOLR_GLOBAL(clients));
-       ALLOC_HASHTABLE(SOLR_GLOBAL(params));
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-solr.git/commitdiff/7a2204f2db8f4874ede0a80be21d4fb51dfd4d4c

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to