From 05af2c6ad9e43bf530435694a7f7e81d6b22fe3c Mon Sep 17 00:00:00 2001 From: Nikola Pajkovsky Date: Fri, 9 Oct 2009 15:57:06 +0200 Subject: start rewriting login and check uuid from xmlrpc++ to xmlrpc --- configure.ac | 6 +- lib/Plugins/Bugzilla.cpp | 197 ++++++++++++++++++++++++++++++++++++++--------- lib/Plugins/Bugzilla.h | 22 ++++-- lib/Plugins/Makefile.am | 4 +- 4 files changed, 181 insertions(+), 48 deletions(-) diff --git a/configure.ac b/configure.ac index 52ae398c..36736dfe 100644 --- a/configure.ac +++ b/configure.ac @@ -28,8 +28,10 @@ PKG_CHECK_MODULES([RPM], [rpm]) PKG_CHECK_MODULES([CURL], [libcurl]) PKG_CHECK_MODULES([LIBNOTIFY], [libnotify]) PKG_CHECK_MODULES([NSS], [nss]) -PKG_CHECK_MODULES([XMLRPC_CPP], [xmlrpc++]) -PKG_CHECK_MODULES([XMLRPC_CLIENT_CPP], [xmlrpc_client++]) +#PKG_CHECK_MODULES([XMLRPC_CPP], [xmlrpc++]) +#PKG_CHECK_MODULES([XMLRPC_CLIENT_CPP], [xmlrpc_client++]) +PKG_CHECK_MODULES([XMLRPC], [xmlrpc]) +PKG_CHECK_MODULES([XMLRPC_CLIENT], [xmlrpc_client]) PKG_CHECK_MODULES([POLKIT],[polkit-gobject-1]) PKG_CHECK_MODULES([ZIP],[libzip]) diff --git a/lib/Plugins/Bugzilla.cpp b/lib/Plugins/Bugzilla.cpp index 48c5eb55..62c29912 100644 --- a/lib/Plugins/Bugzilla.cpp +++ b/lib/Plugins/Bugzilla.cpp @@ -1,5 +1,5 @@ -#include +//#include #include "abrtlib.h" #include "Bugzilla.h" #include "CrashTypes.h" @@ -7,12 +7,75 @@ #include "ABRTException.h" #include "CommLayerInner.h" + +#ifdef HAVE_CONFIG_H + #include +#endif + #define XML_RPC_SUFFIX "/xmlrpc.cgi" +#define C_I 1 + +static xmlrpc_env env; +static xmlrpc_client* client = NULL; +static struct xmlrpc_clientparms clientParms; +static struct xmlrpc_curl_xportparms curlParms; +static xmlrpc_server_info* server_info = NULL; + + +static void throw_if_fault_occurred(xmlrpc_env* const env); + +static void new_xmlrpc_client(const char* url, bool no_ssl_verify); +static void destroy_xmlrpc_client(); + + + + +static void throw_if_fault_occurred(xmlrpc_env* const env) +{ + if (env->fault_occurred) + { + char buffer[2048]; + snprintf(buffer, 2047, "XML-RPC Fault: %s(%d)\n", env->fault_string, env->fault_code); + throw CABRTException(EXCEP_PLUGIN, std::string(buffer)); + } +} + +static void new_xmlrpc_client(const char* url, bool no_ssl_verify) +{ + xmlrpc_env_init(&env); + xmlrpc_client_setup_global_const(&env); + + curlParms.network_interface = NULL; + curlParms.no_ssl_verifypeer = no_ssl_verify; + curlParms.no_ssl_verifyhost = no_ssl_verify; +#ifdef VERSION + curlParms.user_agent = PACKAGE_NAME"/"VERSION; +#else + curlParms.user_agent = "abrt"; +#endif + + clientParms.transport = "curl"; + clientParms.transportparmsP = &curlParms; + clientParms.transportparm_size = XMLRPC_CXPSIZE(user_agent); + + xmlrpc_client_create(&env, XMLRPC_CLIENT_NO_FLAGS, PACKAGE_NAME, VERSION, &clientParms, XMLRPC_CPSIZE(transportparm_size), + &client); + throw_if_fault_occurred(&env); + + server_info = xmlrpc_server_info_new(&env, url); + throw_if_fault_occurred(&env); +} + +static void destroy_xmlrpc_client() +{ + xmlrpc_server_info_free(server_info); + xmlrpc_env_clean(&env); + xmlrpc_client_destroy(client); + xmlrpc_client_teardown_global_const(); +} + CReporterBugzilla::CReporterBugzilla() : - m_pXmlrpcTransport(NULL), - m_pXmlrpcClient(NULL), - m_pCarriageParm(NULL), m_sBugzillaURL("https://bugzilla.redhat.com"), m_sBugzillaXMLRPC("https://bugzilla.redhat.com" + std::string(XML_RPC_SUFFIX)), m_bNoSSLVerify(false), @@ -24,6 +87,7 @@ CReporterBugzilla::~CReporterBugzilla() void CReporterBugzilla::NewXMLRPCClient() { +/* m_pXmlrpcTransport = new xmlrpc_c::clientXmlTransport_curl( xmlrpc_c::clientXmlTransport_curl::constrOpt() .no_ssl_verifyhost(m_bNoSSLVerify) @@ -31,10 +95,13 @@ void CReporterBugzilla::NewXMLRPCClient() ); m_pXmlrpcClient = new xmlrpc_c::client_xml(m_pXmlrpcTransport); m_pCarriageParm = new xmlrpc_c::carriageParm_curl0(m_sBugzillaXMLRPC); +*/ } void CReporterBugzilla::DeleteXMLRPCClient() { + +/* if (m_pCarriageParm != NULL) { delete m_pCarriageParm; @@ -50,6 +117,7 @@ void CReporterBugzilla::DeleteXMLRPCClient() delete m_pXmlrpcTransport; m_pXmlrpcTransport = NULL; } +*/ } PRInt32 CReporterBugzilla::Base64Encode_cb(void *arg, const char *obuf, PRInt32 size) @@ -66,8 +134,20 @@ PRInt32 CReporterBugzilla::Base64Encode_cb(void *arg, const char *obuf, PRInt32 return 1; } -void CReporterBugzilla::Login() +void CReporterBugzilla::Login(const char* login, const char* passwd) { + new_xmlrpc_client(m_sBugzillaXMLRPC.c_str(), m_bNoSSLVerify); + xmlrpc_value* result; + + xmlrpc_value* param = xmlrpc_build_value(&env, "({s:s,s:s})", "login", login, "password", passwd); + throw_if_fault_occurred(&env); + + xmlrpc_client_call2(&env, client, server_info, "User.login", param, &result); + throw_if_fault_occurred(&env); + + destroy_xmlrpc_client(); + + /* xmlrpc_c::paramList paramList; map_xmlrpc_params_t loginParams; map_xmlrpc_params_t ret; @@ -96,10 +176,12 @@ void CReporterBugzilla::Login() { throw CABRTException(EXCEP_PLUGIN, s); } + */ } void CReporterBugzilla::Logout() { + /* xmlrpc_c::paramList paramList; paramList.add(xmlrpc_c::value_string("")); xmlrpc_c::rpcPtr rpc(new xmlrpc_c::rpc("User.logout", paramList)); @@ -111,10 +193,12 @@ void CReporterBugzilla::Logout() { throw CABRTException(EXCEP_PLUGIN, std::string("CReporterBugzilla::Logout(): ") + e.what()); } + */ } bool CReporterBugzilla::CheckCCAndReporter(const std::string& pBugId) { + /* xmlrpc_c::paramList paramList; map_xmlrpc_params_t ret; @@ -145,10 +229,12 @@ bool CReporterBugzilla::CheckCCAndReporter(const std::string& pBugId) } } return false; + */ } void CReporterBugzilla::AddPlusOneCC(const std::string& pBugId) { + /* xmlrpc_c::paramList paramList; map_xmlrpc_params_t addCCParams; map_xmlrpc_params_t ret; @@ -172,45 +258,70 @@ void CReporterBugzilla::AddPlusOneCC(const std::string& pBugId) throw CABRTException(EXCEP_PLUGIN, std::string("CReporterBugzilla::AddPlusOneComment(): ") + e.what()); } ret = xmlrpc_c::value_struct(rpc->getResult()); + */ } std::string CReporterBugzilla::CheckUUIDInBugzilla(const std::string& pComponent, const std::string& pUUID) { - xmlrpc_c::paramList paramList; - map_xmlrpc_params_t searchParams; - map_xmlrpc_params_t ret; - std::string quicksearch = "ALL component:\""+ pComponent +"\" statuswhiteboard:\""+ pUUID + "\""; - searchParams["quicksearch"] = xmlrpc_c::value_string(quicksearch.c_str()); - paramList.add(xmlrpc_c::value_struct(searchParams)); - xmlrpc_c::rpcPtr rpc(new xmlrpc_c::rpc("Bug.search", paramList)); - try - { - rpc->call(m_pXmlrpcClient, m_pCarriageParm); - } - catch (std::exception& e) - { - throw CABRTException(EXCEP_PLUGIN, std::string("CReporterBugzilla::CheckUUIDInBugzilla(): ") + e.what()); - } - ret = xmlrpc_c::value_struct(rpc->getResult()); - std::vector bugs = xmlrpc_c::value_array(ret["bugs"]).vectorValueValue(); - if (bugs.size() > 0) + + xmlrpc_value* result = NULL; + xmlrpc_value* bugs_member = NULL; + xmlrpc_int bug_id; + + char component[1024]; + snprintf(component, 1023, "ALL component:\"%s\" statuswhiteboard:\"%s\"", pComponent.c_str(), pUUID.c_str()); + + xmlrpc_value* param = xmlrpc_build_value(&env, "({s:s})", "quicksearch", component); + throw_if_fault_occurred(&env); + + xmlrpc_client_call2(&env, client, server_info, "Bug.search", param, &result); + throw_if_fault_occurred(&env); + + xmlrpc_struct_find_value(&env, result, "bugs", &bugs_member); + throw_if_fault_occurred(&env); + + if (bugs_member) { - map_xmlrpc_params_t bug; - std::stringstream ss; + uint32_t array_size = xmlrpc_array_size(&env, bugs_member); + throw_if_fault_occurred(&env); - bug = xmlrpc_c::value_struct(bugs[0]); - ss << xmlrpc_c::value_int(bug["bug_id"]); + xmlrpc_value* item = NULL; + xmlrpc_array_read_item(&env, bugs_member, 0, &item); // Correct + throw_if_fault_occurred(&env); - log("Bug is already reported: %s", ss.str().c_str()); - update_client(_("Bug is already reported: ") + ss.str()); + xmlrpc_value* bug = NULL; + xmlrpc_struct_find_value(&env, item,"bug_id", &bug); + throw_if_fault_occurred(&env); + if (bug) + { + xmlrpc_read_int(&env, bug, &bug_id); + log("Bug is already reported: %i", bug_id); + update_client(_("Bug is already reported: ") + to_string(bug_id)); + + xmlrpc_DECREF(param); + xmlrpc_DECREF(bugs_member); + xmlrpc_DECREF(result); + return to_string(bug_id); + } + else + { + std::cout << "There is no member named 'bug_id'" << std::endl; + } - return ss.str(); } + else + { + std::cout << "There is no member named 'bugs'" << std::endl; + } + xmlrpc_DECREF(param); + xmlrpc_DECREF(bugs_member); + xmlrpc_DECREF(result); return ""; } void CReporterBugzilla::CreateNewBugDescription(const map_crash_report_t& pCrashReport, std::string& pDescription) { + /* std::string howToReproduce; std::string comment; @@ -262,12 +373,14 @@ void CReporterBugzilla::CreateNewBugDescription(const map_crash_report_t& pCrash //update_client(_("Binary file ")+it->first+_(" will not be reported.")); } } + */ } void CReporterBugzilla::GetProductAndVersion(const std::string& pRelease, std::string& pProduct, std::string& pVersion) { + /* if (pRelease.find("Rawhide") != std::string::npos) { pProduct = "Fedora"; @@ -293,10 +406,12 @@ void CReporterBugzilla::GetProductAndVersion(const std::string& pRelease, } pos++; } + */ } std::string CReporterBugzilla::NewBug(const map_crash_report_t& pCrashReport) { + /* xmlrpc_c::paramList paramList; map_xmlrpc_params_t bugParams; map_xmlrpc_params_t ret; @@ -334,10 +449,12 @@ std::string CReporterBugzilla::NewBug(const map_crash_report_t& pCrashReport) throw CABRTException(EXCEP_PLUGIN, std::string("CReporterBugzilla::NewBug(): ") + e.what()); } return bugId.str(); + */ } void CReporterBugzilla::AddAttachments(const std::string& pBugId, const map_crash_report_t& pCrashReport) { + /* xmlrpc_c::paramList paramList; map_xmlrpc_params_t attachmentParams; std::vector ret; @@ -381,6 +498,7 @@ void CReporterBugzilla::AddAttachments(const std::string& pBugId, const map_cras } } } + */ } std::string CReporterBugzilla::Report(const map_crash_report_t& pCrashReport, const std::string& pArgs) @@ -391,17 +509,21 @@ std::string CReporterBugzilla::Report(const map_crash_report_t& pCrashReport, co std::string bugId; - NewXMLRPCClient(); m_bLoggedIn = false; try { + new_xmlrpc_client(m_sBugzillaXMLRPC.c_str(), m_bNoSSLVerify); + // NewXMLRPCClient(); update_client(_("Checking for duplicates...")); bugId = CheckUUIDInBugzilla(component, uuid); + if ( bugId != "" ) { update_client(_("Logging into bugzilla...")); - Login(); + Login(m_sLogin.c_str(), m_sPassword.c_str()); m_bLoggedIn = true; + } +/* update_client(_("Checking CC...")); if (!CheckCCAndReporter(bugId) && m_bLoggedIn) { @@ -413,15 +535,16 @@ std::string CReporterBugzilla::Report(const map_crash_report_t& pCrashReport, co update_client(_("Logging into bugzilla...")); Login(); m_bLoggedIn = true; +*/ } catch (CABRTException& e) { - DeleteXMLRPCClient(); + destroy_xmlrpc_client(); throw CABRTException(EXCEP_PLUGIN, std::string("CReporterBugzilla::Report(): ") + e.what()); return ""; } - +/* update_client(_("Creating new bug...")); try { @@ -435,9 +558,9 @@ std::string CReporterBugzilla::Report(const map_crash_report_t& pCrashReport, co DeleteXMLRPCClient(); throw CABRTException(EXCEP_PLUGIN, std::string("CReporterBugzilla::Report(): ") + e.what()); } - - - DeleteXMLRPCClient(); +*/ + destroy_xmlrpc_client(); +// DeleteXMLRPCClient(); return m_sBugzillaURL + "/show_bug.cgi?id=" + bugId; } diff --git a/lib/Plugins/Bugzilla.h b/lib/Plugins/Bugzilla.h index f6a8976f..5a659e5c 100644 --- a/lib/Plugins/Bugzilla.h +++ b/lib/Plugins/Bugzilla.h @@ -3,19 +3,28 @@ #include "Plugin.h" #include "Reporter.h" -#include +//#include #include +#include +#include + class CReporterBugzilla : public CReporter { private: - typedef std::map map_xmlrpc_params_t; + // C implementation + + bool m_bNoSSLVerify; + + // C++ implementation + + // typedef std::map map_xmlrpc_params_t; void NewXMLRPCClient(); void DeleteXMLRPCClient(); static PRInt32 Base64Encode_cb(void *arg, const char *obuf, PRInt32 size); - void Login(); + void Login(const char* login, const char* passwd); void Logout(); bool CheckCCAndReporter(const std::string& pBugId); void AddPlusOneCC(const std::string& pBugId); @@ -28,15 +37,14 @@ class CReporterBugzilla : public CReporter std::string& pProduct, std::string& pVersion); - xmlrpc_c::clientXmlTransport_curl* m_pXmlrpcTransport; - xmlrpc_c::client_xml* m_pXmlrpcClient; - xmlrpc_c::carriageParm_curl0 *m_pCarriageParm; + // xmlrpc_c::clientXmlTransport_curl* m_pXmlrpcTransport; + // xmlrpc_c::client_xml* m_pXmlrpcClient; + // xmlrpc_c::carriageParm_curl0 *m_pCarriageParm; std::string m_sBugzillaURL; std::string m_sBugzillaXMLRPC; std::string m_sLogin; std::string m_sPassword; std::string m_sAttchmentInBase64; - bool m_bNoSSLVerify; bool m_bLoggedIn; public: diff --git a/lib/Plugins/Makefile.am b/lib/Plugins/Makefile.am index bc032d74..a5c5a461 100644 --- a/lib/Plugins/Makefile.am +++ b/lib/Plugins/Makefile.am @@ -80,9 +80,9 @@ libSOSreport_la_LDFLAGS = -avoid-version # Bugzilla libBugzilla_la_SOURCES = Bugzilla.h Bugzilla.cpp -libBugzilla_la_LIBADD = $(XMLRPC_CPP_LIBS) $(XMLRPC_CLIENT_CPP_LIBS) $(NSS_LIBS) +libBugzilla_la_LIBADD = $(XMLRPC_LIBS) $(XMLRPC_CLIENT_LIBS) $(NSS_LIBS) libBugzilla_la_LDFLAGS = -avoid-version -libBugzilla_la_CPPFLAGS = $(XMLRPC_CPP_CFLAGS) $(XMLRPC_CLIENT_CPP_CFLAGS) $(NSS_CFLAGS) -I$(srcdir)/../../inc -I$(srcdir)/../Utils -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" +libBugzilla_la_CPPFLAGS = $(XMLRPC_CFLAGS) $(XMLRPC_CLIENT_CFLAGS) $(NSS_CFLAGS) -I$(srcdir)/../../inc -I$(srcdir)/../Utils -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" # TicketUploader libTicketUploader_la_SOURCES = TicketUploader.h TicketUploader.cpp -- cgit From 0f4e6e5f5fc53be8cc2871abb7c1b7e66db6925c Mon Sep 17 00:00:00 2001 From: Nikola Pajkovsky Date: Thu, 22 Oct 2009 14:27:29 +0200 Subject: rewritten check_uuid, login, check_cc_and_reporter and add_plus_one_cc --- configure.ac | 2 - lib/Plugins/Bugzilla.cpp | 308 ++++++++++++++++++----------------------------- lib/Plugins/Bugzilla.h | 19 +-- 3 files changed, 118 insertions(+), 211 deletions(-) diff --git a/configure.ac b/configure.ac index 33b0bb04..dcbb57c9 100644 --- a/configure.ac +++ b/configure.ac @@ -28,8 +28,6 @@ PKG_CHECK_MODULES([RPM], [rpm]) PKG_CHECK_MODULES([CURL], [libcurl]) PKG_CHECK_MODULES([LIBNOTIFY], [libnotify]) PKG_CHECK_MODULES([NSS], [nss]) -#PKG_CHECK_MODULES([XMLRPC_CPP], [xmlrpc++]) -#PKG_CHECK_MODULES([XMLRPC_CLIENT_CPP], [xmlrpc_client++]) PKG_CHECK_MODULES([XMLRPC], [xmlrpc]) PKG_CHECK_MODULES([XMLRPC_CLIENT], [xmlrpc_client]) PKG_CHECK_MODULES([POLKIT],[polkit-gobject-1]) diff --git a/lib/Plugins/Bugzilla.cpp b/lib/Plugins/Bugzilla.cpp index 62c29912..a16f74fe 100644 --- a/lib/Plugins/Bugzilla.cpp +++ b/lib/Plugins/Bugzilla.cpp @@ -14,8 +14,6 @@ #define XML_RPC_SUFFIX "/xmlrpc.cgi" -#define C_I 1 - static xmlrpc_env env; static xmlrpc_client* client = NULL; static struct xmlrpc_clientparms clientParms; @@ -23,23 +21,23 @@ static struct xmlrpc_curl_xportparms curlParms; static xmlrpc_server_info* server_info = NULL; -static void throw_if_fault_occurred(xmlrpc_env* const env); - static void new_xmlrpc_client(const char* url, bool no_ssl_verify); static void destroy_xmlrpc_client(); - - - - -static void throw_if_fault_occurred(xmlrpc_env* const env) -{ - if (env->fault_occurred) - { - char buffer[2048]; - snprintf(buffer, 2047, "XML-RPC Fault: %s(%d)\n", env->fault_string, env->fault_code); - throw CABRTException(EXCEP_PLUGIN, std::string(buffer)); - } -} +static int32_t check_uuid_in_bugzilla(const char* component, const char* UUID); +static bool check_cc_and_reporter(const uint32_t bug_id, const char* login); +static void add_plus_one_cc(const uint32_t bug_id, const char* login); + +#define throw_if_fault_occurred(env) \ +do \ +{ \ + xmlrpc_env* e = (env); \ + if (e->fault_occurred) \ + { \ + char buffer[2048]; \ + snprintf(buffer, 2047, "XML-RPC Fault: %s(%d)", e->fault_string, e->fault_code); \ + throw CABRTException(EXCEP_PLUGIN, std::string(buffer)); \ + } \ +}while(0) static void new_xmlrpc_client(const char* url, bool no_ssl_verify) { @@ -85,43 +83,9 @@ CReporterBugzilla::CReporterBugzilla() : CReporterBugzilla::~CReporterBugzilla() {} -void CReporterBugzilla::NewXMLRPCClient() -{ -/* - m_pXmlrpcTransport = new xmlrpc_c::clientXmlTransport_curl( - xmlrpc_c::clientXmlTransport_curl::constrOpt() - .no_ssl_verifyhost(m_bNoSSLVerify) - .no_ssl_verifypeer(m_bNoSSLVerify) - ); - m_pXmlrpcClient = new xmlrpc_c::client_xml(m_pXmlrpcTransport); - m_pCarriageParm = new xmlrpc_c::carriageParm_curl0(m_sBugzillaXMLRPC); -*/ -} - -void CReporterBugzilla::DeleteXMLRPCClient() -{ - -/* - if (m_pCarriageParm != NULL) - { - delete m_pCarriageParm; - m_pCarriageParm = NULL; - } - if (m_pXmlrpcClient != NULL) - { - delete m_pXmlrpcClient; - m_pXmlrpcClient = NULL; - } - if (m_pXmlrpcTransport != NULL) - { - delete m_pXmlrpcTransport; - m_pXmlrpcTransport = NULL; - } -*/ -} - PRInt32 CReporterBugzilla::Base64Encode_cb(void *arg, const char *obuf, PRInt32 size) { + /* CReporterBugzilla* bz = static_cast(arg); int ii; for (ii = 0; ii < size; ii++) @@ -131,12 +95,13 @@ PRInt32 CReporterBugzilla::Base64Encode_cb(void *arg, const char *obuf, PRInt32 bz->m_sAttchmentInBase64 += obuf[ii]; } } + */ return 1; } -void CReporterBugzilla::Login(const char* login, const char* passwd) + +static void login(const char* login, const char* passwd) { - new_xmlrpc_client(m_sBugzillaXMLRPC.c_str(), m_bNoSSLVerify); xmlrpc_value* result; xmlrpc_value* param = xmlrpc_build_value(&env, "({s:s,s:s})", "login", login, "password", passwd); @@ -144,39 +109,6 @@ void CReporterBugzilla::Login(const char* login, const char* passwd) xmlrpc_client_call2(&env, client, server_info, "User.login", param, &result); throw_if_fault_occurred(&env); - - destroy_xmlrpc_client(); - - /* - xmlrpc_c::paramList paramList; - map_xmlrpc_params_t loginParams; - map_xmlrpc_params_t ret; - loginParams["login"] = xmlrpc_c::value_string(m_sLogin); - loginParams["password"] = xmlrpc_c::value_string(m_sPassword); - paramList.add(xmlrpc_c::value_struct(loginParams)); - xmlrpc_c::rpcPtr rpc(new xmlrpc_c::rpc("User.login", paramList)); - try - { - if( (m_sLogin == "") && (m_sPassword=="") ) - { - log("Empty login and password"); - throw std::string(_("Empty login and password. Please check Bugzilla.conf")); - } - rpc->call(m_pXmlrpcClient, m_pCarriageParm); - ret = xmlrpc_c::value_struct(rpc->getResult()); - std::stringstream ss; - ss << xmlrpc_c::value_int(ret["id"]); - log("Login id: %s", ss.str().c_str()); - } - catch (std::exception& e) - { - throw CABRTException(EXCEP_PLUGIN, std::string("CReporterBugzilla::Login(): ") + e.what()); - } - catch (std::string& s) - { - throw CABRTException(EXCEP_PLUGIN, s); - } - */ } void CReporterBugzilla::Logout() @@ -196,82 +128,93 @@ void CReporterBugzilla::Logout() */ } -bool CReporterBugzilla::CheckCCAndReporter(const std::string& pBugId) +static bool check_cc_and_reporter(const uint32_t bug_id, const char* login) { - /* - xmlrpc_c::paramList paramList; - map_xmlrpc_params_t ret; + xmlrpc_value* param = NULL; + xmlrpc_value* result = NULL; + xmlrpc_value* reporter_member = NULL; + xmlrpc_value* cc_member = NULL; - paramList.add(xmlrpc_c::value_string(pBugId)); - xmlrpc_c::rpcPtr rpc(new xmlrpc_c::rpc("bugzilla.getBug", paramList)); - try - { - rpc->call(m_pXmlrpcClient, m_pCarriageParm); - ret = xmlrpc_c::value_struct(rpc->getResult()); - } - catch (std::exception& e) - { - throw CABRTException(EXCEP_PLUGIN, std::string("CReporterBugzilla::CheckCCAndReporter(): ") + e.what()); - } - std::string reporter = xmlrpc_c::value_string(ret["reporter"]); - if (reporter == m_sLogin) + const char* bug = to_string(bug_id).c_str(); + + param = xmlrpc_build_value(&env, "(s)", bug); + throw_if_fault_occurred(&env); + + xmlrpc_client_call2(&env, client, server_info, "bugzilla.getBug", param, &result); + throw_if_fault_occurred(&env); + + xmlrpc_struct_find_value(&env, result, "reporter", &reporter_member); + throw_if_fault_occurred(&env); + + if (reporter_member) { - return true; + const char* reporter = NULL; + xmlrpc_read_string(&env, reporter_member, &reporter); + throw_if_fault_occurred(&env); + + if (strcmp(reporter, login) == 0 ) + { + std::cout << "reporter=login" << std::endl; + return true; + } } - std::vector ccs = xmlrpc_c::value_array(ret["cc"]).vectorValueValue(); - int ii; - for (ii = 0; ii < ccs.size(); ii++) + + xmlrpc_struct_find_value(&env, result, "cc", &cc_member); + throw_if_fault_occurred(&env); + + if (cc_member) { - std::string cc = xmlrpc_c::value_string(ccs[ii]); - if (cc == m_sLogin) + xmlrpc_value* item = NULL; + uint32_t array_size = xmlrpc_array_size(&env, cc_member); + + for (uint32_t i = 0; i < array_size; i++) { - return true; + xmlrpc_array_read_item(&env, cc_member, i, &item); // Correct + throw_if_fault_occurred(&env); + + const char* cc = NULL; + xmlrpc_read_string(&env, item, &cc); + throw_if_fault_occurred(&env); + + if (strcmp(cc, login) == 0) + { + std::cout << "cc=login" << std::endl; + return true; + } } } + + xmlrpc_DECREF(result); return false; - */ } -void CReporterBugzilla::AddPlusOneCC(const std::string& pBugId) +static void add_plus_one_cc(const uint32_t bug_id, const char* login) { - /* - xmlrpc_c::paramList paramList; - map_xmlrpc_params_t addCCParams; - map_xmlrpc_params_t ret; - map_xmlrpc_params_t updates; + xmlrpc_value* param = NULL; + xmlrpc_value* result = NULL; - std::vector CCList; - CCList.push_back(xmlrpc_c::value_string(m_sLogin)); - updates["add_cc"] = xmlrpc_c::value_array(CCList); + param = xmlrpc_build_value(&env, "({s:i,s:{s:(s)}})", "ids", bug_id, "updates", "add_cc", login); + throw_if_fault_occurred(&env); - addCCParams["ids"] = xmlrpc_c::value_int(atoi(pBugId.c_str())); - addCCParams["updates"] = xmlrpc_c::value_struct(updates); + xmlrpc_client_call2(&env, client, server_info, "Bug.update", param, &result); + throw_if_fault_occurred(&env); + + xmlrpc_DECREF(result); - paramList.add(xmlrpc_c::value_struct(addCCParams)); - xmlrpc_c::rpcPtr rpc(new xmlrpc_c::rpc("Bug.update", paramList)); - try - { - rpc->call(m_pXmlrpcClient, m_pCarriageParm); - } - catch (std::exception& e) - { - throw CABRTException(EXCEP_PLUGIN, std::string("CReporterBugzilla::AddPlusOneComment(): ") + e.what()); - } - ret = xmlrpc_c::value_struct(rpc->getResult()); - */ } -std::string CReporterBugzilla::CheckUUIDInBugzilla(const std::string& pComponent, const std::string& pUUID) +static int32_t check_uuid_in_bugzilla(const char* component, const char* UUID) { - + xmlrpc_value* param = NULL; xmlrpc_value* result = NULL; xmlrpc_value* bugs_member = NULL; + xmlrpc_int bug_id; - char component[1024]; - snprintf(component, 1023, "ALL component:\"%s\" statuswhiteboard:\"%s\"", pComponent.c_str(), pUUID.c_str()); + char query[1024]; + snprintf(query, 1023, "ALL component:\"%s\" statuswhiteboard:\"%s\"", component, UUID); - xmlrpc_value* param = xmlrpc_build_value(&env, "({s:s})", "quicksearch", component); + param = xmlrpc_build_value(&env, "({s:s})", "quicksearch", query); throw_if_fault_occurred(&env); xmlrpc_client_call2(&env, client, server_info, "Bug.search", param, &result); @@ -282,8 +225,11 @@ std::string CReporterBugzilla::CheckUUIDInBugzilla(const std::string& pComponent if (bugs_member) { + // when array size is equal 0 that means no bug reportet uint32_t array_size = xmlrpc_array_size(&env, bugs_member); throw_if_fault_occurred(&env); + if( array_size == 0 ) + return -1; xmlrpc_value* item = NULL; xmlrpc_array_read_item(&env, bugs_member, 0, &item); // Correct @@ -297,26 +243,17 @@ std::string CReporterBugzilla::CheckUUIDInBugzilla(const std::string& pComponent xmlrpc_read_int(&env, bug, &bug_id); log("Bug is already reported: %i", bug_id); update_client(_("Bug is already reported: ") + to_string(bug_id)); - - xmlrpc_DECREF(param); - xmlrpc_DECREF(bugs_member); xmlrpc_DECREF(result); - return to_string(bug_id); - } - else - { - std::cout << "There is no member named 'bug_id'" << std::endl; + xmlrpc_DECREF(bug); + xmlrpc_DECREF(item); + xmlrpc_DECREF(bugs_member); + return bug_id; } - } - else - { - std::cout << "There is no member named 'bugs'" << std::endl; - } - xmlrpc_DECREF(param); - xmlrpc_DECREF(bugs_member); + xmlrpc_DECREF(result); - return ""; + xmlrpc_DECREF(bugs_member); + return -1; } void CReporterBugzilla::CreateNewBugDescription(const map_crash_report_t& pCrashReport, std::string& pDescription) @@ -503,39 +440,34 @@ void CReporterBugzilla::AddAttachments(const std::string& pBugId, const map_cras std::string CReporterBugzilla::Report(const map_crash_report_t& pCrashReport, const std::string& pArgs) { - std::string package = pCrashReport.find(FILENAME_PACKAGE)->second[CD_CONTENT]; + int32_t bug_id = -1; + std::string component = pCrashReport.find(FILENAME_COMPONENT)->second[CD_CONTENT]; std::string uuid = pCrashReport.find(CD_UUID)->second[CD_CONTENT]; - std::string bugId; - - - - m_bLoggedIn = false; try { new_xmlrpc_client(m_sBugzillaXMLRPC.c_str(), m_bNoSSLVerify); - // NewXMLRPCClient(); - update_client(_("Checking for duplicates...")); - bugId = CheckUUIDInBugzilla(component, uuid); - if ( bugId != "" ) { + update_client(_("Checking for duplicates...")); + bug_id = check_uuid_in_bugzilla(component.c_str(), uuid.c_str()); + if (bug_id > 0) + { update_client(_("Logging into bugzilla...")); - Login(m_sLogin.c_str(), m_sPassword.c_str()); - m_bLoggedIn = true; - } -/* + if ((m_sLogin == "") && (m_sPassword=="")) + { + VERB3 log("Empty login and password"); + throw CABRTException(EXCEP_PLUGIN, std::string(_("Empty login and password. Please check Bugzilla.conf"))); + } + login(m_sLogin.c_str(), m_sPassword.c_str()); + update_client(_("Checking CC...")); - if (!CheckCCAndReporter(bugId) && m_bLoggedIn) + if (!check_cc_and_reporter(bug_id, m_sLogin.c_str())) { - AddPlusOneCC(bugId); + add_plus_one_cc(bug_id, m_sLogin.c_str()); } - DeleteXMLRPCClient(); - return m_sBugzillaURL + "/show_bug.cgi?id=" + bugId; + destroy_xmlrpc_client(); + return m_sBugzillaURL + "/show_bug.cgi?id="+to_string(bug_id); } - update_client(_("Logging into bugzilla...")); - Login(); - m_bLoggedIn = true; -*/ } catch (CABRTException& e) { @@ -543,26 +475,14 @@ std::string CReporterBugzilla::Report(const map_crash_report_t& pCrashReport, co throw CABRTException(EXCEP_PLUGIN, std::string("CReporterBugzilla::Report(): ") + e.what()); return ""; } + destroy_xmlrpc_client(); -/* - update_client(_("Creating new bug...")); - try - { - bugId = NewBug(pCrashReport); - AddAttachments(bugId, pCrashReport); - update_client(_("Logging out...")); - Logout(); - } - catch (CABRTException& e) + if (bug_id > 0) { - DeleteXMLRPCClient(); - throw CABRTException(EXCEP_PLUGIN, std::string("CReporterBugzilla::Report(): ") + e.what()); + return m_sBugzillaURL + "/show_bug.cgi?id="+to_string(bug_id); } -*/ - destroy_xmlrpc_client(); -// DeleteXMLRPCClient(); - return m_sBugzillaURL + "/show_bug.cgi?id=" + bugId; + return m_sBugzillaURL + "/show_bug.cgi?id="; } void CReporterBugzilla::SetSettings(const map_plugin_settings_t& pSettings) diff --git a/lib/Plugins/Bugzilla.h b/lib/Plugins/Bugzilla.h index 5a659e5c..fa56c2c6 100644 --- a/lib/Plugins/Bugzilla.h +++ b/lib/Plugins/Bugzilla.h @@ -10,25 +10,17 @@ #include #include +#include +#include class CReporterBugzilla : public CReporter { private: // C implementation bool m_bNoSSLVerify; - - // C++ implementation - - // typedef std::map map_xmlrpc_params_t; - - void NewXMLRPCClient(); - void DeleteXMLRPCClient(); + bool m_bLoggedIn; static PRInt32 Base64Encode_cb(void *arg, const char *obuf, PRInt32 size); - void Login(const char* login, const char* passwd); void Logout(); - bool CheckCCAndReporter(const std::string& pBugId); - void AddPlusOneCC(const std::string& pBugId); - std::string CheckUUIDInBugzilla(const std::string& pComponent, const std::string& pUUID); std::string NewBug(const map_crash_report_t& pCrashReport); void AddAttachments(const std::string& pBugId, const map_crash_report_t& pCrashReport); void CreateNewBugDescription(const map_crash_report_t& pCrashReport, @@ -37,15 +29,12 @@ class CReporterBugzilla : public CReporter std::string& pProduct, std::string& pVersion); - // xmlrpc_c::clientXmlTransport_curl* m_pXmlrpcTransport; - // xmlrpc_c::client_xml* m_pXmlrpcClient; - // xmlrpc_c::carriageParm_curl0 *m_pCarriageParm; std::string m_sBugzillaURL; std::string m_sBugzillaXMLRPC; std::string m_sLogin; std::string m_sPassword; std::string m_sAttchmentInBase64; - bool m_bLoggedIn; + public: CReporterBugzilla(); -- cgit From 4144647a53c8338da2d958b78fb4b2e6096a3ea2 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 23 Oct 2009 15:29:53 +0200 Subject: removing forgotted debugging printout Signed-off-by: Denys Vlasenko --- lib/Plugins/CCpp.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp index 133811fe..a2cb86eb 100644 --- a/lib/Plugins/CCpp.cpp +++ b/lib/Plugins/CCpp.cpp @@ -834,7 +834,6 @@ void CAnalyzerCCpp::CreateReport(const std::string& pDebugDumpDir, int force) dd.Open(pDebugDumpDir); dd.SaveText(FILENAME_BACKTRACE, build_ids + backtrace); -log("BACKTRACE:'%s'", (build_ids + backtrace).c_str()); if (m_bMemoryMap) { dd.SaveText(FILENAME_MEMORYMAP, "memory map of the crashed C/C++ application, not implemented yet"); -- cgit From b2ef9492881a0713cb8856b146570b261f57689e Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 23 Oct 2009 15:40:00 +0200 Subject: updates to abrt-debuginfo-install (but it is still ifdef'ed out) Signed-off-by: Denys Vlasenko --- lib/Plugins/CCpp.cpp | 14 +++-- src/Daemon/abrt-debuginfo-install | 109 +++++++++++++++++++++----------------- 2 files changed, 67 insertions(+), 56 deletions(-) diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp index a2cb86eb..7d6708fb 100644 --- a/lib/Plugins/CCpp.cpp +++ b/lib/Plugins/CCpp.cpp @@ -265,7 +265,7 @@ static void GetBacktrace(const std::string& pDebugDumpDir, std::string& pBacktra // when/if gdb supports it: // (https://bugzilla.redhat.com/show_bug.cgi?id=528668): //args[2] = (char*)"-ex"; - //args[3] = "set debug-file-directory /usr/lib/debug/.build-id:/var/cache/abrt-di/usr/lib/debug/.build-id"; + //args[3] = "set debug-file-directory /usr/lib/debug:/var/cache/abrt-di/usr/lib/debug"; /* * Unfortunately, "file BINARY_FILE" doesn't work well if BINARY_FILE * was deleted (as often happens during system updates): @@ -656,23 +656,22 @@ static void InstallDebugInfos(const std::string& pDebugDumpDir, std::string& bui { update_client(_("Searching for debug-info packages...")); - int pipein[2], pipeout[2]; //TODO: get rid of pipein. Can we use ExecVP? - xpipe(pipein); + int pipeout[2]; //TODO: can we use ExecVP? xpipe(pipeout); pid_t child = fork(); if (child < 0) { - /*close(pipein[0]); close(pipeout[0]); - why bother */ - /*close(pipein[1]); close(pipeout[1]); */ + /*close(pipeout[0]); - why bother */ + /*close(pipeout[1]); */ perror_msg_and_die("fork"); } if (child == 0) { - close(pipein[1]); close(pipeout[0]); - xmove_fd(pipein[0], STDIN_FILENO); xmove_fd(pipeout[1], STDOUT_FILENO); + close(STDIN_FILENO); + xopen("/dev/null", O_RDONLY); /* Not a good idea, we won't see any error messages */ /*close(STDERR_FILENO);*/ @@ -686,7 +685,6 @@ static void InstallDebugInfos(const std::string& pDebugDumpDir, std::string& bui exit(1); } - close(pipein[0]); close(pipeout[1]); update_client(_("Downloading and installing debug-info packages...")); diff --git a/src/Daemon/abrt-debuginfo-install b/src/Daemon/abrt-debuginfo-install index fc5380ba..1f947cde 100755 --- a/src/Daemon/abrt-debuginfo-install +++ b/src/Daemon/abrt-debuginfo-install @@ -62,10 +62,6 @@ tempdir=$2 cachedir=$3 debug=false -count_words() { - echo $# -} - exec 2>&1 test -f "$core" || exit 2 @@ -78,6 +74,37 @@ mkdir "$tempdir" || exit 2 cd "$tempdir" || exit 2 $debug && echo "Installing rpms to $tempdir" + +count_words() { + echo $# +} + +cleanup_and_report_missing() { +# Which debuginfo files are still missing, including those we just unpacked? + missing_build_ids=`for build_id in $build_ids; do + build_id1=${build_id:0:2} + build_id2=${build_id:2} + file="usr/lib/debug/.build-id/$build_id1/$build_id2.debug" + test -f "/$file" && continue + test -f "$cachedir/$file" && continue + echo -n "$build_id " + done` + $debug && echo "missing_build_ids:$missing_build_ids" + + # If cachedir is specified, tempdir is just a staging area. Delete it + if test x"$cachedir" != x""; then + $debug && echo "Removing $tempdir" + rm -rf "$tempdir" + fi + + for missing in $missing_build_ids; do + echo "MISSING:$missing" + done + + test x"$missing_build_ids" != x"" && echo "`count_words $missing_build_ids` debuginfos can't be found" +} + + # eu-unstrip output example: # 0x400000+0x209000 23c77451cf6adff77fc1f5ee2a01d75de6511dda@0x40024c - - [exe] # or @@ -86,7 +113,9 @@ $debug && echo "Installing rpms to $tempdir" # 0x3d15600000+0x208000 20196628d1bc062279622615cc9955554e5bb227@0x3d156001a0 /usr/lib64/libnotify.so.1.1.3 /usr/lib/debug/usr/lib64/libnotify.so.1.1.3.debug libnotify.so.1 # 0x7fd8ae931000+0x62d000 dd49f44f958b5a11a1635523b2f09cb2e45c1734@0x7fd8ae9311a0 /usr/lib64/libgtk-x11-2.0.so.0.1600.6 /usr/lib/debug/usr/lib64/libgtk-x11-2.0.so.0.1600.6.debug echo "Getting list of build IDs" -eu_unstrip_OUT=`eu-unstrip "--core=$core" -n 2>&1` +# Observed errors: +# eu-unstrip: /var/cache/abrt/ccpp-1256301004-2754/coredump: Callback returned failure +eu_unstrip_OUT=`eu-unstrip "--core=$core" -n 2>eu_unstrip.ERR` err=$? printf "%s\nexitcode:%s\n" "$eu_unstrip_OUT" $err >eu_unstrip.OUT test $err = 0 || exit 2 @@ -112,24 +141,19 @@ $debug && echo "build_ids:$build_ids" missing_debuginfo_files=`for build_id in $build_ids; do build_id1=${build_id:0:2} build_id2=${build_id:2} - file="usr/lib/debug/.build-id/$build_id1/$build_id2.debug" if test x"$cachedir" != x"" && test x"$cachedir" != x"/" ; then test -f "$cachedir/$file" && continue - if test -f "/$file"; then - mkdir -p "$cachedir/usr/lib/debug/.build-id/$build_id1" - # Note: this does not preserve symlinks. This is intentional - $debug && echo Copying "$file" to "$cachedir/$file" >&2 - cp "$file" "$cachedir/$file" - continue - fi fi test -f "/$file" && continue echo -n "/$file " done` $debug && echo "missing_debuginfo_files:$missing_debuginfo_files" -test x"$missing_debuginfo_files" = x"" && exit 0 +if test x"$missing_debuginfo_files" = x""; then + cleanup_and_report_missing + exit 0 +fi # We'll run something like: # yum --enablerepo='*debuginfo*' --quiet provides \ @@ -162,7 +186,10 @@ $debug && echo "packages:$packages" # yum may return "" here if it found no packages (say, if coredump is from a new, # unreleased package fresh from koji). -test x"$packages" = x"" && exit 1 +if test x"$packages" = x""; then + cleanup_and_report_missing + exit 1 +fi # Redirecting, since progress bar stuff only messes up our output echo "Downloading `count_words $packages` packages" @@ -180,45 +207,31 @@ for f in *.rpm; do rpm2cpio <"$f" 2>>unpack.OUT | cpio -id >>unpack.OUT 2>&1 done -# Which debuginfo files are still missing, including those we just unpacked? -missing_build_ids=`for build_id in $build_ids; do - build_id1=${build_id:0:2} - build_id2=${build_id:2} +# Copy debuginfo files to cachedir +if test x"$cachedir" != x"" && test -d "$cachedir"; then + for build_id in $build_ids; do + build_id1=${build_id:0:2} + build_id2=${build_id:2} - file="usr/lib/debug/.build-id/$build_id1/$build_id2.debug" + file="usr/lib/debug/.build-id/$build_id1/$build_id2.debug" - test -f "/$file" && continue - test x"$cachedir" != x"" \ - && test x"$cachedir" != x"/" \ - && test -f "$cachedir/$file" && continue - - if test -f "$file"; then - # file is one of those we just installed. - # Cache it if cachedir is specified. - if test x"$cachedir" != x"" && test -d "$cachedir"; then + test -f "/$file" && continue + test x"$cachedir" != x"/" && test -f "$cachedir/$file" && continue + + if test -f "$file"; then + # file is one of those we just installed. + # Cache it if cachedir is specified. mkdir -p "$cachedir/usr/lib/debug/.build-id/$build_id1" # Note: this does not preserve symlinks. This is intentional - $debug && echo Copying "$file" to "$cachedir/$file" >&2 + $debug && echo Copying2 "$file" to "$cachedir/$file" >&2 cp --remove-destination "$file" "$cachedir/$file" + continue fi - continue - fi - echo -n "$build_id " -done` -$debug && echo "missing_build_ids:$missing_build_ids" - -# If cachedir is specified, tempdir is just a staging area. Delete it -if test x"$cachedir" != x""; then - $debug && echo "Removing $tempdir" - rm -rf "$tempdir" + done fi +$debug && echo "missing_build_ids:$missing_build_ids" -test x"$missing_build_ids" = x"" && exit 0 - -for missing in $missing_build_ids; do - echo "MISSING:$missing" -done - -echo "`count_words $missing_build_ids` debuginfos can't be found" +cleanup_and_report_missing -exit 1 +test x"$missing_build_ids" != x"" && exit 1 +exit 0 -- cgit From 5b9dcf4354e764b16c84f74af31e9bbe81541e39 Mon Sep 17 00:00:00 2001 From: warrink Date: Fri, 23 Oct 2009 15:29:18 +0000 Subject: Sending translation for Dutch --- po/nl.po | 68 +++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/po/nl.po b/po/nl.po index 12f8903b..3adf27e0 100644 --- a/po/nl.po +++ b/po/nl.po @@ -9,8 +9,8 @@ msgid "" msgstr "" "Project-Id-Version: abrt\n" "Report-Msgid-Bugs-To: jmoskovc@redhat.com\n" -"POT-Creation-Date: 2009-10-16 16:11+0000\n" -"PO-Revision-Date: 2009-10-16 21:12+0200\n" +"POT-Creation-Date: 2009-10-23 09:49+0000\n" +"PO-Revision-Date: 2009-10-23 17:28+0200\n" "Last-Translator: Geert Warrink \n" "Language-Team: nl \n" "MIME-Version: 1.0\n" @@ -26,23 +26,23 @@ msgid "Got unexpected data from daemon (is the database properly updated?)." msgstr "" "Kreeg niet verwachte data van daemon (is de database correct vernieuwd?)." -#: ../src/Gui/ABRTPlugin.py:48 +#: ../src/Gui/ABRTPlugin.py:55 msgid "Analyzer plugins" msgstr "Analyse plugins" -#: ../src/Gui/ABRTPlugin.py:49 +#: ../src/Gui/ABRTPlugin.py:56 msgid "Action plugins" msgstr "Actie plugins" -#: ../src/Gui/ABRTPlugin.py:50 +#: ../src/Gui/ABRTPlugin.py:57 msgid "Reporter plugins" msgstr "Rapporteer plugins" -#: ../src/Gui/ABRTPlugin.py:51 +#: ../src/Gui/ABRTPlugin.py:58 msgid "Database plugins" msgstr "Databse plugins" -#: ../src/Gui/ABRTPlugin.py:90 +#: ../src/Gui/ABRTPlugin.py:97 msgid "Plugin name is not set, can't load it's settings" msgstr "Plugin naam is niet opgegeven, kan zijn instellingen niet laden" @@ -70,7 +70,7 @@ msgstr " " msgid "(C) 2009 Red Hat, Inc." msgstr "(C) 2009 Red Hat, Inc." -#: ../src/Gui/ccgui.glade.h:3 ../src/Gui/CCMainWindow.py:240 +#: ../src/Gui/ccgui.glade.h:3 ../src/Gui/CCMainWindow.py:244 msgid "Not reported!" msgstr "Niet gerapporteerd!" @@ -171,7 +171,16 @@ msgstr "Crash rate" msgid "User" msgstr "Gebruiker" -#: ../src/Gui/CCMainWindow.py:178 +#: ../src/Gui/CCMainWindow.py:160 +#, python-format +msgid "" +"Can't show the settings dialog\n" +"%s" +msgstr "" +"Kan de instellingen dialoog niet tonen\n" +"%s" + +#: ../src/Gui/CCMainWindow.py:181 #, python-format msgid "" "Unable to finish current task!\n" @@ -180,7 +189,7 @@ msgstr "" "Kan huidige taak niet afmaken!\n" "%s" -#: ../src/Gui/CCMainWindow.py:195 +#: ../src/Gui/CCMainWindow.py:198 #, python-format msgid "" "Error while loading the dumplist, please check if abrt daemon is running\n" @@ -190,16 +199,16 @@ msgstr "" "draait\n" " %s" -#: ../src/Gui/CCMainWindow.py:205 +#: ../src/Gui/CCMainWindow.py:208 #, python-format msgid "Can't get username for uid %s" msgstr "Kan geen gebruikersnaam voor uid %s krijgen" -#: ../src/Gui/CCMainWindow.py:232 +#: ../src/Gui/CCMainWindow.py:236 msgid "This crash has been reported, you can find the report(s) at:\n" msgstr "Deze crash is gerapporteerd, je kunt het rapport vinden op:\n" -#: ../src/Gui/CCMainWindow.py:292 +#: ../src/Gui/CCMainWindow.py:296 msgid "" "Unable to get report!\n" "Debuginfo is missing?" @@ -207,7 +216,7 @@ msgstr "" "Kan geen rapport krijgen!\n" "Mist debuginfo?" -#: ../src/Gui/CCMainWindow.py:310 +#: ../src/Gui/CCMainWindow.py:314 #, python-format msgid "" "Reporting failed!\n" @@ -216,7 +225,7 @@ msgstr "" "Rapporteren mislukte!\n" "%s" -#: ../src/Gui/CCMainWindow.py:329 ../src/Gui/CCMainWindow.py:356 +#: ../src/Gui/CCMainWindow.py:333 ../src/Gui/CCMainWindow.py:360 #, python-format msgid "Error getting the report: %s" msgstr "Fout tijdens het verkrijgen van het rapport: %s" @@ -278,19 +287,19 @@ msgstr "gtk-cancel" msgid "gtk-refresh" msgstr "gtk-refresh" -#: ../src/Gui/SettingsDialog.py:34 ../src/Gui/SettingsDialog.py:51 +#: ../src/Gui/SettingsDialog.py:33 ../src/Gui/SettingsDialog.py:50 msgid "Select plugin" msgstr "Selecteer een plugin" -#: ../src/Gui/SettingsDialog.py:37 +#: ../src/Gui/SettingsDialog.py:36 msgid "Select database backend" msgstr "Selecteer database back-end" -#: ../src/Gui/SettingsDialog.py:168 +#: ../src/Gui/SettingsDialog.py:165 msgid "Remove this job" msgstr "Verwijder deze taak" -#: ../src/Gui/SettingsDialog.py:211 +#: ../src/Gui/SettingsDialog.py:208 msgid "Remove this action" msgstr "Verwijder deze actie" @@ -464,31 +473,31 @@ msgstr "Uitloggen..." msgid "Getting local universal unique identification" msgstr "Verkrijgen van locale universele unieke identificatie" -#: ../lib/Plugins/CCpp.cpp:161 +#: ../lib/Plugins/CCpp.cpp:246 msgid "Getting backtrace..." msgstr "Backtrace ophalen..." -#: ../lib/Plugins/CCpp.cpp:442 +#: ../lib/Plugins/CCpp.cpp:532 ../lib/Plugins/CCpp.cpp:657 msgid "Searching for debug-info packages..." msgstr "Zoeken naar debug-info pakketten..." -#: ../lib/Plugins/CCpp.cpp:504 +#: ../lib/Plugins/CCpp.cpp:594 ../lib/Plugins/CCpp.cpp:692 msgid "Downloading and installing debug-info packages..." msgstr "Downloaden en installeren van debug-info pakketten..." -#: ../lib/Plugins/CCpp.cpp:566 +#: ../lib/Plugins/CCpp.cpp:735 msgid "Getting local universal unique identification..." msgstr "Verkrijgen van locale universele unieke identificatie..." -#: ../lib/Plugins/CCpp.cpp:585 +#: ../lib/Plugins/CCpp.cpp:754 msgid "Getting global universal unique identification..." msgstr "Verkrijgen van golbale universele unieke identificatie..." -#: ../lib/Plugins/CCpp.cpp:630 +#: ../lib/Plugins/CCpp.cpp:799 msgid "Starting report creation..." msgstr "Beginnen met rapport aanmaken..." -#: ../lib/Plugins/CCpp.cpp:661 +#: ../lib/Plugins/CCpp.cpp:830 msgid "Skipping debuginfo installation" msgstr "Sla debuginfo installatie over" @@ -567,13 +576,6 @@ msgstr "klaar met het draaien van sosreport" #~ "\n" #~ "%s" -#~ msgid "" -#~ "Can't save plugin settings:\n" -#~ " %s" -#~ msgstr "" -#~ "Kan plugin instellingen niet opslaan:\n" -#~ " %s" - #~ msgid "unknown response from settings dialog" #~ msgstr "onbekende reactie van de instellingen dialoog" -- cgit From 19b5500bbf4d8f842ff71504401c66cf6238d406 Mon Sep 17 00:00:00 2001 From: diegobz Date: Sat, 24 Oct 2009 00:43:40 +0000 Subject: Sending translation for Brazilian Portuguese --- po/pt_BR.po | 133 ++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 79 insertions(+), 54 deletions(-) diff --git a/po/pt_BR.po b/po/pt_BR.po index 47019fd8..58cb4aca 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -1,13 +1,12 @@ # Brazilian Portuguese translation of ABRT. # This file is distributed under the same license as the ABRT package. -# # Igor Pires Soares , 2009. # msgid "" msgstr "" "Project-Id-Version: ABRT\n" "Report-Msgid-Bugs-To: jmoskovc@redhat.com\n" -"POT-Creation-Date: 2009-10-22 16:15+0000\n" +"POT-Creation-Date: 2009-10-24 00:40+0000\n" "PO-Revision-Date: 2009-10-22 17:49-0300\n" "Last-Translator: Igor Pires Soares \n" "Language-Team: Brazilian Portuguese \n" @@ -24,7 +23,9 @@ msgstr "Outro cliente já está em execução, tentando acordá-lo." #: ../src/Gui/ABRTExceptions.py:13 msgid "Got unexpected data from daemon (is the database properly updated?)." -msgstr "Dados inesperados obtidos do daemon (o banco de dados está devidamente atualizado?)." +msgstr "" +"Dados inesperados obtidos do daemon (o banco de dados está devidamente " +"atualizado?)." #: ../src/Gui/ABRTPlugin.py:55 msgid "Analyzer plugins" @@ -44,15 +45,15 @@ msgstr "Plugins de banco de dados" #: ../src/Gui/ABRTPlugin.py:97 msgid "Plugin name is not set, can't load it's settings" -msgstr "O nome do plugin não está definido, não é possível carregar as configurações dele" +msgstr "" +"O nome do plugin não está definido, não é possível carregar as configurações " +"dele" -#: ../src/Gui/CCDBusBackend.py:74 -#: ../src/Gui/CCDBusBackend.py:97 +#: ../src/Gui/CCDBusBackend.py:74 ../src/Gui/CCDBusBackend.py:97 msgid "Can't connect to system dbus" msgstr "Não foi possível conectar ao dbus do sistema" -#: ../src/Gui/CCDBusBackend.py:100 -#: ../src/Gui/CCDBusBackend.py:103 +#: ../src/Gui/CCDBusBackend.py:100 ../src/Gui/CCDBusBackend.py:103 msgid "Please check if abrt daemon is running" msgstr "Por favor, verifique se o daemon do abrt está em execução" @@ -72,8 +73,7 @@ msgstr " " msgid "(C) 2009 Red Hat, Inc." msgstr "(C) 2009 Red Hat, Inc." -#: ../src/Gui/ccgui.glade.h:3 -#: ../src/Gui/CCMainWindow.py:244 +#: ../src/Gui/ccgui.glade.h:3 ../src/Gui/CCMainWindow.py:244 msgid "Not reported!" msgstr "Não relatado!" @@ -101,24 +101,37 @@ msgstr "Por favor aguarde..." msgid "Plugins" msgstr "Plugins" -#: ../src/Gui/ccgui.glade.h:10 -#: ../src/Gui/report.glade.h:2 +#: ../src/Gui/ccgui.glade.h:10 ../src/Gui/report.glade.h:2 msgid "Report" msgstr "Relatar" #: ../src/Gui/ccgui.glade.h:11 msgid "" -"This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\n" +"This program is free software; you can redistribute it and/or modify it " +"under the terms of the GNU General Public License as published by the Free " +"Software Foundation; either version 2 of the License, or (at your option) " +"any later version.\n" "\n" -"This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n" +"This program is distributed in the hope that it will be useful, but WITHOUT " +"ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or " +"FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for " +"more details.\n" "\n" -"You should have received a copy of the GNU General Public License along with this program. If not, see ." +"You should have received a copy of the GNU General Public License along with " +"this program. If not, see ." msgstr "" -"Este programa é um software livre; você pode redistribuí-lo e/ou modificá-lo sob os termos da Licença Pública Geral GNU (GNU GPL) como publicada pela Free Software Foundation; tanto a versão 2 da Licença ou (a sua escolha) qualquer versão posterior.\n" +"Este programa é um software livre; você pode redistribuí-lo e/ou modificá-lo " +"sob os termos da Licença Pública Geral GNU (GNU GPL) como publicada pela " +"Free Software Foundation; tanto a versão 2 da Licença ou (a sua escolha) " +"qualquer versão posterior.\n" "\n" -"Este programa é distribuído na esperança de que será útil, mas SEM NENHUMA GARANTIA; até mesmo sem a garantia implícita de COMERCIALIZAÇÃO ou ADEQUAÇÃO A UM PROPÓSITO EM PARTICULAR. Veja a Licença Pública Geral GNU (GNU GPL) para mais detalhes.\n" +"Este programa é distribuído na esperança de que será útil, mas SEM NENHUMA " +"GARANTIA; até mesmo sem a garantia implícita de COMERCIALIZAÇÃO ou ADEQUAÇÃO " +"A UM PROPÓSITO EM PARTICULAR. Veja a Licença Pública Geral GNU (GNU GPL) " +"para mais detalhes.\n" "\n" -"Você deve ter recebido uma cópia da GNU General Public License (GPL) junto com este programa. Se não, acesse ." +"Você deve ter recebido uma cópia da GNU General Public License (GPL) junto " +"com este programa. Se não, acesse ." #: ../src/Gui/ccgui.glade.h:16 msgid "Working..." @@ -185,7 +198,8 @@ msgid "" "Error while loading the dumplist, please check if abrt daemon is running\n" " %s" msgstr "" -"Erro ao carregar a lista de despejo, por favor, verifique se o daemon do abrt está em execução\n" +"Erro ao carregar a lista de despejo, por favor, verifique se o daemon do " +"abrt está em execução\n" " %s" #: ../src/Gui/CCMainWindow.py:208 @@ -195,7 +209,9 @@ msgstr "Não foi possível obter o nome de usuário para o uid %s" #: ../src/Gui/CCMainWindow.py:236 msgid "This crash has been reported, you can find the report(s) at:\n" -msgstr "Este travamento foi relatado, você pode localizar o(s) relatório(s) em:\n" +msgstr "" +"Este travamento foi relatado, você pode localizar o(s) relatório(s) em:\n" #: ../src/Gui/CCMainWindow.py:296 msgid "" @@ -214,8 +230,7 @@ msgstr "" "Falha no relato!\n" "%s" -#: ../src/Gui/CCMainWindow.py:333 -#: ../src/Gui/CCMainWindow.py:360 +#: ../src/Gui/CCMainWindow.py:333 ../src/Gui/CCMainWindow.py:360 #, python-format msgid "Error getting the report: %s" msgstr "Erro ao obter o relatório: %s" @@ -227,24 +242,27 @@ msgstr "Breve descrição sobre como reproduzir isto ou o que você fazia..." #: ../src/Gui/CCReporterDialog.py:211 #, python-format msgid "" -"WARNING, you're about to send data which might contain sensitive information.\n" +"WARNING, you're about to send data which might contain sensitive " +"information.\n" "Do you really want to send %s?\n" msgstr "" -"AVISO, você está prestes a enviar dados que podem conter informações delicadas.\n" +"AVISO, você está prestes a enviar dados que podem conter informações " +"delicadas.\n" "Você realmente deseja enviar o %s?\n" #: ../src/Gui/dialogs.glade.h:1 msgid "Report done" msgstr "Relato concluído" -#: ../src/Gui/dialogs.glade.h:2 -#: ../src/Gui/settings.glade.h:27 +#: ../src/Gui/dialogs.glade.h:2 ../src/Gui/settings.glade.h:27 msgid "gtk-ok" msgstr "gtk-ok" #: ../src/Gui/PluginSettingsUI.py:18 msgid "Can't find PluginDialog widget in UI description!" -msgstr "Não foi possível localizar o widget PluginDialog na descrição da interface de usuário!" +msgstr "" +"Não foi possível localizar o widget PluginDialog na descrição da interface " +"de usuário!" #. we shouldn't get here, but just to be safe #: ../src/Gui/PluginSettingsUI.py:24 @@ -252,8 +270,7 @@ msgstr "Não foi possível localizar o widget PluginDialog na descrição da int msgid "No UI for plugin %s" msgstr "Nenhuma interface de usuário para o plugin %s" -#: ../src/Gui/PluginSettingsUI.py:55 -#: ../src/Gui/PluginSettingsUI.py:81 +#: ../src/Gui/PluginSettingsUI.py:55 ../src/Gui/PluginSettingsUI.py:81 msgid "combo box is not implemented" msgstr "caixa de combinação não implementada" @@ -269,8 +286,7 @@ msgstr "Comentário" msgid "Send" msgstr "Enviar" -#: ../src/Gui/report.glade.h:4 -#: ../src/Gui/settings.glade.h:25 +#: ../src/Gui/report.glade.h:4 ../src/Gui/settings.glade.h:25 msgid "gtk-cancel" msgstr "gtk-cancel" @@ -278,8 +294,7 @@ msgstr "gtk-cancel" msgid "gtk-refresh" msgstr "gtk-refresh" -#: ../src/Gui/SettingsDialog.py:33 -#: ../src/Gui/SettingsDialog.py:50 +#: ../src/Gui/SettingsDialog.py:33 ../src/Gui/SettingsDialog.py:50 msgid "Select plugin" msgstr "Selecionar plugin" @@ -408,8 +423,7 @@ msgstr "Um travamento no pacote %s foi detectado" msgid "ABRT service has been started" msgstr "O serviço ABRT foi iniciado" -#: ../src/Applet/Applet.cpp:132 -#: ../src/Applet/Applet.cpp:246 +#: ../src/Applet/Applet.cpp:132 ../src/Applet/Applet.cpp:246 msgid "ABRT service is not running" msgstr "O serviço do ABRT não está em execução" @@ -418,8 +432,12 @@ msgid "Warning" msgstr "Aviso" #: ../src/Daemon/Daemon.cpp:542 -msgid "Report size exceeded the quota. Please check system's MaxCrashReportsSize value in abrt.conf." -msgstr "O tamanho do relatório excedeu a cota. Por favor, verifique o valor MaxCrashReportsSize do sistema no abrt.conf." +msgid "" +"Report size exceeded the quota. Please check system's MaxCrashReportsSize " +"value in abrt.conf." +msgstr "" +"O tamanho do relatório excedeu a cota. Por favor, verifique o valor " +"MaxCrashReportsSize do sistema no abrt.conf." #: ../lib/Plugins/Bugzilla.cpp:83 msgid "Empty login and password. Please check Bugzilla.conf" @@ -442,8 +460,7 @@ msgstr "Novo id do erro: " msgid "Checking for duplicates..." msgstr "Verificando duplicatas..." -#: ../lib/Plugins/Bugzilla.cpp:402 -#: ../lib/Plugins/Bugzilla.cpp:413 +#: ../lib/Plugins/Bugzilla.cpp:402 ../lib/Plugins/Bugzilla.cpp:413 msgid "Logging into bugzilla..." msgstr "Autenticando no bugzilla..." @@ -467,29 +484,27 @@ msgstr "Obtendo identificação universal local única" msgid "Getting backtrace..." msgstr "Obtendo backtrace..." -#: ../lib/Plugins/CCpp.cpp:532 -#: ../lib/Plugins/CCpp.cpp:657 +#: ../lib/Plugins/CCpp.cpp:532 ../lib/Plugins/CCpp.cpp:657 msgid "Searching for debug-info packages..." msgstr "Pesquisando por pacotes debug-info..." -#: ../lib/Plugins/CCpp.cpp:594 -#: ../lib/Plugins/CCpp.cpp:692 +#: ../lib/Plugins/CCpp.cpp:594 ../lib/Plugins/CCpp.cpp:690 msgid "Downloading and installing debug-info packages..." msgstr "Baixando e instalando pacotes debug-info..." -#: ../lib/Plugins/CCpp.cpp:735 +#: ../lib/Plugins/CCpp.cpp:733 msgid "Getting local universal unique identification..." msgstr "Obtendo identificação universal local única..." -#: ../lib/Plugins/CCpp.cpp:754 +#: ../lib/Plugins/CCpp.cpp:752 msgid "Getting global universal unique identification..." msgstr "Obtendo identificação universal global única..." -#: ../lib/Plugins/CCpp.cpp:799 +#: ../lib/Plugins/CCpp.cpp:797 msgid "Starting report creation..." msgstr "Iniciando a criação do relatório..." -#: ../lib/Plugins/CCpp.cpp:830 +#: ../lib/Plugins/CCpp.cpp:828 msgid "Skipping debuginfo installation" msgstr "Pulando instalação do debuginfo" @@ -497,8 +512,7 @@ msgstr "Pulando instalação do debuginfo" msgid "Creating and submitting a report..." msgstr "Criando e enviando um relatório..." -#: ../lib/Plugins/Logger.cpp:58 -#: ../lib/Plugins/Mailx.cpp:123 +#: ../lib/Plugins/Logger.cpp:58 ../lib/Plugins/Mailx.cpp:123 msgid "Creating a report..." msgstr "Criando um relatório..." @@ -506,8 +520,7 @@ msgstr "Criando um relatório..." msgid "Executing RunApp plugin..." msgstr "Executando o plugin RunApp..." -#: ../lib/Plugins/FileTransfer.cpp:63 -#: ../lib/Plugins/FileTransfer.cpp:409 +#: ../lib/Plugins/FileTransfer.cpp:63 ../lib/Plugins/FileTransfer.cpp:409 msgid "FileTransfer: URL not specified" msgstr "FileTransfer: URL não especificada" @@ -520,8 +533,7 @@ msgstr "Enviando o pacote %s via %s" msgid "File Transfer: Creating a report..." msgstr "File Transfer: Criando um relatório..." -#: ../lib/Plugins/FileTransfer.cpp:358 -#: ../lib/Plugins/FileTransfer.cpp:386 +#: ../lib/Plugins/FileTransfer.cpp:358 ../lib/Plugins/FileTransfer.cpp:386 msgid "CFileTransfer::Run(): Cannot create and send an archive: " msgstr "CFileTransfer::Run(): Não foi possível criar e enviar o pacote: " @@ -547,16 +559,21 @@ msgstr "Execução do sosreport realizada" #~ msgid "Check CC and add coment +1..." #~ msgstr "Verifique o CC e adicione o comentário +1..." + #~ msgid "Pending events: %i" #~ msgstr "Eventos pendentes: %i" + #~ msgid "Can't create menu from the description, popup won't be available!\n" #~ msgstr "" #~ "Não foi possível criar um menu a partir da descrição, a janela " #~ "instantânea não estará disponível!\n" + #~ msgid "Creating an archive..." #~ msgstr "Criando um pacote..." + #~ msgid "Getting local/global universal unique identification..." #~ msgstr "Obtendo identificação universal local/global única..." + #~ msgid "" #~ "Error while opening plugin settings UI: \n" #~ "\n" @@ -565,10 +582,13 @@ msgstr "Execução do sosreport realizada" #~ "Erro ao abrir a interface de usuário das configurações do plugin: \n" #~ "\n" #~ "%s" + #~ msgid "unknown response from settings dialog" #~ msgstr "resposta desconhecida do diálogo de configurações" + #~ msgid "Applet is already running." #~ msgstr "O miniaplicativo já está em execução." + #~ msgid "" #~ "This is default handler, you should register your own with " #~ "ConnectCrashHandler" @@ -583,18 +603,23 @@ msgstr "Execução do sosreport realizada" #~ msgstr "" #~ "Este é o manipulador padrão, você deve registrar o seu próprio com o " #~ "ConnectCrashHandler" + #~ msgid "Out of memory" #~ msgstr "Memória insuficiente" + #~ msgid "Can't load gui description for SettingsDialog!" #~ msgstr "" #~ "Não foi possível carregar a descrição da interface gráfica de usuário " #~ "para o SettingsDialog!" + #~ msgid "Name" #~ msgstr "Nome" + #~ msgid "Enabled" #~ msgstr "Habilitado" + #~ msgid "Can't get plugin description" #~ msgstr "Não foi possível obter a descrição do plugin" + #~ msgid "Daemon is not running." #~ msgstr "O daemon não está em execução." - -- cgit From 7418374811aa5297c9ebf2809a81bed1ea1fe94b Mon Sep 17 00:00:00 2001 From: elsupergomez Date: Sat, 24 Oct 2009 03:17:49 +0000 Subject: Sending translation for Spanish --- po/es.po | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/po/es.po b/po/es.po index d5e5b1ac..b5b9f3c1 100644 --- a/po/es.po +++ b/po/es.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: abrt.master.es\n" "Report-Msgid-Bugs-To: jmoskovc@redhat.com\n" -"POT-Creation-Date: 2009-10-22 16:18+0000\n" -"PO-Revision-Date: 2009-10-22 13:24-0300\n" -"Last-Translator: Domingo Becker \n" +"POT-Creation-Date: 2009-10-24 00:40+0000\n" +"PO-Revision-Date: 2009-10-24 00:15-0300\n" +"Last-Translator: Claudio Rodrigo Pereyra Diaz \n" "Language-Team: Spanish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -136,10 +136,12 @@ msgstr "_Archivo" msgid "_Help" msgstr "Ay_uda" +# Revisar si hay que traducir. +# Ver como referencia los botones gtk que no habia que traducirlos #. add pixbuff separatelly #: ../src/Gui/CCMainWindow.py:80 msgid "Icon" -msgstr "icono" +msgstr "Icono" #: ../src/Gui/CCMainWindow.py:88 msgid "Package" @@ -237,6 +239,7 @@ msgstr "" msgid "Report done" msgstr "Informe hecho" +# NO TRADUCIR, hacen referencia al boton gkt #: ../src/Gui/dialogs.glade.h:2 #: ../src/Gui/settings.glade.h:27 msgid "gtk-ok" @@ -269,11 +272,13 @@ msgstr "Comentario" msgid "Send" msgstr "Enviar" +# NO TRADUCIR, hacen referencia al boton gkt #: ../src/Gui/report.glade.h:4 #: ../src/Gui/settings.glade.h:25 msgid "gtk-cancel" msgstr "gtk-cancel" +# NO TRADUCIR, hacen referencia al boton gkt #: ../src/Gui/report.glade.h:5 msgid "gtk-refresh" msgstr "gtk-refresh" @@ -325,7 +330,7 @@ msgstr "Paquetes en la Blacklist" #: ../src/Gui/settings.glade.h:8 msgid "C_onfigure plugin" -msgstr "C_onfigure Complemento" +msgstr "C_onfigurar Complemento" #: ../src/Gui/settings.glade.h:9 msgid "Check package GPG signature" @@ -353,7 +358,7 @@ msgstr "LLaves GPG" #: ../src/Gui/settings.glade.h:15 msgid "GPG keys: " -msgstr "LLaves GPG" +msgstr "LLaves GPG:" #: ../src/Gui/settings.glade.h:16 msgid "Global Settings" @@ -387,17 +392,20 @@ msgstr "Version:" msgid "Web Site:" msgstr "Página Web:" +# NO TRADUCIR, hacen referencia al boton gkt #: ../src/Gui/settings.glade.h:24 msgid "gtk-add" msgstr "gtk-add" +# NO TRADUCIR, hacen referencia al boton gkt #: ../src/Gui/settings.glade.h:26 msgid "gtk-close" -msgstr "gtk-cerrado" +msgstr "gtk-close" +# NO TRADUCIR, hacen referencia al boton gkt #: ../src/Gui/settings.glade.h:28 msgid "gtk-remove" -msgstr "gtk-borra" +msgstr "gtk-remove" #: ../src/Applet/Applet.cpp:71 #, c-format @@ -473,23 +481,23 @@ msgid "Searching for debug-info packages..." msgstr "Buscando paquetes de información del depurador..." #: ../lib/Plugins/CCpp.cpp:594 -#: ../lib/Plugins/CCpp.cpp:692 +#: ../lib/Plugins/CCpp.cpp:690 msgid "Downloading and installing debug-info packages..." msgstr "Descargando e instalando paquetes de información del depurador..." -#: ../lib/Plugins/CCpp.cpp:735 +#: ../lib/Plugins/CCpp.cpp:733 msgid "Getting local universal unique identification..." msgstr "Obteniendo la identificación única universal local..." -#: ../lib/Plugins/CCpp.cpp:754 +#: ../lib/Plugins/CCpp.cpp:752 msgid "Getting global universal unique identification..." msgstr "Obteniendo la identificación única universal global..." -#: ../lib/Plugins/CCpp.cpp:799 +#: ../lib/Plugins/CCpp.cpp:797 msgid "Starting report creation..." msgstr "Iniciando la creación del informe..." -#: ../lib/Plugins/CCpp.cpp:830 +#: ../lib/Plugins/CCpp.cpp:828 msgid "Skipping debuginfo installation" msgstr "Omita la instalación de la información de depuración" @@ -509,7 +517,7 @@ msgstr "Ejecutando complemento RunApp..." #: ../lib/Plugins/FileTransfer.cpp:63 #: ../lib/Plugins/FileTransfer.cpp:409 msgid "FileTransfer: URL not specified" -msgstr "FileTransfer: URL no especificada" +msgstr "Transferencia de archivo: URL no especificada" #: ../lib/Plugins/FileTransfer.cpp:81 #, c-format @@ -539,11 +547,11 @@ msgstr "Ejecutando complemento SOSreport..." #: ../lib/Plugins/SOSreport.cpp:135 msgid "running sosreport: " -msgstr "lanzando.sosreport" +msgstr "lanzando sosreport:" #: ../lib/Plugins/SOSreport.cpp:150 msgid "done running sosreport" -msgstr "Sosreport.corriendo" +msgstr "Sosreport corriendo" #~ msgid "Check CC and add coment +1..." #~ msgstr "Compruebe CC y añada un comentario +1" -- cgit From 2d7990016e05fad186b466f80625e8ad96e8d6f2 Mon Sep 17 00:00:00 2001 From: elsupergomez Date: Sat, 24 Oct 2009 03:29:06 +0000 Subject: Sending translation for Spanish --- po/es.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/po/es.po b/po/es.po index b5b9f3c1..56c77c1f 100644 --- a/po/es.po +++ b/po/es.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: abrt.master.es\n" "Report-Msgid-Bugs-To: jmoskovc@redhat.com\n" "POT-Creation-Date: 2009-10-24 00:40+0000\n" -"PO-Revision-Date: 2009-10-24 00:15-0300\n" +"PO-Revision-Date: 2009-10-24 00:28-0300\n" "Last-Translator: Claudio Rodrigo Pereyra Diaz \n" "Language-Team: Spanish \n" "MIME-Version: 1.0\n" @@ -86,7 +86,7 @@ msgstr "Acerca de ABRT" #: ../src/Gui/ccgui.glade.h:6 msgid "Automatic Bug Reporting Tool" -msgstr "Acerca de la Herramienta de Informe de Errores Automática" +msgstr "Herramienta de Informe de Errores Automática" #: ../src/Gui/ccgui.glade.h:7 msgid "Delete" @@ -237,7 +237,7 @@ msgstr "" #: ../src/Gui/dialogs.glade.h:1 msgid "Report done" -msgstr "Informe hecho" +msgstr "Informe terminado" # NO TRADUCIR, hacen referencia al boton gkt #: ../src/Gui/dialogs.glade.h:2 -- cgit From 7277e69414bd05e6b4b074faac1e62c17502ffe3 Mon Sep 17 00:00:00 2001 From: astur Date: Sun, 25 Oct 2009 17:46:09 +0000 Subject: Sending translation for po/ast.po --- po/ast.po | 551 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 551 insertions(+) create mode 100644 po/ast.po diff --git a/po/ast.po b/po/ast.po new file mode 100644 index 00000000..e6e4d7b1 --- /dev/null +++ b/po/ast.po @@ -0,0 +1,551 @@ +# translation of abrt.master.ast.po to Asturian +# Astur , 2009. +msgid "" +msgstr "" +"Project-Id-Version: abrt.master.ast\n" +"Report-Msgid-Bugs-To: jmoskovc@redhat.com\n" +"POT-Creation-Date: 2009-10-24 09:37+0000\n" +"PO-Revision-Date: 2009-10-24 21:43+0100\n" +"Last-Translator: Marcos Alvarez Costales \n" +"Language-Team: Asturian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Asturian\n" +"X-Generator: KBabel 1.11.4\n" + +#: ../src/Gui/ABRTExceptions.py:6 +msgid "Another client is already running, trying to wake it." +msgstr "Otru veceru yá ta executándose, intentando llevantalu." + +#: ../src/Gui/ABRTExceptions.py:13 +msgid "Got unexpected data from daemon (is the database properly updated?)." +msgstr "Algamáronse datos inesperaos dende'l degorriu (¿ta la Base de Datos correutamente anovada?)" + +#: ../src/Gui/ABRTPlugin.py:55 +msgid "Analyzer plugins" +msgstr "Complementos analizadores" + +#: ../src/Gui/ABRTPlugin.py:56 +msgid "Action plugins" +msgstr "Complementos d'aición" + +#: ../src/Gui/ABRTPlugin.py:57 +msgid "Reporter plugins" +msgstr "Complementos d'informes" + +#: ../src/Gui/ABRTPlugin.py:58 +msgid "Database plugins" +msgstr "Complementos de Bases de Datos" + +#: ../src/Gui/ABRTPlugin.py:97 +msgid "Plugin name is not set, can't load it's settings" +msgstr "Nun ta puestu'l nome del complementu, nun pudo cargase la configuración" + +#: ../src/Gui/CCDBusBackend.py:74 +#: ../src/Gui/CCDBusBackend.py:97 +msgid "Can't connect to system dbus" +msgstr "Nun ye dable coneutase con system dbus" + +#: ../src/Gui/CCDBusBackend.py:100 +#: ../src/Gui/CCDBusBackend.py:103 +msgid "Please check if abrt daemon is running" +msgstr "Por favor, compreba si'l degorriu abrt ta executándose" + +#: ../src/Gui/CCDBusBackend.py:155 +msgid "" +"Daemon did't return valid report info\n" +"Debuginfo is missing?" +msgstr "" +"El degorriu nun devuelve un informe válidu\n" +"¿Falta la información de la depuración?" + +#: ../src/Gui/ccgui.glade.h:1 +msgid " " +msgstr " " + +#: ../src/Gui/ccgui.glade.h:2 +msgid "(C) 2009 Red Hat, Inc." +msgstr "(C) 2009 Red Hat, Inc." + +#: ../src/Gui/ccgui.glade.h:3 +#: ../src/Gui/CCMainWindow.py:244 +msgid "Not reported!" +msgstr "¡Non informáu!" + +#: ../src/Gui/ccgui.glade.h:4 +msgid "Description" +msgstr "Descripción" + +#: ../src/Gui/ccgui.glade.h:5 +msgid "About ABRT" +msgstr "Tocante a ABRT" + +#: ../src/Gui/ccgui.glade.h:6 +msgid "Automatic Bug Reporting Tool" +msgstr "Ferramienta d'Informe de Fallos Automática" + +#: ../src/Gui/ccgui.glade.h:7 +msgid "Delete" +msgstr "Desaniciar" + +#: ../src/Gui/ccgui.glade.h:8 +msgid "Please wait.." +msgstr "Por favor, espera..." + +#: ../src/Gui/ccgui.glade.h:9 +msgid "Plugins" +msgstr "Complementos" + +#: ../src/Gui/ccgui.glade.h:10 +#: ../src/Gui/report.glade.h:2 +msgid "Report" +msgstr "Informe" + +#: ../src/Gui/ccgui.glade.h:11 +msgid "" +"This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\n" +"\n" +"This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n" +"\n" +"You should have received a copy of the GNU General Public License along with this program. If not, see ." +msgstr "" +"This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\n" +"\n" +"This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n" +"\n" +"You should have received a copy of the GNU General Public License along with this program. If not, see ." + +#: ../src/Gui/ccgui.glade.h:16 +msgid "Working..." +msgstr "Trabayando..." + +#: ../src/Gui/ccgui.glade.h:17 +msgid "_Edit" +msgstr "_Editar" + +#: ../src/Gui/ccgui.glade.h:18 +msgid "_File" +msgstr "_Ficheru" + +#: ../src/Gui/ccgui.glade.h:19 +msgid "_Help" +msgstr "Ai_da" + +# Revisar si hay que traducir. +# Ver como referencia los botones gtk que no habia que traducirlos +#. add pixbuff separatelly +#: ../src/Gui/CCMainWindow.py:80 +msgid "Icon" +msgstr "Iconu" + +#: ../src/Gui/CCMainWindow.py:88 +msgid "Package" +msgstr "Paquete" + +#: ../src/Gui/CCMainWindow.py:89 +msgid "Application" +msgstr "Aplicación" + +#: ../src/Gui/CCMainWindow.py:90 +msgid "Date" +msgstr "Data" + +#: ../src/Gui/CCMainWindow.py:91 +msgid "Crash Rate" +msgstr "Tasa de cayíes" + +#: ../src/Gui/CCMainWindow.py:93 +msgid "User" +msgstr "Usuariu" + +#: ../src/Gui/CCMainWindow.py:160 +#, python-format +msgid "" +"Can't show the settings dialog\n" +"%s" +msgstr "" +"Nun pudo amosase'l diálogu de configuración\n" +"%s" + +#: ../src/Gui/CCMainWindow.py:181 +#, python-format +msgid "" +"Unable to finish current task!\n" +"%s" +msgstr "" +"¡Nun pudo finase la xera actual!\n" +"%s" + +#: ../src/Gui/CCMainWindow.py:198 +#, python-format +msgid "" +"Error while loading the dumplist, please check if abrt daemon is running\n" +" %s" +msgstr "" +"Fallu intentando cargar la llista de volcáu, por favor compreba si'l degorriu abrt ta executándose\n" +"%s" + +#: ../src/Gui/CCMainWindow.py:208 +#, python-format +msgid "Can't get username for uid %s" +msgstr "Nun pudo algamase'l nome d'usuariu pal uid %s" + +#: ../src/Gui/CCMainWindow.py:236 +msgid "This crash has been reported, you can find the report(s) at:\n" +msgstr "Esta cayía yá se reportó, puedes alcontrar l'informe en:\n" + +#: ../src/Gui/CCMainWindow.py:296 +msgid "" +"Unable to get report!\n" +"Debuginfo is missing?" +msgstr "" +"Nun foi dable algamar l'informe!\n" +"¿Falta la información de la depuración?" + +#: ../src/Gui/CCMainWindow.py:314 +#, python-format +msgid "" +"Reporting failed!\n" +"%s" +msgstr "" +"¡L'informe falló!\n" +"%s" + +#: ../src/Gui/CCMainWindow.py:333 +#: ../src/Gui/CCMainWindow.py:360 +#, python-format +msgid "Error getting the report: %s" +msgstr "Fallu al algamar l'informe: %s" + +#: ../src/Gui/CCReporterDialog.py:167 +msgid "Brief description how to reproduce this or what you did..." +msgstr "Breve descripción de cómo reproducir esto o lo que ficisti..." + +#: ../src/Gui/CCReporterDialog.py:211 +#, python-format +msgid "" +"WARNING, you're about to send data which might contain sensitive information.\n" +"Do you really want to send %s?\n" +msgstr "" +"ALVERTENCIA, ¡tas por unviar datos que pueden caltener información sensible!\n" +"¿De xuru que quies unviar %s?\n" + +#: ../src/Gui/dialogs.glade.h:1 +msgid "Report done" +msgstr "Informe fináu" + +# NO TRADUCIR, hacen referencia al boton gkt +#: ../src/Gui/dialogs.glade.h:2 +#: ../src/Gui/settings.glade.h:27 +msgid "gtk-ok" +msgstr "gtk-ok" + +#: ../src/Gui/PluginSettingsUI.py:18 +msgid "Can't find PluginDialog widget in UI description!" +msgstr "Nun s'alcuentra'l control visual de PluginDialog na descripción de la interface del usuariu." + +#. we shouldn't get here, but just to be safe +#: ../src/Gui/PluginSettingsUI.py:24 +#, python-format +msgid "No UI for plugin %s" +msgstr "Nun hai interface del usuariu pal complementu %s" + +#: ../src/Gui/PluginSettingsUI.py:55 +#: ../src/Gui/PluginSettingsUI.py:81 +msgid "combo box is not implemented" +msgstr "La llista estenderexable nun ta fecha" + +#: ../src/Gui/PluginSettingsUI.py:64 +msgid "Nothing to hydrate!" +msgstr "¡Res pa hidratar!" + +#: ../src/Gui/report.glade.h:1 +msgid "Comment" +msgstr "Comentariu" + +#: ../src/Gui/report.glade.h:3 +msgid "Send" +msgstr "Unviar" + +# NO TRADUCIR, hacen referencia al boton gkt +#: ../src/Gui/report.glade.h:4 +#: ../src/Gui/settings.glade.h:25 +msgid "gtk-cancel" +msgstr "gtk-cancel" + +# NO TRADUCIR, hacen referencia al boton gkt +#: ../src/Gui/report.glade.h:5 +msgid "gtk-refresh" +msgstr "gtk-refresh" + +#: ../src/Gui/SettingsDialog.py:33 +#: ../src/Gui/SettingsDialog.py:50 +msgid "Select plugin" +msgstr "Seleiciona un complementu" + +#: ../src/Gui/SettingsDialog.py:36 +msgid "Select database backend" +msgstr "Seleiciona la base de datos de fondu" + +#: ../src/Gui/SettingsDialog.py:165 +msgid "Remove this job" +msgstr "Desaniciar esti trabayu" + +#: ../src/Gui/SettingsDialog.py:208 +msgid "Remove this action" +msgstr "Desaniciar esta aición" + +#: ../src/Gui/settings.glade.h:1 +msgid "Analyzer plugin" +msgstr "Complementos analizadores" + +#: ../src/Gui/settings.glade.h:2 +msgid "Associated action" +msgstr "Aición asociada" + +#: ../src/Gui/settings.glade.h:3 +msgid "Plugin" +msgstr "Complementu" + +#: ../src/Gui/settings.glade.h:4 +msgid "Time (or period)" +msgstr "Tiempu (o periodu)" + +#: ../src/Gui/settings.glade.h:5 +msgid "Analyzers, Actions, Reporters" +msgstr "Analizadores, Aiciones, Informadores" + +#: ../src/Gui/settings.glade.h:6 +msgid "Author:" +msgstr "Autor:" + +#: ../src/Gui/settings.glade.h:7 +msgid "Blacklisted packages: " +msgstr "Paquetes na Blacklist" + +#: ../src/Gui/settings.glade.h:8 +msgid "C_onfigure plugin" +msgstr "C_onfigurar Complementu" + +#: ../src/Gui/settings.glade.h:9 +msgid "Check package GPG signature" +msgstr "Compreba la robla GPG del paquete" + +#: ../src/Gui/settings.glade.h:10 +msgid "Common" +msgstr "Común" + +#: ../src/Gui/settings.glade.h:11 +msgid "Cron" +msgstr "Cron" + +#: ../src/Gui/settings.glade.h:12 +msgid "Database backend: " +msgstr "Backend de la Base de Datos" + +#: ../src/Gui/settings.glade.h:13 +msgid "Edit blacklisted packages" +msgstr "Edita los paquetes de la Blacklist" + +#: ../src/Gui/settings.glade.h:14 +msgid "GPG Keys" +msgstr "Llaves GPG" + +#: ../src/Gui/settings.glade.h:15 +msgid "GPG keys: " +msgstr "Llaves GPG:" + +#: ../src/Gui/settings.glade.h:16 +msgid "Global Settings" +msgstr "Preferencies globales" + +#: ../src/Gui/settings.glade.h:17 +msgid "Max coredump storage size(MB):" +msgstr "Capacidá másima d'almacenamientu del volcáu del núcleu (MB):" + +#: ../src/Gui/settings.glade.h:18 +msgid "Nothing selected" +msgstr "Na esbillao" + +#: ../src/Gui/settings.glade.h:19 +msgid "Plugin Details" +msgstr "Detalles de Complementu" + +#: ../src/Gui/settings.glade.h:20 +msgid "Settings" +msgstr "Preferencies" + +#: ../src/Gui/settings.glade.h:21 +msgid "This function is not implemented yet!" +msgstr "¡Esta función entá nun ta implementada!" + +#: ../src/Gui/settings.glade.h:22 +msgid "Version:" +msgstr "Versión:" + +#: ../src/Gui/settings.glade.h:23 +msgid "Web Site:" +msgstr "Páxina Web:" + +# NO TRADUCIR, hacen referencia al boton gkt +#: ../src/Gui/settings.glade.h:24 +msgid "gtk-add" +msgstr "gtk-add" + +# NO TRADUCIR, hacen referencia al boton gkt +#: ../src/Gui/settings.glade.h:26 +msgid "gtk-close" +msgstr "gtk-close" + +# NO TRADUCIR, hacen referencia al boton gkt +#: ../src/Gui/settings.glade.h:28 +msgid "gtk-remove" +msgstr "gtk-remove" + +#: ../src/Applet/Applet.cpp:71 +#, c-format +msgid "A crash in package %s has been detected" +msgstr "Deteutóse una cayía nel paquete %s." + +#: ../src/Applet/Applet.cpp:130 +msgid "ABRT service has been started" +msgstr "Executáu serviciu ABRT" + +#: ../src/Applet/Applet.cpp:132 +#: ../src/Applet/Applet.cpp:246 +msgid "ABRT service is not running" +msgstr "El serviciu ABRT nun ta executándose" + +#: ../src/Applet/CCApplet.cpp:185 +msgid "Warning" +msgstr "Avisu" + +#: ../src/Daemon/Daemon.cpp:542 +msgid "Report size exceeded the quota. Please check system's MaxCrashReportsSize value in abrt.conf." +msgstr "El tamañu del informe escede la cuota. Por favor, verifica'l valor de MaxCrashReportsSize del sistema n'abrt.conf." + +#: ../lib/Plugins/Bugzilla.cpp:83 +msgid "Empty login and password. Please check Bugzilla.conf" +msgstr "Usuariu y contraseña ermos. Por favor, compreba'l ficheru Bugzilla.conf" + +#: ../lib/Plugins/Bugzilla.cpp:205 +msgid "Bug is already reported: " +msgstr "Yá s'informó d'esti fallu (bug):" + +#: ../lib/Plugins/Bugzilla.cpp:260 +#, c-format +msgid "Binary file %s will not be reported." +msgstr "Nun s'informará del ficheru binariu %s." + +#: ../lib/Plugins/Bugzilla.cpp:330 +msgid "New bug id: " +msgstr "Nuevu id del fallu:" + +#: ../lib/Plugins/Bugzilla.cpp:399 +msgid "Checking for duplicates..." +msgstr "Chequeando si hai duplicaos..." + +#: ../lib/Plugins/Bugzilla.cpp:402 +#: ../lib/Plugins/Bugzilla.cpp:413 +msgid "Logging into bugzilla..." +msgstr "Entrando en bugzilla..." + +#: ../lib/Plugins/Bugzilla.cpp:405 +msgid "Checking CC..." +msgstr "Chequeando CC..." + +#: ../lib/Plugins/Bugzilla.cpp:425 +msgid "Creating new bug..." +msgstr "Criando un nuevu informe..." + +#: ../lib/Plugins/Bugzilla.cpp:430 +msgid "Logging out..." +msgstr "Colando..." + +#: ../lib/Plugins/Kerneloops.cpp:37 +msgid "Getting local universal unique identification" +msgstr "Algamando la identificación única universal llocal" + +#: ../lib/Plugins/CCpp.cpp:246 +msgid "Getting backtrace..." +msgstr "Algamando'l backtrace..." + +#: ../lib/Plugins/CCpp.cpp:532 +#: ../lib/Plugins/CCpp.cpp:657 +msgid "Searching for debug-info packages..." +msgstr "Guetando paquetes d'información del depurador..." + +#: ../lib/Plugins/CCpp.cpp:594 +#: ../lib/Plugins/CCpp.cpp:690 +msgid "Downloading and installing debug-info packages..." +msgstr "Baxando ya instalando paquetes d'información del depurador..." + +#: ../lib/Plugins/CCpp.cpp:733 +msgid "Getting local universal unique identification..." +msgstr "Algamando la identificación única universal llocal..." + +#: ../lib/Plugins/CCpp.cpp:752 +msgid "Getting global universal unique identification..." +msgstr "Algamando la identificación única universal global..." + +#: ../lib/Plugins/CCpp.cpp:797 +msgid "Starting report creation..." +msgstr "Aniciando la criación del informe..." + +#: ../lib/Plugins/CCpp.cpp:828 +msgid "Skipping debuginfo installation" +msgstr "Omite la instalación de la información de depuración" + +#: ../lib/Plugins/KerneloopsReporter.cpp:101 +msgid "Creating and submitting a report..." +msgstr "Criando y unviando un informe..." + +#: ../lib/Plugins/Logger.cpp:58 +#: ../lib/Plugins/Mailx.cpp:123 +msgid "Creating a report..." +msgstr "Criando un informe..." + +#: ../lib/Plugins/RunApp.cpp:62 +msgid "Executing RunApp plugin..." +msgstr "Executando complementu RunApp..." + +#: ../lib/Plugins/FileTransfer.cpp:63 +#: ../lib/Plugins/FileTransfer.cpp:409 +msgid "FileTransfer: URL not specified" +msgstr "Tresferencia de ficheru: URL nun especificada" + +#: ../lib/Plugins/FileTransfer.cpp:81 +#, c-format +msgid "Sending archive %s via %s" +msgstr "Unviando ficheru %s vía %s" + +#: ../lib/Plugins/FileTransfer.cpp:336 +msgid "File Transfer: Creating a report..." +msgstr "Tresferencia de ficheru: Criando un informe..." + +#: ../lib/Plugins/FileTransfer.cpp:358 +#: ../lib/Plugins/FileTransfer.cpp:386 +msgid "CFileTransfer::Run(): Cannot create and send an archive: " +msgstr "CFileTransfer::Run(): nun pudo criase y unviase un ficheru: " + +#: ../lib/Plugins/KerneloopsScanner.cpp:79 +msgid "Creating kernel oops crash reports..." +msgstr "Criando un informe de colingue de kernel oops..." + +#: ../lib/Plugins/Mailx.cpp:109 +msgid "Sending an email..." +msgstr "Unviando un corréu..." + +#: ../lib/Plugins/SOSreport.cpp:113 +msgid "Executing SOSreport plugin..." +msgstr "Executando complementu SOSreport..." + +#: ../lib/Plugins/SOSreport.cpp:135 +msgid "running sosreport: " +msgstr "llanzando sosreport:" + +#: ../lib/Plugins/SOSreport.cpp:150 +msgid "done running sosreport" +msgstr "Sosreport executándose" + -- cgit From cd8efd80bde252be614b5849653bdacc8a7d1f02 Mon Sep 17 00:00:00 2001 From: kristho Date: Mon, 26 Oct 2009 00:43:47 +0000 Subject: Sending translation for Danish --- po/da.po | 72 ++++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/po/da.po b/po/da.po index f2f6aa20..4c15e22c 100644 --- a/po/da.po +++ b/po/da.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: abrt\n" "Report-Msgid-Bugs-To: jmoskovc@redhat.com\n" -"POT-Creation-Date: 2009-10-15 09:50+0000\n" -"PO-Revision-Date: 2009-10-16 22:53+0200\n" +"POT-Creation-Date: 2009-10-26 00:22+0000\n" +"PO-Revision-Date: 2009-10-26 02:42+0100\n" "Last-Translator: Kris Thomsen \n" "Language-Team: Danish \n" "MIME-Version: 1.0\n" @@ -23,25 +23,27 @@ msgstr "En anden klient kører allerede, prøver at vække den." msgid "Got unexpected data from daemon (is the database properly updated?)." msgstr "Modtog uventede data fra dæmon (er databasen opdateret rigtigt?)." -#: ../src/Gui/ABRTPlugin.py:48 +#: ../src/Gui/ABRTPlugin.py:55 msgid "Analyzer plugins" msgstr "Analyseringsudvidelsesmoduler" -#: ../src/Gui/ABRTPlugin.py:49 +#: ../src/Gui/ABRTPlugin.py:56 msgid "Action plugins" msgstr "Handlingsudvidelsesmoduler" -#: ../src/Gui/ABRTPlugin.py:50 +#: ../src/Gui/ABRTPlugin.py:57 msgid "Reporter plugins" msgstr "Rapporteringsudvidelsesmoduler" -#: ../src/Gui/ABRTPlugin.py:51 +#: ../src/Gui/ABRTPlugin.py:58 msgid "Database plugins" msgstr "Databaseudvidelsesmoduler" -#: ../src/Gui/ABRTPlugin.py:90 +#: ../src/Gui/ABRTPlugin.py:97 msgid "Plugin name is not set, can't load it's settings" -msgstr "Navn for udvidelsesmodul er ikke indstillet, kan ikke indlæse dets indstillinger" +msgstr "" +"Navn for udvidelsesmodul er ikke indstillet, kan ikke indlæse dets " +"indstillinger" #: ../src/Gui/CCDBusBackend.py:74 ../src/Gui/CCDBusBackend.py:97 msgid "Can't connect to system dbus" @@ -67,7 +69,7 @@ msgstr " " msgid "(C) 2009 Red Hat, Inc." msgstr "(C) 2009 Red Hat, Inc." -#: ../src/Gui/ccgui.glade.h:3 ../src/Gui/CCMainWindow.py:240 +#: ../src/Gui/ccgui.glade.h:3 ../src/Gui/CCMainWindow.py:244 msgid "Not reported!" msgstr "Ikke rapporteret!" @@ -168,7 +170,16 @@ msgstr "Nedbrudsrate" msgid "User" msgstr "Bruger" -#: ../src/Gui/CCMainWindow.py:178 +#: ../src/Gui/CCMainWindow.py:160 +#, python-format +msgid "" +"Can't show the settings dialog\n" +"%s" +msgstr "" +"Kan ikke vise indstillingsdialogen\n" +"%s" + +#: ../src/Gui/CCMainWindow.py:181 #, python-format msgid "" "Unable to finish current task!\n" @@ -177,7 +188,7 @@ msgstr "" "Kunne ikke afslutte nuværende handling!\n" "%s" -#: ../src/Gui/CCMainWindow.py:195 +#: ../src/Gui/CCMainWindow.py:198 #, python-format msgid "" "Error while loading the dumplist, please check if abrt daemon is running\n" @@ -187,17 +198,17 @@ msgstr "" "kører\n" " %s" -#: ../src/Gui/CCMainWindow.py:205 +#: ../src/Gui/CCMainWindow.py:208 #, python-format msgid "Can't get username for uid %s" msgstr "Kan ikke hente brugernavn for uid %s" -#: ../src/Gui/CCMainWindow.py:232 +#: ../src/Gui/CCMainWindow.py:236 msgid "This crash has been reported, you can find the report(s) at:\n" msgstr "" "Dette nedbrud er blevet rapporteret, du kan finde rapporten på: \n" -#: ../src/Gui/CCMainWindow.py:292 +#: ../src/Gui/CCMainWindow.py:296 msgid "" "Unable to get report!\n" "Debuginfo is missing?" @@ -205,7 +216,7 @@ msgstr "" "Kunne ikke hente rapport!\n" "Mangler fejlsøgningsinformation?" -#: ../src/Gui/CCMainWindow.py:310 +#: ../src/Gui/CCMainWindow.py:314 #, python-format msgid "" "Reporting failed!\n" @@ -214,7 +225,7 @@ msgstr "" "Rapportering fejlede!\n" "%s" -#: ../src/Gui/CCMainWindow.py:329 ../src/Gui/CCMainWindow.py:356 +#: ../src/Gui/CCMainWindow.py:333 ../src/Gui/CCMainWindow.py:360 #, python-format msgid "Error getting the report: %s" msgstr "Fejl under hentning af rapporten: %s" @@ -277,19 +288,19 @@ msgstr "gtk-cancel" msgid "gtk-refresh" msgstr "gtk-refresh" -#: ../src/Gui/SettingsDialog.py:34 ../src/Gui/SettingsDialog.py:51 +#: ../src/Gui/SettingsDialog.py:33 ../src/Gui/SettingsDialog.py:50 msgid "Select plugin" msgstr "Vælg udvidelsesmodul" -#: ../src/Gui/SettingsDialog.py:37 +#: ../src/Gui/SettingsDialog.py:36 msgid "Select database backend" msgstr "Vælg databasebackend" -#: ../src/Gui/SettingsDialog.py:168 +#: ../src/Gui/SettingsDialog.py:165 msgid "Remove this job" msgstr "Fjern dette job" -#: ../src/Gui/SettingsDialog.py:211 +#: ../src/Gui/SettingsDialog.py:208 msgid "Remove this action" msgstr "Fjern denne handling" @@ -463,31 +474,31 @@ msgstr "Logger ud..." msgid "Getting local universal unique identification" msgstr "Henter lokal, universal, unik identifikation" -#: ../lib/Plugins/CCpp.cpp:153 +#: ../lib/Plugins/CCpp.cpp:246 msgid "Getting backtrace..." msgstr "Henter backtrace..." -#: ../lib/Plugins/CCpp.cpp:434 +#: ../lib/Plugins/CCpp.cpp:532 ../lib/Plugins/CCpp.cpp:657 msgid "Searching for debug-info packages..." msgstr "Søger efter pakker med fejlsøgningsinformation..." -#: ../lib/Plugins/CCpp.cpp:496 +#: ../lib/Plugins/CCpp.cpp:594 ../lib/Plugins/CCpp.cpp:690 msgid "Downloading and installing debug-info packages..." msgstr "Henter og installerer pakker med fejlsøgningsinformation..." -#: ../lib/Plugins/CCpp.cpp:558 +#: ../lib/Plugins/CCpp.cpp:733 msgid "Getting local universal unique identification..." msgstr "Henter lokal, universal, unik identifikation..." -#: ../lib/Plugins/CCpp.cpp:577 +#: ../lib/Plugins/CCpp.cpp:752 msgid "Getting global universal unique identification..." msgstr "Henter global, universal, unik identifikation..." -#: ../lib/Plugins/CCpp.cpp:628 +#: ../lib/Plugins/CCpp.cpp:797 msgid "Starting report creation..." msgstr "Starter rapportoprettelse..." -#: ../lib/Plugins/CCpp.cpp:659 +#: ../lib/Plugins/CCpp.cpp:828 msgid "Skipping debuginfo installation" msgstr "Springer over fejlsøgningsinfo-installation" @@ -575,13 +586,6 @@ msgstr "færdig med at køre sosreport" #~ "\n" #~ "%s" -#~ msgid "" -#~ "Can't save plugin settings:\n" -#~ " %s" -#~ msgstr "" -#~ "Kan ikke gemme indstillinger for udvidelsesmoduler:\n" -#~ " %s" - #~ msgid "unknown response from settings dialog" #~ msgstr "ukendt svar fra indstillingsdialog" -- cgit From 65869764558afc330f9ba0227032d49b9b676e27 Mon Sep 17 00:00:00 2001 From: Nikola Pajkovsky Date: Mon, 26 Oct 2009 15:20:03 +0100 Subject: New insides in bugzilla.{cpp/h}. Hole xmlrpc protocol was rewritten into C. --- lib/Plugins/Bugzilla.cpp | 213 +++++++++++++++++++++++++---------------------- lib/Plugins/Bugzilla.h | 15 ---- 2 files changed, 114 insertions(+), 114 deletions(-) diff --git a/lib/Plugins/Bugzilla.cpp b/lib/Plugins/Bugzilla.cpp index a16f74fe..55ce62e5 100644 --- a/lib/Plugins/Bugzilla.cpp +++ b/lib/Plugins/Bugzilla.cpp @@ -1,5 +1,4 @@ -//#include #include "abrtlib.h" #include "Bugzilla.h" #include "CrashTypes.h" @@ -21,12 +20,27 @@ static struct xmlrpc_curl_xportparms curlParms; static xmlrpc_server_info* server_info = NULL; +static void login(const char* login, const char* passwd); + +static void logout(); + static void new_xmlrpc_client(const char* url, bool no_ssl_verify); + static void destroy_xmlrpc_client(); + static int32_t check_uuid_in_bugzilla(const char* component, const char* UUID); + static bool check_cc_and_reporter(const uint32_t bug_id, const char* login); + static void add_plus_one_cc(const uint32_t bug_id, const char* login); +static void create_new_bug_description(const map_crash_report_t& pCrashReport, std::string& pDescription); + +static void get_product_and_version(const std::string& pRelease, + std::string& pProduct, + std::string& pVersion); + + #define throw_if_fault_occurred(env) \ do \ { \ @@ -83,9 +97,12 @@ CReporterBugzilla::CReporterBugzilla() : CReporterBugzilla::~CReporterBugzilla() {} +#if 1 PRInt32 CReporterBugzilla::Base64Encode_cb(void *arg, const char *obuf, PRInt32 size) +#else +static PRint32 base64_encode_cb(void *arg, const char* obuff, PRInt32 size) +#endif { - /* CReporterBugzilla* bz = static_cast(arg); int ii; for (ii = 0; ii < size; ii++) @@ -95,37 +112,32 @@ PRInt32 CReporterBugzilla::Base64Encode_cb(void *arg, const char *obuf, PRInt32 bz->m_sAttchmentInBase64 += obuf[ii]; } } - */ return 1; } static void login(const char* login, const char* passwd) { - xmlrpc_value* result; + xmlrpc_value* result = NULL; + xmlrpc_value* param = NULL; - xmlrpc_value* param = xmlrpc_build_value(&env, "({s:s,s:s})", "login", login, "password", passwd); + param = xmlrpc_build_value(&env, "({s:s,s:s})", "login", login, "password", passwd); throw_if_fault_occurred(&env); xmlrpc_client_call2(&env, client, server_info, "User.login", param, &result); throw_if_fault_occurred(&env); } -void CReporterBugzilla::Logout() +static void logout() { - /* - xmlrpc_c::paramList paramList; - paramList.add(xmlrpc_c::value_string("")); - xmlrpc_c::rpcPtr rpc(new xmlrpc_c::rpc("User.logout", paramList)); - try - { - rpc->call(m_pXmlrpcClient, m_pCarriageParm); - } - catch (std::exception& e) - { - throw CABRTException(EXCEP_PLUGIN, std::string("CReporterBugzilla::Logout(): ") + e.what()); - } - */ + xmlrpc_value* result = NULL; + xmlrpc_value* param = NULL; + + param = xmlrpc_build_value(&env, "(s)", ""); + throw_if_fault_occurred(&env); + + xmlrpc_client_call2(&env, client, server_info, "User.logout", param, &result); + throw_if_fault_occurred(&env); } static bool check_cc_and_reporter(const uint32_t bug_id, const char* login) @@ -154,7 +166,6 @@ static bool check_cc_and_reporter(const uint32_t bug_id, const char* login) if (strcmp(reporter, login) == 0 ) { - std::cout << "reporter=login" << std::endl; return true; } } @@ -178,7 +189,6 @@ static bool check_cc_and_reporter(const uint32_t bug_id, const char* login) if (strcmp(cc, login) == 0) { - std::cout << "cc=login" << std::endl; return true; } } @@ -200,7 +210,6 @@ static void add_plus_one_cc(const uint32_t bug_id, const char* login) throw_if_fault_occurred(&env); xmlrpc_DECREF(result); - } static int32_t check_uuid_in_bugzilla(const char* component, const char* UUID) @@ -225,7 +234,7 @@ static int32_t check_uuid_in_bugzilla(const char* component, const char* UUID) if (bugs_member) { - // when array size is equal 0 that means no bug reportet + // when array size is equal 0 that means no bug reported uint32_t array_size = xmlrpc_array_size(&env, bugs_member); throw_if_fault_occurred(&env); if( array_size == 0 ) @@ -243,6 +252,7 @@ static int32_t check_uuid_in_bugzilla(const char* component, const char* UUID) xmlrpc_read_int(&env, bug, &bug_id); log("Bug is already reported: %i", bug_id); update_client(_("Bug is already reported: ") + to_string(bug_id)); + xmlrpc_DECREF(result); xmlrpc_DECREF(bug); xmlrpc_DECREF(item); @@ -256,9 +266,8 @@ static int32_t check_uuid_in_bugzilla(const char* component, const char* UUID) return -1; } -void CReporterBugzilla::CreateNewBugDescription(const map_crash_report_t& pCrashReport, std::string& pDescription) +static void create_new_bug_description(const map_crash_report_t& pCrashReport, std::string& pDescription) { - /* std::string howToReproduce; std::string comment; @@ -310,14 +319,12 @@ void CReporterBugzilla::CreateNewBugDescription(const map_crash_report_t& pCrash //update_client(_("Binary file ")+it->first+_(" will not be reported.")); } } - */ } -void CReporterBugzilla::GetProductAndVersion(const std::string& pRelease, - std::string& pProduct, - std::string& pVersion) +static void get_product_and_version(const std::string& pRelease, + std::string& pProduct, + std::string& pVersion) { - /* if (pRelease.find("Rawhide") != std::string::npos) { pProduct = "Fedora"; @@ -343,59 +350,65 @@ void CReporterBugzilla::GetProductAndVersion(const std::string& pRelease, } pos++; } - */ } -std::string CReporterBugzilla::NewBug(const map_crash_report_t& pCrashReport) +static uint32_t new_bug(const map_crash_report_t& pCrashReport) { - /* - xmlrpc_c::paramList paramList; - map_xmlrpc_params_t bugParams; - map_xmlrpc_params_t ret; + xmlrpc_value* param = NULL; + xmlrpc_value* result = NULL; + xmlrpc_value* id = NULL; + + xmlrpc_int bug_id = -1; + std::string package = pCrashReport.find(FILENAME_PACKAGE)->second[CD_CONTENT]; std::string component = pCrashReport.find(FILENAME_COMPONENT)->second[CD_CONTENT]; + std::string release = pCrashReport.find(FILENAME_RELEASE)->second[CD_CONTENT]; + std::string arch = pCrashReport.find(FILENAME_ARCHITECTURE)->second[CD_CONTENT]; + std::string uuid = pCrashReport.find(CD_UUID)->second[CD_CONTENT]; + std::string description; - std::string release = pCrashReport.find(FILENAME_RELEASE)->second[CD_CONTENT];; std::string product; std::string version; - std::stringstream bugId; - CreateNewBugDescription(pCrashReport, description); - GetProductAndVersion(release, product, version); - - bugParams["product"] = xmlrpc_c::value_string(product); - bugParams["component"] = xmlrpc_c::value_string(component); - bugParams["version"] = xmlrpc_c::value_string(version); - //bugParams["op_sys"] = xmlrpc_c::value_string("Linux"); - bugParams["summary"] = xmlrpc_c::value_string("[abrt] crash detected in " + package); - bugParams["description"] = xmlrpc_c::value_string(description); - bugParams["status_whiteboard"] = xmlrpc_c::value_string("abrt_hash:" + pCrashReport.find(CD_UUID)->second[CD_CONTENT]); - bugParams["platform"] = xmlrpc_c::value_string(pCrashReport.find(FILENAME_ARCHITECTURE)->second[CD_CONTENT]); - paramList.add(xmlrpc_c::value_struct(bugParams)); - - xmlrpc_c::rpcPtr rpc(new xmlrpc_c::rpc("Bug.create", paramList)); - try - { - rpc->call(m_pXmlrpcClient, m_pCarriageParm); - ret = xmlrpc_c::value_struct(rpc->getResult()); - bugId << xmlrpc_c::value_int(ret["id"]); - log("New bug id: %s", bugId.str().c_str()); - update_client(_("New bug id: ") + bugId.str()); - } - catch (std::exception& e) + std::string summary = "[abrt] crash detected in " + package; + std::string status_whiteboard = "abrt_hash:" + uuid; + + create_new_bug_description(pCrashReport, description); + get_product_and_version(release, product, version); + + param = xmlrpc_build_value(&env, "({s:s,s:s,s:s,s:s,s:s,s:s,s:s})", + "product", product.c_str(), + "component", component.c_str(), + "version", version.c_str(), + "summary", summary.c_str(), + "description", description.c_str(), + "status_whiteboard", status_whiteboard.c_str(), + "platform", arch.c_str() + ); + throw_if_fault_occurred(&env); + + xmlrpc_client_call2(&env, client, server_info, "Bug.create", param, &result); + throw_if_fault_occurred(&env); + + xmlrpc_struct_find_value(&env, result, "id", &id); + throw_if_fault_occurred(&env); + + if (id) { - throw CABRTException(EXCEP_PLUGIN, std::string("CReporterBugzilla::NewBug(): ") + e.what()); + xmlrpc_read_int(&env, id, &bug_id); + throw_if_fault_occurred(&env); + log("New bug id: %i", bug_id); + update_client(_("New bug id: ") + to_string(bug_id)); } - return bugId.str(); - */ + + xmlrpc_DECREF(result); + return bug_id; } void CReporterBugzilla::AddAttachments(const std::string& pBugId, const map_crash_report_t& pCrashReport) { - /* - xmlrpc_c::paramList paramList; - map_xmlrpc_params_t attachmentParams; - std::vector ret; - NSSBase64Encoder* base64; + xmlrpc_value* param = NULL; + xmlrpc_value* result = NULL; + NSSBase64Encoder* base64 = NULL; map_crash_report_t::const_iterator it; for (it = pCrashReport.begin(); it != pCrashReport.end(); it++) @@ -414,28 +427,21 @@ void CReporterBugzilla::AddAttachments(const std::string& pBugId, const map_cras it->second[CD_CONTENT].length()); NSSBase64Encoder_Destroy(base64, PR_FALSE); - paramList.add(xmlrpc_c::value_string(pBugId)); - attachmentParams["description"] = xmlrpc_c::value_string("File: " + it->first); - attachmentParams["filename"] = xmlrpc_c::value_string(it->first); - attachmentParams["contenttype"] = xmlrpc_c::value_string("text/plain"); - attachmentParams["data"] = xmlrpc_c::value_string(m_sAttchmentInBase64); - paramList.add(xmlrpc_c::value_struct(attachmentParams)); - xmlrpc_c::rpcPtr rpc(new xmlrpc_c::rpc("bugzilla.addAttachment", paramList)); - try - { - rpc->call(m_pXmlrpcClient, m_pCarriageParm); - ret = xmlrpc_c::value_array(rpc->getResult()).vectorValueValue(); - std::stringstream ss; - ss << xmlrpc_c::value_int(ret[0]); - log("New attachment id: %s", ss.str().c_str()); - } - catch (std::exception& e) - { - throw CABRTException(EXCEP_PLUGIN, std::string("CReporterBugzilla::AddAttachemnt(): ") + e.what()); - } + + std::string description = "File: " + it->first; + param = xmlrpc_build_value(&env,"(s{s:s,s:s,s:s,s:s})", + pBugId.c_str(), + "description", description.c_str(), + "filename", it->first.c_str(), + "contenttype", "text/plain", + "data", m_sAttchmentInBase64.c_str() + ); + throw_if_fault_occurred(&env); + + xmlrpc_client_call2(&env, client, server_info, "bugzilla.addAttachment", param, &result); + throw_if_fault_occurred(&env); } } - */ } std::string CReporterBugzilla::Report(const map_crash_report_t& pCrashReport, const std::string& pArgs) @@ -450,16 +456,17 @@ std::string CReporterBugzilla::Report(const map_crash_report_t& pCrashReport, co update_client(_("Checking for duplicates...")); bug_id = check_uuid_in_bugzilla(component.c_str(), uuid.c_str()); - if (bug_id > 0) + + update_client(_("Logging into bugzilla...")); + if ((m_sLogin == "") && (m_sPassword=="")) { - update_client(_("Logging into bugzilla...")); - if ((m_sLogin == "") && (m_sPassword=="")) - { - VERB3 log("Empty login and password"); - throw CABRTException(EXCEP_PLUGIN, std::string(_("Empty login and password. Please check Bugzilla.conf"))); - } - login(m_sLogin.c_str(), m_sPassword.c_str()); + VERB3 log("Empty login and password"); + throw CABRTException(EXCEP_PLUGIN, std::string(_("Empty login and password. Please check Bugzilla.conf"))); + } + login(m_sLogin.c_str(), m_sPassword.c_str()); + if (bug_id > 0) + { update_client(_("Checking CC...")); if (!check_cc_and_reporter(bug_id, m_sLogin.c_str())) { @@ -468,6 +475,14 @@ std::string CReporterBugzilla::Report(const map_crash_report_t& pCrashReport, co destroy_xmlrpc_client(); return m_sBugzillaURL + "/show_bug.cgi?id="+to_string(bug_id); } + + update_client(_("Creating new bug...")); + bug_id = new_bug(pCrashReport); + AddAttachments(to_string(bug_id), pCrashReport); + + update_client(_("Logging out...")); + logout(); + } catch (CABRTException& e) { @@ -539,9 +554,9 @@ map_plugin_settings_t CReporterBugzilla::GetSettings() PLUGIN_INFO(REPORTER, CReporterBugzilla, "Bugzilla", - "0.0.3", + "0.0.4", "Check if a bug isn't already reported in a bugzilla " "and if not, report it.", - "zprikryl@redhat.com", + "npajkovs@redhat.com", "https://fedorahosted.org/abrt/wiki", PLUGINS_LIB_DIR"/Bugzilla.GTKBuilder"); diff --git a/lib/Plugins/Bugzilla.h b/lib/Plugins/Bugzilla.h index fa56c2c6..1fccbe47 100644 --- a/lib/Plugins/Bugzilla.h +++ b/lib/Plugins/Bugzilla.h @@ -3,31 +3,17 @@ #include "Plugin.h" #include "Reporter.h" -//#include - #include - #include #include -#include -#include class CReporterBugzilla : public CReporter { private: - // C implementation - bool m_bNoSSLVerify; bool m_bLoggedIn; static PRInt32 Base64Encode_cb(void *arg, const char *obuf, PRInt32 size); - void Logout(); - std::string NewBug(const map_crash_report_t& pCrashReport); void AddAttachments(const std::string& pBugId, const map_crash_report_t& pCrashReport); - void CreateNewBugDescription(const map_crash_report_t& pCrashReport, - std::string& pDescription); - void GetProductAndVersion(const std::string& pRelease, - std::string& pProduct, - std::string& pVersion); std::string m_sBugzillaURL; std::string m_sBugzillaXMLRPC; @@ -35,7 +21,6 @@ class CReporterBugzilla : public CReporter std::string m_sPassword; std::string m_sAttchmentInBase64; - public: CReporterBugzilla(); virtual ~CReporterBugzilla(); -- cgit From ffb51df395d5e0427ef00a6cff1f93a63eaa65e5 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 26 Oct 2009 15:42:27 +0100 Subject: add bits of infrastructure needed for xmlprc code. This does not affect existing code in any way. Signed-off-by: Denys Vlasenko --- inc/abrtlib.h | 51 ++++++ lib/Utils/Makefile.am | 3 + lib/Utils/skip_whitespace.cpp | 22 +++ lib/Utils/time.cpp | 65 +++++++ lib/Utils/xconnect.cpp | 416 ++++++++++++++++++++++++++++++++++++++++++ lib/Utils/xfuncs.cpp | 16 ++ 6 files changed, 573 insertions(+) create mode 100644 lib/Utils/skip_whitespace.cpp create mode 100644 lib/Utils/time.cpp create mode 100644 lib/Utils/xconnect.cpp diff --git a/inc/abrtlib.h b/inc/abrtlib.h index 02906f2f..d98be0b6 100644 --- a/inc/abrtlib.h +++ b/inc/abrtlib.h @@ -25,6 +25,7 @@ #include #include #include +#include /* sockaddr_in, sockaddr_in6 etc */ #include #include #include @@ -100,6 +101,9 @@ void* xzalloc(size_t size); char* xstrdup(const char *s); char* xstrndup(const char *s, int n); +char* skip_whitespace(const char *s); +char* skip_non_whitespace(const char *s); + extern ssize_t safe_read(int fd, void *buf, size_t count); // NB: will return short read on error, not -1, // if some data was read before error occurred @@ -131,6 +135,9 @@ void xstat(const char *name, struct stat *stat_buf); int is_regular_file(struct dirent *dent, const char *dirname); void xmove_fd(int from, int to); +int ndelay_on(int fd); +int ndelay_off(int fd); +int close_on_exec_on(int fd); char* xasprintf(const char *format, ...); int xopen(const char *pathname, int flags); @@ -142,6 +149,50 @@ off_t copyfd_eof(int src_fd, int dst_fd); off_t copyfd_size(int src_fd, int dst_fd, off_t size); void copyfd_exact_size(int src_fd, int dst_fd, off_t size); +unsigned long long monotonic_ns(void); +unsigned long long monotonic_us(void); +unsigned monotonic_sec(void); + +/* networking helpers */ +typedef struct len_and_sockaddr { + socklen_t len; + union { + struct sockaddr sa; + struct sockaddr_in sin; + struct sockaddr_in6 sin6; + } u; +} len_and_sockaddr; +enum { + LSA_LEN_SIZE = offsetof(len_and_sockaddr, u), + LSA_SIZEOF_SA = sizeof(struct sockaddr) > sizeof(struct sockaddr_in6) ? + sizeof(struct sockaddr) : sizeof(struct sockaddr_in6), +}; +void setsockopt_reuseaddr(int fd); +int setsockopt_broadcast(int fd); +int setsockopt_bindtodevice(int fd, const char *iface); +len_and_sockaddr* get_sock_lsa(int fd); +void xconnect(int s, const struct sockaddr *s_addr, socklen_t addrlen); +unsigned lookup_port(const char *port, const char *protocol, unsigned default_port); +int get_nport(const struct sockaddr *sa); +void set_nport(len_and_sockaddr *lsa, unsigned port); +len_and_sockaddr* host_and_af2sockaddr(const char *host, int port, sa_family_t af); +len_and_sockaddr* xhost_and_af2sockaddr(const char *host, int port, sa_family_t af); +len_and_sockaddr* host2sockaddr(const char *host, int port); +len_and_sockaddr* xhost2sockaddr(const char *host, int port); +len_and_sockaddr* xdotted2sockaddr(const char *host, int port); +int xsocket_type(len_and_sockaddr **lsap, int family, int sock_type); +int xsocket_stream(len_and_sockaddr **lsap); +int create_and_bind_stream_or_die(const char *bindaddr, int port); +int create_and_bind_dgram_or_die(const char *bindaddr, int port); +int create_and_connect_stream_or_die(const char *peer, int port); +int xconnect_stream(const len_and_sockaddr *lsa); +char* xmalloc_sockaddr2host(const struct sockaddr *sa); +char* xmalloc_sockaddr2host_noport(const struct sockaddr *sa); +char* xmalloc_sockaddr2hostonly_noport(const struct sockaddr *sa); +char* xmalloc_sockaddr2dotted(const struct sockaddr *sa); +char* xmalloc_sockaddr2dotted_noport(const struct sockaddr *sa); + + /* C++ style stuff */ std::string ssprintf(const char *format, ...); diff --git a/lib/Utils/Makefile.am b/lib/Utils/Makefile.am index 713fe868..d24afa72 100644 --- a/lib/Utils/Makefile.am +++ b/lib/Utils/Makefile.am @@ -1,7 +1,10 @@ lib_LTLIBRARIES = libABRTUtils.la libABRTUtils_la_SOURCES = \ + time.cpp \ xfuncs.cpp \ + xconnect.cpp \ + skip_whitespace.cpp \ read_write.cpp \ logging.cpp \ copyfd.cpp \ diff --git a/lib/Utils/skip_whitespace.cpp b/lib/Utils/skip_whitespace.cpp new file mode 100644 index 00000000..816928bf --- /dev/null +++ b/lib/Utils/skip_whitespace.cpp @@ -0,0 +1,22 @@ +/* vi: set sw=4 ts=4: */ +/* + * Copyright (C) 2003 Manuel Novoa III + * + * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. + */ +#include "abrtlib.h" + +char* skip_whitespace(const char *s) +{ + /* NB: isspace('\0') returns 0 */ + while (isspace(*s)) ++s; + + return (char *) s; +} + +char* skip_non_whitespace(const char *s) +{ + while (*s && !isspace(*s)) ++s; + + return (char *) s; +} diff --git a/lib/Utils/time.cpp b/lib/Utils/time.cpp new file mode 100644 index 00000000..37ade2cc --- /dev/null +++ b/lib/Utils/time.cpp @@ -0,0 +1,65 @@ +/* vi: set sw=4 ts=4: */ +/* + * Utility routines. + * + * Licensed under GPL version 2, see file LICENSE in this tarball for details. + */ +#include "abrtlib.h" + +#define ENABLE_MONOTONIC_SYSCALL 1 + +#if ENABLE_MONOTONIC_SYSCALL + +#include +/* Old glibc (< 2.3.4) does not provide this constant. We use syscall + * directly so this definition is safe. */ +#ifndef CLOCK_MONOTONIC +#define CLOCK_MONOTONIC 1 +#endif + +/* libc has incredibly messy way of doing this, + * typically requiring -lrt. We just skip all this mess */ +static void get_mono(struct timespec *ts) +{ + if (syscall(__NR_clock_gettime, CLOCK_MONOTONIC, ts)) + error_msg_and_die("clock_gettime(MONOTONIC) failed"); +} +unsigned long long monotonic_ns(void) +{ + struct timespec ts; + get_mono(&ts); + return ts.tv_sec * 1000000000ULL + ts.tv_nsec; +} +unsigned long long monotonic_us(void) +{ + struct timespec ts; + get_mono(&ts); + return ts.tv_sec * 1000000ULL + ts.tv_nsec/1000; +} +unsigned monotonic_sec(void) +{ + struct timespec ts; + get_mono(&ts); + return ts.tv_sec; +} + +#else + +unsigned long long monotonic_ns(void) +{ + struct timeval tv; + gettimeofday(&tv, NULL); + return tv.tv_sec * 1000000000ULL + tv.tv_usec * 1000; +} +unsigned long long monotonic_us(void) +{ + struct timeval tv; + gettimeofday(&tv, NULL); + return tv.tv_sec * 1000000ULL + tv.tv_usec; +} +unsigned monotonic_sec(void) +{ + return time(NULL); +} + +#endif diff --git a/lib/Utils/xconnect.cpp b/lib/Utils/xconnect.cpp new file mode 100644 index 00000000..746edd63 --- /dev/null +++ b/lib/Utils/xconnect.cpp @@ -0,0 +1,416 @@ +/* vi: set sw=4 ts=4: */ +/* + * Utility routines. + * + * Connect to host at port using address resolution from getaddrinfo + * + * Licensed under GPLv2, see file LICENSE in this tarball for details. + */ + +#include "abrtlib.h" +#include /* netinet/in.h needs it */ +#include +#include +#include +#include + +#define ENABLE_FEATURE_IPV6 1 +#define ENABLE_FEATURE_PREFER_IPV4_ADDRESS 1 + +static const int const_int_1 = 1; + +void setsockopt_reuseaddr(int fd) +{ + setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &const_int_1, sizeof(const_int_1)); +} +int setsockopt_broadcast(int fd) +{ + return setsockopt(fd, SOL_SOCKET, SO_BROADCAST, &const_int_1, sizeof(const_int_1)); +} +int setsockopt_bindtodevice(int fd, const char *iface) +{ + int r; + struct ifreq ifr; + strncpy(ifr.ifr_name, iface, IFNAMSIZ); + /* NB: passing (iface, strlen(iface) + 1) does not work! + * (maybe it works on _some_ kernels, but not on 2.6.26) + * Actually, ifr_name is at offset 0, and in practice + * just giving char[IFNAMSIZ] instead of struct ifreq works too. + * But just in case it's not true on some obscure arch... */ + r = setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, &ifr, sizeof(ifr)); + if (r) + perror_msg("can't bind to interface %s", iface); + return r; +} + +len_and_sockaddr* get_sock_lsa(int fd) +{ + len_and_sockaddr lsa; + len_and_sockaddr *lsa_ptr; + + lsa.len = LSA_SIZEOF_SA; + if (getsockname(fd, &lsa.u.sa, &lsa.len) != 0) + return NULL; + + lsa_ptr = (len_and_sockaddr *)xzalloc(LSA_LEN_SIZE + lsa.len); + if (lsa.len > LSA_SIZEOF_SA) { /* rarely (if ever) happens */ + lsa_ptr->len = lsa.len; + getsockname(fd, &lsa_ptr->u.sa, &lsa_ptr->len); + } else { + memcpy(lsa_ptr, &lsa, LSA_LEN_SIZE + lsa.len); + } + return lsa_ptr; +} + +void xconnect(int s, const struct sockaddr *s_addr, socklen_t addrlen) +{ + if (connect(s, s_addr, addrlen) < 0) { + close(s); + if (s_addr->sa_family == AF_INET) + perror_msg_and_die("%s (%s)", + "cannot connect to remote host", + inet_ntoa(((struct sockaddr_in *)s_addr)->sin_addr)); + perror_msg_and_die("cannot connect to remote host"); + } +} + +/* Return port number for a service. + * If "port" is a number use it as the port. + * If "port" is a name it is looked up in /etc/services, + * if it isnt found return default_port + */ +unsigned lookup_port(const char *port, const char *protocol, unsigned default_port) +{ + unsigned port_nr = default_port; + if (port) { + int old_errno; + char *end; + + /* Since this is a lib function, we're not allowed to reset errno to 0. + * Doing so could break an app that is deferring checking of errno. */ + old_errno = errno; + errno = 0; + port_nr = strtoul(port, &end, 10); + if (errno || *end || port_nr > 65535) { + struct servent *tserv = getservbyname(port, protocol); + port_nr = default_port; + if (tserv) + port_nr = ntohs(tserv->s_port); + } + errno = old_errno; + } + return (uint16_t)port_nr; +} + +int get_nport(const struct sockaddr *sa) +{ +#if ENABLE_FEATURE_IPV6 + if (sa->sa_family == AF_INET6) { + return ((struct sockaddr_in6*)sa)->sin6_port; + } +#endif + if (sa->sa_family == AF_INET) { + return ((struct sockaddr_in*)sa)->sin_port; + } + /* What? UNIX socket? IPX?? :) */ + return -1; +} + +void set_nport(len_and_sockaddr *lsa, unsigned port) +{ +#if ENABLE_FEATURE_IPV6 + if (lsa->u.sa.sa_family == AF_INET6) { + lsa->u.sin6.sin6_port = port; + return; + } +#endif + if (lsa->u.sa.sa_family == AF_INET) { + lsa->u.sin.sin_port = port; + return; + } + /* What? UNIX socket? IPX?? :) */ +} + +/* We hijack this constant to mean something else */ +/* It doesn't hurt because we will remove this bit anyway */ +#define DIE_ON_ERROR AI_CANONNAME + +/* host: "1.2.3.4[:port]", "www.google.com[:port]" + * port: if neither of above specifies port # */ +static len_and_sockaddr* str2sockaddr( + const char *host, int port, + sa_family_t af, + int ai_flags) +{ + int rc; + len_and_sockaddr *r; + struct addrinfo *result = NULL; + struct addrinfo *used_res; + const char *org_host = host; /* only for error msg */ + const char *cp; + struct addrinfo hint; + + r = NULL; + + /* Ugly parsing of host:addr */ + if (ENABLE_FEATURE_IPV6 && host[0] == '[') { + /* Even uglier parsing of [xx]:nn */ + host++; + cp = strchr(host, ']'); + if (!cp || (cp[1] != ':' && cp[1] != '\0')) { + /* Malformed: must be [xx]:nn or [xx] */ + error_msg("bad address '%s'", org_host); + if (ai_flags & DIE_ON_ERROR) + xfunc_die(); + return NULL; + } + } else { + cp = strrchr(host, ':'); + if (ENABLE_FEATURE_IPV6 && cp && strchr(host, ':') != cp) { + /* There is more than one ':' (e.g. "::1") */ + cp = NULL; /* it's not a port spec */ + } + } + if (cp) { /* points to ":" or "]:" */ + int sz = cp - host + 1; + char *hbuf = (char*)alloca(sz); + hbuf[--sz] = '\0'; + host = strncpy(hbuf, host, sz); + if (ENABLE_FEATURE_IPV6 && *cp != ':') { + cp++; /* skip ']' */ + if (*cp == '\0') /* [xx] without port */ + goto skip; + } + cp++; /* skip ':' */ + char *end; + errno = 0; + port = strtoul(cp, &end, 10); + if (errno || *end || (unsigned)port > 0xffff) { + error_msg("bad port spec '%s'", org_host); + if (ai_flags & DIE_ON_ERROR) + xfunc_die(); + return NULL; + } + skip: ; + } + + memset(&hint, 0 , sizeof(hint)); +#if !ENABLE_FEATURE_IPV6 + hint.ai_family = AF_INET; /* do not try to find IPv6 */ +#else + hint.ai_family = af; +#endif + /* Needed. Or else we will get each address thrice (or more) + * for each possible socket type (tcp,udp,raw...): */ + hint.ai_socktype = SOCK_STREAM; + hint.ai_flags = ai_flags & ~DIE_ON_ERROR; + rc = getaddrinfo(host, NULL, &hint, &result); + if (rc || !result) { + error_msg("bad address '%s'", org_host); + if (ai_flags & DIE_ON_ERROR) + xfunc_die(); + goto ret; + } + used_res = result; +#if ENABLE_FEATURE_PREFER_IPV4_ADDRESS + while (1) { + if (used_res->ai_family == AF_INET) + break; + used_res = used_res->ai_next; + if (!used_res) { + used_res = result; + break; + } + } +#endif + r = (len_and_sockaddr *)xmalloc(offsetof(len_and_sockaddr, u.sa) + used_res->ai_addrlen); + r->len = used_res->ai_addrlen; + memcpy(&r->u.sa, used_res->ai_addr, used_res->ai_addrlen); + set_nport(r, htons(port)); + ret: + freeaddrinfo(result); + return r; +} +#if !ENABLE_FEATURE_IPV6 +#define str2sockaddr(host, port, af, ai_flags) str2sockaddr(host, port, ai_flags) +#endif + +#if ENABLE_FEATURE_IPV6 +len_and_sockaddr* host_and_af2sockaddr(const char *host, int port, sa_family_t af) +{ + return str2sockaddr(host, port, af, 0); +} + +len_and_sockaddr* xhost_and_af2sockaddr(const char *host, int port, sa_family_t af) +{ + return str2sockaddr(host, port, af, DIE_ON_ERROR); +} +#endif + +len_and_sockaddr* host2sockaddr(const char *host, int port) +{ + return str2sockaddr(host, port, AF_UNSPEC, 0); +} + +len_and_sockaddr* xhost2sockaddr(const char *host, int port) +{ + return str2sockaddr(host, port, AF_UNSPEC, DIE_ON_ERROR); +} + +len_and_sockaddr* xdotted2sockaddr(const char *host, int port) +{ + return str2sockaddr(host, port, AF_UNSPEC, AI_NUMERICHOST | DIE_ON_ERROR); +} + +#undef xsocket_type +int xsocket_type(len_and_sockaddr **lsap, int family, int sock_type) +{ + len_and_sockaddr *lsa; + int fd; + int len; + +#if ENABLE_FEATURE_IPV6 + if (family == AF_UNSPEC) { + fd = socket(AF_INET6, sock_type, 0); + if (fd >= 0) { + family = AF_INET6; + goto done; + } + family = AF_INET; + } +#endif + fd = xsocket(family, sock_type, 0); + len = sizeof(struct sockaddr_in); +#if ENABLE_FEATURE_IPV6 + if (family == AF_INET6) { + done: + len = sizeof(struct sockaddr_in6); + } +#endif + lsa = (len_and_sockaddr *)xzalloc(offsetof(len_and_sockaddr, u.sa) + len); + lsa->len = len; + lsa->u.sa.sa_family = family; + *lsap = lsa; + return fd; +} + +int xsocket_stream(len_and_sockaddr **lsap) +{ + return xsocket_type(lsap, AF_UNSPEC, SOCK_STREAM); +} + +static int create_and_bind_or_die(const char *bindaddr, int port, int sock_type) +{ + int fd; + len_and_sockaddr *lsa; + + if (bindaddr && bindaddr[0]) { + lsa = xdotted2sockaddr(bindaddr, port); + /* user specified bind addr dictates family */ + fd = xsocket(lsa->u.sa.sa_family, sock_type, 0); + } else { + fd = xsocket_type(&lsa, AF_UNSPEC, sock_type); + set_nport(lsa, htons(port)); + } + setsockopt_reuseaddr(fd); + xbind(fd, &lsa->u.sa, lsa->len); + free(lsa); + return fd; +} + +int create_and_bind_stream_or_die(const char *bindaddr, int port) +{ + return create_and_bind_or_die(bindaddr, port, SOCK_STREAM); +} + +int create_and_bind_dgram_or_die(const char *bindaddr, int port) +{ + return create_and_bind_or_die(bindaddr, port, SOCK_DGRAM); +} + + +int create_and_connect_stream_or_die(const char *peer, int port) +{ + int fd; + len_and_sockaddr *lsa; + + lsa = xhost2sockaddr(peer, port); + fd = xsocket(lsa->u.sa.sa_family, SOCK_STREAM, 0); + setsockopt_reuseaddr(fd); + xconnect(fd, &lsa->u.sa, lsa->len); + free(lsa); + return fd; +} + +int xconnect_stream(const len_and_sockaddr *lsa) +{ + int fd = xsocket(lsa->u.sa.sa_family, SOCK_STREAM, 0); + xconnect(fd, &lsa->u.sa, lsa->len); + return fd; +} + +/* We hijack this constant to mean something else */ +/* It doesn't hurt because we will add this bit anyway */ +#define IGNORE_PORT NI_NUMERICSERV +static char* sockaddr2str(const struct sockaddr *sa, int flags) +{ + char host[128]; + char serv[16]; + int rc; + socklen_t salen; + + salen = LSA_SIZEOF_SA; +#if ENABLE_FEATURE_IPV6 + if (sa->sa_family == AF_INET) + salen = sizeof(struct sockaddr_in); + if (sa->sa_family == AF_INET6) + salen = sizeof(struct sockaddr_in6); +#endif + rc = getnameinfo(sa, salen, + host, sizeof(host), + /* can do ((flags & IGNORE_PORT) ? NULL : serv) but why bother? */ + serv, sizeof(serv), + /* do not resolve port# into service _name_ */ + flags | NI_NUMERICSERV + ); + if (rc) + return NULL; + if (flags & IGNORE_PORT) + return xstrdup(host); +#if ENABLE_FEATURE_IPV6 + if (sa->sa_family == AF_INET6) { + if (strchr(host, ':')) /* heh, it's not a resolved hostname */ + return xasprintf("[%s]:%s", host, serv); + /*return xasprintf("%s:%s", host, serv);*/ + /* - fall through instead */ + } +#endif + /* For now we don't support anything else, so it has to be INET */ + /*if (sa->sa_family == AF_INET)*/ + return xasprintf("%s:%s", host, serv); + /*return xstrdup(host);*/ +} + +char* xmalloc_sockaddr2host(const struct sockaddr *sa) +{ + return sockaddr2str(sa, 0); +} + +char* xmalloc_sockaddr2host_noport(const struct sockaddr *sa) +{ + return sockaddr2str(sa, IGNORE_PORT); +} + +char* xmalloc_sockaddr2hostonly_noport(const struct sockaddr *sa) +{ + return sockaddr2str(sa, NI_NAMEREQD | IGNORE_PORT); +} +char* xmalloc_sockaddr2dotted(const struct sockaddr *sa) +{ + return sockaddr2str(sa, NI_NUMERICHOST); +} + +char* xmalloc_sockaddr2dotted_noport(const struct sockaddr *sa) +{ + return sockaddr2str(sa, NI_NUMERICHOST | IGNORE_PORT); +} diff --git a/lib/Utils/xfuncs.cpp b/lib/Utils/xfuncs.cpp index d256c195..9c8b0f12 100644 --- a/lib/Utils/xfuncs.cpp +++ b/lib/Utils/xfuncs.cpp @@ -5,6 +5,22 @@ */ #include "abrtlib.h" +/* Turn on nonblocking I/O on a fd */ +int ndelay_on(int fd) +{ + return fcntl(fd, F_SETFL, fcntl(fd,F_GETFL) | O_NONBLOCK); +} + +int ndelay_off(int fd) +{ + return fcntl(fd, F_SETFL, fcntl(fd,F_GETFL) & ~O_NONBLOCK); +} + +int close_on_exec_on(int fd) +{ + return fcntl(fd, F_SETFD, FD_CLOEXEC); +} + // Die if we can't allocate size bytes of memory. void* xmalloc(size_t size) { -- cgit From b1756b440359c381ebafd62709ddcfa78ea74805 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 26 Oct 2009 16:06:57 +0100 Subject: small corrections to nicola's new xmlrpc code Signed-off-by: Denys Vlasenko --- lib/Plugins/Bugzilla.cpp | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/lib/Plugins/Bugzilla.cpp b/lib/Plugins/Bugzilla.cpp index 55ce62e5..d6f6c0c7 100644 --- a/lib/Plugins/Bugzilla.cpp +++ b/lib/Plugins/Bugzilla.cpp @@ -41,17 +41,13 @@ static void get_product_and_version(const std::string& pRelease, std::string& pVersion); -#define throw_if_fault_occurred(env) \ -do \ -{ \ - xmlrpc_env* e = (env); \ - if (e->fault_occurred) \ - { \ - char buffer[2048]; \ - snprintf(buffer, 2047, "XML-RPC Fault: %s(%d)", e->fault_string, e->fault_code); \ - throw CABRTException(EXCEP_PLUGIN, std::string(buffer)); \ - } \ -}while(0) +static void throw_if_fault_occurred(xmlrpc_env* e) +{ + if (e->fault_occurred) + { + throw CABRTException(EXCEP_PLUGIN, ssprintf("XML-RPC Fault: %s(%d)", e->fault_string, e->fault_code));; + } +} static void new_xmlrpc_client(const char* url, bool no_ssl_verify) { @@ -88,10 +84,10 @@ static void destroy_xmlrpc_client() } CReporterBugzilla::CReporterBugzilla() : - m_sBugzillaURL("https://bugzilla.redhat.com"), - m_sBugzillaXMLRPC("https://bugzilla.redhat.com" + std::string(XML_RPC_SUFFIX)), m_bNoSSLVerify(false), - m_bLoggedIn(false) + m_bLoggedIn(false), + m_sBugzillaURL("https://bugzilla.redhat.com"), + m_sBugzillaXMLRPC("https://bugzilla.redhat.com" + std::string(XML_RPC_SUFFIX)) {} CReporterBugzilla::~CReporterBugzilla() -- cgit