Commit 63b2c976 authored by Terje Rosten's avatar Terje Rosten

Bug#24925181 INCORRECT ISA DETECTION CODE IN OEL RPM SPEC

Wrapper for mysql_config used in multilib installs modified to work as
intended, added more archs (aarch64, ppc64le, s390x, s390, sparc and
sparc64) to lists in fallback mode and use same script for EL and
Fedora.

Thanks to Alexey Kopytov for report and fix.
parent 14921277
...@@ -2,22 +2,30 @@ ...@@ -2,22 +2,30 @@
# #
# Wrapper script for mysql_config to support multilib # Wrapper script for mysql_config to support multilib
# #
# Only works on OEL6/RHEL6 and similar
# #
# This command respects setarch
# This command respects setarch, works on OL6/RHEL6 and later
bits=$(rpm --eval %__isa_bits) bits=$(rpm --eval %__isa_bits)
case $bits in case $bits in
32|64) status=known ;; 32|64) ;;
*) status=unknown ;; *) bits=unknown ;;
esac esac
if [ "$status" = "unknown" ] ; then # Try mapping by uname if rpm command failed
echo "$0: error: command 'rpm --eval %__isa_bits' returned unknown value: $bits" if [ "$bits" = "unknown" ] ; then
exit 1 arch=$(uname -m)
case $arch in
x86_64|ppc64|ppc64le|aarch64|s390x|sparc64) bits=64 ;;
i386|i486|i586|i686|pentium3|pentium4|athlon|ppc|s390|sparc) bits=32 ;;
*) bits=unknown ;;
esac
fi fi
if [ "$bits" == "unknown" ] ; then
echo "$0: error: failed to determine isa bits on your arch."
exit 1
fi
if [ -x /usr/bin/mysql_config-$bits ] ; then if [ -x /usr/bin/mysql_config-$bits ] ; then
/usr/bin/mysql_config-$bits "$@" /usr/bin/mysql_config-$bits "$@"
...@@ -25,4 +33,3 @@ else ...@@ -25,4 +33,3 @@ else
echo "$0: error: needed binary: /usr/bin/mysql_config-$bits is missing. Please check your MySQL installation." echo "$0: error: needed binary: /usr/bin/mysql_config-$bits is missing. Please check your MySQL installation."
exit 1 exit 1
fi fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment