Re: [Rpm-maint] [rpm-software-management/rpm] DWARF-5 support in debugedit (#1537)

2021-02-16 Thread Mark Wielaard
Hi Jan, On Tue, 2021-02-16 at 01:37 -0800, Jan Kratochvil wrote: > Could you rather point what was incomplete on the previous testcases > than to screw it up? You removed the only part that matters. I didn't screw up. I simply didn't use that part. But wrote some new testcases based on the

Re: [Rpm-maint] [rpm-software-management/rpm] DWARF-5 support in debugedit (#1537)

2021-02-16 Thread Mark Wielaard
Hi Jan, On Tue, 2021-02-16 at 00:16 -0800, Jan Kratochvil wrote: > The patchset regressed against my version as it no longer tests > rpmbuild compatibility with LLVM product as required by paying > customers of Red Hat company. Unfortunately they did because I rewrote the tests so they didn't

Re: [Rpm-maint] [rpm-software-management/rpm] debugedit: Distinguish files from directories in src list file (#1436)

2021-02-15 Thread Mark Wielaard
Hi, Sorry for the late reply. Somehow the notification emails ended up in a spam folder. sigh. On Thu, 2020-12-10 at 04:29 -0800, Panu Matilainen wrote: > Mark, any objections to this change? I like the idea of having > directories explicitly marked with trailing slash, it goes with the > spirit

[Rpm-maint] [PATCH 1/5] [NFC] debugedit: Protect macro arguments by parentheses

2021-02-15 Thread Mark Wielaard
From: Jan Kratochvil --- tools/debugedit.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/debugedit.c b/tools/debugedit.c index e9d8f3ae7..87c1cd622 100644 --- a/tools/debugedit.c +++ b/tools/debugedit.c @@ -233,7 +233,7 @@ typedef struct int shift =

[Rpm-maint] [PATCH 2/5] [NFC] debugedit: Move code to separate functions.

2021-02-15 Thread Mark Wielaard
From: Jan Kratochvil New functions edit_strp, skip_form and edit_attributes_str_comp_dir called by edit_attributes. Split part of read_dwarf2_line into a read_dwarf4_line function. New function edit_dwarf2_any_str called by edit_dwarf2 at the end of phase 0 to rebuild .debug_str. ---

[Rpm-maint] debugedit: Implement DWARF-5. (#1332)

2021-02-15 Thread Mark Wielaard
Hi, It looks like the rpm-maint github bridge doesn't always work flawlessly with attached patches. So here the whole series is using normal git send-email. They are also available at: https://code.wildebeest.org/git/user/mjw/rpm/log/?h=gcc-dwarf5 These patches are based on the original patches

[Rpm-maint] [PATCH 4/5] debugedit: Handle DWARF-5 debug_line and debug_line_str.

2021-02-15 Thread Mark Wielaard
Handle the new DWARF5 .debug_line tables and the new DW_FORM_line_strp. DWARF5 tables are handled separately from the earlier tables. They will never change size, but they do need updates to the .debug_str or .debug_line_str references. Based on a patch from Jan Kratochvil --- tools/debugedit.c

[Rpm-maint] [PATCH 5/5] debugedit: Add DWARF5 tests

2021-02-15 Thread Mark Wielaard
Adjust some existing tests so they are run with an explicit -gdwarf-4 and add an -gdwarf-5 variant to make testing independent of the gcc default DWARF version. The tests that might generate a DWARF5 line table work for both version 4 and 5 and some also ignore stderr output when using

[Rpm-maint] [PATCH 3/5] debugedit: Implement DWARF-5 unit header and new forms parsing.

2021-02-15 Thread Mark Wielaard
.debug_line format (which isn't produced with binutils < 2.36). Patches slightly edited/merged by Mark Wielaard --- tools/debugedit.c | 88 +++ 1 file changed, 81 insertions(+), 7 deletions(-) diff --git a/tools/debugedit.c b/tools/debugedit.c in

Re: [Rpm-maint] [rpm-software-management/rpm] debugedit: Do not 'edit_dwarf2' when just extracting build-id (#1435)

2020-11-17 Thread Mark Wielaard
On Sun, 2020-11-15 at 12:18 -0800, Vitalio wrote: > > Yes, but you also have to check base_dir && dest_dir aren't set. > > I will rework. You last patch looks good. Thanks, Mark ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org

Re: [Rpm-maint] [rpm-software-management/rpm] debugedit: Distinguish files from directories in src list file (#1436)

2020-11-17 Thread Mark Wielaard
Hi Vitalio, On Sun, 2020-11-15 at 12:35 -0800, Vitalio wrote: > BTW. How does this help you speed things up? > > We do just `grep -v '/$' to filter directories from source list[1], instead > of loop similar to `while read f; do test -d $f || echo $f; done` which takes > more than 15 seconds on

[Rpm-maint] [PATCH] [NFC] debugedit: Move code to separate functions.

2020-11-16 Thread Mark Wielaard
Hi, This looks OK. I added a description of which functions were separate from where to the commit message and rebased the commit to the master branch. Cheers, Mark From ca137a2fa64eacfd0ad42b89c8436d78e1143820 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Mon, 17 Aug 2020 21:58:19 +0200

[Rpm-maint] debugedit: Fix handling in caller for errors in called read_dwarf2_line.

2020-11-16 Thread Mark Wielaard
Hi, I don't fully understand what this patch is intended to do. Why is it necessary? > commit 0da448c337d481f1c50af212246ceb213a7d80cc (HEAD -> master) > Author: Jan Kratochvil > Date: Mon Aug 17 21:46:47 2020 +0200 > > debugedit: Fix handling in caller for errors in called >

[Rpm-maint] [PATCH] [NFC] debugedit: Protect macro arguments by parentheses

2020-11-16 Thread Mark Wielaard
Hi, The attached patch is part of the proposed patch series for PR/1332 and looks good. It can be applied independently IMHO. Cheers, Mark From aabd13f513eefe7e7db35a668e650a304def85d5 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Mon, 17 Aug 2020 16:56:56 +0200 Subject: [PATCH] [NFC]

Re: [Rpm-maint] [rpm-software-management/rpm] debugedit: Distinguish files from directories in src list file (#1436)

2020-11-15 Thread Mark Wielaard
Hi, On Sun, 2020-11-15 at 07:20 -0800, Vitalio wrote: > Append / to directories in source file list (for `-l > option) to allow > quickly distinguish them from regular files (to avoid adding them raw > into %files section). This is needed for ALT for our debuginfo > processing to speed things up.

Re: [Rpm-maint] [rpm-software-management/rpm] debugedit: Do not 'edit_dwarf2' when just extracting build-id (#1435)

2020-11-15 Thread Mark Wielaard
On Sun, Nov 15, 2020 at 07:11:02AM -0800, Vitalio wrote: > No need to call edit_dwarf2() if debugedit is invoked just to extract > build-id (with `-i -n). Yes, but you also have to check base_dir && dest_dir aren't set. > Otherwise, we will get `DWARF version 0 > unhandled warning for compressed

[Rpm-maint] [PATCH] Remove set, but unused, variables in macro.c and rpmlua.c

2020-10-23 Thread Mark Wielaard
macro.c: In function ‘mbopt’: macro.c:895:19: warning: unused variable ‘me’ [-Wunused-variable] 895 | rpmMacroEntry me = mb->me; | ^~ rpmlua.c: In function ‘fd_seek’: rpmlua.c:985:22: warning: unused variable ‘mode’ [-Wunused-variable] 985 | static const int

Re: [Rpm-maint] [rpm-software-management/rpm] elfdeps: Generate dependencies on non-executable shared libraries (#1393)

2020-10-12 Thread Mark Wielaard
Hi, On Mon, 2020-10-12 at 00:35 -0700, Panu Matilainen wrote: > The problem here is that we're trying to classify a hermaphrodite > entity into one of two sexes. ET_EXEC is clear, but ET_DYN can be > either an executable, a dynamic shared library *or both*. Until we > embrace this fact, we'll get

Re: [Rpm-maint] [rpm-software-management/rpm] debugedit: Implement DWARF-5. (#1332)

2020-08-17 Thread Mark Wielaard
Hi Jan, On Sun, 2020-08-16 at 15:02 -0700, Jan Kratochvil wrote: > -- Commit Summary -- > > * debugedit: Implement DWARF-5. > > -- File Changes -- > > M tests/debugedit.at (249) > M tools/debugedit.c (914) > > -- Patch Links -- > >

Re: [Rpm-maint] [rpm-software-management/rpm] debugedit: Fix missing relocation of .debug_types section. (#1323)

2020-08-11 Thread Mark Wielaard
On Sat, Aug 08, 2020 at 07:04:03AM +0200, Jan Kratochvil wrote: > On Fri, 07 Aug 2020 13:55:35 +0200, Mark Wielaard wrote: > > But I pulled > > that branch and reviewed the actual commits (1d080e02 and c804a960). > > git clone -b types g...@github.com:jankratochvil/rpm.git

Re: [Rpm-maint] [rpm-software-management/rpm] debugedit: Fix missing relocation of .debug_types section. (#1323)

2020-08-07 Thread Mark Wielaard
Hi Jan, On Sat, 2020-08-01 at 11:23 +0200, Jan Kratochvil wrote: > debugedit: Fix missing relocation of .debug_types section. > https://github.com/rpm-software-management/rpm/pull/1323 I believe our mail review comments don't make it to that website. And given that there are some forced updates

Re: [Rpm-maint] [rpm-software-management/rpm] debugedit: Fix missing relocation of .debug_types section. (#1323)

2020-07-31 Thread Mark Wielaard
Hi Florian, On Fri, 2020-07-31 at 14:24 +0200, Florian Festi wrote: > Mark can you have a look at this, please? Sure. But somehow I never got this email through the mailinglist, so I don't know how to reply so that my comments show up on that pull. Also, it seems there are various force pushes

Re: [Rpm-maint] [rpm-software-management/rpm] 4.15.1: sepdebugcrcfix is not able to locate source files (#1207)

2020-07-26 Thread Mark Wielaard
Hi Tomasz, On Sat, 2020-07-25 at 06:44 -0700, Tomasz Kłoczko wrote: > Any update or progress? Unfortunately it seems to be a GCC bug: ".debug_line with LTO refers to bogus file-names" https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93865 ___ Rpm-maint

Re: [Rpm-maint] [rpm-software-management/rpm] Please support smaller build-ids (#950)

2019-11-27 Thread Mark Wielaard
Hi Frank, Thanks so much for trying to come up with actual numbers! On Tue, 2019-11-26 at 13:07 -0800, Frank Ch. Eigler wrote: > Argh, very sorry @espindola but I was 3 orders of magnitude too high > with my extrapolated numbers. I hereby hand back my math card. The > collision probability is

Re: [Rpm-maint] [rpm-software-management/rpm] Please support smaller build-ids (#950)

2019-11-25 Thread Mark Wielaard
On Sat, 2019-11-23 at 09:53 -0800, Rafael Ávila de Espíndola wrote: > > If we really need 128 bits, which hash would you suggest for a fast > buildid? Farmhash comes to mind. 128 bits is the minimum that GNU binutils ld and gold support, you can choose between uuid (128bits), md5 (128bits) and

Re: [Rpm-maint] [rpm-software-management/rpm] Remove unused variable id in find-debuginfo.sh (#825)

2019-08-26 Thread Mark Wielaard
Hi, On Mon, Aug 26, 2019 at 02:44:22AM -0700, Tom de Vries wrote: > 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

Re: [Rpm-maint] [rpm-software-management/rpm] Add --zlib-compress-debug-sections to find-debug-info.sh (#795)

2019-08-23 Thread Mark Wielaard
Hi, Sorry for the late reply. On Thu, 2019-07-18 at 05:40 -0700, Tom de Vries wrote: > The script find-debuginfo.sh has a --run-dwz switch to compress the debug > info using dwz. > > Add a similar switch --zlib-compress-debug-sections that compresses the debug > info using objcopy

Re: [Rpm-maint] [rpm-software-management/rpm] Compress annobin notes (#751)

2019-06-17 Thread Mark Wielaard
Hi Nick, On Fri, 2019-06-14 at 09:29 -0700, nickclifton wrote: > This is a request to add support for compressing annobin notes found > in executable binaries built on Fedora and RHEL systems. > > The annobin project adds a note section to binary files describing > the security hardening

[Rpm-maint] debugedit: Add some testcases and handle .debug_macro (gcc -g3)

2019-06-17 Thread Mark Wielaard
Hi, debugedit wouldn't properly handle gcc -g3 which generates .debug_macro sections. The sections would contain references to .debug_str which debugedit rewrites. But it would not update the references in .debug_macro which would upset various tools. For example gdb:

[Rpm-maint] [PATCH 4/5] Handle .debug_macro in debugedit.

2019-06-17 Thread Mark Wielaard
g +* Mon Jun 3 2019 Mark Wielaard +- Create hello-g3 for -g3 .debug_macro testing. + +* Wed May 18 2016 Mark Wielaard +- Add hello2 for dwz testing support. + +* Tue Oct 20 1998 Jeff Johnson +- create. diff --git a/tests/debugedit.at b/tests/debugedit.at index 8b724d3..7e26085 100644 --- a/test

[Rpm-maint] [PATCH 1/5] Add some color to the tests if available and the terminal supports it.

2019-06-17 Thread Mark Wielaard
While working on some new testcases it helped to see the test results in color. We could all use some extra color while working on dull tasks. --- tests/local.at | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/local.at b/tests/local.at index 42eef1c..42c799b 100644 ---

[Rpm-maint] [PATCH 5/5] debugedit: Make sure .debug_line old/new idx start equal.

2019-06-17 Thread Mark Wielaard
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. --- tools/debugedit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/debugedit.c b/tools/debugedit.c index 84483ef..9f8dcd0 100644

[Rpm-maint] [PATCH 2/5] Add some debugedit tests.

2019-06-17 Thread Mark Wielaard
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

[Rpm-maint] [PATCH 3/5] debugedit: Refactor reading/writing of relocated values.

2019-06-17 Thread Mark Wielaard
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

[Rpm-maint] [PATCH 1/2] Fix --without-lua build.

2019-06-03 Thread Mark Wielaard
commit 62bd62 "Add a rpmlua wrapper function for registering libraries" moved the rpmluaRegister function definition into rpmio/rpmlua.h and added an #include . This made that file not compile anymore when lua-devel isn't installed and configuring --without-lua. Even though that function isn't

[Rpm-maint] [PATCH 2/2] Skip tests that use lua (indirectly) when configured --without-lua.

2019-06-03 Thread Mark Wielaard
The rpmbuild.at autosetup test uses lua indirectly and the rpmscript.at basic script failures 1 testcase uses lua directly. Skip both when lua isn't available. With this patch and configure --without-lua the test results will be: 383 tests behaved as expected. 113 tests were skipped. ---

Re: [Rpm-maint] [rpm-software-management/rpm] debugedit fails to update section headers (#423)

2019-05-12 Thread Mark Wielaard
On Mon, Apr 29, 2019 at 02:24:33PM +, Michael Schroeder wrote: > Mark, any update on this? We (SUSE) get corrupt debuginfo files from > time to time because of this bug. Apologies for the slow response. I looked at it before, but didn't understand what was going wrong. But I now believe this

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: provide a mecanism to store buildroot composition in the srpm or a specific subpackage (#607)

2019-05-01 Thread Mark Wielaard
On Wed, May 01, 2019 at 12:56:39AM -0700, nim-nim wrote: > It turns out that even an historic package like elfutils has to hack this in > `%check` because it's not done by default. I was wondering what this was referring to and I think you mean: %check # Record some build root versions in

Re: [Rpm-maint] [rpm-software-management/rpm] Add flag to use strip -g instead of full strip on DSOs (RhBug:1663264) (#643)

2019-03-20 Thread Mark Wielaard
On Tue, 2019-03-19 at 12:30 +, pavlinamv wrote: > Thank you very much for the review. According of the review I added > changes in two places: > - in documentation: explicitly say "ONLY on DSOs" to make clear how > it differs from -g. (as Mark wrote) and add that options -g and --g- > libs

Re: [Rpm-maint] [rpm-software-management/rpm] Add flag to use strip -g instead of full strip on DSOs (RhBug:1663264) (#643)

2019-03-18 Thread Mark Wielaard
On Sat, 2019-03-16 at 22:56 -0700, pavlinamv wrote: > From 960860164a3c5277d3a31cbf73e60c1d4a16 Mon Sep 17 00:00:00 2001 > From: Pavlina Moravcova Varekova > Date: Sun, 17 Mar 2019 06:47:26 +0100 > Subject: [PATCH] Add flag to use strip -g instead of full strip on DSOs > (RhBug:1663264) > >

Re: [Rpm-maint] [rpm-software-management/rpm] Add flag to use strip -g instead of full strip on DSOs (RhBug:1663264) (#643)

2019-03-18 Thread Mark Wielaard
On Mon, 2019-03-18 at 15:40 +0100, Mark Wielaard wrote: > Alternatively since -g-libs is a subset of "full" -g we might simply > set strip_g=true if just -g is given. That might need a code tweak > below though. boo. now I am confusing myself... sorry. I meant: "we migh

Re: [Rpm-maint] rpmbuild: File listed twice (but only build-ids)

2019-01-15 Thread Mark Wielaard
On Tue, 2019-01-15 at 10:40 -0600, Richard Shaw wrote: > Ooooaaa... > > So this has been around since at least 2017 and there's no fix? Much longer than that. At least since 2012, probably earlier. %exclude is discouraged, which is why it doesn't seem to have higher priority. See also:

Re: [Rpm-maint] [PATCH] find-debuginfo.sh: Handle application/x-pie-executable (file 5.33 output).

2018-05-30 Thread Mark Wielaard
On Tue, 2018-05-22 at 22:20 +0200, Mark Wielaard wrote: > 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 >

[Rpm-maint] [PATCH] find-debuginfo.sh: Handle application/x-pie-executable (file 5.33 output).

2018-05-22 Thread Mark Wielaard
-g to keep that symbol table). https://bugzilla.redhat.com/show_bug.cgi?id=1581224 Signed-off-by: Mark Wielaard <m...@klomp.org> --- scripts/find-debuginfo.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh index a7c2db0..90a4494

Re: [Rpm-maint] [PATCH] debugedit: Check .debug_str index is valid before use.

2018-03-12 Thread Mark Wielaard
ase 1, when we don't need to collect the comp_dir. But we still do, wrongly using the old string table... So the error is kind of correct. Fix attached, which looks a bit funny, but really only wraps the affected code in an if (phase == 0) block. Cheers, MarkFrom 8e6eb541067da7848b600b95c6ff8c3

[Rpm-maint] [PATCH] debugedit: Check .debug_str index is valid before use.

2018-03-07 Thread Mark Wielaard
produce a more helpful error message. https://bugzilla.redhat.com/show_bug.cgi?id=1543912 Signed-off-by: Mark Wielaard <m...@klomp.org> --- tools/debugedit.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tools/debugedit.c b/tools/debugedit.c index 57cd830..6c71cbc

[Rpm-maint] [PATCH] Fix type mismatch calculating new line program offset in debugedit.c.

2018-01-22 Thread Mark Wielaard
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

Re: [Rpm-maint] [rpm-software-management/rpm] Missing build id, Generating build-id links failed (#367)

2017-12-10 Thread Mark Wielaard
On Sun, Dec 10, 2017 at 09:34:25AM +0100, Tzafrir Cohen wrote: > On Fri, Dec 08, 2017 at 12:35:44AM +0100, Mark Wielaard wrote: > > At least the Fedora go toolchain should be able to generate proper > > build-ids these days. > > If not, see these (old) notes: > > htt

Re: [Rpm-maint] [rpm-software-management/rpm] Missing build id, Generating build-id links failed (#367)

2017-12-07 Thread Mark Wielaard
Hi Eli, On Thu, Dec 07, 2017 at 03:20:01PM -0800, Eli Uriegas wrote: > ``` > error: Missing build-id in > /root/rpmbuild/BUILDROOT/docker-ce-17.12.0.ce-0.1.rc1.fc27.x86_64/usr/bin/docker-containerd-shim > error: Generating build-id links failed > Missing build-id in >

Re: [Rpm-maint] Drowning in build-ids

2017-10-25 Thread Mark Wielaard
On Wed, 2017-10-25 at 12:49 +0200, Igor Gnatenko wrote: > On Wed, 2017-10-25 at 13:46 +0300, Panu Matilainen wrote: > So I'm wondering how to make this less ugly. > > > > The first thing that comes to mind is adding a %hidden virtual > > attribute  > > and using it on build-ids (which are in a

Re: [Rpm-maint] [rpm-software-management/rpm] rpm-4.14.0/tools/debugedit.c:2144]: (style) Array index 'lndx' is used before limits check. (#332)

2017-10-13 Thread Mark Wielaard
.table[lndx].unit_length) > && lndx < dso->lines.used) > lndx++; > > Suggest limit check array index before use, not after. Yes, nice catch. The conditions should be swapped. Patch attached. Cheers, Mark >From 3be44f93ab963169b1b1f4f

[Rpm-maint] [PATCH] Fix rpmlog printing of off_t in fdConsume.

2017-10-05 Thread Mark Wielaard
a warning because the size doesn't match the %ld format specifier. Change it to %jd and explicitly cast it to intmax_t to make it print consistently on any arch. Signed-off-by: Mark Wielaard <m...@klomp.org> --- build/pack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

[Rpm-maint] [PATCH] Fix rpmlog warning in lzopen_internal from too big length specifier.

2017-10-05 Thread Mark Wielaard
memlimit is defined as uint32_t, but was printed as %lu. Change to %u to avoid a gcc warning. Signed-off-by: Mark Wielaard <m...@klomp.org> --- rpmio/rpmio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c index d8b8840..c7cbc32

[Rpm-maint] [PATCH] Avoid warning about mbAppendStr if lui support isn't enabled.

2017-10-05 Thread Mark Wielaard
Guard the whole mbAppendStr function with ifdef WITH_LUA to avoid a warning when lua support isn't enabled because it is only used inside the doLua function (which is empty unles WITH_LUA is defined). Signed-off-by: Mark Wielaard <m...@klomp.org> --- rpmio/macro.c | 3 +++ 1 file chan

Re: [Rpm-maint] rpm4.14 makes perl-RPM4 testsuite to segfault

2017-10-05 Thread Mark Wielaard
On Thu, 2017-10-05 at 15:36 +0200, Thierry Vignaud wrote: > On 5 October 2017 at 14:07, Igor Gnatenko > wrote: > > > For the record > > > BTW, the latest issue I've with rpm-4.14 is that its testsuite > > > has > > > several debugsources related failures  when

[Rpm-maint] [PATCH 2/2] Add debugsource recommends to debuginfo packages.

2017-09-21 Thread Mark Wielaard
subpackages to check the debugsource (or main debuginfo) package is recommended. Signed-off-by: Mark Wielaard <m...@klomp.org> --- build/files.c | 33 +++-- tests/rpmbuild.at | 46 +- 2 files changed, 76 insertions

[Rpm-maint] [PATCH 1/2] Rename addPackageRequires to addPackageDeps in build/files.

2017-09-21 Thread Mark Wielaard
Also add the dependency tag as argument so it can be used to add either a Requires or Recommends. Adjust the one caller to pass RPMTAG_REQUIRENAME. Signed-off-by: Mark Wielaard <m...@klomp.org> --- build/files.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a

Re: [Rpm-maint] [PATCH] Add debugsource recommends to debuginfo packages.

2017-09-21 Thread Mark Wielaard
On Thu, 2017-09-21 at 10:41 +0300, Panu Matilainen wrote: > Moving an entire function while also changing it is a bit of a no- > no, because it's makes it hard to see what actually changed. Moving > things around also obfuscates git history, which is why I prefer > adding a prototype to the top of

[Rpm-maint] [PATCH] Add debugsource recommends to debuginfo packages.

2017-09-18 Thread Mark Wielaard
findDebugsourcePackage. Use it to add a requires to the main debuginfo file and/or the debuginfo subpackages. Extend the various rpmbuild.at tests that create debugsource and/or debuginfo subpackages to check the debugsource (or main debuginfo) package is recommended. Signed-off-by: Mark Wielaard &l

Re: [Rpm-maint] [PATCH] Warn and create empty debugsource package if there are no sources.

2017-08-03 Thread Mark Wielaard
On Wed, 2017-08-02 at 17:43 +0200, Igor Gnatenko wrote: > On Wed, 2017-08-02 at 13:09 +0200, Mark Wielaard wrote: > > Do we want to be nicer to packages that don't include sources like > > this? > > Or should we just declare that this is probably a packaging issue > >

Re: [Rpm-maint] [PATCH 2/2] Test split debuginfo packages with RemovePathPostfixes.

2017-08-02 Thread Mark Wielaard
On Fri, 2017-07-28 at 23:24 +0200, Mark Wielaard wrote: > If split debuginfo code doesn't know about RemovePathPostfixes it fails: > > error: Installed (but unpackaged) file(s) found: >/usr/lib/debug/bin/hello.foobar-1.0-1.x86_64.debug This one also now passes with

Re: [Rpm-maint] [PATCH 1/2] Test split debuginfo packages with excluded files.

2017-08-02 Thread Mark Wielaard
On Fri, 2017-07-28 at 23:24 +0200, Mark Wielaard wrote: > If split debuginfo code doesn't know about excluded files it fails: > > error: Installed (but unpackaged) file(s) found: >/usr/lib/debug/bin/hello3-1.0-1.x86_64.debug And with Igor's fixes this tes

Re: [Rpm-maint] [PATCH] Add rpmbuild debuginfo subpackages tests.

2017-08-02 Thread Mark Wielaard
On Fri, 2017-07-28 at 21:55 +0200, Mark Wielaard wrote: > This adds various tests for making sure multiple subpackages are build > correctly. Without debuginfo subpackages, with subpackages, subpackages > with unique debug file and source dir paths and with separate debugsourc

Re: [Rpm-maint] [PATCH] Warn and create empty debugsource package if there are no sources.

2017-08-02 Thread Mark Wielaard
Hi, On Fri, 2017-07-28 at 15:29 +0200, Mark Wielaard wrote: > + if [ ! -s "$srcout" ]; then > +echo >&2 "*** WARNING: No source files found. Creating empty > debugsource package" > +# Create the empty directory. > +# See also debug

[Rpm-maint] [PATCH 1/2] Test split debuginfo packages with excluded files.

2017-07-28 Thread Mark Wielaard
If split debuginfo code doesn't know about excluded files it fails: error: Installed (but unpackaged) file(s) found: /usr/lib/debug/bin/hello3-1.0-1.x86_64.debug Signed-off-by: Mark Wielaard <m...@klomp.org> --- tests/Makefile.am | 1 + tests/data/SPEC

[Rpm-maint] [PATCH 2/2] Test split debuginfo packages with RemovePathPostfixes.

2017-07-28 Thread Mark Wielaard
If split debuginfo code doesn't know about RemovePathPostfixes it fails: error: Installed (but unpackaged) file(s) found: /usr/lib/debug/bin/hello.foobar-1.0-1.x86_64.debug Signed-off-by: Mark Wielaard <m...@klomp.org> --- tests/Makefile.am | 1 + ..

[Rpm-maint] [PATCH] Add rpmbuild debuginfo subpackages tests.

2017-07-28 Thread Mark Wielaard
This adds various tests for making sure multiple subpackages are build correctly. Without debuginfo subpackages, with subpackages, subpackages with unique debug file and source dir paths and with separate debugsources. Signed-off-by: Mark Wielaard <m...@klomp.org> --- tests/Makef

[Rpm-maint] [PATCH] Warn and create empty debugsource package if there are no sources.

2017-07-28 Thread Mark Wielaard
Signed-off-by: Mark Wielaard <m...@klomp.org> --- scripts/find-debuginfo.sh | 13 + tests/rpmbuild.at | 33 + 2 files changed, 46 insertions(+) diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh index d8725ad..9b3815a

[Rpm-maint] [PATCH] Add two testcases for generating debugsource packages.

2017-07-28 Thread Mark Wielaard
-off-by: Mark Wielaard <m...@klomp.org> --- tests/Makefile.am | 1 + tests/data/SPECS/hello-cd.spec | 29 tests/rpmbuild.at | 62 ++ 3 files changed, 92 insertions(+) create mode 100644 tests/data/SPECS

[Rpm-maint] [PATCH] Make sure that debugsourcefiles.list is generated in the build dir.

2017-07-25 Thread Mark Wielaard
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 adding the build dir path as explicit argument to -S. Signed-off-by: Mark Wielaard &l

Re: [Rpm-maint] [PATCH] config: Detect major/minor warnings and include the correct system header.

2017-07-21 Thread Mark Wielaard
ined in another header in the first place. Thanks, Mark From 77a745abd88f278b4c29aadefb2f6c5d47bde5e6 Mon Sep 17 00:00:00 2001 From: Mark Wielaard <m...@klomp.org> Date: Wed, 19 Jul 2017 14:43:28 +0200 Subject: [PATCH] config: Detect major/minor warnings and include the correct system head

[Rpm-maint] [PATCH] replaceSigDigests is only used with IMAEVM.

2017-07-19 Thread Mark Wielaard
The replaceSigDigests function is only used in includeFileSignatures when WITH_IMAEVM is defined. If not warning is generated. Signed-off-by: Mark Wielaard <m...@klomp.org> --- sign/rpmgensig.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sign/rpmgensig.c b/sign/rpmgensig.c

[Rpm-maint] [PATCH] find-debuginfo.sh: Remove non-allocated NOBITS sections from minisymtab.

2017-07-19 Thread Mark Wielaard
. Signed-off-by: Mark Wielaard <m...@klomp.org> --- scripts/find-debuginfo.sh | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh index e19ce9b..2fa95e8 100755 --- a/scripts/find-debuginfo.sh +++ b/scripts/find-debugi

[Rpm-maint] [PATCH] config: Detect major/minor warnings and include the correct system header.

2017-07-19 Thread Mark Wielaard
M_FIELD(hdr->devMajor, dev, field); ^~ Adjust the configure check and undef the warning producing macros to get rid of the wrong definitions and use the macros from the right include. Tested against RHEL7 (glibc 2.17) and Fedora 26 (glibc 2.25). Signed-o

[Rpm-maint] [PATCH] find-debuginfo.sh: Add --keep-section and --remove-section for eu-strip.

2017-07-17 Thread Mark Wielaard
=1465997 Signed-off-by: Mark Wielaard <m...@klomp.org> --- scripts/find-debuginfo.sh | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh index 5613391..e19ce9b 100755 --- a/scripts/find-debuginfo.sh

[Rpm-maint] [PATCH 2/3] Use a file list to add build-id files to pkgList.

2017-06-29 Thread Mark Wielaard
-by: Mark Wielaard <m...@klomp.org> --- build/files.c | 74 ++- 1 file changed, 33 insertions(+), 41 deletions(-) diff --git a/build/files.c b/build/files.c index c7debdc..cb7def6 100644 --- a/build/files.c +++ b/build/files.c @@ -1614,6 +1

[Rpm-maint] [PATCH 3/3] Change mkattr to always create a %defattr with explicitly set modes.

2017-06-29 Thread Mark Wielaard
pendent of any umask settings. This works as is for both files and directories, so no file argument is necessary anymore. https://bugzilla.redhat.com/show_bug.cgi?id=1452893 https://bugzilla.redhat.com/show_bug.cgi?id=1458839 Signed-off-by: Mark Wielaard <m...@klomp.org> --- build/files.c | 17

[Rpm-maint] [PATCH 1/3] Extract package file list processing in separate functions.

2017-06-29 Thread Mark Wielaard
Extract two functions resetPackageFilesDefaults() and addPackageFileList() from processPackageFiles(). This will make it possible to add multiple (generated) file lists to a package later. Signed-off-by: Mark Wielaard <m...@klomp.org> --- build/files.c

[Rpm-maint] [PATCH] debugedit: skip_dir_prefix should check for dir separator.

2017-06-28 Thread Mark Wielaard
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 <m...@klomp.org> --- tools/debugedit.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/debug

[Rpm-maint] [PATCH] find-debuginfo.sh: Use 'return', not 'continue', to break out do_file().

2017-06-28 Thread Mark Wielaard
meaningful in a `for', `while', or `until' loop https://bugzilla.redhat.com/show_bug.cgi?id=1465170 Signed-off-by: Mark Wielaard <m...@klomp.org> --- scripts/find-debuginfo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/find-debuginfo.sh b/scripts/find-de

[Rpm-maint] [PATCH] find-debuginfo.sh: Filter out all like fake file names.

2017-06-28 Thread Mark Wielaard
trings "" and "". 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-b

[Rpm-maint] [PATCH] find-debuginfo.sh: Don't create dwz multi file if there is only one .debug.

2017-06-26 Thread Mark Wielaard
.debug file. Signed-off-by: Mark Wielaard <m...@klomp.org> --- scripts/find-debuginfo.sh | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh index aaf4c75..7ab39a2 100755 --- a/scripts/find-debuginfo.sh +++ b/s

[Rpm-maint] [PATCH] Update find-debuginfo.sh options and macros documentation.

2017-06-26 Thread Mark Wielaard
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 <m...@klomp.org> --- macros.in

Re: [Rpm-maint] [PATCH] Use a file list to add build-id files to pkgList and explicitly set attrs.

2017-06-22 Thread Mark Wielaard
From 739796798ac854f80ae2f0d677f74bca734055f7 Mon Sep 17 00:00:00 2001 From: Mark Wielaard <m...@klomp.org> Date: Wed, 21 Jun 2017 16:57:13 +0200 Subject: [PATCH] Use a file list to add build-id files to pkgList and explicitly set attrs. mkattr used "-" as default mode which would

[Rpm-maint] [PATCH] Use a file list to add build-id files to pkgList and explicitly set attrs.

2017-06-09 Thread Mark Wielaard
those files using the defaults mode/attr settings as if they were part of the original package file list. https://bugzilla.redhat.com/show_bug.cgi?id=1452893 https://bugzilla.redhat.com/show_bug.cgi?id=1458839 Signed-off-by: Mark Wielaard <m...@klomp.org> --- build/files.c

Re: [Rpm-maint] [PATCH] rpmbuild: Reset attrFlags in generateBuildIDs.

2017-05-24 Thread Mark Wielaard
ut the attached which just uses /bin and /etc. The actual path used doesn't really matter for the test and this should work whatever --prefix you happen to configure with. Thanks, Mark >From 396a52016dfde76a6d3c89b15d998a30341517b5 Mon Sep 17 00:00:00 2001 From: Mark Wielaard <m...@klomp.org>

[Rpm-maint] [PATCH] rpmbuild: Reset attrFlags in generateBuildIDs.

2017-05-19 Thread Mark Wielaard
Debuginfo directories and files could be marked as configuration files if the file list ended with a config file. Patch by Panu Matilainen. Testcase by me. https://bugzilla.redhat.com/show_bug.cgi?id=1449732 Signed-off-by: Mark Wielaard <m...@klomp.org> --- build/f

[Rpm-maint] [PATCH] debugedit: Only output comp_dir under build dir (once).

2017-04-21 Thread Mark Wielaard
#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 <m...@klomp.org> --- tools/debugedit.c | 39 --- 1 file c

[Rpm-maint] [PATCH] debugedit: Add -n, --no-recompute-build-id.

2017-04-16 Thread Mark Wielaard
. %_no_recompute_build_ids can not be used together with %_unique_build_ids. Signed-off-by: Mark Wielaard <m...@klomp.org> --- macros.in | 7 ++- scripts/find-debuginfo.sh | 20 +++- tests/rpmbuildid.at | 122 ++

[Rpm-maint] [PATCH] find-debuginfo.sh: Only add minisymtab for executables or shared libraries.

2017-04-16 Thread Mark Wielaard
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 <m...@klomp.

[Rpm-maint] [PATCH] Make rpmsign tests work for builddir != srcdir.

2017-04-14 Thread Mark Wielaard
The gpg HOME is in the builddir testing directory. But the keys to import are in the srcdir data/keys directory. Signed-off-by: Mark Wielaard <m...@klomp.org> --- tests/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am

Re: [Rpm-maint] [PATCH 2/5] Only build bundled fts if system has a bad version that doesn't handle LFS

2017-03-24 Thread Mark Wielaard
On Fri, 2017-03-24 at 11:15 +0200, Panu Matilainen wrote: > On 03/23/2017 08:21 PM, Gleb Fotengauer-Malinovskiy wrote: > > diff --git a/configure.ac b/configure.ac > > index bdcb741..687d58c 100644 > > --- a/configure.ac > > +++ b/configure.ac > > @@ -717,6 +717,9 @@ AC_CHECK_FUNCS( > >

[Rpm-maint] [PATCH] build/files.c (generateBuildIDs): Fix small memory leak.

2017-03-23 Thread Mark Wielaard
From: Mark Wielaard <m...@klomp.org> mainiddir and debugiddir are allocated through rpmGetPath () and should be released when done. Signed-off-by: Mark Wielaard <m...@klomp.org> --- build/files.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/files.c b/build/files.c i

Re: [Rpm-maint] [PATCH v2] Unbreak short-circuited binary builds (RhBug:1434235)

2017-03-23 Thread Mark Wielaard
ey already point to the right file and in that case just reuse it instead of creating new ones. Keep track of duplicate build-ids found by noticing existing links that point to different targets. But don't do this for compat links, they should just point to the last (duplicate) main build-id symlin

[Rpm-maint] [PATCH] build/files.c: Only check build-ids for executable files in the main package.

2017-03-20 Thread Mark Wielaard
From: Mark Wielaard <m...@klomp.org> generateBuildIDs should mimic what find-debuginfo.sh does. Only check build-ids for executable files in non-debuginfo packages. This moves the isDbg check up so the is executeble check can be done when the file is part of the main package. This

[Rpm-maint] [PATCH] tests/rpmbuildid.at: Make file sed regexp more strict to extract BuildID.

2017-03-20 Thread Mark Wielaard
From: Mark Wielaard <m...@klomp.org> Like commit f0a5819 for rpmbuild.at. In the case of rpmbuildid.at the sed expression looked to work, but only matched by accident. Make the sed regexp more strict by only matching a hex-string. And properly "escape" [ and ] which inside an

[Rpm-maint] [PATCH] debugedit: Fix cross-endian build-id reading and updating section data.

2017-03-17 Thread Mark Wielaard
From: Mark Wielaard <m...@klomp.org> 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_i

[Rpm-maint] [PATCH] build/files.c (processPackageFiles): Don't call generateBuildIDs for noarch.

2017-03-17 Thread Mark Wielaard
From: Mark Wielaard <m...@klomp.org> We don't want to do build-id processing for noarch packages. It might be that noarch packages do contain architecture depended files, but those are already handled by processBinaryFiles. This fixes the building of openbios in fedora.

[Rpm-maint] [PATCH] debugedit: Fix edit_dwarf2_line replace_dirs -> replace_files typo.

2017-03-16 Thread Mark Wielaard
From: Mark Wielaard <m...@klomp.org> 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 w

Re: [Rpm-maint] [rpm-software-management/rpm] error: Missing build-id in /builddir/build/BUILDROOT/... (#177)

2017-03-15 Thread Mark Wielaard
On Wed, 2017-03-15 at 20:50 +0100, Mark Wielaard wrote: > I couldn't replicate this with the current fedora guile-2.0.14-1 > package. There the .go files are not actual ELF files. So rpm will not > complain about them not having a build-id. If that has changed in with > guile 2.1.8

  1   2   >