Hello community, here is the log from the commit of package crash for openSUSE:Factory checked in at 2013-02-04 21:07:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/crash (Old) and /work/SRC/openSUSE:Factory/.crash.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "crash", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/crash/crash.changes 2013-01-29 12:05:40.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.crash.new/crash.changes 2013-02-04 21:07:54.000000000 +0100 @@ -1,0 +2,6 @@ +Mon Feb 4 18:47:06 UTC 2013 - [email protected] + +- crash-compressed-booted-kernel.patch: Fix for "crash when invoked + without arguments fails to analyze the live system" (bnc#777516). + +------------------------------------------------------------------- New: ---- crash-compressed-booted-kernel.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ crash.spec ++++++ --- /var/tmp/diff_new_pack.BAjVB5/_old 2013-02-04 21:07:56.000000000 +0100 +++ /var/tmp/diff_new_pack.BAjVB5/_new 2013-02-04 21:07:56.000000000 +0100 @@ -60,6 +60,7 @@ Patch10: %{name}_enable_lzo_support.patch Patch11: %{name}-siginfo.patch Patch12: %{name}-var_length_log_rec.patch +Patch13: %{name}-compressed-booted-kernel.patch Patch90: %{name}-sial-ps-2.6.29.diff BuildRequires: bison BuildRequires: flex @@ -219,6 +220,7 @@ %patch10 -p1 %patch11 -p1 %patch12 -p1 +%patch13 -p1 ## SIAL patches cd sial-scripts-%{scripts_version} %patch90 -p1 ++++++ crash-compressed-booted-kernel.patch ++++++ --- filesys.c | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) --- a/filesys.c +++ b/filesys.c @@ -530,6 +530,8 @@ static int find_booted_kernel(void) { char kernel[BUFSIZE]; + char *kernel_unpacked; + char *real_kernel; char buffer[BUFSIZE]; char **searchdirs; int i, preferred, wrapped; @@ -579,16 +581,25 @@ find_booted_kernel(void) sprintf(kernel, "%s%s", searchdirs[i], dp->d_name); if (mount_point(kernel) || - !file_readable(kernel) || - !is_elf_file(kernel)) + !file_readable(kernel)) continue; + if (is_compressed_kernel(kernel, &kernel_unpacked)) + real_kernel = kernel_unpacked; + else { + kernel_unpacked = NULL; + real_kernel = kernel; + } + if (CRASHDEBUG(1)) fprintf(fp, "find_booted_kernel: check: %s\n", kernel); - found = match_file_string(kernel, kt->proc_version, buffer); - + if (!is_elf_file(real_kernel)) + continue; + + found = match_file_string(real_kernel, kt->proc_version, buffer); + if (found) break; } @@ -599,17 +610,25 @@ find_booted_kernel(void) build_searchdirs(DESTROY, NULL); if (found) { - if ((pc->namelist = (char *)malloc - (strlen(kernel)+1)) == NULL) + if ((pc->namelist_orig = strdup(kernel)) == NULL) + error(FATAL, "booted kernel real name malloc: %s\n", + strerror(errno)); + else if ((pc->namelist = strdup(real_kernel)) == NULL) error(FATAL, "booted kernel name malloc: %s\n", strerror(errno)); - else { - strcpy(pc->namelist, kernel); + else if (CRASHDEBUG(1)) fprintf(fp, "find_booted_kernel: found: %s\n", pc->namelist); + if (kernel_unpacked) + free(kernel_unpacked); return TRUE; - } + } + + if (kernel_unpacked) { + remove(kernel_unpacked); + if (kernel_unpacked) + free(kernel_unpacked); } error(INFO, -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
