]> sourceware.org Git - debugedit.git/log
debugedit.git
4 years agoRename add_percent_dir to generate_percent_dir
Florian Festi [Thu, 19 Dec 2019 14:40:20 +0000 (15:40 +0100)]
Rename add_percent_dir to generate_percent_dir

to reflect what the function actually does.

4 years agofind-debuginfo.sh: speed up %dir generation
Denys Vlasenko [Thu, 5 Dec 2019 12:30:17 +0000 (13:30 +0100)]
find-debuginfo.sh: speed up %dir generation

For kernel build, "${LISTFILE}.dirs.sed" is debugfiles.list.dirs.sed
and it contains 1782 lines of sed script.
It is applied to two files, both are about 4450 lines long.

This is slow (~30 seconds) because of ~16 million regex matches
performed by sed.

But we don't need or want regex match here
(and it's buggy, since dots in pattern match will be treated
as "any character", which is wrong here. For example,
      /usr/lib/debug/lib/modules/5@4@0-0@rc7@0@fc31@test@x86_64/vdso/
would match
      /usr/lib/debug/lib/modules/5.4.0-0.rc7.0.fc31.test.x86_64/vdso/
pattern, but it should not).

This change performs matching using shell string comparison ops.
For kernel build, this change results in run time of about one second.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
4 years agoFix sepdebugcrcfix compilation on platforms without MAP_POPULATE
Michal Čihař [Sat, 11 Nov 2017 13:27:10 +0000 (14:27 +0100)]
Fix sepdebugcrcfix compilation on platforms without MAP_POPULATE

Not all architectures offer MAP_POPULATE. As MAP_POPULATE is only an
optimization to improve performance, it is safe to drop it when it is
unavailable. Originally fixed in a Debian patch.

4 years agofind-debuginfo.sh: Dont use xargs -d for portability
Florian Festi [Thu, 28 Nov 2019 08:56:24 +0000 (09:56 +0100)]
find-debuginfo.sh: Dont use xargs -d for portability

Use -0 instead which is more widly available.

Related: #948

5 years agoRemove unused variable id in find-debuginfo.sh
Tom de Vries [Mon, 26 Aug 2019 09:30:31 +0000 (11:30 +0200)]
Remove unused variable id in find-debuginfo.sh

There's code setting variable id in scripts/find-debuginfo.sh, but there's no
subsequent use.  The only use of $id in the script is in do_file, where it is
a local variable.

The variable setting was introduced in commit fe280a20b "Add dwz debuginfo
compression support" in combination with a subsequent make_id_link using the
variable, but the make_id_link was removed in commit 62807f0df
"Add build-id links to rpm for all ELF files".

Remove the unused variable.

5 years agoEliminate use of ambiguous logical operators in script conditionals
Pavlina Moravcova Varekova [Fri, 9 Aug 2019 14:30:43 +0000 (16:30 +0200)]
Eliminate use of ambiguous logical operators in script conditionals

Prefer '[] && []' to '[ -a ]' and '[] || []' to '[ -o ]' in tests.
-a and -o to mean AND and OR in a [ .. ] test expression is not well
defined, and can cause incorrect results when arguments start with
dashes or contain !. Moreover binary -a and -o are inherently
ambiguous. test(1) man page recommends to use
'test EXPR1 && test EXPR2' or 'test EXPR1 || test EXPR2' instead.

It corrects warnings [SC2166] spotted by covscan.

5 years agoPrefer '[] && []' to '[ -a ]' in test in find-debuginfo.sh (RhBug:1720590)
Pavlina Moravcova Varekova [Mon, 29 Jul 2019 06:37:13 +0000 (08:37 +0200)]
Prefer '[] && []' to '[ -a ]' in test in find-debuginfo.sh (RhBug:1720590)

Spotted by covscan:
warning: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. [SC2166]
Originally introduced in commit 997cc2a.

