diff --git a/.gitignore b/.gitignore index d6713cc..1e72613 100644 --- a/.gitignore +++ b/.gitignore @@ -14,34 +14,3 @@ clog /php-phpseclib-2.0.13-42603ce.tgz /php-phpseclib-2.0.14-8ebfcad.tgz /php-phpseclib-2.0.15-11cf67c.tgz -/php-phpseclib-2.0.17-3ca5b88.tgz -/php-phpseclib-2.0.18-6051900.tgz -/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 6e6d643..816b3f7 100755 --- a/makesrc.sh +++ b/makesrc.sh @@ -11,10 +11,11 @@ echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Vers echo "Cloning..." rm -rf $PROJECT-$COMMIT -git clone --revision "${COMMIT}" --depth 1 https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT +git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT -echo "Saving a copy of composer.json..." +echo "Getting commit..." pushd $PROJECT-$COMMIT +git checkout $COMMIT cp composer.json ../composer-$VERSION.json popd diff --git a/php-phpseclib.spec b/php-phpseclib.spec index 923468f..5903a94 100644 --- a/php-phpseclib.spec +++ b/php-phpseclib.spec @@ -3,12 +3,12 @@ %global github_owner phpseclib %global github_name phpseclib -%global github_commit 1815ddd00195487cc922577751c175f339f4e20f +%global github_commit 11cf67cf78dc4acb18dc9149a57be4aee5036ce0 %global github_short %(c=%{github_commit}; echo ${c:0:7}) -%bcond_without tests +%global with_tests 0%{!?_without_tests:1} Name: php-%{composer_vendor} -Version: 2.0.50 +Version: 2.0.15 Release: 1%{?dist} Summary: PHP Secure Communications Library License: MIT @@ -21,23 +21,18 @@ 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 @@ -45,7 +40,6 @@ Requires: php-bcmath Requires: php-date Requires: php-gmp Requires: php-hash -Requires: php-mcrypt Requires: php-openssl Requires: php-pcre Requires: php-session @@ -76,48 +70,25 @@ 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}" php80 php81 php82 php83 php84 php85; do +for cmd in "php %{phpunit}" php70 php71 php72 php73; do if which $cmd; then set $cmd - $1 -d memory_limit=1G ${2:-%{_bindir}/phpunit9} \ - --filter '^((?!(testAuthorityInfoAccess|testVectors|testKeySizes|testOpenSSHEncrypted)).)*$' \ + $1 -d memory_limit=1G ${2:-%{_bindir}/phpunit6} \ + --filter '^((?!(testAuthorityInfoAccess)).)*$' \ --verbose || ret=1 fi done @@ -133,148 +104,9 @@ 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 - -* Tue Jun 25 2019 Remi Collet - 2.0.20-1 -- update to 2.0.20 - -* Fri Jun 21 2019 Remi Collet - 2.0.19-1 -- update to 2.0.19 - -* Thu Jun 13 2019 Remi Collet - 2.0.18-1 -- update to 2.0.18 - -* Mon May 27 2019 Remi Collet - 2.0.17-1 -- update to 2.0.17 - * Mon Mar 11 2019 Remi Collet - 2.0.15-1 - update to 2.0.15 -* Sat Feb 02 2019 Fedora Release Engineering - 2.0.14-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - * Thu Jan 31 2019 Remi Collet - 2.0.14-1 - update to 2.0.14 @@ -284,9 +116,6 @@ exit $ret * Mon Nov 5 2018 Remi Collet - 2.0.12-1 - update to 2.0.12 -* Fri Jul 13 2018 Fedora Release Engineering - 2.0.11-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - * Mon Apr 16 2018 Remi Collet - 2.0.11-1 - update to 2.0.11 diff --git a/sources b/sources index 1e006bc..d6a99ab 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-phpseclib-2.0.50-1815ddd.tgz) = cd7e28877120886af1b764ee5aba46f1d4f05f396d60f9fab45678c8a51a077690f61c24299aab5c239de0515ffcb34a91f533172a8d5f272840bc29ef3f5513 +SHA512 (php-phpseclib-2.0.15-11cf67c.tgz) = 5a777388f8684f3b0fda7b9da9e98936ad7d26539bf8ee89b04142b98c688a4c6b399e7088305f6aeea5e181bb90e77550e8e9c41a73e2336be24e5e3c11e767