Drop Ruby version checks from configuration script.
Fix and enable Ruby test suite.
This commit is contained in:
Vít Ondruch 2013-03-27 17:31:32 +01:00
parent 423e8da9ea
commit e15ed24b56
2 changed files with 19 additions and 35 deletions

View File

@ -5,22 +5,8 @@ Message-ID: <20111221050800.GA17350@slackware.com>
--- subversion-1.7.2/configure.ac.ruby19 --- subversion-1.7.2/configure.ac.ruby19
+++ subversion-1.7.2/configure.ac +++ subversion-1.7.2/configure.ac
@@ -1130,14 +1130,29 @@ if test "$RUBY" != "none"; then @@ -1130,13 +1130,6 @@ if test "$RUBY" != "none"; then
])
RUBY_MINOR="$svn_cv_ruby_minor"
+ # WHY they have not changed the version of there API, I do not know ...
+ AC_CACHE_CHECK([for Ruby tiny version], [svn_cv_ruby_tiny],[
+ svn_cv_ruby_tiny="`$RUBY -rrbconfig -e '
+ begin
+ print Config::CONFIG.fetch(%q(RUBY_PROGRAM_VERSION))
+ rescue IndexError
+ print Config::CONFIG.fetch(%q(TEENY))
+ end
+ ' | cut -d . -f 3` "
+ ])
+ RUBY_PROGRAM_TINY="$svn_cv_ruby_tiny"
+
AC_SUBST(RUBY_MAJOR) AC_SUBST(RUBY_MAJOR)
AC_SUBST(RUBY_MINOR) AC_SUBST(RUBY_MINOR)
- if test ! \( "$RUBY_MAJOR" -eq "1" -a "$RUBY_MINOR" -eq "8" \); then - if test ! \( "$RUBY_MAJOR" -eq "1" -a "$RUBY_MINOR" -eq "8" \); then
@ -29,18 +15,10 @@ Message-ID: <20111221050800.GA17350@slackware.com>
- RUBY="none" - RUBY="none"
- AC_MSG_WARN([The detected Ruby is too new for Subversion to use]) - AC_MSG_WARN([The detected Ruby is too new for Subversion to use])
- AC_MSG_WARN([Only 1.8.x releases are supported at this time]) - AC_MSG_WARN([Only 1.8.x releases are supported at this time])
+ AC_SUBST(RUBY_PROGRAM_TINY) - fi
+ if test ! \( "$RUBY_MAJOR" -eq "1" -a "$RUBY_MINOR" -gt "8" \); then
+ if test \( "$RUBY_PROGRAM_TINY" -lt "3" \); then
+ # Disallow Ruby 1.9 or later until the binding tests get fixed
+ # to run with those versions.
+ RUBY="none"
+ AC_MSG_WARN([The detected Ruby version issue, for Subversion to use])
+ AC_MSG_WARN([Only 1.8.x or > 1.9.3 releases are supported at this time])
+ fi
fi
else else
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
RUBY="none"
--- subversion-1.7.2/Makefile.in.ruby19 --- subversion-1.7.2/Makefile.in.ruby19
+++ subversion-1.7.2/Makefile.in +++ subversion-1.7.2/Makefile.in
@@ -318,7 +318,7 @@ INSTALL_EXTRA_SWIG_RB=\ @@ -318,7 +318,7 @@ INSTALL_EXTRA_SWIG_RB=\
@ -252,14 +230,14 @@ Message-ID: <20111221050800.GA17350@slackware.com>
composed_window.ops.each do |op| composed_window.ops.each do |op|
op_size = op.offset + op.length op_size = op.offset + op.length
case op.action_code case op.action_code
@@ -174,6 +176,7 @@ class SvnDeltaTest < Test::Unit::TestCas @@ -169,6 +171,7 @@
Svn::Delta.send(target_text, handler) stream = Svn::Delta::TextDeltaStream.new(source, target)
output.rewind
result = output.read
+ # FIXME this is needing encoding love on ruby 1.9
assert_match(/\ASVN.*#{target_text}\z/, result)
# skip svndiff window output = StringIO.new("")
+ output.set_encoding Encoding::ASCII_8BIT if output.respond_to? :set_encoding
handler = Svn::Delta.svndiff_handler(output)
Svn::Delta.send(target_text, handler)
--- subversion-1.7.2/subversion/bindings/swig/ruby/test/test_fs.rb.ruby19 --- subversion-1.7.2/subversion/bindings/swig/ruby/test/test_fs.rb.ruby19
+++ subversion-1.7.2/subversion/bindings/swig/ruby/test/test_fs.rb +++ subversion-1.7.2/subversion/bindings/swig/ruby/test/test_fs.rb
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@

View File

@ -26,7 +26,7 @@
Summary: A Modern Concurrent Version Control System Summary: A Modern Concurrent Version Control System
Name: subversion Name: subversion
Version: 1.7.8 Version: 1.7.8
Release: 5%{?dist} Release: 6%{?dist}
License: ASL 2.0 License: ASL 2.0
Group: Development/Tools Group: Development/Tools
URL: http://subversion.apache.org/ URL: http://subversion.apache.org/
@ -158,6 +158,7 @@ This package includes the JNI bindings to the Subversion libraries.
Group: Development/Libraries Group: Development/Libraries
Summary: Ruby bindings to the Subversion libraries Summary: Ruby bindings to the Subversion libraries
BuildRequires: ruby-devel >= 1.9.1, ruby >= 1.9.1 BuildRequires: ruby-devel >= 1.9.1, ruby >= 1.9.1
BuildRequires: rubygem(minitest)
Requires: subversion%{?_isa} = %{version}-%{release} Requires: subversion%{?_isa} = %{version}-%{release}
Conflicts: ruby-libs%{?_isa} < 1.8.2 Conflicts: ruby-libs%{?_isa} < 1.8.2
@ -276,7 +277,7 @@ find $RPM_BUILD_ROOT%{_libdir}/perl5 -type f -perm 555 -print0 |
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libsvn_swig_*.{so,la,a} rm -f ${RPM_BUILD_ROOT}%{_libdir}/libsvn_swig_*.{so,la,a}
# Remove unnecessary ruby libraries # Remove unnecessary ruby libraries
rm -f ${RPM_BUILD_ROOT}%{ruby_sitearch}/svn/ext/*.*a rm -f ${RPM_BUILD_ROOT}%{ruby_vendorarchdir}/svn/ext/*.*a
# Trim what goes in docdir # Trim what goes in docdir
rm -rf tools/*/*.in rm -rf tools/*/*.in
@ -335,7 +336,7 @@ export LANG=C LC_ALL=C
export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}
export MALLOC_PERTURB_=171 MALLOC_CHECK_=3 export MALLOC_PERTURB_=171 MALLOC_CHECK_=3
export LIBC_FATAL_STDERR_=1 export LIBC_FATAL_STDERR_=1
if ! make check check-swig-pl check-swig-py CLEANUP=yes; then if ! make check check-swig-pl check-swig-py check-swig-rb CLEANUP=yes; then
: Test suite failure. : Test suite failure.
cat fails.log cat fails.log
exit 1 exit 1
@ -465,6 +466,11 @@ rm -rf ${RPM_BUILD_ROOT}
%endif %endif
%changelog %changelog
* Wed Mar 27 2013 Vít Ondruch <vondruch@redhat.com> - 1.7.8-6
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
- Drop Ruby version checks from configuration script.
- Fix and enable Ruby test suite.
* Thu Mar 14 2013 Joe Orton <jorton@redhat.com> - 1.7.8-5 * Thu Mar 14 2013 Joe Orton <jorton@redhat.com> - 1.7.8-5
- drop specific dep on ruby(abi) - drop specific dep on ruby(abi)