Skip to content

Commit b5038d8

Browse files
committed
On the better-pristines branch: Sync with trunk to r1931476.
git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/better-pristines@1931477 13f79535-47bb-0310-9956-ffa450edef68
2 parents a11c01e + 78b099b commit b5038d8

File tree

21 files changed

+20954
-15590
lines changed

21 files changed

+20954
-15590
lines changed

CHANGES

Lines changed: 101 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,111 @@ https://svn.apache.org/repos/asf/subversion/tags/1.16.0
1111
Version 1.15.0
1212
(?? ??? 20XX, from /branches/1.15.x)
1313
https://svn.apache.org/repos/asf/subversion/tags/1.15.0
14+
15+
See the 1.15 release notes for a more verbose overview of the changes since
16+
the 1.14 release: https://subversion.apache.org/docs/release-notes/1.15.html
17+
1418
User-visible changes:
19+
- Major new features:
20+
* New 'pristineless' mode for working copies that eliminates overhead
21+
from storing cached pristine content (r1905955, issue #525)
22+
* Support for multiple working copy formats (r1898187, issue #4883)
23+
24+
- Minor new features and improvements:
25+
* Re-enable plaintext credential store by default on Unix (r1909351)
26+
* Optimize checkout, update and export by simultaneously streaming
27+
data to both pristine and working files (r1886490 et al)
28+
1529
- Client-side improvements and bugfixes:
16-
* Support multiple working copy formats (1.8-onward, 1.15) (issue #????)
30+
* Disable best-fit Unicode mapping for Windows command-line arguments
31+
(r1927953)
32+
* Optimize checkout, update and export on Windows by reducing the
33+
number of file reopens (r1886490 et al)
34+
* Use a cryptographic checksum comparison to determine if a file
35+
has been modified in a working copy (r1892645)
36+
* Warn on merges from foreign repositories if UUIDs match but URLs
37+
differ (r1888474 et al, issue #4874)
38+
* Fix assertion on 'svn move [URL] [URL]/subdir' (r1909127, issue #4913)
39+
* ra_serf: Fix segfault on unexpected server responses (r1929793)
40+
* ra_serf: Optimize array filling for inherited properties (r1878084)
41+
* svn: Print character encoding in 'svn --version --verbose' (r1926252)
42+
* svn: Show new macOS versions in 'svn --version --verbose' (r1882127 et al)
43+
* svn: Document trailing-@ trick to avoid peg-revision parsing (r1910826)
44+
* svnlook: Fix handling of negative --limit arguments (r1919535)
45+
* svnmucc: Fix handling of revision arguments like 'Head' (r1925905)
46+
* svnmucc: Fix handling of revision arguments like 'r123' (r1925907)
47+
* svnmucc: Ensure that log messages are using UTF-8 (r1925913)
48+
* svnmucc: Ensure that property values are using UTF-8 (r1926023)
49+
* svnmucc: Show usage instead of help for empty actions (r1926034)
50+
* Use distinct temporary file names for regular and revision property
51+
edits (r1885997)
52+
* Expand ~username directories in tab completion (r1896619, issue #3714)
53+
* Reimplement macOS Keychain auth provider with SecItem* API (r1926564)
54+
55+
- Server-side improvements and bugfixes:
56+
* fsfs: Fix uninitialized read in the logical addressing code (r1880374)
57+
* fsfs: Reduce spurious conflicts when file content and directory
58+
properties are changed in parallel (r1908595)
59+
* fsx: Fix uninitialized read in the logical addressing code (r1880374)
60+
* fsx: Reduce spurious conflicts when file content and directory
61+
properties are changed in parallel (r1908595)
62+
* mod_dav_svn: Use mod_dav's DAVBasePath setting to determine the
63+
repository root path (r1926683)
64+
* svnadmin: Minor optimization in 'svnadmin load' (r1908751)
65+
* svnserve: Add SIGTERM/SIGINT handling (r1908547)
1766

1867
- Other tool improvements and bugfixes:
19-
* When building on Unix, change default configure option to enable support
20-
for the simple (plaintext) credential store unless disabled at configure
21-
time with --disable-plaintext-password-storage. This reverts r1845377
22-
(r1909351).
68+
* case-insensitive.py: Update for Python 3 compatibility (r1881774)
69+
* check-mime-type.pl: Support property-modified files (r1911931)
70+
* fsfsfixer: Update to work with svnadmin verify versions 1.9+ (r1886928)
71+
* fsfsfixer: Update to work with packed repositories (r1887170)
72+
* fsfsverify.py: Support FSFS format >= 4 property lists (r1909337)
73+
* mailer.py: Support message buffering (r1914915)
74+
* mailer.py: Support maximum message length (r1917168)
75+
* mailer.py: Omit diff content when messages are too long (r1917169)
76+
* svn_apply_autoprops.py: Fix Windows compatibility (r1917382)
77+
* svn_apply_autoprops.py: Support @-containing filenames (r1917397)
78+
* svn_apply_autoprops.py: Update for Python 3 compatibility (r1917446)
79+
* svn_load_dirs.pl: Update to handle 'svn propget' errors for non-existent
80+
properties (r1912002, issue #4621)
81+
* wc-format.py: Minor update for Python 3 compatibility (r1880178)
82+
83+
Developer-visible changes:
84+
- General:
85+
* Support building using CMake (r1920717 et al)
86+
* Drop support for Python 2.x in test scripts (r1899944, r1925713)
87+
* Support building for Windows on ARM64 (r1890668, r1890673)
88+
* Support Visual Studio 2022 project generation (r1899028)
89+
* Enable multi-processor compilation (/MP) on Windows (r1906011)
90+
* Support shared RA modules on Windows with CMake (r1921006 et al)
91+
* Support running Valgrind during 'make check' (r1908546)
92+
* Fix building against static Serf on Windows (r1888560)
93+
* Fix finding libexpat on static library builds on Windows (r1888565)
94+
* Fix 'make clean' in out-of-tree builds (r1883939)
95+
* Default AR_FLAGS to 'cr' to fix GNU archiver warnings (r1884094)
96+
* Support generation of .clangd file with '--enable-dot-clangd' (r1925652)
97+
* Fix propagation of libsvn_fs_x_LDFLAGS to the Makefile (r1908721)
98+
* Support C++11 and later (r1883715)
99+
* Allow selecting the C++ language standard with '--enable-c++' (r1883715)
100+
* Remove use of some deprecated autoconf macros (r1908543)
101+
* Guard experimental Serf logic with SVN__SERF_EXPERIMENTAL (r1930808)
102+
* Add 'reverse-merge' attribute to the log schema (r1892455)
103+
* tests: Allow testing ra_serf using Digest authentication (r1926790)
104+
* tests: Close file descriptor using the context manager (r1884279)
105+
* tests: Fix TypeError in some test cases (r1897708)
106+
* tests: Stop encoding a test's number in the svntest library (r1897443)
107+
* tests: Verify command output against Relax NG XML schemas (r1925717)
108+
109+
- Bindings:
110+
* JavaHL: Fix JNI setup for translateOutputStream (r1886280)
111+
* swig: Allow NULL wri_abspath in svn_client_ra_session2() (r1917448)
112+
* swig-py: Allow str(unicode) input for string types (r1885370)
113+
* swig-py: Allow SubversionException to carry attributes (r1880967)
114+
* swig-rb: Block SWIG 4.2.0 because it produces broken external
115+
runtime code (r1915235)
116+
* swig-pl: Fix 'unable to close filehandle' warnings in tests (r1915576)
117+
* swig-py: Fix test cleanup failing with Python 3 on Windows due
118+
to a circular reference of the raised exception (r1897441)
23119

24120
Version 1.14.5
25121
(7 Dec 2024, from /branches/1.14.x)

CMakeLists.txt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -386,14 +386,14 @@ if (SVN_ENABLE_RA_SERF)
386386
endif()
387387

388388
if (SVN_CHECKSUM_BACKEND STREQUAL "apr")
389-
add_library(external-openssl INTERFACE)
389+
add_library(external-checksum-libs INTERFACE)
390390
add_private_config_definition(
391391
"Defined if svn should use APR to compute checksums."
392392
"SVN_CHECKSUM_BACKEND_APR" "1"
393393
)
394394
elseif (SVN_CHECKSUM_BACKEND STREQUAL "openssl")
395395
find_package(OpenSSL REQUIRED)
396-
add_library(external-openssl ALIAS OpenSSL::Crypto)
396+
add_library(external-checksum-libs ALIAS OpenSSL::Crypto)
397397
add_private_config_definition(
398398
"Defined if svn should use OpenSSL to compute checksums."
399399
"SVN_CHECKSUM_BACKEND_OPENSSL" "1"
@@ -403,8 +403,8 @@ elseif (SVN_CHECKSUM_BACKEND STREQUAL "bcrypt")
403403
message(SEND_ERROR "BCrypt checksum backend is only available on Win32 platform.")
404404
endif()
405405

406-
add_library(external-openssl INTERFACE)
407-
target_link_libraries(external-openssl INTERFACE Bcrypt.lib)
406+
add_library(external-checksum-libs INTERFACE)
407+
target_link_libraries(external-checksum-libs INTERFACE Bcrypt.lib)
408408

409409
add_private_config_definition(
410410
"Defined if svn should use BCrypt to compute checksums."
@@ -682,6 +682,10 @@ if (HAVE_UNISTD_H)
682682
autocheck_symbol_exists("getpid" "unistd.h" HAVE_GETPID)
683683
endif()
684684

685+
set(CMAKE_REQUIRED_LIBRARIES external-zlib)
686+
autocheck_symbol_exists("adler32_z" "zlib.h" SVN_ZLIB_HAS_ADLER32_Z)
687+
unset(CMAKE_REQUIRED_LIBRARIES)
688+
685689
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
686690

687691
file(GLOB public_headers "subversion/include/*.h")
@@ -986,7 +990,7 @@ message(STATUS " Build shared libraries ........ : ${BUILD_SHARED_LIBS}")
986990
message(STATUS " Build shared FS Modues ........ : ${SVN_BUILD_SHARED_FS}")
987991
message(STATUS " Build shared RA Modues ........ : ${SVN_BUILD_SHARED_RA}")
988992
message(STATUS " Use pkg-config dependencies ... : ${SVN_USE_PKG_CONFIG}")
989-
message(STATUS " Use OpenSSL for checksum ...... : ${SVN_CHECKSUM_USE_OPENSSL}")
993+
message(STATUS " Checksum Backend .............. : ${SVN_CHECKSUM_BACKEND}")
990994
message(STATUS " FS modules:")
991995
message(STATUS " Enable FSFS ................... : ${SVN_ENABLE_FS_FS}")
992996
message(STATUS " Enable FSX .................... : ${SVN_ENABLE_FS_X}")

build.conf

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ install = fsmod-lib
394394
path = subversion/libsvn_subr
395395
sources = *.c lz4/*.c
396396
libs = aprutil apriconv apr xml zlib apr_memcache
397-
sqlite magic intl lz4 utf8proc macos-plist macos-keychain openssl
397+
sqlite magic intl lz4 utf8proc macos-plist macos-keychain checksum-libs
398398
msvc-libs = kernel32.lib advapi32.lib shfolder.lib ole32.lib
399399
crypt32.lib version.lib ws2_32.lib
400400
msvc-export =
@@ -932,6 +932,14 @@ libs = libsvn_test libsvn_wc libsvn_repos libsvn_fs libsvn_delta libsvn_subr apr
932932
# ----------------------------------------------------------------------------
933933
# Tests for libsvn_subr
934934

935+
[adler32-test]
936+
description = Test our implementation of the adler32 checksum.
937+
type = exe
938+
path = subversion/tests/libsvn_subr
939+
sources = adler32-test.c
940+
install = test
941+
libs = libsvn_test libsvn_subr apr zlib
942+
935943
[auth-test]
936944
description = Test platform-specific auth provider access
937945
type = exe
@@ -1497,6 +1505,10 @@ external-lib = $(SVN_SASL_LIBS)
14971505
type = lib
14981506
external-lib = $(SVN_OPENSSL_LIBS) $(SVN_LIBCRYPTO_LIBS)
14991507

1508+
[checksum-libs]
1509+
type = lib
1510+
external-lib = $(SVN_CHECKSUM_LIBS)
1511+
15001512
[intl]
15011513
type = lib
15021514
external-lib = $(SVN_INTL_LIBS)

build/ac-macros/zlib.m4

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,20 @@ AC_DEFUN(SVN_LIB_Z,
7373
])
7474
fi
7575
fi
76-
76+
7777
if test "$zlib_found" = "no"; then
7878
AC_MSG_ERROR([subversion requires zlib])
7979
fi
8080
81+
dnl Check if this zlib provides adler32_z().
82+
save_ldflags="$LDFLAGS"
83+
LDFLAGS="$SVN_ZLIB_LIBS"
84+
AC_CHECK_FUNC([adler32_z],[
85+
AC_DEFINE([SVN_ZLIB_HAS_ADLER32_Z],[1],
86+
[Define if the function adler32_z() is available])
87+
],[])
88+
LDFLAGS="$save_ldflags"
89+
8190
SVN_DOT_CLANGD([$SVN_ZLIB_INCLUDES])
8291
AC_SUBST(SVN_ZLIB_INCLUDES)
8392
AC_SUBST(SVN_ZLIB_LIBS)

build/generator/gen_base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,6 +1288,9 @@ def _scan_for_includes(self, fname):
12881288
if os.sep.join(['libsvn_subr', 'cmdline.c']) in fname \
12891289
and 'config_keys.inc' == include_param:
12901290
continue # generated by GeneratorBase.write_config_keys
1291+
if os.sep.join(['tests', 'libsvn_subr', 'adler32-test.c']) in fname \
1292+
and '../../libsvn_subr/adler32.c' == include_param:
1293+
continue # adler32-test.c inludes the source file on purpose
12911294
elif direct_possibility_fname in domain_fnames:
12921295
self._upd_dep_hash(hdrs, direct_possibility_fname, type_code)
12931296
elif (len(domain_fnames) == 1

build/generator/gen_win_dependencies.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ class GenDependenciesBase(gen_base.GeneratorBase):
125125
'java_sdk',
126126
'openssl',
127127
'apr_memcache',
128+
'checksum-libs',
128129

129130
# So optional, we don't even have any code to detect them on Windows
130131
'magic',

subversion/libsvn_subr/adler32.c

Lines changed: 52 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <apr.h>
2626
#include <zlib.h>
2727

28+
#include "svn_private_config.h"
2829
#include "private/svn_adler32.h"
2930

3031
/**
@@ -34,20 +35,63 @@
3435
* still provides an extremely low probability of undetected errors"
3536
*/
3637

38+
/* Prefer adler32_z() over adler32(). It should be more efficient, especially
39+
* if the length of the data is larger then the size of zlib's uInt. The
40+
* current implementation of adler32() in zlib just calls adler32_z() anyway.
41+
*
42+
* adler32_z() was added in zlib 1.2.9.
43+
*/
44+
#if SVN_ZLIB_HAS_ADLER32_Z
45+
#define svn__adler32_impl adler32_z
46+
typedef z_size_t svn__adler32_size_t;
47+
#else
48+
typedef uInt svn__adler32_size_t;
49+
#define svn__adler32_impl adler32
50+
#endif /* SVN_ZLIB_HAS_ADLER32_Z */
51+
52+
#define svn__adler32_fn(c,d,s) svn__adler32_impl((c), (const Bytef *)(d), (s))
53+
54+
/* See adler32-test.c which invokes dark magic in order to test the
55+
(len > SVN__ADLER32_SIZE_MAX) branch of the implementation. */
56+
#ifndef SVN__ADLER32_STATIC
57+
#define SVN__ADLER32_STATIC
58+
#define SVN__ADLER32_SIZE_MAX (~(svn__adler32_size_t)0)
59+
#endif
60+
3761
/*
3862
* 65521 is the largest prime less than 65536.
3963
* "That 65521 is prime is important to avoid a possible large class of
4064
* two-byte errors that leave the check unchanged."
4165
*/
42-
#define ADLER_MOD_BASE 65521
66+
#define SVN__ADLER_MOD_BASE 65521U
4367

4468
/*
4569
* Start with CHECKSUM and update the checksum by processing a chunk
4670
* of DATA sized LEN.
4771
*/
48-
apr_uint32_t
72+
SVN__ADLER32_STATIC apr_uint32_t
4973
svn__adler32(apr_uint32_t checksum, const char *data, apr_off_t len)
5074
{
75+
/* Process large amounts of data in max-sized chunks.
76+
*
77+
* Note: > not >=; then if sizeof(apr_off_t) <= sizeof(svn__adler32_size_t),
78+
* this whole code block can be elided at compile time ...
79+
*/
80+
if (SVN__PREDICT_FALSE(len > SVN__ADLER32_SIZE_MAX))
81+
{
82+
uLong partial = checksum; /* Avoid typecasts in the while loop. */
83+
/* ... but >= here because we just might get lucky and
84+
* consume all the data in this loop.
85+
*/
86+
while (len >= SVN__ADLER32_SIZE_MAX)
87+
{
88+
partial = svn__adler32_fn(partial, data, SVN__ADLER32_SIZE_MAX);
89+
len -= SVN__ADLER32_SIZE_MAX;
90+
data += SVN__ADLER32_SIZE_MAX;
91+
}
92+
checksum = (apr_uint32_t)partial;
93+
}
94+
5195
/* The actual limit can be set somewhat higher but should
5296
* not be lower because the SIMD code would not be used
5397
* in that case.
@@ -61,11 +105,10 @@ svn__adler32(apr_uint32_t checksum, const char *data, apr_off_t len)
61105
* optimized code. Also, new zlib versions will come with
62106
* SIMD code for x86 and x64.
63107
*/
64-
return (apr_uint32_t)adler32(checksum,
65-
(const Bytef *)data,
66-
(uInt)len);
108+
return (apr_uint32_t)svn__adler32_fn(checksum, data,
109+
(svn__adler32_size_t)len);
67110
}
68-
else
111+
else if (len > 0)
69112
{
70113
const unsigned char *input = (const unsigned char *)data;
71114
apr_uint32_t s1 = checksum & 0xFFFF;
@@ -96,6 +139,8 @@ svn__adler32(apr_uint32_t checksum, const char *data, apr_off_t len)
96139
s2 += s1;
97140
}
98141

99-
return ((s2 % ADLER_MOD_BASE) << 16) | (s1 % ADLER_MOD_BASE);
142+
return ((s2 % SVN__ADLER_MOD_BASE) << 16) | (s1 % SVN__ADLER_MOD_BASE);
100143
}
144+
145+
return checksum;
101146
}

subversion/libsvn_subr/checksum_apr.c

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,19 +85,38 @@ svn_checksum__md5_ctx_final(unsigned char *digest,
8585

8686

8787
/*** SHA1 checksum ***/
88+
static void
89+
sha1_update(apr_sha1_ctx_t *ctx,
90+
const char *data,
91+
apr_size_t len)
92+
{
93+
while (len > 0)
94+
{
95+
unsigned int block;
96+
97+
if (len < UINT_MAX)
98+
block = (unsigned int)len;
99+
else
100+
block = UINT_MAX;
101+
102+
apr_sha1_update(ctx, data, block);
103+
104+
len -= block;
105+
data += block;
106+
}
107+
}
108+
88109
svn_error_t *
89110
svn_checksum__sha1(unsigned char *digest,
90111
const void *data,
91112
apr_size_t len)
92113
{
93114
apr_sha1_ctx_t sha1_ctx;
94115

95-
/* Do not blindly truncate the data length. */
96-
SVN_ERR_ASSERT(len < UINT_MAX);
97-
98116
apr_sha1_init(&sha1_ctx);
99-
apr_sha1_update(&sha1_ctx, data, (unsigned int)len);
117+
sha1_update(&sha1_ctx, data, len);
100118
apr_sha1_final(digest, &sha1_ctx);
119+
101120
return SVN_NO_ERROR;
102121
}
103122

@@ -127,9 +146,7 @@ svn_checksum__sha1_ctx_update(svn_checksum__sha1_ctx_t *ctx,
127146
const void *data,
128147
apr_size_t len)
129148
{
130-
/* Do not blindly truncate the data length. */
131-
SVN_ERR_ASSERT(len < UINT_MAX);
132-
apr_sha1_update(&ctx->apr_ctx, data, (unsigned int)len);
149+
sha1_update(&ctx->apr_ctx, data, len);
133150
return SVN_NO_ERROR;
134151
}
135152

subversion/libsvn_subr/lz4/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
LZ4 Library
2-
Copyright (c) 2011-2016, Yann Collet
2+
Copyright (c) 2011-2020, Yann Collet
33
All rights reserved.
44

55
Redistribution and use in source and binary forms, with or without modification,

0 commit comments

Comments
 (0)