diff options
author | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2009-06-22 21:59:59 +0000 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2009-06-22 21:59:59 +0000 |
commit | 399cf01d2bde65f5f1a9bf2e338d01e77a9137fc (patch) | |
tree | 42dfe8b510b6a3e8e53193dacc50e154603f284d /dev-util/subversion/files | |
parent | Update some 'ebeep' lines. (diff) | |
download | historical-399cf01d2bde65f5f1a9bf2e338d01e77a9137fc.tar.gz historical-399cf01d2bde65f5f1a9bf2e338d01e77a9137fc.tar.bz2 historical-399cf01d2bde65f5f1a9bf2e338d01e77a9137fc.zip |
Version bump. Improve handling of Apache-dependent tests (bug #273442).
Package-Manager: portage-13665-svn/cvs/Linux x86_64
Diffstat (limited to 'dev-util/subversion/files')
-rw-r--r-- | dev-util/subversion/files/subversion-1.6.3-apache-2.4.patch | 24 | ||||
-rw-r--r-- | dev-util/subversion/files/subversion-1.6.3-kwallet_window.patch | 298 |
2 files changed, 322 insertions, 0 deletions
diff --git a/dev-util/subversion/files/subversion-1.6.3-apache-2.4.patch b/dev-util/subversion/files/subversion-1.6.3-apache-2.4.patch new file mode 100644 index 000000000000..94ba5b171dde --- /dev/null +++ b/dev-util/subversion/files/subversion-1.6.3-apache-2.4.patch @@ -0,0 +1,24 @@ +https://svn.collab.net/viewvc/svn?view=revision&revision=36720 + +--- subversion/mod_dav_svn/liveprops.c ++++ subversion/mod_dav_svn/liveprops.c +@@ -466,7 +466,7 @@ + && resource->info->r->content_type) + mime_type = resource->info->r->content_type; + else +- mime_type = ap_default_type(resource->info->r); ++ mime_type = "application/octet-stream"; + + if ((serr = svn_mime_type_validate(mime_type, p))) + { +--- subversion/mod_dav_svn/repos.c ++++ subversion/mod_dav_svn/repos.c +@@ -2690,7 +2690,7 @@ + && r->content_type) + mimetype = r->content_type; + else +- mimetype = ap_default_type(r); ++ mimetype = "application/octet-stream"; + + serr = svn_mime_type_validate(mimetype, resource->pool); + if (serr) diff --git a/dev-util/subversion/files/subversion-1.6.3-kwallet_window.patch b/dev-util/subversion/files/subversion-1.6.3-kwallet_window.patch new file mode 100644 index 000000000000..4bb9c09f0a4c --- /dev/null +++ b/dev-util/subversion/files/subversion-1.6.3-kwallet_window.patch @@ -0,0 +1,298 @@ +https://svn.collab.net/viewvc/svn?view=revision&revision=38004 +https://svn.collab.net/viewvc/svn?view=revision&revision=38014 +https://svn.collab.net/viewvc/svn?view=revision&revision=38028 +https://svn.collab.net/viewvc/svn?view=revision&revision=38122 + +--- subversion/libsvn_auth_kwallet/kwallet.cpp ++++ subversion/libsvn_auth_kwallet/kwallet.cpp +@@ -22,6 +22,7 @@ + + /*** Includes. ***/ + ++#include <stdlib.h> + #include <string.h> + #include <unistd.h> + +@@ -30,6 +31,9 @@ + #include "svn_auth.h" + #include "svn_config.h" + #include "svn_error.h" ++#include "svn_io.h" ++#include "svn_pools.h" ++#include "svn_string.h" + #include "svn_version.h" + + #include "private/svn_auth_private.h" +@@ -38,13 +42,20 @@ + + #include <dbus/dbus.h> + #include <QtCore/QCoreApplication> ++#include <QtCore/QList> ++#include <QtCore/QMap> + #include <QtCore/QString> ++#include <QtGui/QApplication> ++#include <QtGui/QX11Info> + + #include <kaboutdata.h> + #include <kcmdlineargs.h> + #include <kcomponentdata.h> + #include <klocalizedstring.h> + #include <kwallet.h> ++#include <kwindowsystem.h> ++#include <netwm.h> ++#include <netwm_def.h> + + + /*-----------------------------------------------------------------------*/ +@@ -52,6 +63,28 @@ + /*-----------------------------------------------------------------------*/ + + ++#define INITIALIZE_APPLICATION \ ++ if (apr_hash_get(parameters, \ ++ "svn:auth:qapplication-safe", \ ++ APR_HASH_KEY_STRING)) \ ++ { \ ++ QApplication *app; \ ++ if (! qApp) \ ++ { \ ++ int argc = 1; \ ++ app = new QApplication(argc, (char *[1]) {(char *) "svn"}); \ ++ } \ ++ } \ ++ else \ ++ { \ ++ QCoreApplication *app; \ ++ if (! qApp) \ ++ { \ ++ int argc = 1; \ ++ app = new QCoreApplication(argc, (char *[1]) {(char *) "svn"}); \ ++ } \ ++ } ++ + static const char * + get_application_name(apr_hash_t *parameters, + apr_pool_t *pool) +@@ -69,8 +102,7 @@ + const char *svn_application_name; + if (svn_application_name_with_pid) + { +- long pid = getpid(); +- svn_application_name = apr_psprintf(pool, "Subversion [%ld]", pid); ++ svn_application_name = apr_psprintf(pool, "Subversion [%ld]", long(getpid())); + } + else + { +@@ -102,9 +134,108 @@ + } + } + ++static pid_t ++get_parent_pid(pid_t pid, ++ apr_pool_t *pool) ++{ ++ pid_t parent_pid = 0; ++ ++#ifdef __linux__ ++ svn_stream_t *stat_file_stream; ++ svn_string_t *stat_file_string; ++ const char *preceeding_space, *following_space, *parent_pid_string; ++ ++ const char *path = apr_psprintf(pool, "/proc/%ld/stat", long(pid)); ++ svn_error_t *err = svn_stream_open_readonly(&stat_file_stream, path, pool, pool); ++ if (err == SVN_NO_ERROR) ++ { ++ err = svn_string_from_stream(&stat_file_string, stat_file_stream, pool, pool); ++ if (err == SVN_NO_ERROR) ++ { ++ if ((preceeding_space = strchr(stat_file_string->data, ' '))) ++ { ++ if ((preceeding_space = strchr(preceeding_space + 1, ' '))) ++ { ++ if ((preceeding_space = strchr(preceeding_space + 1, ' '))) ++ { ++ if ((following_space = strchr(preceeding_space + 1, ' '))) ++ { ++ parent_pid_string = apr_pstrndup(pool, ++ preceeding_space + 1, ++ following_space - preceeding_space); ++ parent_pid = atol(parent_pid_string); ++ } ++ } ++ } ++ } ++ } ++ } ++ ++ if (err) ++ { ++ svn_error_clear(err); ++ } ++#endif ++ ++ return parent_pid; ++} ++ ++static WId ++get_wid(apr_hash_t *parameters, ++ apr_pool_t *pool) ++{ ++ WId wid = 1; ++ ++ if (apr_hash_get(parameters, ++ "svn:auth:qapplication-safe", ++ APR_HASH_KEY_STRING)) ++ { ++ QMap<pid_t, WId> process_info_list; ++ QList<WId> windows(KWindowSystem::windows()); ++ QList<WId>::const_iterator i; ++ for (i = windows.begin(); i != windows.end(); i++) ++ { ++ process_info_list[NETWinInfo(QX11Info::display(), ++ *i, ++ QX11Info::appRootWindow(), ++ NET::WMPid).pid()] = *i; ++ } ++ ++ apr_pool_t *iterpool = svn_pool_create(pool); ++ pid_t pid = getpid(); ++ while (pid != 0) ++ { ++ svn_pool_clear(iterpool); ++ if (process_info_list.contains(pid)) ++ { ++ wid = process_info_list[pid]; ++ break; ++ } ++ pid = get_parent_pid(pid, iterpool); ++ } ++ svn_pool_destroy(iterpool); ++ } ++ ++ if (wid == 1) ++ { ++ const char *wid_env_string = getenv("WINDOWID"); ++ if (wid_env_string) ++ { ++ long wid_env = atol(wid_env_string); ++ if (wid_env != 0) ++ { ++ wid = wid_env; ++ } ++ } ++ } ++ ++ return wid; ++} ++ + static KWallet::Wallet * + get_wallet(QString wallet_name, +- apr_hash_t *parameters) ++ apr_hash_t *parameters, ++ apr_pool_t *pool) + { + KWallet::Wallet *wallet = + static_cast<KWallet::Wallet *> (apr_hash_get(parameters, +@@ -115,7 +246,7 @@ + APR_HASH_KEY_STRING)) + { + wallet = KWallet::Wallet::openWallet(wallet_name, +- -1, ++ pool ? get_wid(parameters, pool) : 1, + KWallet::Wallet::Synchronous); + } + if (wallet) +@@ -141,7 +272,7 @@ + apr_hash_t *parameters = static_cast<apr_hash_t *> (data); + if (apr_hash_get(parameters, "kwallet-initialized", APR_HASH_KEY_STRING)) + { +- KWallet::Wallet *wallet = get_wallet(NULL, parameters); ++ KWallet::Wallet *wallet = get_wallet(NULL, parameters, NULL); + delete wallet; + apr_hash_set(parameters, + "kwallet-initialized", +@@ -172,12 +303,7 @@ + return FALSE; + } + +- QCoreApplication *app; +- if (! qApp) +- { +- int argc = 1; +- app = new QCoreApplication(argc, (char *[1]) {(char *) "svn"}); +- } ++ INITIALIZE_APPLICATION + + KCmdLineArgs::init(1, + (char *[1]) {(char *) "svn"}, +@@ -195,7 +321,7 @@ + QString::fromUtf8(username) + "@" + QString::fromUtf8(realmstring); + if (! KWallet::Wallet::keyDoesNotExist(wallet_name, folder, key)) + { +- KWallet::Wallet *wallet = get_wallet(wallet_name, parameters); ++ KWallet::Wallet *wallet = get_wallet(wallet_name, parameters, pool); + if (wallet) + { + apr_hash_set(parameters, +@@ -242,12 +368,7 @@ + return FALSE; + } + +- QCoreApplication *app; +- if (! qApp) +- { +- int argc = 1; +- app = new QCoreApplication(argc, (char *[1]) {(char *) "svn"}); +- } ++ INITIALIZE_APPLICATION + + KCmdLineArgs::init(1, + (char *[1]) {(char *) "svn"}, +@@ -262,7 +383,7 @@ + QString q_password = QString::fromUtf8(password); + QString wallet_name = get_wallet_name(parameters); + QString folder = QString::fromUtf8("Subversion"); +- KWallet::Wallet *wallet = get_wallet(wallet_name, parameters); ++ KWallet::Wallet *wallet = get_wallet(wallet_name, parameters, pool); + if (wallet) + { + apr_hash_set(parameters, +--- subversion/svn/main.c ++++ subversion/svn/main.c +@@ -2067,6 +2067,9 @@ + pool))) + svn_handle_error2(err, stderr, TRUE, "svn: "); + ++ /* svn can safely create instance of QApplication class. */ ++ svn_auth_set_parameter(ab, "svn:auth:qapplication-safe", "1"); ++ + ctx->auth_baton = ab; + + /* Set up conflict resolution callback. */ +--- subversion/svnsync/main.c ++++ subversion/svnsync/main.c +@@ -1,6 +1,6 @@ + /* + * ==================================================================== +- * Copyright (c) 2005-2008 CollabNet. All rights reserved. ++ * Copyright (c) 2005-2009 CollabNet. All rights reserved. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms +@@ -2362,7 +2362,15 @@ + check_cancel, NULL, + pool); + if (! err) +- err = (*subcommand->cmd_func)(os, &opt_baton, pool); ++ { ++ /* svnsync can safely create instance of QApplication class. */ ++ svn_auth_set_parameter(opt_baton.source_auth_baton, ++ "svn:auth:qapplication-safe", "1"); ++ svn_auth_set_parameter(opt_baton.sync_auth_baton, ++ "svn:auth:qapplication-safe", "1"); ++ ++ err = (*subcommand->cmd_func)(os, &opt_baton, pool); ++ } + if (err) + { + /* For argument-related problems, suggest using the 'help' |