- fix FTBFS on 32-bit arches

This commit is contained in:
Joe Orton 2020-02-12 13:43:04 +00:00
parent 3bff10eb40
commit 7cd62e93ad
2 changed files with 32 additions and 1 deletions

View File

@ -0,0 +1,26 @@
get_rev_contents() has signed integer overflow with "long int" rev
and behaves unpredictably.
--- subversion-1.12.2/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c.fsfspacktest
+++ subversion-1.12.2/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
@@ -59,7 +59,8 @@
get_rev_contents(svn_revnum_t rev, apr_pool_t *pool)
{
/* Toss in a bunch of magic numbers for spice. */
- apr_int64_t num = ((rev * 1234353 + 4358) * 4583 + ((rev % 4) << 1)) / 42;
+ apr_int64_t rev64 = rev;
+ apr_int64_t num = ((rev64 * 1234353 + 4358) * 4583 + ((rev64 % 4) << 1)) / 42;
return apr_psprintf(pool, "%" APR_INT64_T_FMT "\n", num);
}
@@ -407,7 +408,8 @@
if (! svn_stringbuf_compare(rstring, sb))
return svn_error_createf(SVN_ERR_FS_GENERAL, NULL,
- "Bad data in revision %ld.", i);
+ "Bad data in revision %ld - [%s] not [%s].",
+ i, rstring->data, sb->data);
}
return SVN_NO_ERROR;

View File

@ -45,7 +45,7 @@
Summary: A Modern Concurrent Version Control System
Name: subversion
Version: 1.13.0
Release: 3%{?dist}
Release: 4%{?dist}
License: ASL 2.0
URL: https://subversion.apache.org/
@ -61,6 +61,7 @@ Patch1: subversion-1.12.0-linking.patch
Patch2: subversion-1.12.2-py3tests.patch
Patch4: subversion-1.8.0-rubybind.patch
Patch5: subversion-1.8.5-swigplWall.patch
Patch7: subversion-1.12.2-fsfspacktest.patch
BuildRequires: autoconf, libtool, texinfo, which
BuildRequires: swig >= 1.3.24, gettext
%if %{with bdb}
@ -219,6 +220,7 @@ This package includes supplementary tools for use with Subversion.
%endif
%patch4 -p1 -b .rubybind
%patch5 -p1 -b .swigplWall
%patch7 -p1 -b .fsfspacktest
%build
# Regenerate the buildsystem, so that:
@ -540,6 +542,9 @@ make check-javahl
%endif
%changelog
* Wed Feb 12 2020 Joe Orton <jorton@redhat.com> - 1.13.0-4
- fix FTBFS on 32-bit arches
* Mon Jan 6 2020 Joe Orton <jorton@redhat.com> - 1.13.0-3
- F-32: fix include path for ruby 2.7 (Mamoru TASAKA)