diff options
author | Remi Collet <remi@remirepo.net> | 2018-03-12 07:23:17 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2018-03-12 07:23:17 +0100 |
commit | 7789b65d1fa4252efa2807f700fef69e814f0877 (patch) | |
tree | 42b03c1daa71a0c984f108b806ab98f94f86e910 | |
parent | a5e90676285c7b3f53f3457402ad267a41bbaae5 (diff) |
v1.10.6 from fedora:
- Update to 1.10.6 (RHBZ #1534985, SSPSA 201801-01, CVE-2018-6519, SSPSA 201802-01, CVE-2018-7644, SSPSA 201803-01, CVE-2018-7711)
- License changed from LGPLv2 to LGPLv2+
- Add max versions to BuildRequires
- Use range dependencies on F27+
- Test with SCLs if available
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | composer.json | 2 | ||||
-rw-r--r-- | php-simplesamlphp-saml2_1.spec | 91 |
3 files changed, 59 insertions, 41 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1ab5c4f --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +package-*.xml +*.tgz +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/composer.json b/composer.json index b2283ab..6d34bb7 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", diff --git a/php-simplesamlphp-saml2_1.spec b/php-simplesamlphp-saml2_1.spec index 8b577c1..e82e048 100644 --- a/php-simplesamlphp-saml2_1.spec +++ b/php-simplesamlphp-saml2_1.spec @@ -2,7 +2,7 @@ # # Fedora spec file for php-simplesamlphp-saml2_1 # -# Copyright (c) 2016 Shawn Iwinski <shawn@iwin.ski> +# Copyright (c) 2016-2018 Shawn Iwinski <shawn@iwin.ski> # # License: MIT # http://opensource.org/licenses/MIT @@ -12,8 +12,8 @@ %global github_owner simplesamlphp %global github_name saml2 -%global github_version 1.10.3 -%global github_commit 3f268c25ca5e9748652834faad04525746227ef7 +%global github_version 1.10.6 +%global github_commit 93fef13dea9c46dc238eb59e414d3ae76559d8c4 %global composer_vendor simplesamlphp %global composer_project saml2 @@ -42,44 +42,57 @@ Release: 1%{?github_release}%{?dist} Summary: SAML2 PHP library from SimpleSAMLphp (version 1) Group: Development/Libraries -License: LGPLv2 +License: LGPLv2+ URL: https://github.com/%{github_owner}/%{github_name} Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch # Tests %if %{with_tests} ## composer.json -BuildRequires: php(language) >= %{php_min_ver} +BuildRequires: php(language) >= %{php_min_ver} BuildRequires: php-composer(phpunit/phpunit) -BuildRequires: php-composer(psr/log) >= %{psr_log_min_ver} -BuildRequires: php-composer(robrichards/xmlseclibs) < %{robrichards_xmlseclibs_max_ver} -BuildRequires: php-composer(robrichards/xmlseclibs) >= %{robrichards_xmlseclibs_min_ver} BuildRequires: php-dom BuildRequires: php-openssl -BuildRequires: php-composer(mockery/mockery) >= %{mockery_min_ver} -## phpcompatinfo (computed from version 1.10.2) +%if 0%{?fedora} >= 27 +BuildRequires: (php-composer(psr/log) >= %{psr_log_min_ver} with php-composer(psr/log) < %{psr_log_max_ver}) +BuildRequires: (php-composer(robrichards/xmlseclibs) >= %{robrichards_xmlseclibs_min_ver} with php-composer(robrichards/xmlseclibs) < %{robrichards_xmlseclibs_max_ver}) +BuildRequires: (php-composer(mockery/mockery) >= %{mockery_min_ver} with php-composer(mockery/mockery) < %{mockery_max_ver}) +%else +BuildRequires: php-composer(psr/log) < %{psr_log_max_ver} +BuildRequires: php-composer(psr/log) >= %{psr_log_min_ver} +BuildRequires: php-composer(robrichards/xmlseclibs) < %{robrichards_xmlseclibs_max_ver} +BuildRequires: php-composer(robrichards/xmlseclibs) >= %{robrichards_xmlseclibs_min_ver} +BuildRequires: php-composer(mockery/mockery) < %{mockery_max_ver} +BuildRequires: php-composer(mockery/mockery) >= %{mockery_min_ver} +%endif +## phpcompatinfo (computed from version 1.10.6) BuildRequires: php-date BuildRequires: php-libxml -BuildRequires: php-mcrypt BuildRequires: php-pcre BuildRequires: php-soap BuildRequires: php-spl BuildRequires: php-zlib -## Autoloader +## For php-composer(robrichards/xmlseclibs) +BuildRequires: php-mcrypt %endif +## Autoloader BuildRequires: php-fedora-autoloader-devel # composer.json -Requires: php(language) >= %{php_min_ver} -Requires: php-composer(psr/log) < %{psr_log_max_ver} -Requires: php-composer(psr/log) >= %{psr_log_min_ver} -Requires: php-composer(robrichards/xmlseclibs) < %{robrichards_xmlseclibs_max_ver} -Requires: php-composer(robrichards/xmlseclibs) >= %{robrichards_xmlseclibs_min_ver} +Requires: php(language) >= %{php_min_ver} Requires: php-dom Requires: php-openssl -# phpcompatinfo (computed from version 1.10.2) +%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) >= %{robrichards_xmlseclibs_min_ver} with php-composer(robrichards/xmlseclibs) < %{robrichards_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) < %{robrichards_xmlseclibs_max_ver} +Requires: php-composer(robrichards/xmlseclibs) >= %{robrichards_xmlseclibs_min_ver} +%endif +# phpcompatinfo (computed from version 1.10.6) Requires: php-date Requires: php-libxml Requires: php-pcre @@ -123,7 +136,6 @@ AUTOLOAD %install -rm -rf %{buildroot} mkdir -p %{buildroot}%{phpdir}/SAML2_1 cp -rp src/SAML2/* %{buildroot}%{phpdir}/SAML2_1/ @@ -138,32 +150,24 @@ require_once '%{buildroot}%{phpdir}/SAML2_1/autoload.php'; require_once '%{phpdir}/Mockery/autoload.php'; AUTOLOAD -: Run tests -ret=0 -run=0 -if which php56; then - php56 %{_bindir}/phpunit --configuration=tools/phpunit || ret=1 - run=1 -fi -if which php71; then - php71 %{_bindir}/phpunit --configuration=tools/phpunit || ret=1 - run=1 -fi -if [ $run -eq 0 ]; then -%{_bindir}/phpunit --configuration=tools/phpunit --verbose -fi -exit $ret +: Upstream tests +RETURN_CODE=0 +PHPUNIT=$(which phpunit) +for PHP_EXEC in "" %{?rhel:php54 php55 php56} php70 php71 php72 +do + if [ -z "$PHP_EXEC" ] || which $PHP_EXEC + then + $PHP_EXEC $PHPUNIT --configuration=tools/phpunit --verbose \ + || RETURN_CODE=1 + fi +done +exit $RETURN_CODE %else : Tests skipped %endif -%clean -rm -rf %{buildroot} - - %files -%defattr(-,root,root,-) %{!?_licensedir:%global license %%doc} %license LICENSE %doc *.md @@ -172,6 +176,13 @@ rm -rf %{buildroot} %changelog +* Sat Mar 10 2018 Shawn Iwinski <shawn@iwin.ski> - 1.10.6-1 +- Update to 1.10.6 (RHBZ #1534985, SSPSA 201801-01, CVE-2018-6519, SSPSA 201802-01, CVE-2018-7644, SSPSA 201803-01, CVE-2018-7711) +- License changed from LGPLv2 to LGPLv2+ +- Add max versions to BuildRequires +- Use range dependencies on F27+ +- Test with SCLs if available + * Fri Dec 2 2016 Remi Collet <remi@remirepo.net> - 1.10.3-1 - update to 1.10.3 |