Thanks to Florian Festi for spotting this and proposing the solution.

5 years agodebugedit: Make sure .debug_line old/new idx start equal.
Mark Wielaard [Mon, 17 Jun 2019 09:23:26 +0000 (11:23 +0200)]
debugedit: Make sure .debug_line old/new idx start equal.

Found by running the debugedit tests under valgrind.
If the old and new .debug_line offset isn't changed then we might
write out an uninitialized new_idx.

5 years agoHandle .debug_macro in debugedit.
Mark Wielaard [Mon, 17 Jun 2019 09:23:25 +0000 (11:23 +0200)]
Handle .debug_macro in debugedit.

When compiling with -g3 gcc will generate a .debug_macro section
which has pointers to the .debug_str section. Since we might rewrite
the .debug_str section, we also need to update any .debug_macro
pointers.

Updated the debugedit.at testcase by building everything with -g
and add various checks to see the .debug_macro section looks OK
after running debugedit. Added a new rpmbuild.at testcase to check
handing of .debug_macro in the whole rpmbuild debuginfo pipeline
to double check the separate .debug file also contains the macros.

Original patch by Michael Schroeder <mls@suse.de>. Extended by
Mark Wielaard <mark@klomp.org> to deal with relocations and possible
multiple COMDAT .debug_macro sections.

5 years agodebugedit: Refactor reading/writing of relocated values.
Mark Wielaard [Mon, 17 Jun 2019 09:23:24 +0000 (11:23 +0200)]
debugedit: Refactor reading/writing of relocated values.

This refactors the reading and writing of relocated values into seperate
helper functions (setup_relbuf and update_rela_data). It will be easier
to reuse this code in case we want to read/write relocated values in other
sections than DEBUG_INFO. The only functional change is that we explicitly
track whether the relocation data is updated, and only explicitly update
and write out the relocation data if so. In the case there were no strp
or stmt updates, there will also not be any relocation updates, even if
there is relocation data available.

All new debugedit testcases pass before and after this refactoring.

5 years agoAdd some debugedit tests.
Mark Wielaard [Mon, 17 Jun 2019 09:23:23 +0000 (11:23 +0200)]
Add some debugedit tests.

debugedit didn't have any direct tests, it was only tested indirectly
through some other debuginfo testcases.  So add some testcases that
just test debugedit functionality directly.

The tests create different kinds of ELF files (object files, partially
linked files and executables) and run debugedit path replacements on
them, checking that the resulting .debug_str, .debug_info and .debug_line
sections look sane.

Testcases verified against various different gcc and binutils versions.
gcc 4.8 and gcc 6 generate slightly different .debuginfo

Also add debugedit --version. Which makes it easy to see we are
testing the correct version/install of debugedit in rpmtests.log.

Adjust autotest paths to include rpmlibexecdir, where debuginfo
is installed.  Note that rpmlibexecdir != libexecdir (see rpm.am).

5 years agoAdd step to find-debuginfo.sh script to compress annobin notes.
nickclifton [Wed, 19 Jun 2019 11:45:09 +0000 (12:45 +0100)]
Add step to find-debuginfo.sh script to compress annobin notes.

With the introduction of the annobin gcc plugin to the build process,
built binary files have become larger.  Sometimes significantly so.
This is a patch that adds a new step to the post-link process performed
by rpmbuild, to run the objcopy program with the --merge-notes option
specified.  This will reduce the size of the annobin notes in binary
files, thus alleviating the size growth.

