diff options
| -rw-r--r-- | composer.json | 16 | ||||
| -rw-r--r-- | php-phpseclib3.spec | 43 | 
2 files changed, 24 insertions, 35 deletions
diff --git a/composer.json b/composer.json index 34dc999..0f40d7c 100644 --- a/composer.json +++ b/composer.json @@ -51,14 +51,12 @@          }      ],      "require": { +        "php": ">=5.6.1",          "paragonie/constant_time_encoding": "^1|^2", -        "paragonie/random_compat": "^1.4|^2.0|^9.99.99", -        "php": ">=5.6.1" +        "paragonie/random_compat": "^1.4|^2.0|^9.99.99"      },      "require-dev": { -        "phing/phing": "~2.7", -        "phpunit/phpunit": "^5.7|^6.0|^9.4", -        "squizlabs/php_codesniffer": "~2.0" +        "phpunit/phpunit": "*"      },      "suggest": {          "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", @@ -73,5 +71,13 @@          "psr-4": {              "phpseclib3\\": "phpseclib/"          } +    }, +    "autoload-dev": { +        "psr-4": { +            "phpseclib3\\Tests\\": "tests/" +        } +    }, +    "config": { +        "sort-packages": true      }  } diff --git a/php-phpseclib3.spec b/php-phpseclib3.spec index e9c8337..ea99ba6 100644 --- a/php-phpseclib3.spec +++ b/php-phpseclib3.spec @@ -3,14 +3,14 @@  %global github_owner            phpseclib  %global github_name             phpseclib -%global github_commit           1443ab79364eea48665fa8c09ac67f37d1025f7e +%global github_commit           2f0b7af658cbea265cbb4a791d6c29a6613f98ef  %global github_short            %(c=%{github_commit}; echo ${c:0:7})  %global major                   3  %bcond_without                  tests  Name:       php-%{composer_vendor}%{major} -Version:    3.0.13 +Version:    3.0.14  Release:    1%{?dist}  Summary:    PHP Secure Communications Library  License:    MIT @@ -36,11 +36,7 @@ BuildRequires: php-paragonie-constant-time-encoding  BuildRequires: php-paragonie-random-compat  %endif  BuildRequires:  php-composer(fedora/autoloader) -%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9  %global phpunit %{_bindir}/phpunit9 -%else -%global phpunit %{_bindir}/phpunit6 -%endif  BuildRequires:  %{phpunit}  BuildRequires:  %{_bindir}/phpab  # Optional at runtime, to avoid too muck skipped tests @@ -49,10 +45,9 @@ BuildRequires:  php-gmp  %endif  # from composer.json, "require": { -#        "paragonie/constant_time_encoding": "^1|^2", -#        "paragonie/random_compat": "^1.4|^2.0",  #        "php": ">=5.6.1" -# +#        "paragonie/constant_time_encoding": "^1|^2", +#        "paragonie/random_compat": "^1.4|^2.0|^9.99.99",  Requires:   php(language) >= 5.6.1  %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8  Requires:  (php-composer(paragonie/constant_time_encoding) >= 2    with php-composer(paragonie/constant_time_encoding) < 3) @@ -99,10 +94,11 @@ cp -pr %{composer_vendor} %{buildroot}%{_datadir}/php/%{composer_vendor}%{major}  %if %{with tests}  %check -cat << 'EOF' | tee  tests/bootstrap.php +mkdir vendor +cat << 'EOF' | tee  vendor/autoload.php  <?php  require "%{buildroot}%{_datadir}/php/%{composer_vendor}%{major}/autoload.php"; -\Fedora\Autoloader\Autoload::addPsr0('', __DIR__); +\Fedora\Autoloader\Autoload::addPsr4('phpseclib3\\Tests\\', dirname(__DIR__) . "/tests");  date_default_timezone_set('UTC');  EOF @@ -117,25 +113,9 @@ rm tests/Unit/Crypt/EC/CurveTest.php  rm phpseclib/Crypt/EC/Curves/{brainpoolP160t1,secp128r2,secp112r1,secp160r2,secp192r1,brainpoolP192t1,brainpoolP160r1,secp112r2,secp192k1,prime192v3,secp160r1,brainpoolP192r1,secp128r1,prime192v2,secp160k1}.php  %endif -# 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 assertIsResource([^)]*)\)/\1: void/g' -    find tests -type f -name "*.php" -print0 | xargs -0 sed -i 's/\(n assertIsObject([^)]*)\)/\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\|DSA\|EC\|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' -fi +php tests/make_compatible_with_new_phpunit_versions.php +# from travis/run-phpunit.sh  # testAuthorityInfoAccess fails without internet access  # testCurveExistance as we remove some files  # TODO php 8.1 @@ -145,7 +125,7 @@ for cmd in "php %{phpunit}" php74 php80 php81; do      set $cmd      $1 -d memory_limit=1G ${2:-%{_bindir}/phpunit9} \         --filter '^((?!(testAuthorityInfoAccess|testCurveExistance|testLoginToInvalidServer)).)*$' \ -       --verbose || ret=1 +       --verbose --configuration tests/phpunit.xml || ret=1    fi  done  exit $ret @@ -160,6 +140,9 @@ exit $ret  %changelog +* Mon Apr  4 2022 Remi Collet <remi@remirepo.net> - 3.0.14-1 +- update to 3.0.14 +  * Mon Jan 31 2022 Remi Collet <remi@remirepo.net> - 3.0.13-1  - update to 3.0.13  | 
