Resolve KASM-2301 "Feature/ upload debug packages"

This commit is contained in:
Dmitry Maksyoma
2022-02-11 14:57:25 +00:00
committed by Matthew McClaskey
parent 974a06bb8c
commit 49890cf8da
8 changed files with 129 additions and 15 deletions

39
unix/kasm-upload-crash-dump.sh Executable file
View File

@@ -0,0 +1,39 @@
#!/bin/sh
URL=https://to-be-filled.com/path
die() {
echo "$@"
exit
}
[ "$#" -ne 1 ] && die "Usage: $0 logfile"
grep -q Backtrace: $1 || die "No crash in log file"
CURL=`which curl`
WGET=`which wget`
[ -n "$CURL" -o -n "$WGET" ] || die "Curl or wget required"
BIN=`grep vnc $1 | tail -n1 | cut -d: -f2 | cut -d\( -f1`
[ -f $BIN ] || die "Can't locate binary"
#
# prep done, filter the log file
#
TMP=`mktemp`
LANG=C date >> $TMP
md5sum $BIN >> $TMP
$BIN -version 2>&1 | grep built >> $TMP
grep -A200 Backtrace: $1 >> $TMP
if [ -n "$CURL" ]; then
echo curl --data-binary @"$TMP" "$URL"
else
echo wget --post-file "$TMP" "$URL"
fi
rm $TMP

View File

@@ -41,6 +41,7 @@ nodist_EXTRA_Xvnc_SOURCES = dummy.cxx
Xvnc_CPPFLAGS = $(XVNC_CPPFLAGS) -DKASMVNC -DNO_MODULE_EXTS \
-UHAVE_CONFIG_H \
-DXVNCEXTRAVERSION="\".$(KASMVNC_COMMIT_ID)\"" \
-DXFree86Server -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \
-DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(KASMVNC_SRCDIR)/common -I$(KASMVNC_SRCDIR)/unix/common \
-I$(top_srcdir)/include ${XSERVERLIBS_CFLAGS} -I$(includedir)

View File

@@ -159,7 +159,9 @@ static int vncVerbose = DEFAULT_LOG_VERBOSITY;
static void
vncPrintBanner(void)
{
ErrorF("\nXvnc %s - built %s\n%s", XVNCVERSION, buildtime, XVNCCOPYRIGHT);
ErrorF("\nXvnc %s%s - built %s\n%s", XVNCVERSION,
sizeof(XVNCEXTRAVERSION) > 2 ? XVNCEXTRAVERSION : "",
buildtime, XVNCCOPYRIGHT);
ErrorF("Underlying X server release %d, %s\n\n", VENDOR_RELEASE,
VENDOR_STRING);
}