diff options
-rw-r--r-- | composer.json | 5 | ||||
-rwxr-xr-x | makesrc.sh | 27 | ||||
-rw-r--r-- | php-paragonie-constant-time-encoding.spec | 35 |
3 files changed, 56 insertions, 11 deletions
diff --git a/composer.json b/composer.json index 583fe36..2fe9717 100644 --- a/composer.json +++ b/composer.json @@ -47,5 +47,10 @@ "psr-4": { "ParagonIE\\ConstantTime\\": "src/" } + }, + "autoload-dev": { + "psr-4": { + "ParagonIE\\ConstantTime\\Tests\\": "tests/" + } } } diff --git a/makesrc.sh b/makesrc.sh new file mode 100755 index 0000000..8352783 --- /dev/null +++ b/makesrc.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +NAME=$(basename $PWD) +OWNER=$(sed -n '/^%global github_owner/{s/.* //;p}' $NAME.spec) +PROJECT=$(sed -n '/^%global github_name/{s/.* //;p}' $NAME.spec) +VERSION=$(sed -n '/^Version:/{s/.* //;p}' $NAME.spec) +COMMIT=$(sed -n '/^%global commit0/{s/.* //;p}' $NAME.spec) +SHORT=${COMMIT:0:7} + +echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION\n" + +echo "Cloning..." +git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT + +echo "Getting commit..." +pushd $PROJECT-$COMMIT +git checkout $COMMIT +cp composer.json ../composer.json +popd + +echo "Archiving..." +tar czf $NAME-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT + +echo "Cleaning..." +rm -rf $PROJECT-$COMMIT + +echo "Done." diff --git a/php-paragonie-constant-time-encoding.spec b/php-paragonie-constant-time-encoding.spec index a6ae59a..dc88a22 100644 --- a/php-paragonie-constant-time-encoding.spec +++ b/php-paragonie-constant-time-encoding.spec @@ -14,19 +14,20 @@ %global github_owner paragonie %global github_name constant_time_encoding -%global commit0 f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c +%global commit0 58c3f47f650c94ec05a151692652a868995d2938 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) Name: php-%{composer_vendor}-constant-time-encoding -Version: 2.4.0 +Version: 2.6.3 Release: 1%{?dist} Summary: Constant-time Implementations of RFC 4648 Encoding License: MIT URL: https://github.com/%{github_owner}/%{github_name} -Source0: %{url}/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz +Source0: %{name}-%{version}-%{shortcommit0}.tgz +Source1: makesrc.sh BuildArch: noarch @@ -34,14 +35,9 @@ BuildArch: noarch BuildRequires: php(language) >= 7 BuildRequires: php-mbstring BuildRequires: php-spl -# "phpunit/phpunit": "^6|^7", -%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9 +# "phpunit/phpunit": "^6|^7|^8|^9" BuildRequires: phpunit9 %global phpunit %{_bindir}/phpunit9 -%else -BuildRequires: phpunit8 -%global phpunit %{_bindir}/phpunit8 -%endif BuildRequires: php-fedora-autoloader-devel @@ -69,11 +65,13 @@ mkdir -p %{buildroot}%{_datadir}/php/%{composer_namespace} cp -pr src/* %{buildroot}%{_datadir}/php/%{composer_namespace} %check +%{_bindir}/phpab -t fedora -o tests/autoload.php src tests + ret=0 -for cmdarg in "php %{phpunit}" "php71 %{_bindir}/phpunit7" "php72 %{_bindir}/phpunit8" php73 php74 php80; do +for cmdarg in php php74 php80 php81 php82; do if which $cmdarg; then set $cmdarg - $1 ${2:-%{_bindir}/phpunit9} --no-coverage --verbose --bootstrap=src/autoload.php || ret=1 + $1 ${2:-%{_bindir}/phpunit9} --no-coverage --verbose --bootstrap=tests/autoload.php || ret=1 fi done exit $ret @@ -87,6 +85,21 @@ exit $ret %license LICENSE.txt %changelog +* Tue Jun 14 2022 François Kooman <fkooman@tuxed.net> - 2.6.3-1 +- update to 2.6.3 + +* Mon Jun 13 2022 François Kooman <fkooman@tuxed.net> - 2.6.2-1 +- update to 2.6.2 (RHBZ#1494754) +- autoload required files for tests as well + +* Mon Jan 17 2022 François Kooman <fkooman@tuxed.net> - 2.5.0-1 +- update to 2.5.0 +- add makesrc.sh to download source as upstream included .gitattributes to not + export tests + +* Thu Dec 10 2020 François Kooman <fkooman@tuxed.net> - 2.4.0-2 +- support PHPUnit 8/9 for future PHP 8 support (patch by Remi Collet) + * Mon Dec 7 2020 François Kooman <fkooman@tuxed.net> - 2.4.0-1 - update to 2.4.0 |