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.
This commit is contained in:
parent
1492127728
commit
63b2c97650
@ -2,22 +2,30 @@
|
||||
#
|
||||
# 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)
|
||||
|
||||
case $bits in
|
||||
32|64) status=known ;;
|
||||
*) status=unknown ;;
|
||||
32|64) ;;
|
||||
*) bits=unknown ;;
|
||||
esac
|
||||
|
||||
if [ "$status" = "unknown" ] ; then
|
||||
echo "$0: error: command 'rpm --eval %__isa_bits' returned unknown value: $bits"
|
||||
exit 1
|
||||
# Try mapping by uname if rpm command failed
|
||||
if [ "$bits" = "unknown" ] ; then
|
||||
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
|
||||
|
||||
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
|
||||
/usr/bin/mysql_config-$bits "$@"
|
||||
@ -25,4 +33,3 @@ else
|
||||
echo "$0: error: needed binary: /usr/bin/mysql_config-$bits is missing. Please check your MySQL installation."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user