basebuilder_pel7ppc64bebuilder0
6 years ago
29 changed files with 13005 additions and 0 deletions
@ -0,0 +1,13 @@
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh |
||||
# Munge Perl requirements: |
||||
# - remove dependency on Config::Inifiles |
||||
# - only require File::Path >= 1.04, not >= 1.404 |
||||
# (since rpmvercmp thinks 04 < 1.404, not unreasonably) |
||||
# - filter out requirements for SVN:: modules; otherwise |
||||
# subversion requires subversion-perl |
||||
/usr/lib/rpm/perl.req $* | |
||||
sed -e '/perl(Config::IniFiles)/d' \ |
||||
-e '/perl(SVN::/d' \ |
||||
-e 's/perl(File::Path) >= 1.0404/perl(File::Path) >= 1.04/' |
||||
|
||||
|
@ -0,0 +1,3 @@
@@ -0,0 +1,3 @@
|
||||
(defalias 'svn-examine 'svn-status) |
||||
(autoload 'svn-status "psvn" "Examine the status of Subversion working copy in |
||||
directory DIR.") |
@ -0,0 +1,26 @@
@@ -0,0 +1,26 @@
|
||||
|
||||
The first half of this is certainly upstream-worthy, but the second half is presumably |
||||
some Fedora-specific KDE packaging thing. It's not obvious how to get |
||||
kde4-config to report the directory which contains the .so files. |
||||
|
||||
--- subversion-1.7.0/build/ac-macros/kwallet.m4.kwallet 2010-11-01 19:29:16.000000000 +0000 |
||||
+++ subversion-1.7.0/build/ac-macros/kwallet.m4 2011-10-12 09:32:55.129561537 +0100 |
||||
@@ -64,15 +64,14 @@ AC_DEFUN(SVN_LIB_KWALLET, |
||||
fi |
||||
done |
||||
qt_include_dirs="`$PKG_CONFIG --cflags-only-I QtCore QtDBus QtGui`" |
||||
- kde_dir="`$KDE4_CONFIG --prefix`" |
||||
- SVN_KWALLET_INCLUDES="$DBUS_CPPFLAGS $qt_include_dirs -I$kde_dir/include" |
||||
+ kde_include_dirs="-I`$KDE4_CONFIG --path include`" |
||||
+ SVN_KWALLET_INCLUDES="$DBUS_CPPFLAGS $qt_include_dirs $kde_include_dirs" |
||||
qt_libs_other_options="`$PKG_CONFIG --libs-only-other QtCore QtDBus QtGui`" |
||||
SVN_KWALLET_LIBS="$DBUS_LIBS -lQtCore -lQtDBus -lQtGui -lkdecore -lkdeui $qt_libs_other_options" |
||||
CXXFLAGS="$CXXFLAGS $SVN_KWALLET_INCLUDES" |
||||
LIBS="$LIBS $SVN_KWALLET_LIBS" |
||||
qt_lib_dirs="`$PKG_CONFIG --libs-only-L QtCore QtDBus QtGui`" |
||||
- kde_lib_suffix="`$KDE4_CONFIG --libsuffix`" |
||||
- LDFLAGS="$old_LDFLAGS `SVN_REMOVE_STANDARD_LIB_DIRS($qt_lib_dirs -L$kde_dir/lib$kde_lib_suffix)`" |
||||
+ LDFLAGS="$old_LDFLAGS `SVN_REMOVE_STANDARD_LIB_DIRS($qt_lib_dirs)` -L$libdir/kde4/devel" |
||||
AC_LANG(C++) |
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
||||
#include <kwallet.h> |
@ -0,0 +1,57 @@
@@ -0,0 +1,57 @@
|
||||
diff -uap subversion-1.7.0/build/generator/gen_base.py.pie subversion-1.7.0/build/generator/gen_base.py |
||||
--- subversion-1.7.0/build/generator/gen_base.py.pie 2011-10-12 09:25:30.510524103 +0100 |
||||
+++ subversion-1.7.0/build/generator/gen_base.py 2011-10-12 09:25:30.515650110 +0100 |
||||
@@ -406,7 +406,7 @@ class TargetLinked(Target): |
||||
self.install = options.get('install') |
||||
self.compile_cmd = options.get('compile-cmd') |
||||
self.sources = options.get('sources', '*.c *.cpp') |
||||
- self.link_cmd = options.get('link-cmd', '$(LINK)') |
||||
+ self.link_cmd = options.get('link-cmd', '$(LINK_LIB)') |
||||
|
||||
self.external_lib = options.get('external-lib') |
||||
self.external_project = options.get('external-project') |
||||
@@ -462,6 +462,11 @@ class TargetExe(TargetLinked): |
||||
self.manpages = options.get('manpages', '') |
||||
self.testing = options.get('testing') |
||||
|
||||
+ if self.install == 'test' or self.install == 'bdb-test': |
||||
+ self.link_cmd = '$(LINK_TEST)' |
||||
+ else: |
||||
+ self.link_cmd = '$(LINK_EXE)' |
||||
+ |
||||
def add_dependencies(self): |
||||
TargetLinked.add_dependencies(self) |
||||
|
||||
@@ -507,8 +512,8 @@ class TargetLib(TargetLinked): |
||||
self.msvc_export = options.get('msvc-export', '').split() |
||||
|
||||
### hmm. this is Makefile-specific |
||||
- if self.link_cmd == '$(LINK)': |
||||
- self.link_cmd = '$(LINK_LIB)' |
||||
+ if self.install == 'test': |
||||
+ self.link_cmd = '$(LINK_TEST_LIB)' |
||||
|
||||
class TargetApacheMod(TargetLib): |
||||
|
||||
diff -uap subversion-1.7.0/Makefile.in.pie subversion-1.7.0/Makefile.in |
||||
--- subversion-1.7.0/Makefile.in.pie 2011-10-12 09:25:30.511600030 +0100 |
||||
+++ subversion-1.7.0/Makefile.in 2011-10-12 09:26:16.757524426 +0100 |
||||
@@ -205,6 +205,9 @@ COMPILE_JAVAHL_JAVAH = $(JAVAH) |
||||
|
||||
LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) |
||||
LINK_LIB = $(LINK) $(LT_SO_VERSION) -rpath $(libdir) |
||||
+LINK_TEST = $(LINK) -no-install |
||||
+LINK_TEST_LIB = $(LINK) -avoid-version |
||||
+LINK_EXE = $(LINK) -pie |
||||
LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=link $(CXX) $(LT_LDFLAGS) $(CXXFLAGS) $(LDFLAGS) -rpath $(libdir) |
||||
LINK_CXX_LIB = $(LINK_CXX) $(LT_SO_VERSION) |
||||
|
||||
@@ -657,7 +660,7 @@ schema-clean: |
||||
$(PYTHON) $(top_srcdir)/build/transform_sql.py $< $(top_srcdir)/$@ |
||||
|
||||
.c.o: |
||||
- $(COMPILE) -o $@ -c $< |
||||
+ $(COMPILE) -fpie -o $@ -c $< |
||||
|
||||
.cpp.o: |
||||
$(COMPILE_CXX) -o $@ -c $< |
@ -0,0 +1,49 @@
@@ -0,0 +1,49 @@
|
||||
diff -uap subversion-1.7.0/build.conf.rpath subversion-1.7.0/build.conf |
||||
--- subversion-1.7.0/build.conf.rpath 2011-08-04 21:18:50.000000000 +0100 |
||||
+++ subversion-1.7.0/build.conf 2011-10-12 09:23:43.844525530 +0100 |
||||
@@ -478,7 +478,7 @@ type = swig_lib |
||||
lang = python |
||||
path = subversion/bindings/swig/python/libsvn_swig_py |
||||
libs = libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_subr apriconv apr |
||||
-link-cmd = $(LINK) |
||||
+link-cmd = $(LINK_LIB) |
||||
install = swig-py-lib |
||||
# need special build rule to include -DSWIGPYTHON |
||||
compile-cmd = $(COMPILE_SWIG_PY) |
||||
@@ -501,7 +501,7 @@ type = swig_lib |
||||
lang = ruby |
||||
path = subversion/bindings/swig/ruby/libsvn_swig_ruby |
||||
libs = libsvn_client libsvn_wc libsvn_delta libsvn_subr apriconv apr |
||||
-link-cmd = $(LINK) $(SWIG_RB_LIBS) |
||||
+link-cmd = $(LINK_LIB) $(SWIG_RB_LIBS) |
||||
install = swig-rb-lib |
||||
# need special build rule to include |
||||
compile-cmd = $(COMPILE_SWIG_RB) |
||||
diff -uap subversion-1.7.0/build/generator/gen_base.py.rpath subversion-1.7.0/build/generator/gen_base.py |
||||
--- subversion-1.7.0/build/generator/gen_base.py.rpath 2011-06-22 17:44:54.000000000 +0100 |
||||
+++ subversion-1.7.0/build/generator/gen_base.py 2011-10-12 09:23:15.368649375 +0100 |
||||
@@ -506,6 +506,10 @@ class TargetLib(TargetLinked): |
||||
self.msvc_fake = options.get('msvc-fake') == 'yes' # has fake target |
||||
self.msvc_export = options.get('msvc-export', '').split() |
||||
|
||||
+ ### hmm. this is Makefile-specific |
||||
+ if self.link_cmd == '$(LINK)': |
||||
+ self.link_cmd = '$(LINK_LIB)' |
||||
+ |
||||
class TargetApacheMod(TargetLib): |
||||
|
||||
def __init__(self, name, options, gen_obj): |
||||
diff -uap subversion-1.7.0/Makefile.in.rpath subversion-1.7.0/Makefile.in |
||||
--- subversion-1.7.0/Makefile.in.rpath 2011-07-16 12:50:53.000000000 +0100 |
||||
+++ subversion-1.7.0/Makefile.in 2011-10-12 09:24:36.165524732 +0100 |
||||
@@ -203,8 +203,8 @@ COMPILE_JAVAHL_CXX = $(LIBTOOL) $(LTCXXF |
||||
COMPILE_JAVAHL_JAVAC = $(JAVAC) $(JAVAC_FLAGS) |
||||
COMPILE_JAVAHL_JAVAH = $(JAVAH) |
||||
|
||||
-LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) -rpath $(libdir) |
||||
-LINK_LIB = $(LINK) $(LT_SO_VERSION) |
||||
+LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) |
||||
+LINK_LIB = $(LINK) $(LT_SO_VERSION) -rpath $(libdir) |
||||
LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=link $(CXX) $(LT_LDFLAGS) $(CXXFLAGS) $(LDFLAGS) -rpath $(libdir) |
||||
LINK_CXX_LIB = $(LINK_CXX) $(LT_SO_VERSION) |
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,33 @@
@@ -0,0 +1,33 @@
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2014-0032 |
||||
|
||||
http://svn.apache.org/viewvc?view=revision&revision=1558692 |
||||
|
||||
--- subversion-1.7.14/subversion/mod_dav_svn/repos.c.cve0032 |
||||
+++ subversion-1.7.14/subversion/mod_dav_svn/repos.c |
||||
@@ -1959,6 +1959,25 @@ get_resource(request_rec *r, |
||||
of private resource, iff the SVNListParentPath directive is 'on'. */ |
||||
if (dav_svn__is_parentpath_list(r)) |
||||
{ |
||||
+ /* Only allow GET and HEAD on the parentpath resource |
||||
+ * httpd uses the same method_number for HEAD as GET */ |
||||
+ if (r->method_number != M_GET) |
||||
+ { |
||||
+ int status; |
||||
+ |
||||
+ /* Marshall the error back to the client by generating by |
||||
+ * way of the dav_svn__error_response_tag trick. */ |
||||
+ err = dav_svn__new_error(r->pool, HTTP_METHOD_NOT_ALLOWED, |
||||
+ SVN_ERR_APMOD_MALFORMED_URI, |
||||
+ "The URI does not contain the name " |
||||
+ "of a repository."); |
||||
+ /* can't use r->allowed since the default handler isn't called */ |
||||
+ apr_table_setn(r->headers_out, "Allow", "GET,HEAD"); |
||||
+ status = dav_svn__error_response_tag(r, err); |
||||
+ |
||||
+ return dav_push_error(r->pool, status, err->error_id, NULL, err); |
||||
+ } |
||||
+ |
||||
err = get_parentpath_resource(r, resource); |
||||
if (err) |
||||
return err; |
@ -0,0 +1,30 @@
@@ -0,0 +1,30 @@
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2014-3528 |
||||
|
||||
http://subversion.apache.org/security/CVE-2014-3528-advisory.txt |
||||
|
||||
http://svn.apache.org/viewvc?view=revision&revision=r1615193 |
||||
|
||||
--- subversion-1.7.14/subversion/libsvn_subr/config_auth.c.cve3528 |
||||
+++ subversion-1.7.14/subversion/libsvn_subr/config_auth.c |
||||
@@ -90,6 +90,7 @@ svn_config_read_auth_data(apr_hash_t **h |
||||
if (kind == svn_node_file) |
||||
{ |
||||
svn_stream_t *stream; |
||||
+ svn_string_t *stored_realm; |
||||
|
||||
SVN_ERR_W(svn_stream_open_readonly(&stream, auth_path, pool, pool), |
||||
_("Unable to open auth file for reading")); |
||||
@@ -100,6 +101,12 @@ svn_config_read_auth_data(apr_hash_t **h |
||||
apr_psprintf(pool, _("Error parsing '%s'"), |
||||
svn_dirent_local_style(auth_path, pool))); |
||||
|
||||
+ stored_realm = apr_hash_get(*hash, SVN_CONFIG_REALMSTRING_KEY, |
||||
+ APR_HASH_KEY_STRING); |
||||
+ |
||||
+ if (!stored_realm || strcmp(stored_realm->data, realmstring) != 0) |
||||
+ *hash = NULL; /* Hash collision, or somebody tampering with storage */ |
||||
+ |
||||
SVN_ERR(svn_stream_close(stream)); |
||||
} |
||||
|
@ -0,0 +1,77 @@
@@ -0,0 +1,77 @@
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2014-3580 |
||||
|
||||
http://subversion.apache.org/security/CVE-2014-3580-advisory.txt |
||||
|
||||
--- subversion-1.7.14/subversion/mod_dav_svn/reports/deleted-rev.c.cve3580 |
||||
+++ subversion-1.7.14/subversion/mod_dav_svn/reports/deleted-rev.c |
||||
@@ -56,6 +56,9 @@ dav_svn__get_deleted_rev_report(const da |
||||
dav_error *derr = NULL; |
||||
|
||||
/* Sanity check. */ |
||||
+ if (!resource->info->repos_path) |
||||
+ return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0, |
||||
+ "The request does not specify a repository path"); |
||||
ns = dav_svn__find_ns(doc->namespaces, SVN_XML_NAMESPACE); |
||||
if (ns == -1) |
||||
return dav_svn__new_error_tag(resource->pool, HTTP_BAD_REQUEST, 0, |
||||
--- subversion-1.7.14/subversion/mod_dav_svn/reports/file-revs.c.cve3580 |
||||
+++ subversion-1.7.14/subversion/mod_dav_svn/reports/file-revs.c |
||||
@@ -251,6 +251,9 @@ dav_svn__file_revs_report(const dav_reso |
||||
arb.repos = resource->info->repos; |
||||
|
||||
/* Sanity check. */ |
||||
+ if (!resource->info->repos_path) |
||||
+ return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0, |
||||
+ "The request does not specify a repository path"); |
||||
ns = dav_svn__find_ns(doc->namespaces, SVN_XML_NAMESPACE); |
||||
/* ### This is done on other places, but the document element is |
||||
in this namespace, so is this necessary at all? */ |
||||
--- subversion-1.7.14/subversion/mod_dav_svn/reports/get-locations.c.cve3580 |
||||
+++ subversion-1.7.14/subversion/mod_dav_svn/reports/get-locations.c |
||||
@@ -106,6 +106,9 @@ dav_svn__get_locations_report(const dav_ |
||||
sizeof(svn_revnum_t)); |
||||
|
||||
/* Sanity check. */ |
||||
+ if (!resource->info->repos_path) |
||||
+ return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0, |
||||
+ "The request does not specify a repository path"); |
||||
ns = dav_svn__find_ns(doc->namespaces, SVN_XML_NAMESPACE); |
||||
if (ns == -1) |
||||
{ |
||||
--- subversion-1.7.14/subversion/mod_dav_svn/reports/get-location-segments.c.cve3580 |
||||
+++ subversion-1.7.14/subversion/mod_dav_svn/reports/get-location-segments.c |
||||
@@ -123,6 +123,9 @@ dav_svn__get_location_segments_report(co |
||||
struct location_segment_baton location_segment_baton; |
||||
|
||||
/* Sanity check. */ |
||||
+ if (!resource->info->repos_path) |
||||
+ return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0, |
||||
+ "The request does not specify a repository path"); |
||||
ns = dav_svn__find_ns(doc->namespaces, SVN_XML_NAMESPACE); |
||||
if (ns == -1) |
||||
{ |
||||
--- subversion-1.7.14/subversion/mod_dav_svn/reports/log.c.cve3580 |
||||
+++ subversion-1.7.14/subversion/mod_dav_svn/reports/log.c |
||||
@@ -307,6 +307,9 @@ dav_svn__log_report(const dav_resource * |
||||
= apr_array_make(resource->pool, 1, sizeof(const char *)); |
||||
|
||||
/* Sanity check. */ |
||||
+ if (!resource->info->repos_path) |
||||
+ return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0, |
||||
+ "The request does not specify a repository path"); |
||||
ns = dav_svn__find_ns(doc->namespaces, SVN_XML_NAMESPACE); |
||||
if (ns == -1) |
||||
{ |
||||
--- subversion-1.7.14/subversion/mod_dav_svn/reports/mergeinfo.c.cve3580 |
||||
+++ subversion-1.7.14/subversion/mod_dav_svn/reports/mergeinfo.c |
||||
@@ -67,6 +67,9 @@ dav_svn__get_mergeinfo_report(const dav_ |
||||
= apr_array_make(resource->pool, 0, sizeof(const char *)); |
||||
|
||||
/* Sanity check. */ |
||||
+ if (!resource->info->repos_path) |
||||
+ return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0, |
||||
+ "The request does not specify a repository path"); |
||||
ns = dav_svn__find_ns(doc->namespaces, SVN_XML_NAMESPACE); |
||||
if (ns == -1) |
||||
{ |
@ -0,0 +1,54 @@
@@ -0,0 +1,54 @@
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2014-8108 |
||||
|
||||
http://subversion.apache.org/security/CVE-2014-8108-advisory.txt |
||||
|
||||
--- subversion-1.7.14/subversion/mod_dav_svn/repos.c.cve8108 |
||||
+++ subversion-1.7.14/subversion/mod_dav_svn/repos.c |
||||
@@ -506,6 +506,9 @@ parse_vtxnstub_uri(dav_resource_combined |
||||
if (parse_txnstub_uri(comb, path, label, use_checked_in)) |
||||
return TRUE; |
||||
|
||||
+ if (!comb->priv.root.txn_name) |
||||
+ return TRUE; |
||||
+ |
||||
comb->priv.root.vtxn_name = comb->priv.root.txn_name; |
||||
comb->priv.root.txn_name = dav_svn__get_txn(comb->priv.repos, |
||||
comb->priv.root.vtxn_name); |
||||
@@ -574,6 +577,9 @@ parse_vtxnroot_uri(dav_resource_combined |
||||
if (parse_txnroot_uri(comb, path, label, use_checked_in)) |
||||
return TRUE; |
||||
|
||||
+ if (!comb->priv.root.txn_name) |
||||
+ return TRUE; |
||||
+ |
||||
comb->priv.root.vtxn_name = comb->priv.root.txn_name; |
||||
comb->priv.root.txn_name = dav_svn__get_txn(comb->priv.repos, |
||||
comb->priv.root.vtxn_name); |
||||
@@ -919,6 +925,10 @@ prep_working(dav_resource_combined *comb |
||||
point. */ |
||||
if (txn_name == NULL) |
||||
{ |
||||
+ if (!comb->priv.root.activity_id) |
||||
+ return dav_svn__new_error(comb->res.pool, HTTP_BAD_REQUEST, 0, |
||||
+ "The request did not specify an activity ID"); |
||||
+ |
||||
txn_name = dav_svn__get_txn(comb->priv.repos, |
||||
comb->priv.root.activity_id); |
||||
if (txn_name == NULL) |
||||
@@ -1029,8 +1039,13 @@ prep_working(dav_resource_combined *comb |
||||
static dav_error * |
||||
prep_activity(dav_resource_combined *comb) |
||||
{ |
||||
- const char *txn_name = dav_svn__get_txn(comb->priv.repos, |
||||
- comb->priv.root.activity_id); |
||||
+ const char *txn_name; |
||||
+ |
||||
+ if (!comb->priv.root.activity_id) |
||||
+ return dav_svn__new_error(comb->res.pool, HTTP_BAD_REQUEST, 0, |
||||
+ "The request did not specify an activity ID"); |
||||
+ |
||||
+ txn_name = dav_svn__get_txn(comb->priv.repos, comb->priv.root.activity_id); |
||||
|
||||
comb->priv.root.txn_name = txn_name; |
||||
comb->res.exists = txn_name != NULL; |
@ -0,0 +1,112 @@
@@ -0,0 +1,112 @@
|
||||
# ./pullrev.sh 1667246 |
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2015-0248 |
||||
|
||||
http://svn.apache.org/viewvc?view=revision&revision=1667246 |
||||
|
||||
--- subversion-1.7.14/subversion/mod_dav_svn/reports/get-location-segments.c |
||||
+++ subversion-1.7.14/subversion/mod_dav_svn/reports/get-location-segments.c |
||||
@@ -181,17 +181,36 @@ |
||||
"Not all parameters passed.", |
||||
SVN_DAV_ERROR_NAMESPACE, |
||||
SVN_DAV_ERROR_TAG); |
||||
- if (SVN_IS_VALID_REVNUM(start_rev) |
||||
- && SVN_IS_VALID_REVNUM(end_rev) |
||||
- && (end_rev > start_rev)) |
||||
+ |
||||
+ /* No START_REV or PEG_REVISION? We'll use HEAD. */ |
||||
+ if (!SVN_IS_VALID_REVNUM(start_rev) || !SVN_IS_VALID_REVNUM(peg_revision)) |
||||
+ { |
||||
+ svn_revnum_t youngest; |
||||
+ |
||||
+ serr = svn_fs_youngest_rev(&youngest, resource->info->repos->fs, |
||||
+ resource->pool); |
||||
+ if (serr != NULL) |
||||
+ return dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR, |
||||
+ "Could not determine youngest revision", |
||||
+ resource->pool); |
||||
+ |
||||
+ if (!SVN_IS_VALID_REVNUM(start_rev)) |
||||
+ start_rev = youngest; |
||||
+ if (!SVN_IS_VALID_REVNUM(peg_revision)) |
||||
+ peg_revision = youngest; |
||||
+ } |
||||
+ |
||||
+ /* No END_REV? We'll use 0. */ |
||||
+ if (!SVN_IS_VALID_REVNUM(end_rev)) |
||||
+ end_rev = 0; |
||||
+ |
||||
+ if (end_rev > start_rev) |
||||
return dav_svn__new_error_tag(resource->pool, HTTP_BAD_REQUEST, 0, |
||||
"End revision must not be younger than " |
||||
"start revision", |
||||
SVN_DAV_ERROR_NAMESPACE, |
||||
SVN_DAV_ERROR_TAG); |
||||
- if (SVN_IS_VALID_REVNUM(peg_revision) |
||||
- && SVN_IS_VALID_REVNUM(start_rev) |
||||
- && (start_rev > peg_revision)) |
||||
+ if (start_rev > peg_revision) |
||||
return dav_svn__new_error_tag(resource->pool, HTTP_BAD_REQUEST, 0, |
||||
"Start revision must not be younger than " |
||||
"peg revision", |
||||
--- subversion-1.7.14/subversion/svnserve/serve.c |
||||
+++ subversion-1.7.14/subversion/svnserve/serve.c |
||||
@@ -2266,10 +2266,31 @@ |
||||
|
||||
abs_path = svn_fspath__join(b->fs_path->data, relative_path, pool); |
||||
|
||||
- if (SVN_IS_VALID_REVNUM(start_rev) |
||||
- && SVN_IS_VALID_REVNUM(end_rev) |
||||
- && (end_rev > start_rev)) |
||||
+ SVN_ERR(trivial_auth_request(conn, pool, b)); |
||||
+ SVN_ERR(log_command(baton, conn, pool, "%s", |
||||
+ svn_log__get_location_segments(abs_path, peg_revision, |
||||
+ start_rev, end_rev, |
||||
+ pool))); |
||||
+ |
||||
+ /* No START_REV or PEG_REVISION? We'll use HEAD. */ |
||||
+ if (!SVN_IS_VALID_REVNUM(start_rev) || !SVN_IS_VALID_REVNUM(peg_revision)) |
||||
{ |
||||
+ svn_revnum_t youngest; |
||||
+ |
||||
+ SVN_CMD_ERR(svn_fs_youngest_rev(&youngest, b->fs, pool)); |
||||
+ |
||||
+ if (!SVN_IS_VALID_REVNUM(start_rev)) |
||||
+ start_rev = youngest; |
||||
+ if (!SVN_IS_VALID_REVNUM(peg_revision)) |
||||
+ peg_revision = youngest; |
||||
+ } |
||||
+ |
||||
+ /* No END_REV? We'll use 0. */ |
||||
+ if (!SVN_IS_VALID_REVNUM(end_rev)) |
||||
+ end_rev = 0; |
||||
+ |
||||
+ if (end_rev > start_rev) |
||||
+ { |
||||
err = svn_error_createf(SVN_ERR_INCORRECT_PARAMS, NULL, |
||||
"Get-location-segments end revision must not be " |
||||
"younger than start revision"); |
||||
@@ -2276,9 +2297,7 @@ |
||||
return log_fail_and_flush(err, b, conn, pool); |
||||
} |
||||
|
||||
- if (SVN_IS_VALID_REVNUM(peg_revision) |
||||
- && SVN_IS_VALID_REVNUM(start_rev) |
||||
- && (start_rev > peg_revision)) |
||||
+ if (start_rev > peg_revision) |
||||
{ |
||||
err = svn_error_createf(SVN_ERR_INCORRECT_PARAMS, NULL, |
||||
"Get-location-segments start revision must not " |
||||
@@ -2286,12 +2305,6 @@ |
||||
return log_fail_and_flush(err, b, conn, pool); |
||||
} |
||||
|
||||
- SVN_ERR(trivial_auth_request(conn, pool, b)); |
||||
- SVN_ERR(log_command(baton, conn, pool, "%s", |
||||
- svn_log__get_location_segments(abs_path, peg_revision, |
||||
- start_rev, end_rev, |
||||
- pool))); |
||||
- |
||||
/* All the parameters are fine - let's perform the query against the |
||||
* repository. */ |
||||
|
@ -0,0 +1,66 @@
@@ -0,0 +1,66 @@
|
||||
# ./pullrev.sh 1667248 |
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2015-0251 |
||||
|
||||
http://svn.apache.org/viewvc?view=revision&revision=1667248 |
||||
|
||||
--- subversion-1.7.14/subversion/mod_dav_svn/deadprops.c |
||||
+++ subversion-1.7.14/subversion/mod_dav_svn/deadprops.c |
||||
@@ -160,6 +160,23 @@ |
||||
} |
||||
|
||||
|
||||
+static svn_error_t * |
||||
+change_txn_prop(svn_fs_txn_t *txn, |
||||
+ const char *propname, |
||||
+ const svn_string_t *value, |
||||
+ apr_pool_t *scratch_pool) |
||||
+{ |
||||
+ if (strcmp(propname, SVN_PROP_REVISION_AUTHOR) == 0) |
||||
+ return svn_error_create(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL, |
||||
+ "Attempted to modify 'svn:author' property " |
||||
+ "on a transaction"); |
||||
+ |
||||
+ SVN_ERR(svn_repos_fs_change_txn_prop(txn, propname, value, scratch_pool)); |
||||
+ |
||||
+ return SVN_NO_ERROR; |
||||
+} |
||||
+ |
||||
+ |
||||
static dav_error * |
||||
save_value(dav_db *db, const dav_prop_name *name, |
||||
const svn_string_t *const *old_value_p, |
||||
@@ -210,9 +227,8 @@ |
||||
{ |
||||
if (db->resource->working) |
||||
{ |
||||
- serr = svn_repos_fs_change_txn_prop(resource->info->root.txn, |
||||
- propname, value, |
||||
- subpool); |
||||
+ serr = change_txn_prop(resource->info->root.txn, propname, |
||||
+ value, subpool); |
||||
} |
||||
else |
||||
{ |
||||
@@ -251,8 +267,8 @@ |
||||
} |
||||
else if (resource->info->restype == DAV_SVN_RESTYPE_TXN_COLLECTION) |
||||
{ |
||||
- serr = svn_repos_fs_change_txn_prop(resource->info->root.txn, |
||||
- propname, value, subpool); |
||||
+ serr = change_txn_prop(resource->info->root.txn, propname, |
||||
+ value, subpool); |
||||
} |
||||
else |
||||
{ |
||||
@@ -561,8 +577,8 @@ |
||||
/* Working Baseline or Working (Version) Resource */ |
||||
if (db->resource->baselined) |
||||
if (db->resource->working) |
||||
- serr = svn_repos_fs_change_txn_prop(db->resource->info->root.txn, |
||||
- propname, NULL, subpool); |
||||
+ serr = change_txn_prop(db->resource->info->root.txn, propname, |
||||
+ NULL, subpool); |
||||
else |
||||
/* ### VIOLATING deltaV: you can't proppatch a baseline, it's |
||||
not a working resource! But this is how we currently |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,104 @@
@@ -0,0 +1,104 @@
|
||||
Index: subversion/libsvn_ra_svn/client.c |
||||
=================================================================== |
||||
--- subversion/libsvn_ra_svn/client.c (revision 1803926) |
||||
+++ subversion/libsvn_ra_svn/client.c (working copy) |
||||
@@ -46,6 +46,7 @@ |
||||
#include "svn_props.h" |
||||
#include "svn_mergeinfo.h" |
||||
#include "svn_version.h" |
||||
+#include "svn_ctype.h" |
||||
|
||||
#include "svn_private_config.h" |
||||
|
||||
@@ -395,7 +396,7 @@ |
||||
* versions have it too. If the user is using some other ssh |
||||
* implementation that doesn't accept it, they can override it |
||||
* in the [tunnels] section of the config. */ |
||||
- val = "$SVN_SSH ssh -q"; |
||||
+ val = "$SVN_SSH ssh -q --"; |
||||
} |
||||
|
||||
if (!val || !*val) |
||||
@@ -435,7 +436,7 @@ |
||||
; |
||||
*argv = apr_palloc(pool, (n + 4) * sizeof(char *)); |
||||
memcpy((void *) *argv, cmd_argv, n * sizeof(char *)); |
||||
- (*argv)[n++] = svn_path_uri_decode(hostinfo, pool); |
||||
+ (*argv)[n++] = hostinfo; |
||||
(*argv)[n++] = "svnserve"; |
||||
(*argv)[n++] = "-t"; |
||||
(*argv)[n] = NULL; |
||||
@@ -716,7 +717,33 @@ |
||||
} |
||||
|
||||
|
||||
+/* A simple whitelist to ensure the following are valid: |
||||
+ * user@server |
||||
+ * [::1]:22 |
||||
+ * server-name |
||||
+ * server_name |
||||
+ * 127.0.0.1 |
||||
+ * with an extra restriction that a leading '-' is invalid. |
||||
+ */ |
||||
+static svn_boolean_t |
||||
+is_valid_hostinfo(const char *hostinfo) |
||||
+{ |
||||
+ const char *p = hostinfo; |
||||
|
||||
+ if (p[0] == '-') |
||||
+ return FALSE; |
||||
+ |
||||
+ while (*p) |
||||
+ { |
||||
+ if (!svn_ctype_isalnum(*p) && !strchr(":.-_[]@", *p)) |
||||
+ return FALSE; |
||||
+ |
||||
+ ++p; |
||||
+ } |
||||
+ |
||||
+ return TRUE; |
||||
+} |
||||
+ |
||||
static svn_error_t *ra_svn_open(svn_ra_session_t *session, |
||||
const char **corrected_url, |
||||
const char *url, |
||||
@@ -740,8 +767,17 @@ |
||||
parse_tunnel(url, &tunnel, pool); |
||||
|
||||
if (tunnel) |
||||
- SVN_ERR(find_tunnel_agent(tunnel, uri.hostinfo, &tunnel_argv, config, |
||||
- pool)); |
||||
+ { |
||||
+ const char *decoded_hostinfo; |
||||
+ |
||||
+ decoded_hostinfo = svn_path_uri_decode(uri.hostinfo, pool); |
||||
+ if (!is_valid_hostinfo(decoded_hostinfo)) |
||||
+ return svn_error_createf(SVN_ERR_BAD_URL, NULL, _("Invalid host '%s'"), |
||||
+ uri.hostinfo); |
||||
+ |
||||
+ SVN_ERR(find_tunnel_agent(tunnel, decoded_hostinfo, &tunnel_argv, |
||||
+ config, pool)); |
||||
+ } |
||||
else |
||||
tunnel_argv = NULL; |
||||
|
||||
Index: subversion/libsvn_subr/config_file.c |
||||
=================================================================== |
||||
--- subversion/libsvn_subr/config_file.c (revision 1803926) |
||||
+++ subversion/libsvn_subr/config_file.c (working copy) |
||||
@@ -1134,12 +1134,12 @@ |
||||
"### passed to the tunnel agent as <user>@<hostname>.) If the" NL |
||||
"### built-in ssh scheme were not predefined, it could be defined" NL |
||||
"### as:" NL |
||||
- "# ssh = $SVN_SSH ssh -q" NL |
||||
+ "# ssh = $SVN_SSH ssh -q --" NL |
||||
"### If you wanted to define a new 'rsh' scheme, to be used with" NL |
||||
"### 'svn+rsh:' URLs, you could do so as follows:" NL |
||||
- "# rsh = rsh" NL |
||||
+ "# rsh = rsh --" NL |
||||
"### Or, if you wanted to specify a full path and arguments:" NL |
||||
- "# rsh = /path/to/rsh -l myusername" NL |
||||
+ "# rsh = /path/to/rsh -l myusername --" NL |
||||
"### On Windows, if you are specifying a full path to a command," NL |
||||
"### use a forward slash (/) or a paired backslash (\\\\) as the" NL |
||||
"### path separator. A single backslash will be treated as an" NL |
@ -0,0 +1,63 @@
@@ -0,0 +1,63 @@
|
||||
# ./pullrev.sh 1439592 1447513 |
||||
|
||||
http://svn.apache.org/viewvc?view=revision&revision=1439592 |
||||
http://svn.apache.org/viewvc?view=revision&revision=1447513 |
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1379593 |
||||
|
||||
--- subversion-1.7.14/tools/hook-scripts/mailer/mailer.conf.example |
||||
+++ subversion-1.7.14/tools/hook-scripts/mailer/mailer.conf.example |
||||
@@ -146,7 +146,16 @@ |
||||
# |
||||
# from_addr = %(author)s@example.com |
||||
# |
||||
+# The substitution variable "repos_basename" is provided, and is set to |
||||
+# the directory name of the repository. This can be useful to set |
||||
+# a custom subject that can be re-used in multiple repositories: |
||||
# |
||||
+# commit_subject_prefix = [svn-%(repos_basename)s] |
||||
+# |
||||
+# For example if the repository is at /path/to/repo/project-x then |
||||
+# the subject of commit emails will be prefixed with [svn-project-x] |
||||
+# |
||||
+# |
||||
# SUMMARY |
||||
# |
||||
# While mailer.py will work to minimize the number of mail messages |
||||
--- subversion-1.7.14/tools/hook-scripts/mailer/mailer.py |
||||
+++ subversion-1.7.14/tools/hook-scripts/mailer/mailer.py |
||||
@@ -98,7 +98,10 @@ |
||||
if cmd == 'commit': |
||||
revision = int(cmd_args[0]) |
||||
repos = Repository(repos_dir, revision, pool) |
||||
- cfg = Config(config_fname, repos, { 'author' : repos.author }) |
||||
+ cfg = Config(config_fname, repos, |
||||
+ {'author': repos.author, |
||||
+ 'repos_basename': os.path.basename(repos.repos_dir) |
||||
+ }) |
||||
messenger = Commit(pool, cfg, repos) |
||||
elif cmd == 'propchange' or cmd == 'propchange2': |
||||
revision = int(cmd_args[0]) |
||||
@@ -108,14 +111,20 @@ |
||||
repos = Repository(repos_dir, revision, pool) |
||||
# Override the repos revision author with the author of the propchange |
||||
repos.author = author |
||||
- cfg = Config(config_fname, repos, { 'author' : author }) |
||||
+ cfg = Config(config_fname, repos, |
||||
+ {'author': author, |
||||
+ 'repos_basename': os.path.basename(repos.repos_dir) |
||||
+ }) |
||||
messenger = PropChange(pool, cfg, repos, author, propname, action) |
||||
elif cmd == 'lock' or cmd == 'unlock': |
||||
author = cmd_args[0] |
||||
repos = Repository(repos_dir, 0, pool) ### any old revision will do |
||||
# Override the repos revision author with the author of the lock/unlock |
||||
repos.author = author |
||||
- cfg = Config(config_fname, repos, { 'author' : author }) |
||||
+ cfg = Config(config_fname, repos, |
||||
+ {'author': author, |
||||
+ 'repos_basename': os.path.basename(repos.repos_dir) |
||||
+ }) |
||||
messenger = Lock(pool, cfg, repos, author, cmd == 'lock') |
||||
else: |
||||
raise UnknownSubcommand(cmd) |
@ -0,0 +1,367 @@
@@ -0,0 +1,367 @@
|
||||
# ./pullrev.sh r1564900 |
||||
|
||||
http://svn.apache.org/viewvc?view=revision&revision=r1564900 |
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1378178 |
||||
|
||||
--- subversion-1.7.14/subversion/tests/cmdline/diff_tests.py |
||||
+++ subversion-1.7.14/subversion/tests/cmdline/diff_tests.py |
||||
@@ -45,16 +45,39 @@ |
||||
###################################################################### |
||||
# Generate expected output |
||||
|
||||
-def make_diff_header(path, old_tag, new_tag): |
||||
+def is_absolute_url(target): |
||||
+ return (target.startswith('file://') |
||||
+ or target.startswith('http://') |
||||
+ or target.startswith('https://') |
||||
+ or target.startswith('svn://') |
||||
+ or target.startswith('svn+ssh://')) |
||||
+ |
||||
+def make_diff_header(path, old_tag, new_tag, src_label=None, dst_label=None): |
||||
"""Generate the expected diff header for file PATH, with its old and new |
||||
- versions described in parentheses by OLD_TAG and NEW_TAG. Return the header |
||||
- as an array of newline-terminated strings.""" |
||||
+ versions described in parentheses by OLD_TAG and NEW_TAG. SRC_LABEL and |
||||
+ DST_LABEL are paths or urls that are added to the diff labels if we're |
||||
+ diffing against the repository or diffing two arbitrary paths. |
||||
+ Return the header as an array of newline-terminated strings.""" |
||||
+ if src_label: |
||||
+ src_label = src_label.replace('\\', '/') |
||||
+ if not is_absolute_url(src_label): |
||||
+ src_label = '.../' + src_label |
||||
+ src_label = '\t(' + src_label + ')' |
||||
+ else: |
||||
+ src_label = '' |
||||
+ if dst_label: |
||||
+ dst_label = dst_label.replace('\\', '/') |
||||
+ if not is_absolute_url(dst_label): |
||||
+ dst_label = '.../' + dst_label |
||||
+ dst_label = '\t(' + dst_label + ')' |
||||
+ else: |
||||
+ dst_label = '' |
||||
path_as_shown = path.replace('\\', '/') |
||||
return [ |
||||
"Index: " + path_as_shown + "\n", |
||||
"===================================================================\n", |
||||
- "--- " + path_as_shown + "\t(" + old_tag + ")\n", |
||||
- "+++ " + path_as_shown + "\t(" + new_tag + ")\n", |
||||
+ "--- " + path_as_shown + src_label + "\t(" + old_tag + ")\n", |
||||
+ "+++ " + path_as_shown + dst_label + "\t(" + new_tag + ")\n", |
||||
] |
||||
|
||||
def make_no_diff_deleted_header(path, old_tag, new_tag): |
||||
@@ -3867,6 +3890,122 @@ |
||||
'diff', '-c2', |
||||
sbox.repo_url + '/A/D/H') |
||||
|
||||
+@Issue(4460) |
||||
+def diff_repo_wc_file_props(sbox): |
||||
+ "diff repo to wc file target with props" |
||||
+ sbox.build() |
||||
+ iota = sbox.ospath('iota') |
||||
+ |
||||
+ # add a mime-type and a line to iota to test the binary check |
||||
+ sbox.simple_propset('svn:mime-type', 'text/plain', 'iota') |
||||
+ sbox.simple_append('iota','second line\n') |
||||
+ |
||||
+ # test that we get the line and the property add |
||||
+ expected_output = make_diff_header(iota, 'revision 1', 'working copy') + \ |
||||
+ [ '@@ -1 +1,2 @@\n', |
||||
+ " This is the file 'iota'.\n", |
||||
+ "+second line\n", ] + \ |
||||
+ make_diff_prop_header(iota) + \ |
||||
+ make_diff_prop_added('svn:mime-type', 'text/plain') |
||||
+ svntest.actions.run_and_verify_svn(None, expected_output, [], |
||||
+ 'diff', '-r1', iota) |
||||
+ |
||||
+ # reverse the diff, should get a property delete and line delete |
||||
+ # skip actually testing the output since apparently 1.7 is busted |
||||
+ # this isn't related to issue #4460, older versions of 1.7 had the issue |
||||
+ # as well |
||||
+ #expected_output = make_diff_header(iota, 'working copy', 'revision 1') + \ |
||||
+ # [ '@@ -1,2 +1 @@\n', |
||||
+ # " This is the file 'iota'.\n", |
||||
+ # "-second line\n", ] + \ |
||||
+ # make_diff_prop_header(iota) + \ |
||||
+ # make_diff_prop_deleted('svn:mime-type', 'text/plain') |
||||
+ expected_output = None |
||||
+ svntest.actions.run_and_verify_svn(None, expected_output, [], |
||||
+ 'diff', '--old', iota, |
||||
+ '--new', iota + '@1') |
||||
+ |
||||
+ # copy iota to test with --show-copies as adds |
||||
+ sbox.simple_copy('iota', 'iota_copy') |
||||
+ iota_copy = sbox.ospath('iota_copy') |
||||
+ |
||||
+ # test that we get all lines as added and the property added |
||||
+ # TODO: We only test that this test doesn't error out because of Issue #4464 |
||||
+ # if and when that issue is fixed this test should check output |
||||
+ svntest.actions.run_and_verify_svn(None, None, [], 'diff', |
||||
+ '--show-copies-as-adds', '-r1', iota_copy) |
||||
+ |
||||
+ # reverse the diff, should get all lines as a delete and no property |
||||
+ # TODO: We only test that this test doesn't error out because of Issue #4464 |
||||
+ # if and when that issue is fixed this test should check output |
||||
+ svntest.actions.run_and_verify_svn(None, None, [], 'diff', |
||||
+ '--show-copies-as-adds', |
||||
+ '--old', iota_copy, |
||||
+ '--new', iota + '@1') |
||||
+ |
||||
+ # revert and commit with the eol-style of LF and then update so |
||||
+ # that we can see a change on either windows or *nix. |
||||
+ sbox.simple_revert('iota', 'iota_copy') |
||||
+ sbox.simple_propset('svn:eol-style', 'LF', 'iota') |
||||
+ sbox.simple_commit() #r2 |
||||
+ sbox.simple_update() |
||||
+ |
||||
+ # now that we have a LF file on disk switch to CRLF |
||||
+ sbox.simple_propset('svn:eol-style', 'CRLF', 'iota') |
||||
+ |
||||
+ # test that not only the property but also the file changes |
||||
+ # i.e. that the line endings substitution works |
||||
+ if svntest.main.is_os_windows(): |
||||
+ # test suite normalizes crlf output into just lf on Windows. |
||||
+ # so we have to assume it worked because there is an add and |
||||
+ # remove line with the same content. Fortunately, it does't |
||||
+ # do this on *nix so we can be pretty sure that it works right. |
||||
+ # TODO: Provide a way to handle this better |
||||
+ crlf = '\n' |
||||
+ else: |
||||
+ crlf = '\r\n' |
||||
+ expected_output = make_diff_header(iota, 'revision 1', 'working copy') + \ |
||||
+ [ '@@ -1 +1 @@\n', |
||||
+ "-This is the file 'iota'.\n", |
||||
+ "+This is the file 'iota'." + crlf ] + \ |
||||
+ make_diff_prop_header(iota) + \ |
||||
+ make_diff_prop_added('svn:eol-style', 'CRLF') |
||||
+ |
||||
+ svntest.actions.run_and_verify_svn(None, expected_output, [], |
||||
+ 'diff', '-r1', iota) |
||||
+ |
||||
+ |
||||
+@Issue(4460) |
||||
+def diff_repo_repo_added_file_mime_type(sbox): |
||||
+ "diff repo to repo added file with mime-type" |
||||
+ sbox.build() |
||||
+ wc_dir = sbox.wc_dir |
||||
+ newfile = sbox.ospath('newfile') |
||||
+ |
||||
+ # add a file with a mime-type |
||||
+ sbox.simple_append('newfile', "This is the file 'newfile'.\n") |
||||
+ sbox.simple_add('newfile') |
||||
+ sbox.simple_propset('svn:mime-type', 'text/plain', 'newfile') |
||||
+ sbox.simple_commit() # r2 |
||||
+ |
||||
+ # try to diff across the addition |
||||
+ expected_output = make_diff_header(newfile, 'revision 1', 'revision 2') + \ |
||||
+ [ '@@ -0,0 +1 @@\n', |
||||
+ "+This is the file 'newfile'.\n" ] + \ |
||||
+ make_diff_prop_header(newfile) + \ |
||||
+ make_diff_prop_added('svn:mime-type', 'text/plain') |
||||
+ |
||||
+ svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff', |
||||
+ '-r1:2', newfile) |
||||
+ |
||||
+ # reverse the diff to diff across a deletion |
||||
+ # Note no property delete is printed when whole file is deleted |
||||
+ expected_output = make_diff_header(newfile, 'revision 2', 'revision 1') + \ |
||||
+ [ '@@ -1, +0,0 @@\n', |
||||
+ "-This is the file 'newfile'.\n" ] |
||||
+ svntest.actions.run_and_verify_svn(None, None, [], 'diff', |
||||
+ '-r2:1', newfile) |
||||
+ |
||||
######################################################################## |
||||
#Run the tests |
||||
|
||||
@@ -3935,6 +4074,8 @@ |
||||
no_spurious_conflict, |
||||
diff_deleted_url, |
||||
diff_git_format_wc_wc_dir_mv, |
||||
+ diff_repo_wc_file_props, |
||||
+ diff_repo_repo_added_file_mime_type, |
||||
] |
||||
|
||||
if __name__ == '__main__': |
||||
--- subversion-1.7.14/subversion/libsvn_client/diff.c |
||||
+++ subversion-1.7.14/subversion/libsvn_client/diff.c |
||||
@@ -1892,6 +1892,7 @@ |
||||
const char *file_abspath; |
||||
svn_stream_t *content; |
||||
apr_hash_t *prop_hash; |
||||
+ svn_string_t *mimetype; |
||||
|
||||
SVN_ERR(svn_stream_open_unique(&content, &file_abspath, NULL, |
||||
svn_io_file_del_on_pool_cleanup, |
||||
@@ -1900,13 +1901,13 @@ |
||||
&prop_hash, scratch_pool)); |
||||
SVN_ERR(svn_stream_close(content)); |
||||
|
||||
+ mimetype = apr_hash_get(prop_hash, SVN_PROP_MIME_TYPE, APR_HASH_KEY_STRING); |
||||
+ |
||||
if (show_deletion) |
||||
{ |
||||
SVN_ERR(callbacks->file_deleted(NULL, NULL, |
||||
target, file_abspath, empty_file, |
||||
- apr_hash_get(prop_hash, |
||||
- SVN_PROP_MIME_TYPE, |
||||
- APR_HASH_KEY_STRING), |
||||
+ mimetype ? mimetype->data : NULL, |
||||
NULL, |
||||
make_regular_props_hash( |
||||
prop_hash, scratch_pool, scratch_pool), |
||||
@@ -1917,8 +1918,7 @@ |
||||
SVN_ERR(callbacks->file_added(NULL, NULL, NULL, |
||||
target, empty_file, file_abspath, |
||||
rev1, rev2, NULL, |
||||
- apr_hash_get(prop_hash, SVN_PROP_MIME_TYPE, |
||||
- APR_HASH_KEY_STRING), |
||||
+ mimetype ? mimetype->data : NULL, |
||||
NULL, SVN_INVALID_REVNUM, |
||||
make_regular_props_array(prop_hash, |
||||
scratch_pool, |
||||
@@ -2243,6 +2243,7 @@ |
||||
apr_hash_t *file1_props = NULL; |
||||
apr_hash_t *file2_props; |
||||
svn_boolean_t is_copy = FALSE; |
||||
+ svn_string_t *mimetype1, *mimetype2; |
||||
|
||||
/* Get content and props of file 1 (the remote file). */ |
||||
SVN_ERR(svn_stream_open_unique(&file1_content, &file1_abspath, NULL, |
||||
@@ -2292,6 +2293,7 @@ |
||||
{ |
||||
apr_hash_t *keywords = NULL; |
||||
svn_string_t *keywords_prop; |
||||
+ svn_string_t *eol_prop; |
||||
svn_subst_eol_style_t eol_style; |
||||
const char *eol_str; |
||||
|
||||
@@ -2299,10 +2301,10 @@ |
||||
scratch_pool, scratch_pool)); |
||||
|
||||
/* We might have to create a normalised version of the working file. */ |
||||
+ eol_prop = apr_hash_get(file2_props, SVN_PROP_EOL_STYLE, |
||||
+ APR_HASH_KEY_STRING); |
||||
svn_subst_eol_style_from_value(&eol_style, &eol_str, |
||||
- apr_hash_get(file2_props, |
||||
- SVN_PROP_EOL_STYLE, |
||||
- APR_HASH_KEY_STRING)); |
||||
+ eol_prop ? eol_prop->data : NULL); |
||||
keywords_prop = apr_hash_get(file2_props, SVN_PROP_KEYWORDS, |
||||
APR_HASH_KEY_STRING); |
||||
if (keywords_prop) |
||||
@@ -2309,7 +2311,7 @@ |
||||
SVN_ERR(svn_subst_build_keywords2(&keywords, keywords_prop->data, |
||||
NULL, NULL, 0, NULL, |
||||
scratch_pool)); |
||||
- if (svn_subst_translation_required(eol_style, SVN_SUBST_NATIVE_EOL_STR, |
||||
+ if (svn_subst_translation_required(eol_style, eol_str, |
||||
keywords, FALSE, TRUE)) |
||||
{ |
||||
svn_stream_t *working_content; |
||||
@@ -2323,7 +2325,7 @@ |
||||
svn_io_file_del_on_pool_cleanup, |
||||
scratch_pool, scratch_pool)); |
||||
normalized_content = svn_subst_stream_translated( |
||||
- file2_content, SVN_SUBST_NATIVE_EOL_STR, |
||||
+ file2_content, eol_str, |
||||
TRUE, keywords, FALSE, scratch_pool); |
||||
SVN_ERR(svn_stream_copy3(working_content, normalized_content, |
||||
ctx->cancel_func, ctx->cancel_baton, |
||||
@@ -2331,42 +2333,46 @@ |
||||
} |
||||
} |
||||
|
||||
+ mimetype1 = file1_props ? apr_hash_get(file1_props, SVN_PROP_MIME_TYPE, |
||||
+ APR_HASH_KEY_STRING) |
||||
+ : NULL; |
||||
+ mimetype2 = apr_hash_get(file2_props, SVN_PROP_MIME_TYPE, |
||||
+ APR_HASH_KEY_STRING); |
||||
+ |
||||
if (kind1 == svn_node_file && !(show_copies_as_adds && is_copy)) |
||||
{ |
||||
+ apr_array_header_t *propchanges; |
||||
+ |
||||
SVN_ERR(callbacks->file_opened(NULL, NULL, target, |
||||
reverse ? SVN_INVALID_REVNUM : rev, |
||||
callback_baton, scratch_pool)); |
||||
|
||||
if (reverse) |
||||
- SVN_ERR(callbacks->file_changed(NULL, NULL, NULL, target, |
||||
- file2_abspath, file1_abspath, |
||||
- SVN_INVALID_REVNUM, rev, |
||||
- apr_hash_get(file2_props, |
||||
- SVN_PROP_MIME_TYPE, |
||||
- APR_HASH_KEY_STRING), |
||||
- apr_hash_get(file1_props, |
||||
- SVN_PROP_MIME_TYPE, |
||||
- APR_HASH_KEY_STRING), |
||||
- make_regular_props_array( |
||||
- file1_props, scratch_pool, |
||||
- scratch_pool), |
||||
- file2_props, |
||||
- callback_baton, scratch_pool)); |
||||
+ { |
||||
+ SVN_ERR(svn_prop_diffs(&propchanges, file1_props, file2_props, |
||||
+ scratch_pool)); |
||||
+ |
||||
+ SVN_ERR(callbacks->file_changed(NULL, NULL, NULL, target, |
||||
+ file2_abspath, file1_abspath, |
||||
+ SVN_INVALID_REVNUM, rev, |
||||
+ mimetype2 ? mimetype2->data : NULL, |
||||
+ mimetype1 ? mimetype1->data : NULL, |
||||
+ propchanges, file2_props, |
||||
+ callback_baton, scratch_pool)); |
||||
+ } |
||||
else |
||||
- SVN_ERR(callbacks->file_changed(NULL, NULL, NULL, target, |
||||
- file1_abspath, file2_abspath, |
||||
- rev, SVN_INVALID_REVNUM, |
||||
- apr_hash_get(file1_props, |
||||
- SVN_PROP_MIME_TYPE, |
||||
- APR_HASH_KEY_STRING), |
||||
- apr_hash_get(file2_props, |
||||
- SVN_PROP_MIME_TYPE, |
||||
- APR_HASH_KEY_STRING), |
||||
- make_regular_props_array( |
||||
- file2_props, scratch_pool, |
||||
- scratch_pool), |
||||
- file1_props, |
||||
- callback_baton, scratch_pool)); |
||||
+ { |
||||
+ SVN_ERR(svn_prop_diffs(&propchanges, file2_props, file1_props, |
||||
+ scratch_pool)); |
||||
+ |
||||
+ SVN_ERR(callbacks->file_changed(NULL, NULL, NULL, target, |
||||
+ file1_abspath, file2_abspath, |
||||
+ rev, SVN_INVALID_REVNUM, |
||||
+ mimetype1 ? mimetype1->data : NULL, |
||||
+ mimetype2 ? mimetype2->data : NULL, |
||||
+ propchanges, file1_props, |
||||
+ callback_baton, scratch_pool)); |
||||
+ } |
||||
} |
||||
else |
||||
{ |
||||
@@ -2374,9 +2380,7 @@ |
||||
{ |
||||
SVN_ERR(callbacks->file_deleted(NULL, NULL, |
||||
target, file2_abspath, file1_abspath, |
||||
- apr_hash_get(file2_props, |
||||
- SVN_PROP_MIME_TYPE, |
||||
- APR_HASH_KEY_STRING), |
||||
+ mimetype2 ? mimetype2->data : NULL, |
||||
NULL, |
||||
make_regular_props_hash( |
||||
file2_props, scratch_pool, |
||||
@@ -2389,9 +2393,7 @@ |
||||
file1_abspath, file2_abspath, |
||||
rev, SVN_INVALID_REVNUM, |
||||
NULL, |
||||
- apr_hash_get(file2_props, |
||||
- SVN_PROP_MIME_TYPE, |
||||
- APR_HASH_KEY_STRING), |
||||
+ mimetype2 ? mimetype2->data : NULL, |
||||
NULL, SVN_INVALID_REVNUM, |
||||
make_regular_props_array( |
||||
file2_props, scratch_pool, |
@ -0,0 +1,37 @@
@@ -0,0 +1,37 @@
|
||||
# ./pullrev.sh 1708699 |
||||
http://svn.apache.org/viewvc?view=revision&revision=1708699 |
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1306431 |
||||
|
||||
--- subversion-1.7.14/subversion/mod_authz_svn/mod_authz_svn.c.r1708699 |
||||
+++ subversion-1.7.14/subversion/mod_authz_svn/mod_authz_svn.c |
||||
@@ -807,19 +807,21 @@ |
||||
#if USE_FORCE_AUTHN |
||||
if (authn_configured) { |
||||
/* We have to check to see if authn is required because if so we must |
||||
- * return UNAUTHORIZED (401) rather than FORBIDDEN (403) since returning |
||||
+ * return DECLINED rather than FORBIDDEN (403) since returning |
||||
* the 403 leaks information about what paths may exist to |
||||
- * unauthenticated users. We must set a note here in order |
||||
- * to use ap_some_authn_rquired() without triggering an infinite |
||||
- * loop since the call will trigger this function to be called again. */ |
||||
+ * unauthenticated users. Returning DECLINED means apache's request |
||||
+ * handling will continue until the authn module itself generates |
||||
+ * UNAUTHORIZED (401). |
||||
+ |
||||
+ * We must set a note here in order to use |
||||
+ * ap_some_authn_rquired() without triggering an infinite |
||||
+ * loop since the call will trigger this function to be |
||||
+ * called again. */ |
||||
apr_table_setn(r->notes, IN_SOME_AUTHN_NOTE, (const char*)1); |
||||
authn_required = ap_some_authn_required(r); |
||||
apr_table_unset(r->notes, IN_SOME_AUTHN_NOTE); |
||||
if (authn_required) |
||||
- { |
||||
- ap_note_auth_failure(r); |
||||
- return HTTP_UNAUTHORIZED; |
||||
- } |
||||
+ return DECLINED; |
||||
} |
||||
#else |
||||
if (!ap_some_auth_required(r)) |
@ -0,0 +1,365 @@
@@ -0,0 +1,365 @@
|
||||
Date: Tue, 20 Dec 2011 21:08:00 -0800 |
||||
From: Vincent Batts <vbatts@slackware.com> |
||||
Subject: Re: [PATCH] enabling ruby in the subversion build |
||||
Message-ID: <20111221050800.GA17350@slackware.com> |
||||
|
||||
--- subversion-1.7.2/configure.ac.ruby19 |
||||
+++ subversion-1.7.2/configure.ac |
||||
@@ -1130,13 +1130,6 @@ if test "$RUBY" != "none"; then |
||||
|
||||
AC_SUBST(RUBY_MAJOR) |
||||
AC_SUBST(RUBY_MINOR) |
||||
- if test ! \( "$RUBY_MAJOR" -eq "1" -a "$RUBY_MINOR" -eq "8" \); 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 is too new for Subversion to use]) |
||||
- AC_MSG_WARN([Only 1.8.x releases are supported at this time]) |
||||
- fi |
||||
else |
||||
AC_MSG_RESULT([no]) |
||||
RUBY="none" |
||||
--- subversion-1.7.2/Makefile.in.ruby19 |
||||
+++ subversion-1.7.2/Makefile.in |
||||
@@ -318,7 +318,7 @@ INSTALL_EXTRA_SWIG_RB=\ |
||||
$(INSTALL_DATA) "$$i" $(DESTDIR)$(SWIG_RB_SITE_LIB_DIR)/svn; \ |
||||
done |
||||
|
||||
-APXS = @APXS@ |
||||
+APXS = @APXS@ |
||||
|
||||
PYTHON = @PYTHON@ |
||||
PERL = @PERL@ |
||||
@@ -818,9 +818,14 @@ swig-rb: autogen-swig-rb |
||||
|
||||
check-swig-rb: swig-rb svnserve |
||||
cd $(SWIG_RB_DIR); \ |
||||
- $(RUBY) -I $(SWIG_RB_SRC_DIR) \ |
||||
- $(SWIG_RB_SRC_DIR)/test/run-test.rb \ |
||||
- --verbose=$(SWIG_RB_TEST_VERBOSE) |
||||
+ if [ "$(RUBY_MAJOR)" -eq 1 -a "$(RUBY_MINOR)" -lt 9 ] ; then \ |
||||
+ $(RUBY) -I $(SWIG_RB_SRC_DIR) \ |
||||
+ $(SWIG_RB_SRC_DIR)/test/run-test.rb \ |
||||
+ --verbose=$(SWIG_RB_TEST_VERBOSE); \ |
||||
+ else \ |
||||
+ $(RUBY) -I $(SWIG_RB_SRC_DIR) \ |
||||
+ $(SWIG_RB_SRC_DIR)/test/run-test.rb; \ |
||||
+ fi |
||||
|
||||
EXTRACLEAN_SWIG_RB=rm -f $(SWIG_RB_SRC_DIR)/svn_*.c $(SWIG_RB_SRC_DIR)/core.c |
||||
|
||||
--- subversion-1.7.2/subversion/bindings/swig/ruby/svn/info.rb.ruby19 |
||||
+++ subversion-1.7.2/subversion/bindings/swig/ruby/svn/info.rb |
||||
@@ -229,7 +229,9 @@ module Svn |
||||
|
||||
def parse_diff_unified(entry) |
||||
in_content = false |
||||
- entry.body.each do |line| |
||||
+ # accomodation for ruby 1.9 and 1.8 |
||||
+ each_meth = entry.body.respond_to?(:each_line) ? :each_line : :each |
||||
+ entry.body.send(each_meth) do |line| |
||||
case line |
||||
when /^@@/ |
||||
in_content = true |
||||
--- subversion-1.7.2/subversion/bindings/swig/ruby/svn/util.rb.ruby19 |
||||
+++ subversion-1.7.2/subversion/bindings/swig/ruby/svn/util.rb |
||||
@@ -36,7 +36,7 @@ module Svn |
||||
module Util #:nodoc: |
||||
module_function |
||||
def to_ruby_class_name(name) |
||||
- name.split("_").collect do |x| |
||||
+ name.to_s.split("_").collect do |x| |
||||
"#{x[0,1].upcase}#{x[1..-1].downcase}" |
||||
end.join("") |
||||
end |
||||
--- subversion-1.7.2/subversion/bindings/swig/ruby/test/my-assertions.rb.ruby19 |
||||
+++ subversion-1.7.2/subversion/bindings/swig/ruby/test/my-assertions.rb |
||||
@@ -24,20 +24,33 @@ module Test |
||||
module Unit |
||||
module Assertions |
||||
|
||||
+ # make an intermediary assertion block handler |
||||
+ def _my_assert_block(&block) |
||||
+ if RUBY_VERSION > '1.9' |
||||
+ assert_block do |
||||
+ yield |
||||
+ end |
||||
+ else |
||||
+ _wrap_assertion do |
||||
+ yield |
||||
+ end |
||||
+ end |
||||
+ end |
||||
+ |
||||
def assert_true(boolean, message=nil) |
||||
- _wrap_assertion do |
||||
+ _my_assert_block do |
||||
assert_equal(true, boolean, message) |
||||
end |
||||
end |
||||
|
||||
def assert_false(boolean, message=nil) |
||||
- _wrap_assertion do |
||||
+ _my_assert_block do |
||||
assert_equal(false, boolean, message) |
||||
end |
||||
end |
||||
|
||||
def assert_nested_sorted_array(expected, actual, message=nil) |
||||
- _wrap_assertion do |
||||
+ _my_assert_block do |
||||
assert_equal(expected.collect {|elem| elem.sort}, |
||||
actual.collect {|elem| elem.sort}, |
||||
message) |
||||
@@ -45,7 +58,7 @@ module Test |
||||
end |
||||
|
||||
def assert_equal_log_entries(expected, actual, message=nil) |
||||
- _wrap_assertion do |
||||
+ _my_assert_block do |
||||
actual = actual.collect do |entry| |
||||
changed_paths = entry.changed_paths |
||||
changed_paths.each_key do |path| |
||||
--- subversion-1.7.2/subversion/bindings/swig/ruby/test/test_client.rb.ruby19 |
||||
+++ subversion-1.7.2/subversion/bindings/swig/ruby/test/test_client.rb |
||||
@@ -2203,7 +2203,11 @@ class SvnClientTest < Test::Unit::TestCa |
||||
|
||||
make_context(log) do |ctx| |
||||
items = nil |
||||
- ctx.set_log_msg_func do |items| |
||||
+ ctx.set_log_msg_func do |l_items| |
||||
+ # ruby 1.8 magically carried the assignment of 'items' back from this Proc block, |
||||
+ # but in 1.9, we need to have names that don't conflict, and set the outside 'items'. |
||||
+ # This works in 1.8 as well |
||||
+ items = l_items |
||||
[true, log] |
||||
end |
||||
|
||||
--- subversion-1.7.2/subversion/bindings/swig/ruby/test/test_core.rb.ruby19 |
||||
+++ subversion-1.7.2/subversion/bindings/swig/ruby/test/test_core.rb |
||||
@@ -1,3 +1,4 @@ |
||||
+# encoding: UTF-8 |
||||
# ==================================================================== |
||||
# Licensed to the Apache Software Foundation (ASF) under one |
||||
# or more contributor license agreements. See the NOTICE file |
||||
@@ -52,7 +53,13 @@ class SvnCoreTest < Test::Unit::TestCase |
||||
now = Time.now.gmtime |
||||
str = now.strftime("%Y-%m-%dT%H:%M:%S.") + "#{now.usec}Z" |
||||
|
||||
- assert_equal(now, Time.from_svn_format(str)) |
||||
+ if RUBY_VERSION > '1.9' |
||||
+ # ruby 1.9 Time comparison gets into the nano-seconds, that strftime |
||||
+ # shaves off. So we can compare epoch time instead |
||||
+ assert_equal(now.to_i, Time.from_svn_format(str).gmtime.to_i) |
||||
+ else |
||||
+ assert_equal(now, Time.from_svn_format(str).gmtime) |
||||
+ end |
||||
|
||||
apr_time = now.to_i * 1000000 + now.usec |
||||
assert_equal(apr_time, now.to_apr_time) |
||||
@@ -244,7 +251,11 @@ class SvnCoreTest < Test::Unit::TestCase |
||||
config_infos << [section, name, value] |
||||
end |
||||
assert_equal(infos.sort, config_infos.sort) |
||||
- assert_equal(infos.sort, config.collect {|args| args}.sort) |
||||
+ if RUBY_VERSION > '1.9' |
||||
+ assert_equal(infos.sort, config.collect {|sect,name,val| [sect,name,val]}.sort) |
||||
+ else |
||||
+ assert_equal(infos.sort, config.collect {|args| args}.sort) |
||||
+ end |
||||
end |
||||
|
||||
def test_config_find_group |
||||
@@ -532,7 +543,13 @@ EOD |
||||
date_str = now.strftime("%Y-%m-%dT%H:%M:%S") |
||||
date_str << ".#{now.usec}Z" |
||||
info.date = date_str |
||||
- assert_equal(now, info.date) |
||||
+ if RUBY_VERSION > '1.9' |
||||
+ # ruby 1.9 Time comparison gets into the nano-seconds, that strftime |
||||
+ # shaves off. So we can compare epoch time instead |
||||
+ assert_equal(now.to_i, info.date.gmtime.to_i) |
||||
+ else |
||||
+ assert_equal(now, info.date.gmtime) |
||||
+ end |
||||
end |
||||
|
||||
def test_svn_prop |
||||
--- subversion-1.7.2/subversion/bindings/swig/ruby/test/test_delta.rb.ruby19 |
||||
+++ subversion-1.7.2/subversion/bindings/swig/ruby/test/test_delta.rb |
||||
@@ -17,9 +17,10 @@ |
||||
# under the License. |
||||
# ==================================================================== |
||||
|
||||
+require "my-assertions" |
||||
require "util" |
||||
require "stringio" |
||||
-require 'md5' |
||||
+require 'digest/md5' |
||||
require 'tempfile' |
||||
|
||||
require "svn/info" |
||||
@@ -46,8 +47,8 @@ class SvnDeltaTest < Test::Unit::TestCas |
||||
target = StringIO.new(t) |
||||
stream = Svn::Delta::TextDeltaStream.new(source, target) |
||||
assert_nil(stream.md5_digest) |
||||
- _wrap_assertion do |
||||
- stream.each do |window| |
||||
+ _my_assert_block do |
||||
+ ret = stream.each do |window| |
||||
window.ops.each do |op| |
||||
op_size = op.offset + op.length |
||||
case op.action_code |
||||
@@ -62,8 +63,9 @@ class SvnDeltaTest < Test::Unit::TestCas |
||||
end |
||||
end |
||||
end |
||||
+ true if RUBY_VERSION > '1.9' # this block returns nil in > ruby '1.9' |
||||
end |
||||
- assert_equal(MD5.new(t).hexdigest, stream.md5_digest) |
||||
+ assert_equal(Digest::MD5.hexdigest(t), stream.md5_digest) |
||||
end |
||||
|
||||
def test_txdelta_window_compose |
||||
@@ -81,7 +83,7 @@ class SvnDeltaTest < Test::Unit::TestCas |
||||
end |
||||
end |
||||
|
||||
- _wrap_assertion do |
||||
+ assert_block do |
||||
composed_window.ops.each do |op| |
||||
op_size = op.offset + op.length |
||||
case op.action_code |
||||
@@ -169,6 +171,7 @@ |
||||
stream = Svn::Delta::TextDeltaStream.new(source, target) |
||||
|
||||
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 |
||||
@@ -20,7 +20,7 @@ |
||||
require "my-assertions" |
||||
require "util" |
||||
require "time" |
||||
-require "md5" |
||||
+require "digest/md5" |
||||
|
||||
require "svn/core" |
||||
require "svn/fs" |
||||
@@ -49,14 +49,15 @@ class SvnFsTest < Test::Unit::TestCase |
||||
|
||||
assert(!File.exist?(path)) |
||||
fs = nil |
||||
- callback = Proc.new do |fs| |
||||
+ callback = Proc.new do |t_fs| |
||||
assert(File.exist?(path)) |
||||
assert_equal(fs_type, Svn::Fs.type(path)) |
||||
- fs.set_warning_func do |err| |
||||
+ t_fs.set_warning_func do |err| |
||||
p err |
||||
abort |
||||
end |
||||
- assert_equal(path, fs.path) |
||||
+ assert_equal(path, t_fs.path) |
||||
+ fs = t_fs |
||||
end |
||||
yield(:create, [path, config], callback) |
||||
|
||||
@@ -162,7 +163,7 @@ class SvnFsTest < Test::Unit::TestCase |
||||
|
||||
assert_equal(src, @fs.root.file_contents(path_in_repos){|f| f.read}) |
||||
assert_equal(src.length, @fs.root.file_length(path_in_repos)) |
||||
- assert_equal(MD5.new(src).hexdigest, |
||||
+ assert_equal(Digest::MD5.hexdigest(src), |
||||
@fs.root.file_md5_checksum(path_in_repos)) |
||||
|
||||
assert_equal([path_in_repos], @fs.root.paths_changed.keys) |
||||
@@ -364,7 +365,7 @@ class SvnFsTest < Test::Unit::TestCase |
||||
|
||||
File.open(path, "w") {|f| f.print(modified)} |
||||
@fs.transaction do |txn| |
||||
- checksum = MD5.new(normalize_line_break(result)).hexdigest |
||||
+ checksum = Digest::MD5.hexdigest(normalize_line_break(result)) |
||||
stream = txn.root.apply_text(path_in_repos, checksum) |
||||
stream.write(normalize_line_break(result)) |
||||
stream.close |
||||
@@ -392,8 +393,8 @@ class SvnFsTest < Test::Unit::TestCase |
||||
|
||||
File.open(path, "w") {|f| f.print(modified)} |
||||
@fs.transaction do |txn| |
||||
- base_checksum = MD5.new(normalize_line_break(src)).hexdigest |
||||
- checksum = MD5.new(normalize_line_break(result)).hexdigest |
||||
+ base_checksum = Digest::MD5.hexdigest(normalize_line_break(src)) |
||||
+ checksum = Digest::MD5.hexdigest(normalize_line_break(result)) |
||||
handler = txn.root.apply_textdelta(path_in_repos, |
||||
base_checksum, checksum) |
||||
assert_raises(Svn::Error::ChecksumMismatch) do |
||||
--- subversion-1.7.2/subversion/bindings/swig/ruby/test/test_repos.rb.ruby19 |
||||
+++ subversion-1.7.2/subversion/bindings/swig/ruby/test/test_repos.rb |
||||
@@ -98,11 +98,12 @@ class SvnReposTest < Test::Unit::TestCas |
||||
fs_type = Svn::Fs::TYPE_FSFS |
||||
fs_config = {Svn::Fs::CONFIG_FS_TYPE => fs_type} |
||||
repos = nil |
||||
- Svn::Repos.create(tmp_repos_path, {}, fs_config) do |repos| |
||||
+ Svn::Repos.create(tmp_repos_path, {}, fs_config) do |t_repos| |
||||
assert(File.exist?(tmp_repos_path)) |
||||
- fs_type_path = File.join(repos.fs.path, Svn::Fs::CONFIG_FS_TYPE) |
||||
+ fs_type_path = File.join(t_repos.fs.path, Svn::Fs::CONFIG_FS_TYPE) |
||||
assert_equal(fs_type, File.open(fs_type_path) {|f| f.read.chop}) |
||||
- repos.fs.set_warning_func(&warning_func) |
||||
+ t_repos.fs.set_warning_func(&warning_func) |
||||
+ repos = t_repos |
||||
end |
||||
|
||||
assert(repos.closed?) |
||||
--- subversion-1.7.2/subversion/bindings/swig/ruby/test/test-unit-ext/priority.rb.ruby19 |
||||
+++ subversion-1.7.2/subversion/bindings/swig/ruby/test/test-unit-ext/priority.rb |
||||
@@ -179,7 +179,7 @@ module Test |
||||
apply_priority |
||||
!@tests.empty? |
||||
end |
||||
- end |
||||
+ end if RUBY_VERSION < '1.9.3' |
||||
|
||||
class AutoRunner |
||||
alias_method :original_options, :options |
||||
--- subversion-1.7.2/subversion/bindings/swig/ruby/test/test-unit-ext.rb.ruby19 |
||||
+++ subversion-1.7.2/subversion/bindings/swig/ruby/test/test-unit-ext.rb |
||||
@@ -17,7 +17,7 @@ |
||||
# under the License. |
||||
# ==================================================================== |
||||
|
||||
-require "test-unit-ext/always-show-result" |
||||
+require "test-unit-ext/always-show-result" if RUBY_VERSION < '1.9.3' |
||||
require "test-unit-ext/priority" |
||||
-require "test-unit-ext/backtrace-filter" |
||||
-require "test-unit-ext/long-display-for-emacs" |
||||
+require "test-unit-ext/backtrace-filter" if RUBY_VERSION < '1.9.3' |
||||
+require "test-unit-ext/long-display-for-emacs" if RUBY_VERSION < '1.9.3' |
||||
--- subversion-1.7.2/subversion/bindings/swig/ruby/test/test_wc.rb.ruby19 |
||||
+++ subversion-1.7.2/subversion/bindings/swig/ruby/test/test_wc.rb |
||||
@@ -530,7 +530,7 @@ EOE |
||||
ctx.ci(lf_path) |
||||
|
||||
Svn::Wc::AdmAccess.open(nil, @wc_path, true, 5) do |access| |
||||
- _wrap_assertion do |
||||
+ _my_assert_block do |
||||
File.open(src_path, "wb") {|f| f.print(source)} |
||||
args = [method_name, src_path, crlf_path, Svn::Wc::TRANSLATE_FROM_NF] |
||||
result = yield(access.send(*args), source) |
||||
@@ -1084,7 +1084,11 @@ EOE |
||||
assert_not_nil context |
||||
assert_kind_of Svn::Wc::Context, context |
||||
end |
||||
- assert_nil result; |
||||
+ if RUBY_VERSION > '1.9' |
||||
+ assert_equal(result,true) |
||||
+ else |
||||
+ assert_nil result |
||||
+ end |
||||
end |
||||
end |
||||
|
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
|
||||
Possible fix/workaround for dubious pointer derefs in #810861. |
||||
|
||||
--- subversion-1.7.4/subversion/libsvn_auth_kwallet/kwallet.cpp.kwallet |
||||
+++ subversion-1.7.4/subversion/libsvn_auth_kwallet/kwallet.cpp |
||||
@@ -175,6 +175,10 @@ kwallet_terminate(void *data) |
||||
"kwallet-initialized", |
||||
APR_HASH_KEY_STRING, |
||||
NULL); |
||||
+ apr_hash_set(parameters, |
||||
+ "kwallet-wallet", |
||||
+ APR_HASH_KEY_STRING, |
||||
+ NULL); |
||||
} |
||||
return APR_SUCCESS; |
||||
} |
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
|
||||
Patch out strict version requirements for sqlite. |
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=815396 |
||||
|
||||
--- subversion-1.7.4/subversion/libsvn_subr/sqlite.c.sqlitever |
||||
+++ subversion-1.7.4/subversion/libsvn_subr/sqlite.c |
||||
@@ -740,14 +740,6 @@ static volatile svn_atomic_t sqlite_init |
||||
static svn_error_t * |
||||
init_sqlite(void *baton, apr_pool_t *pool) |
||||
{ |
||||
- if (sqlite3_libversion_number() < SQLITE_VERSION_NUMBER) |
||||
- { |
||||
- return svn_error_createf( |
||||
- SVN_ERR_SQLITE_ERROR, NULL, |
||||
- _("SQLite compiled for %s, but running with %s"), |
||||
- SQLITE_VERSION, sqlite3_libversion()); |
||||
- } |
||||
- |
||||
#if APR_HAS_THREADS |
||||
|
||||
/* SQLite 3.5 allows verification of its thread-safety at runtime. |
@ -0,0 +1,24 @@
@@ -0,0 +1,24 @@
|
||||
|
||||
Try a little harder to avoid svnserve() bind failures. |
||||
|
||||
--- subversion-1.7.9/subversion/bindings/swig/ruby/test/util.rb.rubybind |
||||
+++ subversion-1.7.9/subversion/bindings/swig/ruby/test/util.rb |
||||
@@ -41,7 +41,8 @@ module SvnTestUtil |
||||
@full_repos_path = File.expand_path(@repos_path) |
||||
@repos_uri = "file://#{@full_repos_path.sub(/^\/?/, '/')}" |
||||
@svnserve_host = "127.0.0.1" |
||||
- @svnserve_ports = (64152..64282).collect{|x| x.to_s} |
||||
+ sport = (50000 + rand(100) * 100) |
||||
+ @svnserve_ports = (sport..sport + 99).collect{|x| x.to_s} |
||||
@wc_base_dir = File.join(Dir.tmpdir, "wc-tmp") |
||||
@wc_path = File.join(@wc_base_dir, "wc") |
||||
@full_wc_path = File.expand_path(@wc_path) |
||||
@@ -249,6 +250,8 @@ realm = #{@realm} |
||||
"--listen-port", port, |
||||
"-d", "--foreground") |
||||
} |
||||
+ # wait a while for svnserve to attempt a bind() and possibly fail |
||||
+ sleep(1) |
||||
pid, status = Process.waitpid2(@svnserve_pid, Process::WNOHANG) |
||||
if status and status.exited? |
||||
if $DEBUG |
@ -0,0 +1,23 @@
@@ -0,0 +1,23 @@
|
||||
|
||||
http://svn.apache.org/viewvc?view=revision&revision=1327373 |
||||
|
||||
--- subversion-1.7.9/subversion/bindings/swig/ruby/test/test_wc.rb.swighash |
||||
+++ subversion-1.7.9/subversion/bindings/swig/ruby/test/test_wc.rb |
||||
@@ -326,12 +326,16 @@ class SvnWcTest < Test::Unit::TestCase |
||||
ignored_errors = [] |
||||
callbacks.ignored_errors = ignored_errors |
||||
access.walk_entries(@wc_path, callbacks) |
||||
+ sorted_ignored_errors = ignored_errors.sort_by {|path, err| path} |
||||
+ sorted_ignored_errors = sorted_ignored_errors.collect! do |path, err| |
||||
+ [path, err.class] |
||||
+ end |
||||
assert_equal([ |
||||
[@wc_path, Svn::Error::Cancelled], |
||||
[path1, Svn::Error::Cancelled], |
||||
[path2, Svn::Error::Cancelled], |
||||
], |
||||
- ignored_errors.collect {|path, err| [path, err.class]}) |
||||
+ sorted_ignored_errors) |
||||
end |
||||
end |
||||
end |
@ -0,0 +1,41 @@
@@ -0,0 +1,41 @@
|
||||
|
||||
LoadModule dav_svn_module modules/mod_dav_svn.so |
||||
LoadModule authz_svn_module modules/mod_authz_svn.so |
||||
LoadModule dontdothat_module modules/mod_dontdothat.so |
||||
|
||||
# |
||||
# Example configuration to enable HTTP access for a directory |
||||
# containing Subversion repositories, "/var/www/svn". Each repository |
||||
# must be both: |
||||
# |
||||
# a) readable and writable by the 'apache' user, and |
||||
# |
||||
# b) labelled with the 'httpd_sys_content_t' context if using |
||||
# SELinux |
||||
# |
||||
|
||||
# |
||||
# To create a new repository "http://localhost/repos/stuff" using |
||||
# this configuration, run as root: |
||||
# |
||||
# # cd /var/www/svn |
||||
# # svnadmin create stuff |
||||
# # chown -R apache:apache stuff |
||||
# # chcon -R -t httpd_sys_content_t stuff |
||||
# |
||||
|
||||
#<Location /repos> |
||||
# DAV svn |
||||
# SVNParentPath /var/www/svn |
||||
# |
||||
# # Limit write permission to list of valid users. |
||||
# <LimitExcept GET PROPFIND OPTIONS REPORT> |
||||
# # Require SSL connection for password protection. |
||||
# # SSLRequireSSL |
||||
# |
||||
# AuthType Basic |
||||
# AuthName "Authorization Realm" |
||||
# AuthUserFile /path/to/passwdfile |
||||
# Require valid-user |
||||
# </LimitExcept> |
||||
#</Location> |
@ -0,0 +1,11 @@
@@ -0,0 +1,11 @@
|
||||
[Unit] |
||||
Description=Subversion protocol daemon |
||||
After=syslog.target network.target |
||||
|
||||
[Service] |
||||
Type=forking |
||||
EnvironmentFile=/etc/sysconfig/svnserve |
||||
ExecStart=/usr/bin/svnserve --daemon --pid-file=/run/svnserve/svnserve.pid $OPTIONS |
||||
|
||||
[Install] |
||||
WantedBy=multi-user.target |
@ -0,0 +1,4 @@
@@ -0,0 +1,4 @@
|
||||
# OPTIONS is used to pass command-line arguments to svnserve. |
||||
# |
||||
# Specify the repository location in -r parameter: |
||||
OPTIONS="-r /var/svn" |
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
D /run/svnserve 0700 root root - |
Loading…
Reference in new issue