Re: [Rpm-maint] [rpm-software-management/rpm] RFE: set builsubdir to the *first* extracted archive not the last one (#551)

2018-09-24 Thread Jeff Johnson
Even simpler -- only one line of code needs to change -- would be to define _buildsubdir only if it is not already defined. That might even permit overriding _buildsubdir to be set from the spec file, or -- with Yet Another POPT alias -- from the rpmbuild command line. And of course %setup

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: set builsubdir to the *first* extracted archive not the last one (#551)

2018-09-24 Thread Jeff Johnson
FWIW, here is an implementation that would permit first rather than last definition of %_buildsubdir to be used under user control. RPM5 permits read only macros which -- when set -- prevent a macro value from being changed. The syntax prefixes a macro name with a '.' in order to set (actually

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

2018-09-24 Thread Sergei Trofimovich
The following workaround allows to maintain original section order: ```diff --- a/tools/debugedit.c +++ b/tools/debugedit.c @@ -2342,21 +2342,21 @@ fdopen_dso (int fd, const char *name) } if (elf_getphdrnum (elf, ) != 0) { error (0, 0, "Couldn't get number of phdrs: %s",

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: set builsubdir to the *first* extracted archive not the last one (#551)

2018-09-24 Thread Jeff Johnson
You are absolutely correct that %setup from time immemorial has been overly complicated, non-intuitive, and *documented*. Expecting users to change their behavior 20y later is a political task, better left to distro packaging committees and package reviews: %setup does what %setup does.

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

2018-09-24 Thread Sergei Trofimovich
I think in my case it happens because `debugedit` was not able to delete any sections (no file size changes) but it reordered sections in the file and did not update section offsets. Attaching original, mangled file and a

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: set builsubdir to the *first* extracted archive not the last one (#551)

2018-09-24 Thread nim-nim
I don't doubt that's what the setup authors intended, but really, it's overly clever for human beings, that like their commands simple and easy to remember, it's overly clever for scripts, that like to loop over the same command not compute complex lists of arguments, it's overly clever for

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

2018-09-24 Thread Sergei Trofimovich
debugedit also can break gcc's crtstartup: https://bugs.gentoo.org/666954 . I think it's the same issue. Will try to provide more detail today. -- You are receiving this because you commented. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: set builsubdir to the *first* extracted archive not the last one (#551)

2018-09-24 Thread ニール・ゴンパ
You're supposed to use `%setup` once, and tell it how many archives it needs to extract before it it should change into the workdir. For example: `%setup -q -b 3` tells it to unpack `Source0`, `Source1`, `Source2`, and `Source3` before changing into the `%name-%version` workdir. If you want

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: set builsubdir to the *first* extracted archive not the last one (#551)

2018-09-24 Thread Andreas Scherer
I believe that's what the `-n` option of `%setup` is for. You can (or have to) set/repeat the desired `%buildsubdir` on every invocation of `%setup`. (IIRC, multiple `%setup`s are deemed esoteric/byzantine anyway.) -- You are receiving this because you are subscribed to this thread. Reply to