5 years agoUse [ ] in condition to avoid sub processes in find-debuginfo.sh (#735)
Pavlina Moravcova Varekova [Wed, 5 Jun 2019 04:07:00 +0000 (06:07 +0200)]
Use [ ] in condition to avoid sub processes in find-debuginfo.sh (#735)

Introduced in commit d0ee451, spotted by covscan.

5 years agoSort list of hard linked files in find-debuginfo.sh (RhBug:1421272)
Pavlina Moravcova Varekova [Sun, 7 Apr 2019 05:23:47 +0000 (07:23 +0200)]
Sort list of hard linked files in find-debuginfo.sh (RhBug:1421272)

It helps to make build results reproducible. Based on Mark Wielaard's idea.

5 years agoAdd flag to use strip -g instead of full strip on DSOs (RhBug:1663264)
Pavlina Moravcova Varekova [Sun, 17 Mar 2019 05:47:26 +0000 (06:47 +0100)]
Add flag to use strip -g instead of full strip on DSOs (RhBug:1663264)

The find-debuginfo.sh flag -g had exactly this meaning. But from
version rpm-4.13.0-alpha flag -g changes its behavior. It affects
both libraries and executables.

For some packages the original behavior was preferred. That is why
the new find-debuginfo.sh flag --g-libs is created.

Options -g and --g-libs are mutually exclusive.

5 years agofind-debuginfo.sh: Handle position-independent executables
Ernestas Kulik [Mon, 25 Feb 2019 15:34:06 +0000 (16:34 +0100)]
find-debuginfo.sh: Handle position-independent executables

Since file 5.33, PIEs are identified by a new MIME type, meaning that,
currently, for such executables, the .gnu_debugdata section is not
added, even if -m is passed.

Signed-off-by: Ernestas Kulik <ekulik@redhat.com>
6 years agoReport debuginfo size in kilobytes
Panu Matilainen [Mon, 1 Oct 2018 10:41:45 +0000 (13:41 +0300)]
Report debuginfo size in kilobytes

By standard, 'du' defaults to 512 byte units, but this differs between
implementations: GNU du defaults to 1024 unless POSIXLY_CORRECT is set
and also allows overriding via number of environment variables. It also
supports various other ways of controlling the block size, but the
only standard means to control the size is -k, and we really don't
want to break portability for the sake of FYI statistics.

Inspired by Marxim Liska's patch at in #554.

6 years agoInfo how beneficial is dwz compression.
marxin [Tue, 28 Aug 2018 09:31:17 +0000 (11:31 +0200)]
Info how beneficial is dwz compression.

Example output:
...
original debug info size: 120600, size after compression: 77604
...

6 years agoRevert "find-debuginfo.sh: decompress DWARF compressed ELF sections"
Panu Matilainen [Thu, 6 Sep 2018 08:39:15 +0000 (11:39 +0300)]
Revert "find-debuginfo.sh: decompress DWARF compressed ELF sections"

This is breaking suid bit handling in packaging unless an unreleased
bleeding edge version of elfutils is used. In other words it's not
an acceptable requirement and wont be for a long time. This needs
to be fixed in some other way.

This reverts commit 076c14fc57621b307f216810679d6977e3f71d26.

6 years agoAdd missing documentation for --jobs in find-debuginfo.sh
Pavlina Moravcova Varekova [Thu, 9 Aug 2018 06:37:16 +0000 (08:37 +0200)]
Add missing documentation for --jobs in find-debuginfo.sh

6 years agofind-debuginfo.sh: sort output of find
Bernhard M. Wiedemann [Mon, 30 Jul 2018 17:02:46 +0000 (19:02 +0200)]
find-debuginfo.sh: sort output of find

to make build results more reproducible
in spite of indeterministic filesystem readdir order.

For openSUSE, this helped to make squid, openssh, postfix and shadow
packages build reproducibly.

See https://reproducible-builds.org/ for why this is good.

6 years agoFix an obvious typo in dwz filename generation
Panu Matilainen [Wed, 1 Aug 2018 08:29:10 +0000 (11:29 +0300)]
Fix an obvious typo in dwz filename generation

This typo has always been there since the initial implementation in
Fedora-specific patches in 2012 and inherited upstream. Which suggests
something hasn't been working right all this time, or then this will
break something all of a sudden...

6 years agofind-debuginfo.sh: decompress DWARF compressed ELF sections
Mark Wielaard [Sat, 21 Jul 2018 08:13:04 +0000 (10:13 +0200)]
find-debuginfo.sh: decompress DWARF compressed ELF sections

debugedit and dwz do not support DWARF compressed ELF sections, let's
just decompress those before extracting debuginfo.

Tested-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
6 years agofind-debuginfo.sh: Handle application/x-pie-executable (file 5.33 output).
Mark Wielaard [Tue, 22 May 2018 20:20:19 +0000 (22:20 +0200)]
find-debuginfo.sh: Handle application/x-pie-executable (file 5.33 output).

A new version of file (5.33) changed the output for PIE executables.
Which are now represented as application/x-pie-executable; charset=binary.

The following change simply recognizes that binary format as one for
which -g applies. This fixes accidental stripping of the .symtab in
glibc (which use -g to keep that symbol table).

https://bugzilla.redhat.com/show_bug.cgi?id=1581224

Signed-off-by: Mark Wielaard <mark@klomp.org>
6 years agodebugedit: Only try to collect comp_dir in phase zero.
Mark Wielaard [Mon, 12 Mar 2018 13:16:15 +0000 (14:16 +0100)]
debugedit: Only try to collect comp_dir in phase zero.

edit_attributes is run twice. Once for phase zero in which all strings are
collected. Then then for phase one in which the strings are rewritten. In
phase zero we also try to collect the comp_dir (either from the
DW_AT_comp_dir or the DW_AT_name of the compile unit). We were also
collecting the comp_dir is phase 1, which is unnecessary, and would not
actually work, since we would be using to old string table index for that,
which had already been rewritten.

Caught by the new string table index checks.

Signed-off-by: Mark Wielaard <mark@klomp.org>
6 years agodebugedit: Check .debug_str index is valid before use.
Mark Wielaard [Wed, 7 Mar 2018 15:25:31 +0000 (16:25 +0100)]
debugedit: Check .debug_str index is valid before use.

debugedit would blindly use an .debug_str index from the .debug_info or
.debug_line sections assuming it would result in a valid string. Which
would crash and burn if the DWARF data was bogus when the string was
used. So check whenever converting an string index into a char pointer
so we can produce a more helpful error message.

https://bugzilla.redhat.com/show_bug.cgi?id=1543912

Signed-off-by: Mark Wielaard <mark@klomp.org>
6 years agodebugedit: handle RISC-V relocation
Andreas Schwab [Mon, 26 Feb 2018 09:34:26 +0000 (10:34 +0100)]
debugedit: handle RISC-V relocation

Resolves #407

6 years agoFix type mismatch calculating new line program offset in debugedit.c.
Mark Wielaard [Mon, 22 Jan 2018 15:55:51 +0000 (16:55 +0100)]
Fix type mismatch calculating new line program offset in debugedit.c.

edit_dwarf2 calculates the (new) offset in the line program by
taking the difference between the old and new idx, which are of type
size_t (unsigned), plus the size_diff of the header given as ssize_t
(signed), and adding that to the current r_offset, which is an Elf64_Addr
(unsigned). On 64bit architectures, where the size of Elf64_Addr and
ssize_t are the same this isn't a problem. But on 32bit architectures,
where the size of ssize_t is smaller than Elf64_Addr the smaller signed
result gets promoted to an unsigned long first causing issues if the
size_diff was negative.

This would have been caught by gcc -Wsign-conversion

warning: conversion to ‘long unsigned int’ from ‘ssize_t’ {aka ‘long int’}
may change the sign of the result

But enabling this by default gives a lot of false positives.

Found and fixed by Richard Biener <rguenther@suse.de>.

6 years agoSupport --jobs as an alias to -j in find-debuginfo.sh (RhBug:1518120)
Mark Wielaard [Fri, 8 Dec 2017 12:46:16 +0000 (14:46 +0200)]
Support --jobs as an alias to -j in find-debuginfo.sh (RhBug:1518120)

make supports both, and as %_smp_mflags gets passed to both make and
find-debuginfo.sh now we better accept the same options for as make.

6 years agodebugedit: edit_dwarf2 check lndx is in range before checking r_offset.
Mark Wielaard [Fri, 13 Oct 2017 21:27:32 +0000 (23:27 +0200)]
debugedit: edit_dwarf2 check lndx is in range before checking r_offset.

7 years agoRevert "Warn and create empty debugsource package if there are no sources."
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.

7 years agoWarn and create empty debugsource package if there are no sources.
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>
7 years agofind-debuginfo.sh: make sure that debugsourcefiles.list is generated under the builddir
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>
7 years agofind-debuginfo.sh: Remove non-allocated NOBITS sections from minisymtab.
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>
7 years agofind-debuginfo.sh: Add --keep-section and --remove-section for eu-strip.
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>
7 years agofind-debuginfo.sh: Use 'return', not 'continue', to break out do_file().
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>
7 years agofind-debuginfo.sh: Filter out all <built-in> like fake file names.
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>
7 years agodebugedit: skip_dir_prefix should check for dir separator.
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>
7 years agofind-debuginfo.sh: Don't create dwz multi file if there is only one .debug.
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>
7 years agoUpdate find-debuginfo.sh options and macros documentation.
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>
7 years agoSpelling fixes
Ville Skyttä [Sun, 25 Jun 2017 07:18:06 +0000 (10:18 +0300)]
Spelling fixes

7 years agoSupport debugsource subpackages
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.

7 years agoUntangle unique build options in find-debuginfo.sh
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.

7 years agodebugedit: Only output comp_dir under build dir (once).
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>
7 years agofind-debuginfo.sh: Only add minisymtab for executables or shared libraries.
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>
7 years agodebugedit: Add -n, --no-recompute-build-id.
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>
7 years agoFix non-standard inherented modes of directories in debuginfo
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
7 years agoEliminate warning from '_' being redefined in sepdebugcrcfix.c
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.

7 years agoFix Large File Support (LFS) in sepdebugcrcfix tool and systemd_inhibit.so plugin
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>
7 years agodebugedit: Fix off-by-one adding DW_FORM_string replacement slashes.
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>
7 years agodebugedit: Fix edit_dwarf2_line replace_dirs -> replace_files typo.
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>
7 years agodebugedit: Fix cross-endian build-id reading and updating section data.
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>
7 years agoAdd option to have unique debug source dirs across version/release/arch.
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>
7 years agodebugedit: Support String/Line table rewriting for larger/smaller paths.
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>
7 years agoEliminate unnecessary dependency on bfd.h from sepdebugcrcfix
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.

7 years agoFix mini-symtab in find-debuginfo.sh for arches with function descriptors.
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>
7 years agofind-debuginfo.sh: Don't copy extra sections into .gnu_debugdata.
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>
8 years agofind-debuginfo.sh: Process files in parallel
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>
8 years agofind-debuginfo.sh: Split directory traversal and debuginfo extraction
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>
8 years agoAdd option to have unique debug file names across version/release/arch.
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>
8 years agoMake adding GDB index sections configurable.
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>
8 years agoMake it possible to have unique build-ids across build versions/releases.
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>
8 years agoAdd build-id links to rpm for all ELF files.
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>
8 years agoAdd sepdebugcrcfix to fixup old style gnu_debuglink CRC checksum.
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>
8 years agoDon't use hardcoded paths to tools/scripts in find-debuginfo.sh.
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>
8 years agoAdd dwz debuginfo compression support.
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>
8 years agoAdd find-debuginfo.sh -m minisymtab support.
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>
9 years agoMake sure references to go sources in debuginfo packages go to the installed path...
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

9 years agoPass _find_debuginfo_opts -g to eu-strip for executables (rhbz:#1186563)
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)

9 years agoFix debuginfo creation for changed file output.
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
10 years agoEnsure clean paths are used for matching in debugedit (RhBug:1077148)
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.

10 years agoAdd support for m68k
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>
11 years agoDoh, its .debug_gdb_scripts, not _script (really fix SuseBug:818502)
Panu Matilainen [Thu, 1 Aug 2013 13:34:40 +0000 (16:34 +0300)]
Doh, its .debug_gdb_scripts, not _script (really fix SuseBug:818502)

11 years agoTeach debugedit about .debug_gdb_script section (SuseBug:818502)
Panu Matilainen [Mon, 17 Jun 2013 12:40:47 +0000 (15:40 +0300)]
Teach debugedit about .debug_gdb_script section (SuseBug:818502)

11 years agoAvoid breaking build on older systems which dont know AArch64
Panu Matilainen [Mon, 17 Jun 2013 07:17:07 +0000 (10:17 +0300)]
Avoid breaking build on older systems which dont know AArch64

11 years agodebugedit: handle aarch64 debug_info relocations (RhBug:974860)
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>
11 years agoPlug segfault on NULL pointer dereference in debugedit (RhBug:929365)
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...

11 years agoRevert "make "canonicalization(...)shrank by one character" error message more usefull"
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

11 years agomake "canonicalization(...)shrank by one character" error message more usefull
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>
12 years agoWarn but dont fail the build on STABS debuginfo (RhBug:725378, others)
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.

12 years agoGenerate debug symlinks for all filenames sharing a build-id (RhBug:641377)
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>
12 years agoTeach debugedit about .debug_macro dwarf section (RhBug:759272)
Panu Matilainen [Fri, 2 Dec 2011 10:11:05 +0000 (12:11 +0200)]
Teach debugedit about .debug_macro dwarf section (RhBug:759272)

13 years ago$RPM_BUILD_ROOT breaks brp-* scripts if it contains spaces (ticket #843)
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>
13 years agoAdd DWARF-4 support to debugedit (RhBug:707677)
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>
13 years agoAdd -r flag to find-debuginfo.sh to invoke eu-strip --reloc-debug-sections.
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>
13 years agoBail out of debuginfo if stabs format encountered (RhBug:453506)
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.

13 years agoRemove unused variable in debugedit
Panu Matilainen [Fri, 4 Mar 2011 12:50:30 +0000 (14:50 +0200)]
Remove unused variable in debugedit

14 years agodebugedit: fix incorrect error messages regarding -b and -d
Anssi Hannula [Mon, 16 Aug 2010 23:29:14 +0000 (02:29 +0300)]
debugedit: fix incorrect error messages regarding -b and -d

14 years agoFix find-debuginfo.sh behavior on cross-directory hardlinks (RhBug:618426)
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.

14 years agoCreate GDB index from find-debuginfo if possible (RhBug:617166)
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

14 years agoMake debugedit -i recompute build ID only when any DWARF was actually changed.
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.

14 years agoWhitespace fixups for tools/debugedit.c
Roland McGrath [Tue, 11 May 2010 00:53:07 +0000 (17:53 -0700)]
Whitespace fixups for tools/debugedit.c

14 years agoUse grep -E and grep -F instead of egrep and fgrep.
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.

15 years agofind-debuginfo.sh: use permissions 444 for all .debug files
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>
15 years agoAdd debugedit support for DWARF-3 (RhBug:505774)
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

15 years agoRevert couple of checksum -> digest renames
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

15 years agoAdd md5->filedigest aliases (rhbz#487597)
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

15 years agoDelay NSS initialization until actually used
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)

15 years agoAdjust for file output change (rhbz#468129)
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

16 years agodebugedit: Include empty CU current directories (rhbz#444310)
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

This page took 0.070786 seconds and 5 git commands to generate.