diff --git a/.gitignore b/.gitignore index f278bed..d6713cc 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,29 @@ clog /php-phpseclib-2.0.19-d2085db.tgz /php-phpseclib-2.0.20-d6819a5.tgz /php-phpseclib-2.0.21-9f1287e.tgz +/php-phpseclib-2.0.22-cbddb52.tgz +/php-phpseclib-2.0.23-c78eb50.tgz +/php-phpseclib-2.0.24-4099815.tgz +/php-phpseclib-2.0.25-c181596.tgz +/php-phpseclib-2.0.26-09655fc.tgz +/php-phpseclib-2.0.27-34620af.tgz +/php-phpseclib-2.0.28-d1ca58c.tgz +/php-phpseclib-2.0.29-497856a.tgz +/php-phpseclib-2.0.30-136b9ca.tgz +/php-phpseclib-2.0.31-233a920.tgz +/php-phpseclib-2.0.32-f5c4c19.tgz +/php-phpseclib-2.0.33-fb53b78.tgz +/php-phpseclib-2.0.34-98a6fe5.tgz +/php-phpseclib-2.0.35-4e16cf3.tgz +/php-phpseclib-2.0.36-a975471.tgz +/php-phpseclib-2.0.37-c812fbb.tgz +/php-phpseclib-2.0.38-b035365.tgz +/php-phpseclib-2.0.39-f3a0e2b.tgz +/php-phpseclib-2.0.40-5ef6f83.tgz +/php-phpseclib-2.0.41-7e763c6.tgz +/php-phpseclib-2.0.42-665d289.tgz +/php-phpseclib-2.0.43-87b6bb4.tgz +/php-phpseclib-2.0.44-149f608.tgz +/php-phpseclib-2.0.48-eaa7be7.tgz +/php-phpseclib-2.0.49-4de468f.tgz +/php-phpseclib-2.0.50-1815ddd.tgz diff --git a/makesrc.sh b/makesrc.sh index 816b3f7..6e6d643 100755 --- a/makesrc.sh +++ b/makesrc.sh @@ -11,11 +11,10 @@ echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Vers echo "Cloning..." rm -rf $PROJECT-$COMMIT -git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT +git clone --revision "${COMMIT}" --depth 1 https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT -echo "Getting commit..." +echo "Saving a copy of composer.json..." pushd $PROJECT-$COMMIT -git checkout $COMMIT cp composer.json ../composer-$VERSION.json popd diff --git a/php-phpseclib.spec b/php-phpseclib.spec index 5b787e8..923468f 100644 --- a/php-phpseclib.spec +++ b/php-phpseclib.spec @@ -3,12 +3,12 @@ %global github_owner phpseclib %global github_name phpseclib -%global github_commit 9f1287e68b3f283339a9f98f67515dd619e5bf9d +%global github_commit 1815ddd00195487cc922577751c175f339f4e20f %global github_short %(c=%{github_commit}; echo ${c:0:7}) -%global with_tests 0%{!?_without_tests:1} +%bcond_without tests Name: php-%{composer_vendor} -Version: 2.0.21 +Version: 2.0.50 Release: 1%{?dist} Summary: PHP Secure Communications Library License: MIT @@ -21,18 +21,23 @@ Source2: makesrc.sh BuildArch: noarch -%if %{with_tests} +%if %{with tests} BuildRequires: php-composer(fedora/autoloader) +%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9 +%global phpunit %{_bindir}/phpunit9 +%else %if 0%{?fedora} >= 26 || 0%{?rhel} >= 8 %global phpunit %{_bindir}/phpunit6 %else %global phpunit %{_bindir}/phpunit %endif +%endif BuildRequires: %{phpunit} BuildRequires: %{_bindir}/phpab # Optional at runtime, to avoid too muck skipped tests BuildRequires: php-bcmath BuildRequires: php-gmp +BuildRequires: php-mcrypt %endif Requires: php(language) >= 5.3.3 @@ -40,6 +45,7 @@ Requires: php-bcmath Requires: php-date Requires: php-gmp Requires: php-hash +Requires: php-mcrypt Requires: php-openssl Requires: php-pcre Requires: php-session @@ -70,25 +76,48 @@ mkdir -p %{buildroot}%{_datadir}/php cp -pr %{composer_vendor} %{buildroot}%{_datadir}/php -%if %{with_tests} +%if %{with tests} %check %{_bindir}/phpab --output tests/bootstrap.php tests cat << 'EOF' | tee -a tests/bootstrap.php if (class_exists("PHPUnit_Framework_TestCase") && !class_exists("PHPUnit\\Framework\\TestCase")) { class_alias("PHPUnit_Framework_TestCase", "PHPUnit\\Framework\\TestCase"); } +if (class_exists("PHPUnit_Framework_Error_Notice") && !class_exists("PHPUnit\Framework\Error\Notice")) { + class_alias("PHPUnit_Framework_Error_Notice", "PHPUnit\Framework\Error\Notice"); +} require "%{buildroot}%{_datadir}/php/%{composer_vendor}/autoload.php"; date_default_timezone_set('UTC'); EOF +# from travis/run-phpunit.sh +if %{phpunit} --atleast-version 8 +then + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/n setUpBeforeClass()/n setUpBeforeClass(): void/g' + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/n setUp()/n setUp(): void/g' + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/n tearDown()/n tearDown(): void/g' + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/\(n assertIsArray([^)]*)\)/\1: void/g' + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/\(n assertIsString([^)]*)\)/\1: void/g' + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/\(n assertStringContainsString([^)]*)\)/\1: void/g' + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/\(n assertStringNotContainsString([^)]*)\)/\1: void/g' + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/^class Unit_Crypt_\(AES\|Hash\|RSA\)_/class /g' + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/^class Unit_File_\(X509\)_/class /g' + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/^class Unit_Math_\(BigInteger\)_/class /g' + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/^class Unit_\(Crypt\|File\|Math\|Net\)_/class /g' + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/^class Functional_Net_/class /g' + find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/extends Unit_Crypt_Hash_\(SHA512Test\|SHA256Test\)/extends \1/g' +fi + +# avoid already defined class +sed -e '/require /d' -i tests/Unit/Crypt/Hash/SHA*_96Test.php # testAuthorityInfoAccess fails without internet access ret=0 -for cmd in "php %{phpunit}" php71 php72 php73 php74; do +for cmd in "php %{phpunit}" php80 php81 php82 php83 php84 php85; do if which $cmd; then set $cmd - $1 -d memory_limit=1G ${2:-%{_bindir}/phpunit6} \ - --filter '^((?!(testAuthorityInfoAccess)).)*$' \ + $1 -d memory_limit=1G ${2:-%{_bindir}/phpunit9} \ + --filter '^((?!(testAuthorityInfoAccess|testVectors|testKeySizes|testOpenSSHEncrypted)).)*$' \ --verbose || ret=1 fi done @@ -104,6 +133,127 @@ exit $ret %changelog +* Sat Jan 03 2026 Artur Frenszek-Iwicki - 2.0.50-1 +- Update to v2.0.50 + +* Mon Oct 06 2025 Artur Frenszek-Iwicki - 2.0.49-1 +- Update to v2.0.49 + +* Fri Jul 25 2025 Fedora Release Engineering - 2.0.48-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Thu Jan 30 2025 Artur Frenszek-Iwicki - 2.0.48-1 +- Update to v2.0.48 + +* Sat Jan 18 2025 Fedora Release Engineering - 2.0.44-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Fri Jul 19 2024 Fedora Release Engineering - 2.0.44-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Thu Jan 25 2024 Fedora Release Engineering - 2.0.44-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 2.0.44-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jul 21 2023 Fedora Release Engineering - 2.0.44-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jun 13 2023 Remi Collet - 2.0.44-1 +- update to 2.0.44 + +* Tue Jun 13 2023 Remi Collet - 2.0.43-1 +- update to 2.0.43 + +* Mon Mar 6 2023 Remi Collet - 2.0.42-1 +- update to 2.0.42 + +* Fri Jan 20 2023 Fedora Release Engineering - 2.0.41-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Tue Jan 3 2023 Remi Collet - 2.0.41-1 +- update to 2.0.41 + +* Mon Dec 19 2022 Remi Collet - 2.0.40-1 +- update to 2.0.40 + +* Mon Oct 24 2022 Remi Collet - 2.0.39-1 +- update to 2.0.39 + +* Mon Sep 12 2022 Remi Collet - 2.0.38-1 +- update to 2.0.38 + +* Fri Jul 22 2022 Fedora Release Engineering - 2.0.37-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Apr 4 2022 Remi Collet - 2.0.37-1 +- update to 2.0.37 + +* Mon Jan 31 2022 Remi Collet - 2.0.36-1 +- update to 2.0.36 + +* Fri Jan 21 2022 Fedora Release Engineering - 2.0.35-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Mon Nov 29 2021 Remi Collet - 2.0.35-1 +- update to 2.0.35 + +* Wed Oct 27 2021 Remi Collet - 2.0.34-1 +- update to 2.0.34 + +* Thu Sep 2 2021 Remi Collet - 2.0.33-1 +- update to 2.0.33 + +* Fri Jul 23 2021 Fedora Release Engineering - 2.0.32-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Mon Jun 14 2021 Remi Collet - 2.0.32-1 +- update to 2.0.32 + +* Tue Apr 6 2021 Remi Collet - 2.0.31-1 +- update to 2.0.31 + +* Wed Jan 27 2021 Fedora Release Engineering - 2.0.30-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Thu Dec 17 2020 Remi Collet - 2.0.30-1 +- update to 2.0.30 +- switch to phpunit9 on Fedora + +* Tue Sep 8 2020 Remi Collet - 2.0.29-1 +- update to 2.0.29 + +* Tue Jul 28 2020 Fedora Release Engineering - 2.0.28-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jul 8 2020 Remi Collet - 2.0.28-1 +- update to 2.0.28 + +* Mon Apr 6 2020 Remi Collet - 2.0.27-1 +- update to 2.0.27 + +* Mon Mar 23 2020 Remi Collet - 2.0.26-1 +- update to 2.0.26 + +* Tue Feb 25 2020 Remi Collet - 2.0.25-1 +- update to 2.0.25 + +* Mon Feb 24 2020 Remi Collet - 2.0.24-1 +- update to 2.0.24 + +* Thu Jan 30 2020 Fedora Release Engineering - 2.0.23-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Sep 17 2019 Remi Collet - 2.0.23-1 +- update to 2.0.23 + +* Mon Sep 16 2019 Remi Collet - 2.0.22-1 +- update to 2.0.22 + +* Fri Jul 26 2019 Fedora Release Engineering - 2.0.21-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Mon Jul 15 2019 Remi Collet - 2.0.21-1 - update to 2.0.21 diff --git a/sources b/sources index e956a19..1e006bc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-phpseclib-2.0.21-9f1287e.tgz) = 0523bf8949050beb4a4bf3130f7fc140472a7edcdbe616cd4010b3d9266138467bc9cbaf27f79ed28900d230f59435e07623d371c44baf9da492b29e132a0a79 +SHA512 (php-phpseclib-2.0.50-1815ddd.tgz) = cd7e28877120886af1b764ee5aba46f1d4f05f396d60f9fab45678c8a51a077690f61c24299aab5c239de0515ffcb34a91f533172a8d5f272840bc29ef3f5513