diff --git a/php-pear-File-1.4.1-countable.patch b/php-pear-File-1.4.1-countable.patch new file mode 100644 index 0000000..538d566 --- /dev/null +++ b/php-pear-File-1.4.1-countable.patch @@ -0,0 +1,12 @@ +diff -Nur --no-dereference File-1.4.1.old/File.php File-1.4.1/File.php +--- File-1.4.1.old/File.php 2012-04-06 01:13:35.000000000 -0400 ++++ File-1.4.1/File.php 2024-03-17 17:07:50.714000000 -0400 +@@ -378,7 +378,7 @@ + $filePointers = &PEAR::getStaticProperty('File', 'filePointers'); + + // unlock files +- for ($i = 0, $c = count($locks); $i < $c; $i++) { ++ for ($i = 0, $c = count((array)$locks); $i < $c; $i++) { + is_resource($locks[$i]) and @flock($locks[$i], LOCK_UN); + } + diff --git a/php-pear-File-1.4.1.tgz b/php-pear-File-1.4.1.tgz new file mode 100644 index 0000000..dea4555 --- /dev/null +++ b/php-pear-File-1.4.1.tgz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:642d51b6265c579e8deb03218259de2d7d96040e80ef850827c7d9bd6f5c805f +size 131 diff --git a/php-pear-File.spec b/php-pear-File.spec index e7f1274..12ef8cc 100644 --- a/php-pear-File.spec +++ b/php-pear-File.spec @@ -11,6 +11,7 @@ Group: Development/Languages License: PHP URL: http://pear.php.net/package/File Source0: http://pear.php.net/get/File-%{version}.tgz +Patch0: php-pear-File-1.4.1-countable.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -31,11 +32,13 @@ to deal with paths. %prep %setup -qc +%patch0 cd %{pear_name}-%{version} # Package is V2 -mv ../package.xml %{name}.xml - +#mv ../package.xml %{name}.xml +# remove File.php test, we patched it +sed -e '/ec80783869ebfdee05a4ccd38106b296/s/md5sum="[^"]*"//' ../package.xml > %{name}.xml %build cd %{pear_name}-%{version}