Bug #83428 RPM .spec broken for "non-multiarch" architectures
Submitted: 18 Oct 2016 14:27 Modified: 25 Oct 2016 14:13
Reporter: Alexey Kopytov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Packaging Severity:S3 (Non-critical)
Version:5.7 OS:Any
Assigned to: Terje Røsten CPU Architecture:Any

[18 Oct 2016 14:27] Alexey Kopytov
Description:
packaging/rpm-fedora/mysql.spec.in and packaging/rpm-oel/mysql.spec.in
contain code that make it impossible to build packages on an
architecture which is not in the "multiarchs" macro:

---

# multiarch support
%ifarch %{multiarchs}
mv %{buildroot}/%{_includedir}/mysql/my_config.h \
   %{buildroot}/%{_includedir}/mysql/my_config_%{_arch}.h
install -p -m 0644 %{SOURCE4} %{buildroot}/%{_includedir}/mysql/my_config.h
mv %{buildroot}/%{_bindir}/mysql_config %{buildroot}/%{_bindir}/mysql_config-%{__isa_bits}
install -p -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/mysql_config
%endif
...
%attr(755, root, root) %{_bindir}/mysql_config
%attr(755, root, root) %{_bindir}/mysql_config-%{__isa_bits}

---

Note that mysql_config-%{isa_bits} is only created when the architecture
is present in multiarchs, but the spec refers to it unconditionally
later which results in a build error on AArch64.

I'm not sure if AArch64 should be on the multiarchs list, I don't fully
understand the purpose of that code. So I'm reporting this as a more
general problem with how mysql_config-... is created and used.

How to repeat:
Look at the code around "multiarchs" in
packaging/rpm-fedora/mysql.spec.in and packaging/rpm-oel/mysql.spec.in.
[19 Oct 2016 6:38] MySQL Verification Team
Hello Alexey,

Thank you for the report and feedback!

Thanks,
Umesh
[19 Oct 2016 12:09] Terje Røsten
Hi again Alexey!

Thanks for report. Fix for this issue will be included in next release.
[25 Oct 2016 14:13] Paul DuBois
Posted by developer:
 
Noted in 5.7.17, 8.0.1 changelogs.

OEL RPM packages now better detect which platforms do not have
multilib support (for which 32-bit and 64-bit libraries can be
installed). Thanks to Alexey Kopytov for the patch.