summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json12
-rwxr-xr-xphp-simplesamlphp-saml2_3-get-source.sh8
-rw-r--r--php-simplesamlphp-saml2_3.spec49
3 files changed, 43 insertions, 26 deletions
diff --git a/composer.json b/composer.json
index 6046563..23e1556 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
{
"name": "simplesamlphp/saml2",
"description": "SAML2 PHP library from SimpleSAMLphp",
- "license": "LGPL-2.1",
+ "license": "LGPL-2.1-or-later",
"authors": [
{
"name": "Andreas Åkre Solberg",
@@ -9,12 +9,12 @@
}
],
"require": {
- "php": ">=5.3.3",
+ "php": ">=5.4",
"ext-openssl": "*",
"ext-dom": "*",
"ext-zlib": "*",
- "simplesamlphp/xmlseclibs": "^2.0|^3.0",
+ "robrichards/xmlseclibs": "^3.0",
"psr/log": "~1.0"
},
"require-dev": {
@@ -22,7 +22,6 @@
"phpmd/phpmd": "~1.5",
"sensiolabs/security-checker": "~1.1",
"phpunit/phpunit": "~3.7",
- "satooshi/php-coveralls": "~0.6.1",
"sebastian/phpcpd": "~1.4",
"mockery/mockery": "~0.9"
},
@@ -36,5 +35,10 @@
"psr-0": {
"SAML2\\": "tests/"
}
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "v3.0.x-dev"
+ }
}
}
diff --git a/php-simplesamlphp-saml2_3-get-source.sh b/php-simplesamlphp-saml2_3-get-source.sh
index 4ad1051..b2ac62b 100755
--- a/php-simplesamlphp-saml2_3-get-source.sh
+++ b/php-simplesamlphp-saml2_3-get-source.sh
@@ -24,6 +24,10 @@ else
SPEC=`ls *.spec | head -1`
fi
+SPEC_DIR=`pwd`
+
+print "SPEC_DIR = $SPEC_DIR"
+
NAME=`echo $SPEC | sed 's#\.spec##'`
VERSION=`egrep '%global\s*github_version' $SPEC | awk '{print $3}'`
@@ -43,8 +47,6 @@ print "GIT_REPO = $GIT_REPO"
print "GIT_DIR = $GIT_DIR"
TEMP_DIR=$(mktemp --dir)
-TAR_FILE=$PWD/${NAME}-${VERSION}-${GIT_COMMIT}.tar.gz
-CMP_FILE=$PWD/composer.json
pushd $TEMP_DIR
print "Cloning git repo..."
@@ -53,7 +55,6 @@ pushd $TEMP_DIR
pushd $GIT_DIR
print "Checking out commit..."
$GIT checkout $GIT_COMMIT
- cp composer.json $CMP_FILE
popd
TAR_DIR=${GIT_NAME}-${GIT_COMMIT}
@@ -61,6 +62,7 @@ pushd $TEMP_DIR
mv $GIT_DIR $TAR_DIR
+ TAR_FILE=${SPEC_DIR}/${NAME}-${VERSION}-${GIT_COMMIT}.tar.gz
print "TAR_FILE = $TAR_FILE"
[ -e $TAR_FILE ] && rm -f $TAR_FILE
diff --git a/php-simplesamlphp-saml2_3.spec b/php-simplesamlphp-saml2_3.spec
index 42b4bad..3eaf796 100644
--- a/php-simplesamlphp-saml2_3.spec
+++ b/php-simplesamlphp-saml2_3.spec
@@ -2,7 +2,7 @@
#
# Fedora spec file for php-simplesamlphp-saml2_3
#
-# Copyright (c) 2017 Shawn Iwinski <shawn@iwin.ski>
+# Copyright (c) 2017-2018 Shawn Iwinski <shawn@iwin.ski>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -12,14 +12,14 @@
%global github_owner simplesamlphp
%global github_name saml2
-%global github_version 3.0.2
-%global github_commit bacad25473258cfefb7a7fd418cc5f8a22cda0a1
+%global github_version 3.1.4
+%global github_commit 4f6af7f69f29df8555a18b9bb7b646906b45924d
%global composer_vendor simplesamlphp
%global composer_project saml2
-# "php": ">=5.3.3"
-%global php_min_ver 5.3.3
+# "php": ">=5.4"
+%global php_min_ver 5.4
# "mockery/mockery": "~0.9"
%global mockery_min_ver 0.9
%global mockery_max_ver 1.0
@@ -27,16 +27,7 @@
# NOTE: Min version not 1.0 because autoloader required
%global psr_log_min_ver 1.0.1
%global psr_log_max_ver 2.0
-# "simplesamlphp/xmlseclibs": "^2.0|^3.0"
-#
-# https://github.com/simplesamlphp/xmlseclibs
-# Micro-fork of xmlseclibs, sole difference is restore of PHP 5.4 compatibility
-#
-# Using robrichards/xmlseclibs instead of simplesamlphp/xmlseclibs because
-# they use the same namespace, the only difference is PHP version compatibility,
-# and tests pass.
-#
-# NOTE: Min version not 2.0 to force version 3.0 and remove build dependency php-mcrypt
+# "robrichards/xmlseclibs": "^3.0"
%global xmlseclibs_min_ver 3.0
%global xmlseclibs_max_ver 4.0
@@ -47,11 +38,11 @@
Name: php-%{composer_vendor}-%{composer_project}_3
Version: %{github_version}
-Release: 3%{?github_release}%{?dist}
+Release: 2%{?github_release}%{?dist}
Summary: SAML2 PHP library from SimpleSAMLphp (version 3)
Group: Development/Libraries
-License: LGPLv2
+License: LGPLv2+
URL: https://github.com/%{github_owner}/%{github_name}
# GitHub export does not include tests.
@@ -64,13 +55,19 @@ BuildArch: noarch
%if %{with_tests}
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
+BuildRequires: php-composer(phpunit/phpunit)
+%if 0%{?fedora} >= 27
+BuildRequires: (php-composer(mockery/mockery) >= %{mockery_min_ver} with php-composer(mockery/mockery) < %{mockery_max_ver})
+BuildRequires: (php-composer(psr/log) >= %{psr_log_min_ver} with php-composer(psr/log) < %{psr_log_max_ver})
+BuildRequires: (php-composer(robrichards/xmlseclibs) >= %{xmlseclibs_min_ver} with php-composer(robrichards/xmlseclibs) < %{xmlseclibs_max_ver})
+%else
BuildRequires: php-composer(mockery/mockery) < %{mockery_max_ver}
BuildRequires: php-composer(mockery/mockery) >= %{mockery_min_ver}
-BuildRequires: php-composer(phpunit/phpunit)
BuildRequires: php-composer(psr/log) < %{psr_log_max_ver}
BuildRequires: php-composer(psr/log) >= %{psr_log_min_ver}
BuildRequires: php-composer(robrichards/xmlseclibs) < %{xmlseclibs_max_ver}
BuildRequires: php-composer(robrichards/xmlseclibs) >= %{xmlseclibs_min_ver}
+%endif
BuildRequires: php-dom
BuildRequires: php-openssl
BuildRequires: php-zlib
@@ -86,10 +83,15 @@ BuildRequires: php-fedora-autoloader-devel
# composer.json
Requires: php(language) >= %{php_min_ver}
+%if 0%{?fedora} >= 27
+Requires: (php-composer(psr/log) >= %{psr_log_min_ver} with php-composer(psr/log) < %{psr_log_max_ver})
+Requires: (php-composer(robrichards/xmlseclibs) >= %{xmlseclibs_min_ver} with php-composer(robrichards/xmlseclibs) < %{xmlseclibs_max_ver})
+%else
Requires: php-composer(psr/log) < %{psr_log_max_ver}
Requires: php-composer(psr/log) >= %{psr_log_min_ver}
Requires: php-composer(robrichards/xmlseclibs) < %{xmlseclibs_max_ver}
Requires: php-composer(robrichards/xmlseclibs) >= %{xmlseclibs_min_ver}
+%endif
Requires: php-dom
Requires: php-openssl
Requires: php-zlib
@@ -159,7 +161,7 @@ sed 's/function testToString/function SKIP_testToString/' \
: Upstream tests
RETURN_CODE=0
PHPUNIT=$(which phpunit)
-for PHP_EXEC in php %{?rhel:php54 php55} php56 php70 php71 php72; do
+for PHP_EXEC in php %{?rhel:php55 php56} php70 php71 php72; do
if [ "php" = "$PHP_EXEC" ] || which $PHP_EXEC; then
$PHP_EXEC $PHPUNIT --configuration=tools/phpunit --verbose || RETURN_CODE=1
fi
@@ -179,6 +181,15 @@ exit $RETURN_CODE
%changelog
+* Mon Mar 12 2018 Remi Collet <remi@remirepo.net> - 3.1.4-2
+- fix dependencies
+
+* Sat Mar 10 2018 Shawn Iwinski <shawn@iwin.ski> - 3.1.4-1
+- Update to 3.1.4 (RHBZ #1528489, SSPSA 201801-01, CVE-2018-6519, SSPSA 201802-01, CVE-2018-7644, SSPSA 201803-01, CVE-2018-7711)
+- License changed from LGPLv2 to LGPLv2+
+- Update "get source" to save tarball in same directory as spec file
+- Use range dependencies on F27+
+
* Wed Aug 30 2017 Shawn Iwinski <shawn@iwin.ski> - 3.0.2-3
- Drop support for simplesamlphp/xmlseclibs v2