On Tue, 29 Sep 2015 14:32:06 +0200, Sérgio Basto wrote:
On Seg, 2015-09-28 at 09:11 +0200, Jan Kratochvil wrote:
> This works for Requires (or Recommends) but not for BuildRequires:
Sorry if it is off-topic ...
I got a similar question, I just tested and the following works in
copr :
%ifarch x86_64
BuildRequires: libstdc++-static(x86-32) glibc(x86-32) glibc-devel(x86-32)
libgcc(x86-32)
BuildRequires: libstdc++-static(x86-64)
%else
BuildRequires: libstdc++-static
%endif
In most cases - such as rpmbuild, mock or koji it works.
But it does not work in Koschei which is how I found this problem:
https://github.com/msimacek/koschei/issues/54
And no matter where it works or not it is officially incorrect:
https://fedoraproject.org/wiki/Packaging:Guidelines#BuildRequires_and_.25...
So I have created in gdb.spec at least:
# --with buildisa: Use %%{?_isa} for BuildRequires
so that I still can benefit from proper BuildRequires myself but it cannot be
arch-specific by default anymore.
arch-BuildRequires are even essential for testsuite which does test cross-arch
debugging and needs the other-arch packages installed:
%if 0%{?_with_testsuite:1}
BuildRequires: glibc-devel%{bits_local} glibc-devel%{bits_other}
BuildRequires: libgcc%{bits_local} libgcc%{bits_other}
%endif # 0%{?_with_testsuite:1}
Jan