From 7cd62e93ad6706b7f2314bcd25de1484f5aa0b5d Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Wed, 12 Feb 2020 13:43:04 +0000 Subject: [PATCH] - fix FTBFS on 32-bit arches --- subversion-1.12.2-fsfspacktest.patch | 26 ++++++++++++++++++++++++++ subversion.spec | 7 ++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 subversion-1.12.2-fsfspacktest.patch diff --git a/subversion-1.12.2-fsfspacktest.patch b/subversion-1.12.2-fsfspacktest.patch new file mode 100644 index 0000000..ba5e0fa --- /dev/null +++ b/subversion-1.12.2-fsfspacktest.patch @@ -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; diff --git a/subversion.spec b/subversion.spec index 69fbbd7..0e4ca95 100644 --- a/subversion.spec +++ b/subversion.spec @@ -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 - 1.13.0-4 +- fix FTBFS on 32-bit arches + * Mon Jan 6 2020 Joe Orton - 1.13.0-3 - F-32: fix include path for ruby 2.7 (Mamoru TASAKA)