Panu Matilainen [Thu, 10 Aug 2017 08:17:36 +0000 (11:17 +0300)]
Revert "Warn and create empty debugsource package if there are no sources."
This reverts commit
11b9f5b312f248841ae6ebf6602496cfe2ffb5fe.
Mark Wielaard [Fri, 28 Jul 2017 13:29:52 +0000 (15:29 +0200)]
Warn and create empty debugsource package if there are no sources.
Signed-off-by: Mark Wielaard <mark@klomp.org>
Igor Gnatenko [Fri, 28 Jul 2017 05:42:38 +0000 (07:42 +0200)]
find-debuginfo.sh: make sure that debugsourcefiles.list is generated under the builddir
The %_debugsource_template expects the debugsourcefiles.list file
to be in the (current) build dir. Make sure that is always the case
even if find-debuginfo.sh was invoked in a different (sub) directory
by prepending $BUILDDIR to the output file as written in description
"All file names in switches are relative to builddir (. if not given).".
Closes: https://github.com/rpm-software-management/rpm/issues/279
Based-on-patch-by: Mark Wielaard <mark@klomp.org>
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Mark Wielaard [Wed, 19 Jul 2017 12:53:53 +0000 (14:53 +0200)]
find-debuginfo.sh: Remove non-allocated NOBITS sections from minisymtab.
In the minisymtab section (the .gnu_debugdata embedded ELF image) we
do not need unallocated sections (except for the SYMTAB and STRTAB
sections we are creating). We already remove PROGBITS and NOTES. Also
remove NOBITS sections. They should not really take up much (any) space
but they still add to the section tables. These sections might be created
with the new --keep-section support (which puts the actual section in
the main ELF binary, and a NOBITS variant in the .debug file).
Also binutils objcopy seems to sometimes add them anyway filled with
zeros instead of marking them NOBITS.
Signed-off-by: Mark Wielaard <mark@klomp.org>
Mark Wielaard [Mon, 17 Jul 2017 10:58:26 +0000 (12:58 +0200)]
find-debuginfo.sh: Add --keep-section and --remove-section for eu-strip.
Use --keep-section SECTION or --remove-section SECTION to explicitly
keep a (non-allocated) section in the main executable or explicitly
remove it into the .debug file. SECTION is an extended wildcard pattern.
Both options can be given more than once.
https://bugzilla.redhat.com/show_bug.cgi?id=
1465997
Signed-off-by: Mark Wielaard <mark@klomp.org>
Mark Wielaard [Wed, 28 Jun 2017 12:21:32 +0000 (14:21 +0200)]
find-debuginfo.sh: Use 'return', not 'continue', to break out do_file().
commit 038bfe "Split directory traversal and debuginfo extraction"
put the core of a while loop into its own function 'do_file()'.
That means that instead of using 'continue' to break out early it now
needs to use 'return'. Otherwise the script will give errors like:
continue: only meaningful in a `for', `while', or `until' loop
https://bugzilla.redhat.com/show_bug.cgi?id=
1465170
Signed-off-by: Mark Wielaard <mark@klomp.org>
Mark Wielaard [Wed, 28 Jun 2017 11:34:55 +0000 (13:34 +0200)]
find-debuginfo.sh: Filter out all <built-in> like fake file names.
There is no official way to mark an instruction range as being not
part of some actual source code, but as part of a compiler built-in
construct in DWARF. So different compilers have come up with fake
source file names like <built-in> or <__thread_local_inner macros>.
We already filtered out the strings "<internal>" and "<built-in>".
Just filter out all '(^|/)<[a-z _-]+>$'. They are fake files!
This is mainly to appease the rustc compiler which generates lots of
different variants to encode some instruction sequence is part of an
compiler generated macro expansion.
Signed-off-by: Mark Wielaard <mark@klomp.org>
Mark Wielaard [Wed, 28 Jun 2017 18:25:39 +0000 (20:25 +0200)]
debugedit: skip_dir_prefix should check for dir separator.
To count as a real directory prefix the string matched should either
be equal to the given prefix or start with the prefix plus '/'.
skip_dir_prefix is always used with base_dir or dest_dir which don't
end with a slash themselves.
This really only is an issue if a package would put a directory named
similar to the package source dir (which cargo on fedora does, by adding
a directory named cargo-vendor in the builddir itself).
Signed-off-by: Mark Wielaard <mark@klomp.org>
Mark Wielaard [Mon, 26 Jun 2017 15:38:30 +0000 (17:38 +0200)]
find-debuginfo.sh: Don't create dwz multi file if there is only one .debug.
dwz -m multi only works when there are multiple .debug input files.
With just one .debug file it doesn't really make sense to extract
the shared debug info into a separate file and dwz will complain:
dwz: Too few files for multifile optimization.
So only add -m multi if there is more than one .debug file.
Signed-off-by: Mark Wielaard <mark@klomp.org>
Mark Wielaard [Mon, 26 Jun 2017 11:35:48 +0000 (13:35 +0200)]
Update find-debuginfo.sh options and macros documentation.
This adds some missing documentation for rpm macros and find-debuginfo.sh
options that were recently added (or renamed). -j N, --build-id-seed SEED,
--unique-debug-suffix SUFFIX and --unique-debug-src-base BASE.
Signed-off-by: Mark Wielaard <mark@klomp.org>
Ville Skyttä [Sun, 25 Jun 2017 07:18:06 +0000 (10:18 +0300)]
Spelling fixes
Michael Schroeder [Tue, 28 Mar 2017 12:21:40 +0000 (14:21 +0200)]
Support debugsource subpackages
This can be enabled by setting the _debugsource_packages macro.
Michael Schroeder [Tue, 28 Mar 2017 12:20:50 +0000 (14:20 +0200)]
Untangle unique build options in find-debuginfo.sh
Rename --ver-rel option to --build-id-seed, so that it reflects what
it does, not how it is used.
Remove implcit usage of the old --ver-rel option for --unique-debug-arch
and --unique-debug-src-base, instead already call find-debuginfo.sh with
the version included.
Rename --unique-debug-arch to --unique-debug-suffix because it now
also contains the package version.
Mark Wielaard [Fri, 21 Apr 2017 15:33:26 +0000 (17:33 +0200)]
debugedit: Only output comp_dir under build dir (once).
The fix for rhbz#444310 (commit c1a5eb - Include empty CU current dirs)
was a little greedy. It would also include comp_dirs outside the build
root. Those are unnecessary and we don't have a good way to store them.
Such dirs (e.g. /tmp) would then show up at the root of /usr/src/debug.
Fix this by including only comp_dirs under base_dir. Also only output
all dirs once (during phase zero) and don't output empty dirs (which
was harmless but would produce a warning from cpio).
This still includes all empty dirs from the original rhbz#444310
nodir testcase and it is an alternative fix for rhbz#641022
(commit c707ab).
Both fixes are necessary in case of an unexpected mode for a directory
actually in the build root that we want to include in the source list.
Signed-off-by: Mark Wielaard <mark@klomp.org>
Mark Wielaard [Sun, 16 Apr 2017 16:16:02 +0000 (18:16 +0200)]
find-debuginfo.sh: Only add minisymtab for executables or shared libraries.
It only makes sense to add a minisymtab for executables and shared
libraries. Other executable ELF files (like kernel modules) don't need it.
Since those don't have a dynsym section trying to add it will fail and
produce confusing errors from nm.
Signed-off-by: Mark Wielaard <mark@klomp.org>
Mark Wielaard [Sun, 16 Apr 2017 16:16:46 +0000 (18:16 +0200)]
debugedit: Add -n, --no-recompute-build-id.
Some packages depend on the build-ids as generated during the build
and cannot handle rpmbuild recomputing them before generating the
package file list. Add -n, --no-recompute-build-id to debugedit and
add -n to find-debuginfo.sh set by defining the %_no_recompute_build_ids
macro for such packages. %_no_recompute_build_ids can not be used together
with %_unique_build_ids.
Signed-off-by: Mark Wielaard <mark@klomp.org>
Robin Lee [Sat, 8 Apr 2017 13:21:39 +0000 (21:21 +0800)]
Fix non-standard inherented modes of directories in debuginfo
In case that binary compiled from source generated in /tmp, a
/usr/src/debug/tmp directory will be created with the same mode as
/tmp, a.k.a 777, which should be avoided.
Fixes: rhbz#641022
Panu Matilainen [Fri, 24 Mar 2017 10:54:04 +0000 (12:54 +0200)]
Eliminate warning from '_' being redefined in sepdebugcrcfix.c
Exposed by commit
6415903f88ce0da7bd27fe0767b9bd070b04b65a which
includes system.h which includes the NLS stuff.
Gleb Fotengauer-Malinovskiy [Thu, 23 Mar 2017 18:22:47 +0000 (21:22 +0300)]
Fix Large File Support (LFS) in sepdebugcrcfix tool and systemd_inhibit.so plugin
This problem was found by ALT rpm verify-elf brp script:
verify-elf: WARNING: ./usr/lib/rpm-plugins/systemd_inhibit.so: uses non-LFS functions: __lxstat
verify-elf: WARNING: ./usr/lib/rpm/sepdebugcrcfix: uses non-LFS functions: __xstat mmap open pread pwrite
Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
Mark Wielaard [Tue, 21 Mar 2017 15:57:44 +0000 (16:57 +0100)]
debugedit: Fix off-by-one adding DW_FORM_string replacement slashes.
We would put one too many slashes in between the new dest_dir and file name
part of the replacement of a DW_FORM_string in the .debug_info. If there
was file part then we would overwrite the first character of the name. If
there was no file part at all then this would overwrite the zero terminator
and cause a crash reading the rest of the data.
A crash did happen while building the docker package on fedora s390x.
https://bugzilla.redhat.com/show_bug.cgi?id=
1434347
The reason neither issue would normally trigger is because if we do detect
that the dest_dir is larger than the base_dir we refuse to replace anything.
Signed-off-by: Mark Wielaard <mark@klomp.org>
Mark Wielaard [Thu, 16 Mar 2017 21:53:54 +0000 (22:53 +0100)]
debugedit: Fix edit_dwarf2_line replace_dirs -> replace_files typo.
We wouldn't replace the changed file names if replace_dirs was false,
but replace_files was true. This could overrun the new debug_line data
buffer if the original file name was larger than the replacement. It
wasn't found before because often when we need to replace files we
also would have to replace dirs.
This fixes the kubernetes build in fedora.
Signed-off-by: Mark Wielaard <mark@klomp.org>
Mark Wielaard [Fri, 17 Mar 2017 20:03:35 +0000 (21:03 +0100)]
debugedit: Fix cross-endian build-id reading and updating section data.
debugedit doesn't read raw mmap data any longer. Which made the complex
way to read the build-id unnecessary (and it was broken for cross-endian).
Just use gelf_getnote to read the notes.
Also in some special cases when only the debug_info or build_id data
was updated, but no section changed size and we had to preserve the
allocated section headers we could hit a bug in elfutils that could
trash some section data in case there were gaps between non-dirty and
dirty sections. See https://sourceware.org/bugzilla/show_bug.cgi?id=21199
Add a workaround for that issue.
This fixes the kompose package build on fedora ppc64.
And makes it possible to replicate that issue on x86_64.
Signed-off-by: Mark Wielaard <mark@klomp.org>
Mark Wielaard [Tue, 28 Feb 2017 20:34:34 +0000 (21:34 +0100)]
Add option to have unique debug source dirs across version/release/arch.
Introduce a new macro _unique_debug_srcs that when set will pass
--unique-debug-src-base "%{name}" to find-debuginfo.sh which will
move sources into a unique "<name>-<ver>-<rel>.<arch>" directory
under /usr/src/debug/ and makes debugedit rewrite the source paths
in the debuginfo to use that unique directory name.
Traditionally the debug src dir was named after the builddir which
was defined through the %setup macro which used the -n name argument
to define the builddir name and source archive to use. The builddir
might not be unique though between package versions.
Now that debugedit doesn't have strict base and dest dir length
restrictions for rewriting the source dir paths this can now be made
more flexible.
The added testcases show the difference between the old and new way.
The hello2.spec file defines the name of the package as hello2, but
uses the %setup marcro with -n hello-1.0 to use the hello-1.0.tar.gz
archive. This would traditionally result in a hello-1.0 builddir
which would be moved under /usr/src/debug. Possibly conflicting
with any other package (version) that used the same builddir name.
When defining _unique_debug_srcs to 1 that builddir will be moved
to <name>-<ver>-<rel>.<arch> instead (hello2-1.0-1.<arch>).
The testcases check that both the actual package source filess under
/usr/debug/src/ and the source paths as found in the .debug files are
under the traditional or new unique directory names depending on whether
the new _unique_debug_srcs macro is defined.
Signed-off-by: Mark Wielaard <mark@klomp.org>
Mark Wielaard [Mon, 27 Feb 2017 15:28:18 +0000 (16:28 +0100)]
debugedit: Support String/Line table rewriting for larger/smaller paths.
debugedit --base to --dest rewriting of debug source file paths only
supported dest paths that were smaller or equal than the base path
(and the size should differ more than 1 character for correct debug lines).
All paths were changed "in place". Which could in theory mess up debug str
sharing.
This rewrite supports base and dest strings of any size (some limitations,
see below). This is done by reconstructing the debug_str and debug_line
tables and updating the references in the debug_info attributes pointing
to these tables. Plus, if necessary (only for ET_REL kernel modules),
updating any relocations for the debug_info and debug_line sections.
This has the nice benefit of merging any duplicate strings in the
debug_str table which might resulting on slightly smaller files.
kernel modules are ET_REL files that often contain a lot of duplicate
strings.
The rewrite uses elfutils (either libebl or libdw) to reconstruct the
debug_str table. Since we are changing some section sizes now we cannot
just use mmap and rawdata to poke the values, but need to read in and
write out the changed sections. This does take a bit more memory because
we now also need to keep track of all string/line references.
There are still some limitations (already in the original debugedit)
not fixed by this rewrite:
- DW_AT_comp_dir in .debug_info using DW_FORM_string can not be made
larger. We only warn about that now instead of failing. The only
producer of DW_FORM_string comp_dirs is binutils gas. It seems simpler
to fix gas than to try to support resizing the debug_info section.
- A DW_AT_name on a DW_TAG_compile_unit is only rewritten for DW_FORM_strp
not for DW_FORM_string. Probably no problem in practice since this
wasn't supported originally either.
- The debug_line program isn't scanned for DW_LNE_define_file which
could in theory define an absolute path that might need rewriting.
Again probably not a problem because this wasn't supported before
and there are no know producers for this construct.
To support the upcoming DWARFv5 in gcc 7 (not on by default), we will
need to add support for the new debug_line format and scan the new
debug_macro section that can have references to the debug_str table.
Signed-off-by: Mark Wielaard <mark@klomp.org>
Mark Wielaard [Fri, 9 Dec 2016 08:31:23 +0000 (10:31 +0200)]
Eliminate unnecessary dependency on bfd.h from sepdebugcrcfix
I think the reliance on bfd.h was a mistake. The code was lifted from
bfd, but should be totally independent (it just calculates a CRC).
Fix the type to be a normal size_t and include sys/stat.h (which was
included through bfd.h) to get the definitions of stat and chmod.
Mark Wielaard [Fri, 7 Oct 2016 13:45:47 +0000 (15:45 +0200)]
Fix mini-symtab in find-debuginfo.sh for arches with function descriptors.
add_minidebug uses nm to select the function symbols to include in the
mini-symtab table. But on arches that use function descriptors (like ppc64)
nm --format-posix doesn't make it clear which symbols are real functions
The symbols point to the (stripped away) function descriptor table).
Use --format=sysv style to match the ELF symbol type directly instead of
using the somewhat ambiguous symbol type char used in --format=posix style
in binutils nm.
https://bugzilla.redhat.com/show_bug.cgi?id=
1052415
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Mark Wielaard [Fri, 7 Oct 2016 15:00:44 +0000 (17:00 +0200)]
find-debuginfo.sh: Don't copy extra sections into .gnu_debugdata.
When creating the compressed mini-symtab section in find-debuginfo
add_minidebug we explicitly remove .gdb_index and .comment. But there
can be other non-empty sections in the debuginfo that shouldn't be
copied. For example rust binaries might have a .rustc section.
Explicitly remove any non-allocated PROGBITS or NOTE sections.
https://bugzilla.redhat.com/show_bug.cgi?id=
1382394
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Michal Marek [Sat, 10 Sep 2016 21:13:25 +0000 (23:13 +0200)]
find-debuginfo.sh: Process files in parallel
Add a -j <n> option, which, when used, will spawn <n> processes to do the
debuginfo extraction in parallel. A pipe is used to dispatch the files among
the processes.
Signed-off-by: Michal Marek <mmarek@suse.com>
Michal Marek [Sat, 10 Sep 2016 21:13:24 +0000 (23:13 +0200)]
find-debuginfo.sh: Split directory traversal and debuginfo extraction
This siplifies the handling of hardlinks a bit and allows a later patch
to parallelize the debuginfo extraction.
Signed-off-by: Michal Marek <mmarek@suse.com>
Mark Wielaard [Thu, 16 Jun 2016 12:24:22 +0000 (14:24 +0200)]
Add option to have unique debug file names across version/release/arch.
Introduce a new macro _unique_debug_names that when set will pass
--unique-debug-arch "%{_arch}" to find-debuginfo.sh to create debuginfo
files which end in "-<ver>-<rel>.<arch>.debug" instead of simply ".debug".
Adds testcases for dwz and buildid with and without unique debug file names.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Mark Wielaard [Tue, 14 Jun 2016 15:07:14 +0000 (17:07 +0200)]
Make adding GDB index sections configurable.
Introduces _include_gdb_index macro and -i flag to find-debuginfo.sh to
enable or disable adding a .gdb_index section to debug files. Adds tests
to make sure the .gdb_index is really added (or not) when requested.
Checks that gdb-add-index is actually installed instead of silently
failing if not. Similar for dwz.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Mark Wielaard [Tue, 14 Jun 2016 15:07:13 +0000 (17:07 +0200)]
Make it possible to have unique build-ids across build versions/releases.
Introduce a new macro _unique_build_ids that when set will pass the
version and release to find-debuginfo.sh and debugedit to recalculate
the build-id of ELF files.
Includes two new testcases to make sure the new setting works as expected
both when set and unset.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Mark Wielaard [Tue, 14 Jun 2016 15:07:12 +0000 (17:07 +0200)]
Add build-id links to rpm for all ELF files.
This patch moves the main ELF file build-id symlinks from the
debuginfo package into the main package. And uses different
base directories for the main ELF file build-id symlink.
For the main build-id use /usr/lib/.build-id and for the debug
build-id use /usr/lib/debug/.build-id.
There are two reasons for doing this. The main package and the
debuginfo package might get out of sync, or the debuginfo package
might not be installed at all. In which case finding the main ELF
file through the build-id symlink becomes impossible. Secondly by
moving the main ELF build-id symlink in its own directory the
/usr/lib/debug directory gets populated with only debuginfo files
which is convenient if the user might want to have that directory
populated through a network mountpoint.
To support the new logic the symlink code has been moved from
find-debuginfo.sh to build/files.c.
This also includes support for a new config %_build_id_links that
defaults to compat. The other settings are none, alldebug (the old
style) and separate. compat is like separate, but adds a compatibility
link under /usr/lib/debug/.build-id for the main build-id symlink.
There are several new testcases added to test the various settings
using the new keyword "buildid".
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Mark Wielaard [Tue, 14 Jun 2016 15:07:11 +0000 (17:07 +0200)]
Add sepdebugcrcfix to fixup old style gnu_debuglink CRC checksum.
Some old tools might still use the .gnu_debuglink section to find
separate debuginfo files instead of build-id style lookups. When
dwz has compresses the .debug files the original CRC in the main
ELF file will no longer match. Make sure to run sepdebugcrcfix
after dwz to recalculate the CRC.
The original fix was created by Jan Kratochvil based on code
from GNU binutils BFD. https://bugzilla.redhat.com/show_bug.cgi?id=971119
I added a testcase to make sure the CRCs were all correctly
updated after dwz has run to compress a debuginfo package.
And a change (plus testcase) to make sure implicit suid binaries
didn't accidentially got their suid flag bit.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Mark Wielaard [Tue, 14 Jun 2016 15:07:10 +0000 (17:07 +0200)]
Don't use hardcoded paths to tools/scripts in find-debuginfo.sh.
This prevents installation and testing in any other location than
/usr/lib/rpm.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Mark Wielaard [Tue, 14 Jun 2016 15:07:09 +0000 (17:07 +0200)]
Add dwz debuginfo compression support.
Support for dwz compression has been in Fedora since a couple of years.
https://fedoraproject.org/wiki/Features/DwarfCompressor
The original find-debuginfo.sh patch was written by Jakub Jelinek.
https://bugzilla.redhat.com/show_bug.cgi?id=833311
The new testcase using the macros.debug was added by me.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Mark Wielaard [Tue, 14 Jun 2016 15:07:08 +0000 (17:07 +0200)]
Add find-debuginfo.sh -m minisymtab support.
Support for minisymtab (a minimal function symbol table in a compressed
section in the main binary) has been in gdb and elfutils based tools
since some years. Fedora has had this as rpm-4.10.0-minidebuginfo.patch
since 2012.
The patch adjusts macros to pass -m to find-debuginfo.sh when
_include_minidebuginfo has been set. find-debuginfo.sh now takes -m
as argument to generate the .gnu_debugdata ELF section to be added
to the main executable.
To support the testcases a new macros.debug is added that is used to
generate debuginfo packages in the rpmbuild.at testsuite.
The original support was added to Fedora rpm by Alexander Larsson.
Lubos Kardos fixed a bug in it when strip -g was used. I added some
configuration macros and two testcases to check the basic support works
and for the strip -g bug.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Jan Kratochvil [Wed, 15 Apr 2015 07:51:08 +0000 (09:51 +0200)]
Make sure references to go sources in debuginfo packages go to the installed path and not the source file in the build environment.
- Resolves: rhbz#
1184221
Lubos Kardos [Fri, 27 Mar 2015 14:45:57 +0000 (15:45 +0100)]
Pass _find_debuginfo_opts -g to eu-strip for executables (rhbz:#
1186563)
Pascal Terjan [Mon, 16 Feb 2015 12:08:50 +0000 (13:08 +0100)]
Fix debuginfo creation for changed file output.
file will print a "warning" that it only processed up to 256 notes.
Fixes: http://rpm.org/ticket/887
Panu Matilainen [Tue, 25 Mar 2014 12:06:34 +0000 (14:06 +0200)]
Ensure clean paths are used for matching in debugedit (RhBug:
1077148)
- Things like extra slashes can cause sources not to be found at all
due to path prefix matching, canonicalize the argument paths first.
Andreas Schwab [Wed, 12 Mar 2014 14:16:15 +0000 (15:16 +0100)]
Add support for m68k
Tested on m68k-suse-linux.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Panu Matilainen [Thu, 1 Aug 2013 13:34:40 +0000 (16:34 +0300)]
Doh, its .debug_gdb_scripts, not _script (really fix SuseBug:818502)
Panu Matilainen [Mon, 17 Jun 2013 12:40:47 +0000 (15:40 +0300)]
Teach debugedit about .debug_gdb_script section (SuseBug:818502)
Panu Matilainen [Mon, 17 Jun 2013 07:17:07 +0000 (10:17 +0300)]
Avoid breaking build on older systems which dont know AArch64
Kyle McMartin [Sun, 16 Jun 2013 16:48:46 +0000 (12:48 -0400)]
debugedit: handle aarch64 debug_info relocations (RhBug:974860)
AArch64 generates a relocation which must be handled similar to other
architectures. Adding this patch allows debugedit to run against the
kernel debuginfo.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Panu Matilainen [Wed, 22 May 2013 04:24:06 +0000 (07:24 +0300)]
Plug segfault on NULL pointer dereference in debugedit (RhBug:929365)
- Not sure what the right thing to do would be here, ignoring seems
like a better option than crashing though...
Panu Matilainen [Wed, 9 Jan 2013 11:48:40 +0000 (13:48 +0200)]
Revert "make "canonicalization(...)shrank by one character" error message more usefull"
- The message is not about basedir and destdir, and printing them
here only makes the message even more confusing than it was, eg:
canonicalization unexpectedly shrank by one character \
('/home/pmatilai/rpmbuild/BUILD/' vs '/usr/src/debug/')
- This reverts commit
bda09c382b90fdbad9a166a49642f36b5a5396ce
thierry.vignaud@gmail.com [Fri, 19 Oct 2012 08:08:35 +0000 (10:08 +0200)]
make "canonicalization(...)shrank by one character" error message more usefull
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Panu Matilainen [Wed, 7 Mar 2012 11:47:09 +0000 (13:47 +0200)]
Warn but dont fail the build on STABS debuginfo (RhBug:725378, others)
- debugedit doesn't support STABS but there are some crazy cases
like PPC Linux kernel which contains both STABS and DWARF debuginfo
sections, manually added. A better fix would be erroring out
if we didn't find any usable debuginfo and warning otherwise but
this at least folks get their kernels built.
Jan Kratochvil [Wed, 7 Mar 2012 09:30:19 +0000 (11:30 +0200)]
Generate debug symlinks for all filenames sharing a build-id (RhBug:641377)
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Panu Matilainen [Fri, 2 Dec 2011 10:11:05 +0000 (12:11 +0200)]
Teach debugedit about .debug_macro dwarf section (RhBug:759272)
Jeff Tickle [Tue, 6 Sep 2011 06:52:19 +0000 (09:52 +0300)]
$RPM_BUILD_ROOT breaks brp-* scripts if it contains spaces (ticket #843)
- This patch adds quotes around $RPM_BUILD_ROOT in places that I noticed
they were missing, and attempts to handle some of the problems that can
occur when looping over the output of find.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Jakub Jelinek [Fri, 17 Jun 2011 13:40:20 +0000 (16:40 +0300)]
Add DWARF-4 support to debugedit (RhBug:707677)
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Mark Wielaard [Wed, 25 May 2011 13:44:42 +0000 (15:44 +0200)]
Add -r flag to find-debuginfo.sh to invoke eu-strip --reloc-debug-sections.
- This is a new option to eu-strip that strips out/resolves relocations
between .debug_* elf sections in ET_REL files. This can save a lot of
space for kernel module.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Panu Matilainen [Tue, 24 May 2011 14:23:37 +0000 (17:23 +0300)]
Bail out of debuginfo if stabs format encountered (RhBug:453506)
- The previous "silently ignore" policy produces bogus debuginfo
packages on some architectures and fails with other mysterious
errors on others, better just fail hard until (if ever) somebody adds
stabs support.
Panu Matilainen [Fri, 4 Mar 2011 12:50:30 +0000 (14:50 +0200)]
Remove unused variable in debugedit
Anssi Hannula [Mon, 16 Aug 2010 23:29:14 +0000 (02:29 +0300)]
debugedit: fix incorrect error messages regarding -b and -d
Roland McGrath [Mon, 9 Aug 2010 12:27:03 +0000 (15:27 +0300)]
Fix find-debuginfo.sh behavior on cross-directory hardlinks (RhBug:618426)
- The find-debuginfo.sh script makes hard links of .debug files to
correspond to hard links between install binaries. It can fail to
create one of these .debug hard links if it's in a directory that
didn't exist at that point in the script run. How this happens
depends on things like the order "find" lists files, so it can
be hard to reproduce off hand.
Tom Tromey [Mon, 9 Aug 2010 12:22:51 +0000 (15:22 +0300)]
Create GDB index from find-debuginfo if possible (RhBug:617166)
- Details in https://fedoraproject.org/wiki/Features/GdbIndex
Roland McGrath [Tue, 11 May 2010 03:05:48 +0000 (20:05 -0700)]
Make debugedit -i recompute build ID only when any DWARF was actually changed.
Roland McGrath [Tue, 11 May 2010 00:53:07 +0000 (17:53 -0700)]
Whitespace fixups for tools/debugedit.c
Ville Skyttä [Wed, 16 Dec 2009 21:14:04 +0000 (23:14 +0200)]
Use grep -E and grep -F instead of egrep and fgrep.
egrep and fgrep are deprecated in GNU grep and "historical" in POSIX.
Roland McGrath [Wed, 9 Sep 2009 18:07:10 +0000 (11:07 -0700)]
find-debuginfo.sh: use permissions 444 for all .debug files
Signed-off-by: Roland McGrath <roland@redhat.com>
Panu Matilainen [Tue, 16 Jun 2009 10:52:43 +0000 (13:52 +0300)]
Add debugedit support for DWARF-3 (RhBug:505774)
- patch from Jakub Jelinek
Panu Matilainen [Thu, 19 Mar 2009 08:15:49 +0000 (10:15 +0200)]
Revert couple of checksum -> digest renames
- physical cpio header and elf header have checksums, not digests
(from commit
0097de79aa1f07c0a3b1cb15b9191c5fcdc71b6e)
- doesn't affect functionality though
Jindrich Novy [Fri, 27 Feb 2009 13:34:39 +0000 (14:34 +0100)]
Add md5->filedigest aliases (rhbz#487597)
- add %verify(nofiledigest) as %verify(nomd5) file attribute alias
- reference digests as digests not checksums
- make old md5 related symbols obsolete and use newer reference
- update man page accordingly
Panu Matilainen [Thu, 8 Jan 2009 11:17:22 +0000 (13:17 +0200)]
Delay NSS initialization until actually used
- since NSS is allergic (ie becomes non-functional) after forking, delay
it's initialization until really needed, ie lazy init in rpmDigestInit()
- however as NSS init can fail if attempted in completely empty chroot,
we force crypto init to happen at transaction set create time, forking
past that is pretty much doomed anyway
- this is the other half of the fix for rhbz#476737, and similar case
noticed by Pixel in Mandriva (due to urpm forking)
Panu Matilainen [Fri, 31 Oct 2008 08:17:07 +0000 (10:17 +0200)]
Adjust for file output change (rhbz#468129)
- file util used reported file details along with mime type, newer ones don't
Panu Matilainen [Fri, 27 Jun 2008 12:15:46 +0000 (15:15 +0300)]
debugedit: Include empty CU current directories (rhbz#444310)
- patch from Jan Kratochvil
Panu Matilainen [Mon, 5 May 2008 05:15:17 +0000 (08:15 +0300)]
Silence bogus warning on memset()
- gcc doesn't realize shrank == 0 would terminate the process via error()
before reaching memset(), work around...
Panu Matilainen [Mon, 7 Apr 2008 10:26:46 +0000 (13:26 +0300)]
Minimally convert all pgpHexCvt() users to use pgpHexStr() instead
Panu Matilainen [Fri, 4 Jan 2008 10:00:51 +0000 (12:00 +0200)]
Remove now useless nested function in debugedit
Panu Matilainen [Fri, 14 Dec 2007 09:38:20 +0000 (11:38 +0200)]
More size_t type pedantry
Panu Matilainen [Sat, 8 Dec 2007 12:02:32 +0000 (14:02 +0200)]
Switch to <rpm/foo.h> style for public headers
- adjust include paths accordingly
Ralf Corsépius [Mon, 26 Nov 2007 09:42:39 +0000 (10:42 +0100)]
Eliminate type "byte"
Ralf Corsépius [Fri, 23 Nov 2007 10:47:48 +0000 (11:47 +0100)]
Expand private include file names to be relative to $(top_srcdir)
Ralf Corsépius [Thu, 22 Nov 2007 12:41:06 +0000 (13:41 +0100)]
Include system.h
Panu Matilainen [Thu, 15 Nov 2007 13:16:10 +0000 (15:16 +0200)]
Debugedit needs crypto initialization too..
Panu Matilainen [Fri, 2 Nov 2007 08:02:40 +0000 (10:02 +0200)]
Use NSS instead of beecrypt for encryption (Tomas Mraz)
Ralf Corsépius [Mon, 29 Oct 2007 07:22:15 +0000 (08:22 +0100)]
Remove local def of uint32_t, uint16_t.
Include <stdint.h>.
Use size_t for sizes.
Ralf Corsépius [Fri, 26 Oct 2007 11:24:14 +0000 (13:24 +0200)]
Eliminate [u|]int_[8|16|32]. Use c99 stdint.h types instead.
Panu Matilainen [Thu, 18 Oct 2007 06:34:54 +0000 (09:34 +0300)]
debugedit mishandles empty DW_AT_comp_dir (Roland McGrath)
- fpc seems to produce DW_AT_comp_dir with value "" (empty string).
This is dubious, but debugedit makes it even worse by getting confused by it.
Panu Matilainen [Thu, 18 Oct 2007 06:33:56 +0000 (09:33 +0300)]
debugedit mishandles DW_FORM_ref_addr (Roland McGrath)
Ralf Corsépius [Mon, 17 Sep 2007 02:31:28 +0000 (04:31 +0200)]
Reformat call to poptGetContext for better source-code readability.
Panu Matilainen [Wed, 5 Sep 2007 12:21:43 +0000 (15:21 +0300)]
Fix a bunch of whitespace-in-files issues in find-debuginfo
Panu Matilainen [Wed, 5 Sep 2007 12:00:59 +0000 (15:00 +0300)]
New find-debuginfo script from Roland McGrath
- new options for using -g on DSO's
- support for multiple output files (multiple debuginfo subpackages)
- build ID support
- symlink and hardlink support
- new macro to optionally terminate build on missing build id's
Panu Matilainen [Tue, 4 Sep 2007 05:19:03 +0000 (08:19 +0300)]
Debugedit fixes.
This makes debugedit's -l file get files that already match the -d rewrite
directory, not just those that match the -b build directory and get rewritten.
Patch from Roland McGrath
Panu Matilainen [Sun, 12 Aug 2007 12:27:46 +0000 (15:27 +0300)]
Fix debugedit buildid thinko.
Patch from Roland McGrath
Panu Matilainen [Thu, 12 Jul 2007 11:36:49 +0000 (14:36 +0300)]
And one last debugedit fix...
Modern gcc doesn't like arithmetics on void pointers, cast where needed.
Panu Matilainen [Thu, 12 Jul 2007 10:53:23 +0000 (13:53 +0300)]
Silence the rest of ptr signedness issues in debugedit
Panu Matilainen [Thu, 12 Jul 2007 10:47:51 +0000 (13:47 +0300)]
comp_dir doesn't need to be unsigned
Panu Matilainen [Thu, 12 Jul 2007 10:43:40 +0000 (13:43 +0300)]
Remove unused variable (debugedit)
Panu Matilainen [Thu, 12 Jul 2007 10:43:01 +0000 (13:43 +0300)]
Debugedit cleanup continued.
Cast to expected type on all uses of strchr()
Panu Matilainen [Thu, 12 Jul 2007 10:41:18 +0000 (13:41 +0300)]
Debugedit cleanup continued.
Cast to expected types on all uses of has_prefix() canonicalize_path()
Panu Matilainen [Thu, 12 Jul 2007 10:37:32 +0000 (13:37 +0300)]
debugedit signedness fixes wrt strlen()
Panu Matilainen [Wed, 4 Jul 2007 12:11:27 +0000 (15:11 +0300)]
New debugedit option to recompute build ID (rhbz#246404)
Patch from Roland McGrath.
Paul Nasrat [Mon, 23 Apr 2007 09:49:31 +0000 (10:49 +0100)]
Fix debugedit for relative paths (#232222)
Paul Nasrat [Thu, 15 Mar 2007 15:59:55 +0000 (15:59 +0000)]
Fix for debugedit with ../../ in paths
Paul Nasrat [Thu, 15 Mar 2007 15:59:22 +0000 (15:59 +0000)]
Fix debugedit for O0
This page took 0.08421 seconds and 5 git commands to generate.