summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2013-10-18 18:39:34 +0200
committerRemi Collet <fedora@famillecollet.com>2013-10-18 18:39:34 +0200
commitc85be28f25d1772dde704086478a5f1b0f459c6a (patch)
treea9d860f269526c2f228741a05f2097f15eeb16f2
parent1d662ce4248a0ba426309bf0bdaadd4f849221b1 (diff)
php-symfony2-Security: cleanups
-rw-r--r--Security-password.patch12
-rw-r--r--php-symfony2-Security.spec48
2 files changed, 40 insertions, 20 deletions
diff --git a/Security-password.patch b/Security-password.patch
new file mode 100644
index 0000000..9e87738
--- /dev/null
+++ b/Security-password.patch
@@ -0,0 +1,12 @@
+diff -up Security-2.3.6/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php.old Security-2.3.6/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php
+--- Security-2.3.6/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php.old 2013-10-18 18:05:13.000000000 +0200
++++ Security-2.3.6/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php 2013-10-18 18:09:03.000000000 +0200
+@@ -14,6 +14,8 @@ namespace Symfony\Component\Security\Cor
+ use Symfony\Component\Security\Core\Encoder\BasePasswordEncoder;
+ use Symfony\Component\Security\Core\Exception\BadCredentialsException;
+
++require_once "password_compat/password.php";
++
+ /**
+ * @author Elnur Abdurrakhimov <elnur@elnur.pro>
+ * @author Terje BrĂ¥ten <terje@braten.be>
diff --git a/php-symfony2-Security.spec b/php-symfony2-Security.spec
index 73b8e6a..e232c4b 100644
--- a/php-symfony2-Security.spec
+++ b/php-symfony2-Security.spec
@@ -14,6 +14,8 @@ License: MIT
URL: http://symfony.com/components
Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz
+Patch0: %{pear_name}-password.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -22,17 +24,16 @@ BuildRequires: php-channel(%{pear_channel})
# For tests
BuildRequires: php(language) >= %{php_min_ver}
BuildRequires: php-pear(pear.phpunit.de/PHPUnit)
-BuildRequires: php-pear(%{pear_channel}/EventDispatcher) >= 2.2.0
+BuildRequires: php-pear(%{pear_channel}/EventDispatcher) > 2.1
BuildRequires: php-pear(%{pear_channel}/Form) >= 2.2.0
-BuildRequires: php-pear(%{pear_channel}/HttpFoundation) >= 2.2.0
-BuildRequires: php-pear(%{pear_channel}/HttpKernel) >= 2.2.0
-BuildRequires: php-pear(%{pear_channel}/Routing) >= 2.2.0
-BuildRequires: php-pear(%{pear_channel}/Validator) >= 2.2.0
-BuildRequires: php-pear(pear.doctrine-project.org/DoctrineCommon) >= 2.2.0
-BuildRequires: php-pear(pear.doctrine-project.org/DoctrineDBAL) >= 2.2.0
-BuildRequires: php-PsrLog >= 1.0
-# Need to be hacked to be loadable.
-BuildRequires: php-password-compat
+BuildRequires: php-pear(%{pear_channel}/HttpFoundation) > 2.1
+BuildRequires: php-pear(%{pear_channel}/HttpKernel) > 2.1
+BuildRequires: php-pear(%{pear_channel}/Routing) > 2.2
+BuildRequires: php-pear(%{pear_channel}/Validator) > 2.2
+BuildRequires: php-pear(pear.doctrine-project.org/DoctrineCommon) > 2.2
+BuildRequires: php-pear(pear.doctrine-project.org/DoctrineDBAL) > 2.2
+BuildRequires: php-PsrLog > 1.0
+BuildRequires: php-password-compat > 1.0
# For tests: phpci
BuildRequires: php-date
BuildRequires: php-hash
@@ -46,9 +47,9 @@ BuildRequires: php-spl
Requires: php(language) >= %{php_min_ver}
Requires: php-pear(PEAR)
Requires: php-channel(%{pear_channel})
-Requires: php-pear(%{pear_channel}/EventDispatcher) >= 2.2.0
-Requires: php-pear(%{pear_channel}/HttpFoundation) >= 2.2.0
-Requires: php-pear(%{pear_channel}/HttpKernel) >= 2.2.0
+Requires: php-pear(%{pear_channel}/EventDispatcher) > 2.1
+Requires: php-pear(%{pear_channel}/HttpFoundation) > 2.1
+Requires: php-pear(%{pear_channel}/HttpKernel) > 2.1
Requires(post): %{__pear}
Requires(postun): %{__pear}
# phpci
@@ -60,14 +61,16 @@ Requires: php-openssl
Requires: php-pcre
Requires: php-reflection
Requires: php-spl
-Requires: php-password-compat
# Optional
-Requires: php-pear(%{pear_channel}/ClassLoader) >= 2.2.0
-Requires: php-pear(%{pear_channel}/Finder) >= 2.2.0
-Requires: php-pear(%{pear_channel}/Form) >= 2.2.0
-Requires: php-pear(%{pear_channel}/Routing) >= 2.2.0
-Requires: php-pear(%{pear_channel}/Validator) >= 2.2.0
-Requires: php-pear(pear.doctrine-project.org/DoctrineDBAL) >= 2.2.0
+Requires: php-pear(%{pear_channel}/ClassLoader)
+Requires: php-pear(%{pear_channel}/Finder)
+Requires: php-pear(%{pear_channel}/Form)
+Requires: php-pear(%{pear_channel}/Routing) > 2.2
+Requires: php-pear(%{pear_channel}/Validator) > 2.2
+Requires: php-pear(pear.doctrine-project.org/DoctrineCommon) > 2.2
+Requires: php-pear(pear.doctrine-project.org/DoctrineDBAL) > 2.2
+Requires: php-PsrLog > 1.0
+Requires: php-password-compat > 1.0
Provides: php-pear(%{pear_channel}/%{pear_name}) = %{version}
@@ -112,14 +115,19 @@ sed -e 's#vendor/autoload.php#./phpunit.autoloader.php#' \
# Modify PEAR package.xml file:
# - Change role from "php" to "test" for all test files
# - Remove md5sum from phpunit.xml.dist file since it was updated
+# - Remove md5sum from patched files
sed -e '/Tests/s/role="php"/role="test"/' \
-e '/phpunit.xml.dist/s/role="php"/role="test"/' \
-e '/phpunit.xml.dist/s/md5sum="[^"]*"\s*//' \
+ -e '/BCryptPasswordEncoder.php/s/md5sum="[^"]*"\s*//' \
-i package.xml
# package.xml is version 2.0
mv package.xml %{pear_name}-%{version}/%{name}.xml
+cd %{pear_name}-%{version}
+%patch0 -p1 -b .passwordcompat
+
%build
# Empty build section, nothing required