Makefile.gbuild | 3 +++ Makefile.in | 5 +++++ bin/upload_symbols.py | 37 +++++++++++++++++++++++++++++++------ config_host.mk.in | 1 + configure.ac | 17 +++++++++++++++++ 5 files changed, 57 insertions(+), 6 deletions(-)
New commits: commit 0cd5d93c1e313d8d71f3338451c683c7aeef8f10 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Tue May 24 04:27:46 2016 +0200 make debuggin failures a bit easier Change-Id: I0b17ab513e05ee95c378399348557cfee8341fb0 diff --git a/bin/upload_symbols.py b/bin/upload_symbols.py index f9aa40c..fd4246e 100755 --- a/bin/upload_symbols.py +++ b/bin/upload_symbols.py @@ -14,6 +14,7 @@ def detect_platform(): def main(): if len(sys.argv) != 4: + print(sys.argv) print("Invalid number of parameters") sys.exit(1) commit 1e4e503a5399990064d9d91c392a7bec7502b01d Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Tue May 24 04:27:18 2016 +0200 add build system part for upload crashreport symbols Change-Id: Ib8dc0267034716740ba6d7f60cf635adc4bd1561 diff --git a/Makefile.gbuild b/Makefile.gbuild index 8c41a28..bcfa569 100644 --- a/Makefile.gbuild +++ b/Makefile.gbuild @@ -20,4 +20,7 @@ include $(SRCDIR)/solenv/gbuild/gbuild.mk $(eval $(call gb_Module_make_global_targets,$(SRCDIR)/RepositoryModule_$(gb_Side).mk)) +upload-symbols: + bin/upload_symbols.py $(WORKDIR)/symbols.zip $(BREAKPAD_SYMBOL_CONFIG) "$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)$(LIBO_VERSION_SUFFIX)$(LIBO_VERSION_SUFFIX_SUFFIX)" + # vim: set noet sw=4 ts=4: diff --git a/Makefile.in b/Makefile.in index 155c200b..5da8e93 100644 --- a/Makefile.in +++ b/Makefile.in @@ -386,6 +386,9 @@ symbols: $(SRCDIR)/bin/symbolstore.py $(WORKDIR)/UnpackedTarball/breakpad/src/tools/linux/dump_syms/dump_syms $(WORKDIR)/symbols/ $(INSTDIR)/program/* cd $(WORKDIR)/symbols/ && zip -r $(WORKDIR)/symbols.zip * +upload-symbols: + $(MAKE) -f $(SRCDIR)/Makefile.gbuild upload-symbols + dump-deps: @$(SRCDIR)/bin/module-deps.pl $(MAKE) $(SRCDIR)/Makefile.gbuild diff --git a/config_host.mk.in b/config_host.mk.in index 60b87bd..ddd144e 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -42,6 +42,7 @@ export BOOST_IOSTREAMS_LIB=@BOOST_IOSTREAMS_LIB@ export BOOST_LDFLAGS=@BOOST_LDFLAGS@ export BOOST_SYSTEM_LIB=@BOOST_SYSTEM_LIB@ export BRAND_INTRO_IMAGES=@BRAND_INTRO_IMAGES@ +export BREAKPAD_SYMBOL_CONFIG=@BREAKPAD_SYMBOL_CONFIG@ export BSH_JAR=@BSH_JAR@ export BUILD_PLATFORM=@build@ export BUILD_POSTGRESQL_SDBC=@BUILD_POSTGRESQL_SDBC@ diff --git a/configure.ac b/configure.ac index 6dea282..091abb4 100644 --- a/configure.ac +++ b/configure.ac @@ -2023,6 +2023,12 @@ AC_ARG_WITH(ant-home, of the entire distribution.]), ,) +AC_ARG_WITH(symbol-config, + AS_HELP_STRING([--with-symbol-config], + [Configuration for the crashreport symbol upload]), + [], + [$with_symbol_config=no]) + AC_ARG_WITH(export-validation, AS_HELP_STRING([--with-export-validation], [If you want the exported files to be validated. Right now limited to OOXML and ODF files. @@ -9135,6 +9141,17 @@ else AC_DEFINE(ENABLE_BREAKPAD) AC_DEFINE(HAVE_FEATURE_BREAKPAD, 1) BUILD_TYPE="$BUILD_TYPE BREAKPAD" + + AC_MSG_CHECKING([for crashreport config]) + if test "$with_symbol_config" = "no"; then + BREAKPAD_SYMBOL_CONFIG="invalid" + AC_MSG_RESULT([no]) + else + BREAKPAD_SYMBOL_CONFIG="$with_symbol_config" + AC_DEFINE(BREAKPAD_SYMBOL_CONFIG) + AC_MSG_RESULT([yes]) + fi + AC_SUBST(BREAKPAD_SYMBOL_CONFIG) fi AC_SUBST(ENABLE_BREAKPAD) commit d586e3bf04d486aa28709ff98926e2817629d59f Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Tue May 24 03:29:48 2016 +0200 fix the crashreport symbol upload script Change-Id: Id99ac569f6c9f839002798b6f5794b05ed228988 diff --git a/bin/upload_symbols.py b/bin/upload_symbols.py old mode 100644 new mode 100755 index 483ac3b..f9aa40c --- a/bin/upload_symbols.py +++ b/bin/upload_symbols.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ # # This Source Code Form is subject to the terms of the Mozilla Public @@ -6,17 +7,40 @@ # import requests, sys +import platform, configparser + +def detect_platform(): + return platform.system() def main(): - if len(sys.argv) != 3: + if len(sys.argv) != 4: print("Invalid number of parameters") sys.exit(1) - url = "http://vm171.documentfoundation.org/upload/" - files = {'symbols': open(sys.argv[1], 'rb'), 'comment': sys.argv[2]} - comment = {'comment': sys.argv[2]} - r = requests.post(url, files = files, data = {"comment":"whatever", "tempt":"tempt"}) - print(r) + upload_url = "http://vm171.documentfoundation.org/upload/" + login_url = "http://vm171.documentfoundation.org/accounts/login/" + + config = configparser.ConfigParser() + config.read(sys.argv[2]) + + user = config["CrashReport"]["User"] + password = config["CrashReport"]["Password"] + + platform = detect_platform() + files = {'symbols': open(sys.argv[1], 'rb')} + data = {'version': sys.argv[3], 'platform': platform} + + session = requests.session() + session.get(login_url) + csrftoken = session.cookies['csrftoken'] + + login_data = { 'username': user,'password': password, + 'csrfmiddlewaretoken': csrftoken } + r1 = session.post(login_url,data=login_data) + + data['csrfmiddlewaretoken'] = csrftoken + + r = session.post(upload_url, files = files, data = data) if __name__ == "__main__": main() commit b862ad8436f8f2ff06c40d36be5434bdf17eb204 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Tue May 24 00:33:32 2016 +0200 also create the symbols.zip file Change-Id: I4c96dbecd90de83fe9ac76a93ec0520ffb6932d6 diff --git a/Makefile.in b/Makefile.in index 09ebc3e..155c200b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -384,6 +384,7 @@ symbols: rm -fr $(WORKDIR)/symbols/ mkdir -p $(WORKDIR)/symbols/ $(SRCDIR)/bin/symbolstore.py $(WORKDIR)/UnpackedTarball/breakpad/src/tools/linux/dump_syms/dump_syms $(WORKDIR)/symbols/ $(INSTDIR)/program/* + cd $(WORKDIR)/symbols/ && zip -r $(WORKDIR)/symbols.zip * dump-deps: @$(SRCDIR)/bin/module-deps.pl $(MAKE) $(SRCDIR)/Makefile.gbuild commit be1dcb5982b587f83e0cef719caf2db64906c9a6 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Tue May 24 00:33:10 2016 +0200 remove old symbols directory Change-Id: Id6bd2dfd05f1c13d928dbf26414b01086740df74 diff --git a/Makefile.in b/Makefile.in index 26f9e0e..09ebc3e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -381,6 +381,7 @@ findunusedheaders: $(SRCDIR)/bin/find-unusedheaders.pl symbols: + rm -fr $(WORKDIR)/symbols/ mkdir -p $(WORKDIR)/symbols/ $(SRCDIR)/bin/symbolstore.py $(WORKDIR)/UnpackedTarball/breakpad/src/tools/linux/dump_syms/dump_syms $(WORKDIR)/symbols/ $(INSTDIR)/program/* _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits