Backport upstream fix for ruby3.2 support
This commit is contained in:
parent
5c77eeb705
commit
298e62217d
131
subversion-1.14.2-ruby32-remove-deprecated-api.patch
Normal file
131
subversion-1.14.2-ruby32-remove-deprecated-api.patch
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
------------------------------------------------------------------------
|
||||||
|
r1904472 | hartmannathan | 2022-10-09 21:50:28 +0900 (Sun, 09 Oct 2022) | 22 lines
|
||||||
|
|
||||||
|
swig-rb: Use Ruby API 'File.exist?' instead of deprecated 'File.exists?'
|
||||||
|
|
||||||
|
The Ruby API 'File.exists?' has been deprecated since Ruby 2.1 and is removed
|
||||||
|
as of Ruby 3.2. Use 'File.exist?' instead, which exists at least as far back
|
||||||
|
as Ruby 1.8. (According to our configure.ac, we support Ruby 1.8.x and newer,
|
||||||
|
except between 1.9 and 1.9.3.)
|
||||||
|
|
||||||
|
* subversion/bindings/swig/ruby/svn/util.rb
|
||||||
|
(): As above.
|
||||||
|
|
||||||
|
* subversion/bindings/swig/ruby/test/test_wc.rb
|
||||||
|
(SvnWcTest::test_adm_ensure,
|
||||||
|
SvnWcTest::test_delete,
|
||||||
|
SvnWcTest::test_update_editor,
|
||||||
|
SvnWcTest::test_update_editor_options,
|
||||||
|
SvnWcTest::test_switch_editor): As above.
|
||||||
|
|
||||||
|
* subversion/bindings/swig/ruby/test/windows_util.rb
|
||||||
|
(SvnTestUtil::Windows::SetupEnvironment::gen_make_opts): As above.
|
||||||
|
|
||||||
|
Found by: Mamoru TASAKA (mtasaka {_AT_} fedoraproject (dot) org)
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
Index: subversion/bindings/swig/ruby/svn/util.rb
|
||||||
|
===================================================================
|
||||||
|
--- subversion/bindings/swig/ruby/svn/util.rb (revision 1904471)
|
||||||
|
+++ subversion/bindings/swig/ruby/svn/util.rb (revision 1904472)
|
||||||
|
@@ -20,7 +20,7 @@
|
||||||
|
if /cygwin|mingw|mswin32|bccwin32/.match(RUBY_PLATFORM)
|
||||||
|
$LOAD_PATH.each do |load_path|
|
||||||
|
svn_ext_path = File.join(load_path, "svn", "ext")
|
||||||
|
- if File.exists?(svn_ext_path)
|
||||||
|
+ if File.exist?(svn_ext_path)
|
||||||
|
svn_ext_path_win = File.expand_path(svn_ext_path)
|
||||||
|
svn_ext_path_win = svn_ext_path.gsub(File::SEPARATOR, File::ALT_SEPARATOR)
|
||||||
|
unless ENV["PATH"].split(";").find {|path| path == svn_ext_path_win}
|
||||||
|
Index: subversion/bindings/swig/ruby/test/test_wc.rb
|
||||||
|
===================================================================
|
||||||
|
--- subversion/bindings/swig/ruby/test/test_wc.rb (revision 1904471)
|
||||||
|
+++ subversion/bindings/swig/ruby/test/test_wc.rb (revision 1904472)
|
||||||
|
@@ -342,11 +342,11 @@
|
||||||
|
|
||||||
|
def test_adm_ensure
|
||||||
|
adm_dir = Dir.glob(File.join(@wc_path, "{.,_}svn")).first
|
||||||
|
- assert(File.exists?(adm_dir))
|
||||||
|
+ assert(File.exist?(adm_dir))
|
||||||
|
FileUtils.rm_rf(adm_dir)
|
||||||
|
- assert(!File.exists?(adm_dir))
|
||||||
|
+ assert(!File.exist?(adm_dir))
|
||||||
|
Svn::Wc.ensure_adm(@wc_path, @fs.uuid, @repos_uri, @repos_uri, 0)
|
||||||
|
- assert(File.exists?(adm_dir))
|
||||||
|
+ assert(File.exist?(adm_dir))
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_merge
|
||||||
|
@@ -474,19 +474,19 @@
|
||||||
|
ctx.add(path)
|
||||||
|
ctx.ci(@wc_path).revision
|
||||||
|
|
||||||
|
- assert(File.exists?(path))
|
||||||
|
+ assert(File.exist?(path))
|
||||||
|
Svn::Wc::AdmAccess.open(nil, @wc_path, true, 5) do |access|
|
||||||
|
access.delete(path)
|
||||||
|
end
|
||||||
|
- assert(!File.exists?(path))
|
||||||
|
+ assert(!File.exist?(path))
|
||||||
|
|
||||||
|
ctx.revert(path)
|
||||||
|
|
||||||
|
- assert(File.exists?(path))
|
||||||
|
+ assert(File.exist?(path))
|
||||||
|
Svn::Wc::AdmAccess.open(nil, @wc_path, true, 5) do |access|
|
||||||
|
access.delete(path, nil, nil, true)
|
||||||
|
end
|
||||||
|
- assert(File.exists?(path))
|
||||||
|
+ assert(File.exist?(path))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
@@ -808,9 +808,9 @@
|
||||||
|
ctx.add(path2)
|
||||||
|
rev2 = ctx.commit(@wc_path).revision
|
||||||
|
|
||||||
|
- assert(File.exists?(path2))
|
||||||
|
+ assert(File.exist?(path2))
|
||||||
|
assert_equal(0, ctx.up(@wc_path, 0))
|
||||||
|
- assert(!File.exists?(path2))
|
||||||
|
+ assert(!File.exist?(path2))
|
||||||
|
Svn::Wc::AdmAccess.open(nil, @wc_path) do |access|
|
||||||
|
editor = access.update_editor('', 0)
|
||||||
|
assert_equal(0, editor.target_revision)
|
||||||
|
@@ -848,9 +848,9 @@
|
||||||
|
ctx.add(path2)
|
||||||
|
rev2 = ctx.commit(@wc_path).revision
|
||||||
|
|
||||||
|
- assert(File.exists?(path2))
|
||||||
|
+ assert(File.exist?(path2))
|
||||||
|
assert_equal(0, ctx.up(@wc_path, 0))
|
||||||
|
- assert(!File.exists?(path2))
|
||||||
|
+ assert(!File.exist?(path2))
|
||||||
|
notification_count = 0
|
||||||
|
Svn::Wc::AdmAccess.open(nil, @wc_path) do |access|
|
||||||
|
notify_func = Proc.new {|n| notification_count += 1}
|
||||||
|
@@ -946,9 +946,9 @@
|
||||||
|
ctx.add(dir2_path)
|
||||||
|
rev2 = ctx.commit(@wc_path).revision
|
||||||
|
|
||||||
|
- assert(File.exists?(path1))
|
||||||
|
+ assert(File.exist?(path1))
|
||||||
|
assert_equal(rev2, ctx.switch(@wc_path, dir2_uri))
|
||||||
|
- assert(File.exists?(File.join(@wc_path, file2)))
|
||||||
|
+ assert(File.exist?(File.join(@wc_path, file2)))
|
||||||
|
Svn::Wc::AdmAccess.open_anchor(@wc_path) do |access, dir_access, target|
|
||||||
|
editor = dir_access.switch_editor('', dir1_uri, rev2)
|
||||||
|
assert_equal(rev2, editor.target_revision)
|
||||||
|
Index: subversion/bindings/swig/ruby/test/windows_util.rb
|
||||||
|
===================================================================
|
||||||
|
--- subversion/bindings/swig/ruby/test/windows_util.rb (revision 1904471)
|
||||||
|
+++ subversion/bindings/swig/ruby/test/windows_util.rb (revision 1904472)
|
||||||
|
@@ -115,7 +115,7 @@
|
||||||
|
lines = []
|
||||||
|
gen_make_opts = File.join(@@top_dir, "gen-make.opts")
|
||||||
|
lines =
|
||||||
|
- File.read(gen_make_opts).lines.to_a if File.exists?(gen_make_opts)
|
||||||
|
+ File.read(gen_make_opts).lines.to_a if File.exist?(gen_make_opts)
|
||||||
|
config = Hash.new do |hash, key|
|
||||||
|
if /^--with-(.*)$/ =~ key
|
||||||
|
hash[key] = File.join(@@top_dir, $1)
|
@ -59,7 +59,7 @@
|
|||||||
Summary: A Modern Concurrent Version Control System
|
Summary: A Modern Concurrent Version Control System
|
||||||
Name: subversion
|
Name: subversion
|
||||||
Version: 1.14.2
|
Version: 1.14.2
|
||||||
Release: 8%{?dist}
|
Release: 9%{?dist}
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: https://subversion.apache.org/
|
URL: https://subversion.apache.org/
|
||||||
Source0: https://downloads.apache.org/subversion/subversion-%{version}.tar.bz2
|
Source0: https://downloads.apache.org/subversion/subversion-%{version}.tar.bz2
|
||||||
@ -78,6 +78,7 @@ Patch5: subversion-1.8.5-swigplWall.patch
|
|||||||
Patch6: subversion-1.14.1-testnomagic.patch
|
Patch6: subversion-1.14.1-testnomagic.patch
|
||||||
Patch8: subversion-1.14.1-python-3.11-build.patch
|
Patch8: subversion-1.14.1-python-3.11-build.patch
|
||||||
Patch9: subversion-1.14.2-swig-py-Fix-conditionals-by-SWIG-version-and-by-Pyth.patch
|
Patch9: subversion-1.14.2-swig-py-Fix-conditionals-by-SWIG-version-and-by-Pyth.patch
|
||||||
|
Patch10: subversion-1.14.2-ruby32-remove-deprecated-api.patch
|
||||||
|
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: autoconf, libtool, texinfo, which, gcc, gcc-c++
|
BuildRequires: autoconf, libtool, texinfo, which, gcc, gcc-c++
|
||||||
@ -583,6 +584,9 @@ make check-javahl
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Oct 09 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.14.2-9
|
||||||
|
- Backport upstream fix for ruby3.2 support
|
||||||
|
|
||||||
* Wed Oct 05 2022 Richard Lescak <rlescak@redhat.com> - 1.14.2-8
|
* Wed Oct 05 2022 Richard Lescak <rlescak@redhat.com> - 1.14.2-8
|
||||||
- fix segfault in Python swig test (#2128024)
|
- fix segfault in Python swig test (#2128024)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user