Compare commits
15 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b95f009e90 | ||
|
|
ed7e12685c | ||
|
|
4c8752a321 | ||
|
|
e31699abb1 | ||
|
|
2f944aea96 | ||
|
|
0d1b70661c | ||
|
|
50614e0b9e | ||
|
|
3f1e19053a | ||
|
|
7395ebd3f6 | ||
|
|
738f1b7754 | ||
|
|
25988c04f5 | ||
|
|
adb498f3e5 | ||
|
|
a952aa1ec4 | ||
|
|
ed2a52004d | ||
|
|
1b1e1effe0 |
5 changed files with 165 additions and 19 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
|
@ -1,4 +1,5 @@
|
|||
/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
|
||||
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
|
||||
|
|
|
|||
28
makesrc.sh
Executable file
28
makesrc.sh
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#!/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."
|
||||
63
php-sebastian-diff3-tests.patch
Normal file
63
php-sebastian-diff3-tests.patch
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
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();
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
# remirepo/fedora spec file for php-sebastian-diff3
|
||||
#
|
||||
# Copyright (c) 2013-2019 Remi Collet
|
||||
# License: CC-BY-SA
|
||||
# Copyright (c) 2013-2024 Remi Collet
|
||||
# License: CC-BY-SA-4.0
|
||||
# http://creativecommons.org/licenses/by-sa/4.0/
|
||||
#
|
||||
# Please, preserve the changelog entries
|
||||
#
|
||||
%global bootstrap 0
|
||||
%global gh_commit 14f72dd46eaf2f2293cbe79c93cc0bc43161a211
|
||||
%global gh_commit 98ff311ca519c3aa73ccd3de053bdb377171d7b6
|
||||
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
|
||||
%global gh_owner sebastianbergmann
|
||||
%global gh_project diff
|
||||
|
|
@ -27,13 +27,20 @@
|
|||
%endif
|
||||
|
||||
Name: php-%{pk_vendor}-%{pk_project}%{major}
|
||||
Version: 3.0.3
|
||||
Release: 2%{?dist}
|
||||
Summary: Diff implementation
|
||||
Version: 3.0.6
|
||||
Release: 4%{?dist}
|
||||
Summary: Diff implementation, version %{major}
|
||||
|
||||
License: BSD
|
||||
License: BSD-3-Clause
|
||||
URL: https://github.com/%{gh_owner}/%{gh_project}
|
||||
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz
|
||||
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
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: php-fedora-autoloader-devel
|
||||
|
|
@ -45,7 +52,6 @@ BuildRequires: php-spl
|
|||
# "phpunit/phpunit": "^7.5 || ^8.0",
|
||||
# "symfony/process": "^2 || ^3.3 || ^4"
|
||||
BuildRequires: phpunit8
|
||||
BuildRequires: php-symfony4-process
|
||||
%endif
|
||||
|
||||
# from composer.json
|
||||
|
|
@ -63,11 +69,14 @@ 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}
|
||||
%setup -q -n %{gh_project}-%{gh_commit} -a 2
|
||||
%patch -P0 -p0
|
||||
|
||||
|
||||
%build
|
||||
|
|
@ -83,15 +92,12 @@ cp -pr src %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}
|
|||
%check
|
||||
%if %{with_tests}
|
||||
mkdir vendor
|
||||
%{_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
|
||||
%{_bindir}/phpab --output vendor/autoload.php tests process-%{symfony_version}
|
||||
|
||||
|
||||
: Run upstream test suite
|
||||
ret=0
|
||||
for cmd in php php72 php73 php80; do
|
||||
for cmd in php php81 php82 php83; 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
|
||||
|
|
@ -112,6 +118,53 @@ exit $ret
|
|||
|
||||
|
||||
%changelog
|
||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.6-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.6-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.6-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Tue Mar 5 2024 Remi Collet <remi@remirepo.net> - 3.0.6-1
|
||||
- update to 3.0.6
|
||||
- sources from git snapshot
|
||||
|
||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.4-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.4-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.4-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Tue May 9 2023 Remi Collet <remi@remirepo.net> - 3.0.4-1
|
||||
- update to 3.0.4
|
||||
|
||||
* Fri Apr 21 2023 Remi Collet <remi@remirepo.net> - 3.0.3-8
|
||||
- use SPDX license ID
|
||||
- use bundled symfony/process for test
|
||||
|
||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.3-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Wed Aug 3 2022 Remi Collet <remi@remirepo.net> - 3.0.3-6
|
||||
- fix test suite with recent symfony, FTBFS #2113592
|
||||
|
||||
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.3-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.3-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Mon Aug 2 2021 Remi Collet <remi@remirepo.net> - 3.0.3-4
|
||||
- fix symfony autoloader usage
|
||||
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.3-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
3
sources
3
sources
|
|
@ -1 +1,2 @@
|
|||
SHA512 (php-sebastian-diff3-3.0.3-14f72dd.tar.gz) = 8b4822cd9f1d203914dc0d62e328e18a7b993b2f22b20944d12bc61d8aa0eea1f0b881a0c55ed07e65d460ea65391c192693fe00873ad17e7b201399e7558d3f
|
||||
SHA512 (php-sebastian-diff3-3.0.6-98ff311.tgz) = bb5ab43ff80ac3b43bd1bb3bdab1977c74cf670ee3c5eca32b51b40bf519a1c4405467468ca58d73de681210693880e60d5e571333f975be8781536efbc24c29
|
||||
SHA512 (php-symfony-process-4.4.44.tar.gz) = f50deca4d93f4252ecd32ff31b4c221ecab49172b369b37d862eca274aeb31fa4396b42224f84492e2cb82107acb8ffa90b39d006d5f9040d793fbe08486af46
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue