diff --git a/.gitignore b/.gitignore index 0aaf08c..a1d4c45 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ -clog -/php-sebastian-diff3-3.0.3-14f72dd.tar.gz -/php-symfony-process-4.4.44.tar.gz -/php-sebastian-diff3-3.0.4-6296a0c.tar.gz -/php-sebastian-diff3-3.0.6-98ff311.tgz +/php-sebastian-diff3-3.0.0-e091609.tar.gz +/php-sebastian-diff3-3.0.1-366541b.tar.gz +/php-sebastian-diff3-3.0.2-720fcc7.tar.gz diff --git a/makesrc.sh b/makesrc.sh deleted file mode 100755 index 3d8028d..0000000 --- a/makesrc.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -NAME=$(basename $PWD) -OWNER=$(sed -n '/^%global gh_owner/{s/.* //;p}' $NAME.spec) -PROJECT=$(sed -n '/^%global gh_project/{s/.* //;p}' $NAME.spec) -VERSION=$(sed -n '/^Version:/{s/.* //;p}' $NAME.spec) -COMMIT=$(sed -n '/^%global gh_commit/{s/.* //;p}' $NAME.spec) -SHORT=${COMMIT:0:7} - -echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION\n" - -echo "Cloning..." -rm -rf $PROJECT-$COMMIT -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-vcs --exclude tools $PROJECT-$COMMIT - -echo "Cleaning..." -rm -rf $PROJECT-$COMMIT - -echo "Done." diff --git a/php-sebastian-diff3-tests.patch b/php-sebastian-diff3-tests.patch deleted file mode 100644 index b35cab3..0000000 --- a/php-sebastian-diff3-tests.patch +++ /dev/null @@ -1,63 +0,0 @@ -diff -up tests/Output/Integration/StrictUnifiedDiffOutputBuilderIntegrationTest.php.old tests/Output/Integration/StrictUnifiedDiffOutputBuilderIntegrationTest.php ---- tests/Output/Integration/StrictUnifiedDiffOutputBuilderIntegrationTest.php.old 2022-08-03 16:19:34.658062557 +0200 -+++ tests/Output/Integration/StrictUnifiedDiffOutputBuilderIntegrationTest.php 2022-08-03 16:20:00.063084090 +0200 -@@ -197,7 +197,7 @@ final class StrictUnifiedDiffOutputBuild - $this->assertNotFalse(\file_put_contents($this->fileFrom, $from)); - $this->assertNotFalse(\file_put_contents($this->fileTo, $to)); - -- $p = new Process(\sprintf('diff -u %s %s', \escapeshellarg($this->fileFrom), \escapeshellarg($this->fileTo))); -+ $p = Process::fromShellCommandline(\sprintf('diff -u %s %s', \escapeshellarg($this->fileFrom), \escapeshellarg($this->fileTo))); - $p->run(); - $this->assertSame(1, $p->getExitCode()); // note: Process assumes exit code 0 for `isSuccessful`, however `diff` uses the exit code `1` for success with diff - -@@ -226,7 +226,7 @@ final class StrictUnifiedDiffOutputBuild - $this->assertNotFalse(\file_put_contents($this->fileFrom, $from)); - $this->assertNotFalse(\file_put_contents($this->filePatch, $diff)); - -- $p = new Process(\sprintf( -+ $p = Process::fromShellCommandline(\sprintf( - 'git --git-dir %s apply --check -v --unsafe-paths --ignore-whitespace %s', - \escapeshellarg($this->dir), - \escapeshellarg($this->filePatch) -@@ -253,7 +253,7 @@ final class StrictUnifiedDiffOutputBuild - \escapeshellarg($this->filePatch) - ); - -- $p = new Process($command); -+ $p = Process::fromShellCommandline($command); - $p->run(); - - $this->assertProcessSuccessful($p); -diff -up tests/Output/Integration/UnifiedDiffOutputBuilderIntegrationTest.php.old tests/Output/Integration/UnifiedDiffOutputBuilderIntegrationTest.php ---- tests/Output/Integration/UnifiedDiffOutputBuilderIntegrationTest.php.old 2022-08-03 16:19:44.460070865 +0200 -+++ tests/Output/Integration/UnifiedDiffOutputBuilderIntegrationTest.php 2022-08-03 16:20:06.754089761 +0200 -@@ -97,7 +97,7 @@ final class UnifiedDiffOutputBuilderInte - \escapeshellarg($this->filePatch) - ); - -- $p = new Process($command); -+ $p = Process::fromShellCommandline($command); - $p->run(); - - $this->assertProcessSuccessful($p); -@@ -125,7 +125,7 @@ final class UnifiedDiffOutputBuilderInte - \escapeshellarg($this->filePatch) - ); - -- $p = new Process($command); -+ $p = Process::fromShellCommandline($command); - $p->run(); - - $this->assertProcessSuccessful($p); -diff -up tests/Utils/UnifiedDiffAssertTraitIntegrationTest.php.old tests/Utils/UnifiedDiffAssertTraitIntegrationTest.php ---- tests/Utils/UnifiedDiffAssertTraitIntegrationTest.php.old 2022-08-03 16:19:24.424053883 +0200 -+++ tests/Utils/UnifiedDiffAssertTraitIntegrationTest.php 2022-08-03 16:19:47.539073475 +0200 -@@ -51,7 +51,7 @@ final class UnifiedDiffAssertTraitIntegr - \escapeshellarg($this->filePatch) - ); - -- $p = new Process($command); -+ $p = Process::fromShellCommandline($command); - $p->run(); - - $exitCode = $p->getExitCode(); diff --git a/php-sebastian-diff3.spec b/php-sebastian-diff3.spec index af24786..eee26df 100644 --- a/php-sebastian-diff3.spec +++ b/php-sebastian-diff3.spec @@ -1,13 +1,13 @@ # remirepo/fedora spec file for php-sebastian-diff3 # -# Copyright (c) 2013-2024 Remi Collet -# License: CC-BY-SA-4.0 +# Copyright (c) 2013-2019 Remi Collet +# License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # %global bootstrap 0 -%global gh_commit 98ff311ca519c3aa73ccd3de053bdb377171d7b6 +%global gh_commit 720fcc7e9b5cf384ea68d9d930d480907a0c1a29 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sebastianbergmann %global gh_project diff @@ -27,20 +27,13 @@ %endif Name: php-%{pk_vendor}-%{pk_project}%{major} -Version: 3.0.6 -Release: 4%{?dist} -Summary: Diff implementation, version %{major} +Version: 3.0.2 +Release: 1%{?dist} +Summary: Diff implementation -License: BSD-3-Clause +License: BSD URL: https://github.com/%{gh_owner}/%{gh_project} -Source0: %{name}-%{version}-%{gh_short}.tgz -Source1: makesrc.sh -# php-symfony4 going to disapear, only used for tests -%global symfony_version 4.4.44 -Source2: https://github.com/symfony/process/archive/v%{symfony_version}/php-symfony-process-%{symfony_version}.tar.gz - -# Fix for recent Symfony -Patch0: %{name}-tests.patch +Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz BuildArch: noarch BuildRequires: php-fedora-autoloader-devel @@ -51,11 +44,12 @@ BuildRequires: php-spl # from composer.json, "require-dev": { # "phpunit/phpunit": "^7.5 || ^8.0", # "symfony/process": "^2 || ^3.3 || ^4" -BuildRequires: phpunit8 +BuildRequires: phpunit7 >= 7.5 +BuildRequires: php-symfony4-process %endif # from composer.json -# "php": ">=7.1" +# "php": "^7.1" Requires: php(language) >= 7.1 # from phpcompatinfo report for version 3.0.0 Requires: php-pcre @@ -69,14 +63,11 @@ Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version} %description Diff implementation. -This package provides the version %{major} of the library. - Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php %prep -%setup -q -n %{gh_project}-%{gh_commit} -a 2 -%patch -P0 -p0 +%setup -q -n %{gh_project}-%{gh_commit} %build @@ -92,15 +83,17 @@ cp -pr src %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major} %check %if %{with_tests} mkdir vendor -%{_bindir}/phpab --output vendor/autoload.php tests process-%{symfony_version} - +%{_bindir}/phpab --output vendor/autoload.php tests +cat << 'EOF' | tee -a vendor/autoload.php +\Fedora\Autoloader\Autoload::addPsr4('Symfony\\Component\\Process', '%{php_home}/Symfony4/Component/Process'); +EOF : Run upstream test suite ret=0 -for cmd in php php81 php82 php83; do +for cmd in php php71 php72; do if which $cmd; then $cmd -d auto_prepend_file=%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php \ - %{_bindir}/phpunit8 --verbose || ret=1 + %{_bindir}/phpunit7 --verbose || ret=1 fi done exit $ret @@ -118,81 +111,9 @@ exit $ret %changelog -* Fri Jul 25 2025 Fedora Release Engineering - 3.0.6-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Sat Jan 18 2025 Fedora Release Engineering - 3.0.6-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Fri Jul 19 2024 Fedora Release Engineering - 3.0.6-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Tue Mar 5 2024 Remi Collet - 3.0.6-1 -- update to 3.0.6 -- sources from git snapshot - -* Thu Jan 25 2024 Fedora Release Engineering - 3.0.4-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sun Jan 21 2024 Fedora Release Engineering - 3.0.4-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jul 21 2023 Fedora Release Engineering - 3.0.4-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Tue May 9 2023 Remi Collet - 3.0.4-1 -- update to 3.0.4 - -* Fri Apr 21 2023 Remi Collet - 3.0.3-8 -- use SPDX license ID -- use bundled symfony/process for test - -* Fri Jan 20 2023 Fedora Release Engineering - 3.0.3-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Wed Aug 3 2022 Remi Collet - 3.0.3-6 -- fix test suite with recent symfony, FTBFS #2113592 - -* Fri Jul 22 2022 Fedora Release Engineering - 3.0.3-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Fri Jan 21 2022 Fedora Release Engineering - 3.0.3-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Mon Aug 2 2021 Remi Collet - 3.0.3-4 -- fix symfony autoloader usage - -* Fri Jul 23 2021 Fedora Release Engineering - 3.0.3-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Wed Jan 27 2021 Fedora Release Engineering - 3.0.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Mon Nov 30 2020 Remi Collet - 3.0.3-1 -- update to 3.0.3 (no change) -- switch to phpunit8 - -* Tue Jul 28 2020 Fedora Release Engineering - 3.0.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Thu Jan 30 2020 Fedora Release Engineering - 3.0.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Fri Jul 26 2019 Fedora Release Engineering - 3.0.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - * Mon Feb 4 2019 Remi Collet - 3.0.2-1 - update to 3.0.2 -* Sat Feb 02 2019 Fedora Release Engineering - 3.0.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Fri Jul 13 2018 Fedora Release Engineering - 3.0.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Mon Jun 11 2018 Remi Collet - 3.0.1-1 -- update to 3.0.1 (no change) - * Wed Feb 7 2018 Remi Collet - 3.0.0-1 - normal build diff --git a/sources b/sources index 0b19f48..3f495ab 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (php-sebastian-diff3-3.0.6-98ff311.tgz) = bb5ab43ff80ac3b43bd1bb3bdab1977c74cf670ee3c5eca32b51b40bf519a1c4405467468ca58d73de681210693880e60d5e571333f975be8781536efbc24c29 -SHA512 (php-symfony-process-4.4.44.tar.gz) = f50deca4d93f4252ecd32ff31b4c221ecab49172b369b37d862eca274aeb31fa4396b42224f84492e2cb82107acb8ffa90b39d006d5f9040d793fbe08486af46 +SHA512 (php-sebastian-diff3-3.0.2-720fcc7.tar.gz) = 23a72319b76203a94d9edd14f8d960c9c489773ba9ec2bd7c8fb067332454ff9f83cba620e66da136d963d5599012cf42829c5d5913dd2bad44ed41c69ff9cba