Compare commits
18 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b95f009e90 | ||
|
|
ed7e12685c | ||
|
|
4c8752a321 | ||
|
|
e31699abb1 | ||
|
|
2f944aea96 | ||
|
|
0d1b70661c | ||
|
|
50614e0b9e | ||
|
|
3f1e19053a | ||
|
|
7395ebd3f6 | ||
|
|
738f1b7754 | ||
|
|
25988c04f5 | ||
|
|
adb498f3e5 | ||
|
|
a952aa1ec4 | ||
|
|
ed2a52004d | ||
|
|
1b1e1effe0 | ||
|
|
7eac71ca77 | ||
|
|
efbcdddc53 | ||
|
|
f3c3568e1e |
5 changed files with 179 additions and 22 deletions
8
.gitignore
vendored
8
.gitignore
vendored
|
|
@ -1,3 +1,5 @@
|
||||||
/php-sebastian-diff3-3.0.0-e091609.tar.gz
|
clog
|
||||||
/php-sebastian-diff3-3.0.1-366541b.tar.gz
|
/php-sebastian-diff3-3.0.3-14f72dd.tar.gz
|
||||||
/php-sebastian-diff3-3.0.2-720fcc7.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
|
# remirepo/fedora spec file for php-sebastian-diff3
|
||||||
#
|
#
|
||||||
# Copyright (c) 2013-2019 Remi Collet
|
# Copyright (c) 2013-2024 Remi Collet
|
||||||
# License: CC-BY-SA
|
# License: CC-BY-SA-4.0
|
||||||
# http://creativecommons.org/licenses/by-sa/4.0/
|
# http://creativecommons.org/licenses/by-sa/4.0/
|
||||||
#
|
#
|
||||||
# Please, preserve the changelog entries
|
# Please, preserve the changelog entries
|
||||||
#
|
#
|
||||||
%global bootstrap 0
|
%global bootstrap 0
|
||||||
%global gh_commit 720fcc7e9b5cf384ea68d9d930d480907a0c1a29
|
%global gh_commit 98ff311ca519c3aa73ccd3de053bdb377171d7b6
|
||||||
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
|
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
|
||||||
%global gh_owner sebastianbergmann
|
%global gh_owner sebastianbergmann
|
||||||
%global gh_project diff
|
%global gh_project diff
|
||||||
|
|
@ -27,13 +27,20 @@
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: php-%{pk_vendor}-%{pk_project}%{major}
|
Name: php-%{pk_vendor}-%{pk_project}%{major}
|
||||||
Version: 3.0.2
|
Version: 3.0.6
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Summary: Diff implementation
|
Summary: Diff implementation, version %{major}
|
||||||
|
|
||||||
License: BSD
|
License: BSD-3-Clause
|
||||||
URL: https://github.com/%{gh_owner}/%{gh_project}
|
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
|
BuildArch: noarch
|
||||||
BuildRequires: php-fedora-autoloader-devel
|
BuildRequires: php-fedora-autoloader-devel
|
||||||
|
|
@ -44,12 +51,11 @@ BuildRequires: php-spl
|
||||||
# from composer.json, "require-dev": {
|
# from composer.json, "require-dev": {
|
||||||
# "phpunit/phpunit": "^7.5 || ^8.0",
|
# "phpunit/phpunit": "^7.5 || ^8.0",
|
||||||
# "symfony/process": "^2 || ^3.3 || ^4"
|
# "symfony/process": "^2 || ^3.3 || ^4"
|
||||||
BuildRequires: phpunit7 >= 7.5
|
BuildRequires: phpunit8
|
||||||
BuildRequires: php-symfony4-process
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# from composer.json
|
# from composer.json
|
||||||
# "php": "^7.1"
|
# "php": ">=7.1"
|
||||||
Requires: php(language) >= 7.1
|
Requires: php(language) >= 7.1
|
||||||
# from phpcompatinfo report for version 3.0.0
|
# from phpcompatinfo report for version 3.0.0
|
||||||
Requires: php-pcre
|
Requires: php-pcre
|
||||||
|
|
@ -63,11 +69,14 @@ Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version}
|
||||||
%description
|
%description
|
||||||
Diff implementation.
|
Diff implementation.
|
||||||
|
|
||||||
|
This package provides the version %{major} of the library.
|
||||||
|
|
||||||
Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php
|
Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{gh_project}-%{gh_commit}
|
%setup -q -n %{gh_project}-%{gh_commit} -a 2
|
||||||
|
%patch -P0 -p0
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
@ -83,18 +92,15 @@ cp -pr src %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}
|
||||||
%check
|
%check
|
||||||
%if %{with_tests}
|
%if %{with_tests}
|
||||||
mkdir vendor
|
mkdir vendor
|
||||||
%{_bindir}/phpab --output vendor/autoload.php tests
|
%{_bindir}/phpab --output vendor/autoload.php tests process-%{symfony_version}
|
||||||
cat << 'EOF' | tee -a vendor/autoload.php
|
|
||||||
\Fedora\Autoloader\Autoload::addPsr4('Symfony\\Component\\Process', '%{php_home}/Symfony4/Component/Process');
|
|
||||||
EOF
|
|
||||||
|
|
||||||
|
|
||||||
: Run upstream test suite
|
: Run upstream test suite
|
||||||
ret=0
|
ret=0
|
||||||
for cmd in php php71 php72 php73; do
|
for cmd in php php81 php82 php83; do
|
||||||
if which $cmd; then
|
if which $cmd; then
|
||||||
$cmd -d auto_prepend_file=%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php \
|
$cmd -d auto_prepend_file=%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php \
|
||||||
%{_bindir}/phpunit7 --verbose || ret=1
|
%{_bindir}/phpunit8 --verbose || ret=1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
exit $ret
|
exit $ret
|
||||||
|
|
@ -112,6 +118,63 @@ exit $ret
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%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
|
||||||
|
|
||||||
|
* Mon Nov 30 2020 Remi Collet <remi@remirepo.net> - 3.0.3-1
|
||||||
|
- update to 3.0.3 (no change)
|
||||||
|
- switch to phpunit8
|
||||||
|
|
||||||
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-3
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
|
|
||||||
3
sources
3
sources
|
|
@ -1 +1,2 @@
|
||||||
SHA512 (php-sebastian-diff3-3.0.2-720fcc7.tar.gz) = 23a72319b76203a94d9edd14f8d960c9c489773ba9ec2bd7c8fb067332454ff9f83cba620e66da136d963d5599012cf42829c5d5913dd2bad44ed41c69ff9cba
|
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