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
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
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",
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.
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
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
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:
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
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