~ubuntu-branches/ubuntu/trusty/mysql-5.5/trusty-security

« back to all changes in this revision

Viewing changes to packaging/rpm-oel/mysql_config.sh

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2017-01-18 07:41:29 UTC
  • mfrom: (1.1.30)
  • Revision ID: package-import@ubuntu.com-20170118074129-gyilougbokbprl1p
Tags: 5.5.54-0ubuntu0.14.04.1
* SECURITY UPDATE: Update to 5.5.54 to fix security issues
  - CVE-2017-3238
  - CVE-2017-3243
  - CVE-2017-3244
  - CVE-2017-3258
  - CVE-2017-3265
  - CVE-2017-3291
  - CVE-2017-3312
  - CVE-2017-3313
  - CVE-2017-3317
  - CVE-2017-3318 
* debian/patches/fix_test_events_2.patch: fix date in test.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#
3
3
# Wrapper script for mysql_config to support multilib
4
4
#
5
 
# Only works on OEL6/RHEL6 and similar
6
5
#
7
 
# This command respects setarch
8
6
 
 
7
# This command respects setarch, works on OL6/RHEL6 and later
9
8
bits=$(rpm --eval %__isa_bits)
10
9
 
11
10
case $bits in
12
 
    32|64) status=known ;;
13
 
        *) status=unknown ;;
 
11
    32|64) ;;
 
12
        *) bits=unknown ;;
14
13
esac
15
14
 
16
 
if [ "$status" = "unknown" ] ; then
17
 
    echo "$0: error: command 'rpm --eval %__isa_bits' returned unknown value: $bits"
 
15
# Try mapping by uname if rpm command failed
 
16
if [ "$bits" = "unknown" ] ; then
 
17
    arch=$(uname -m)
 
18
    case $arch in
 
19
        x86_64|ppc64|ppc64le|aarch64|s390x|sparc64) bits=64 ;;
 
20
        i386|i486|i586|i686|pentium3|pentium4|athlon|ppc|s390|sparc) bits=32 ;;
 
21
        *) bits=unknown ;;
 
22
    esac
 
23
fi
 
24
 
 
25
if [ "$bits" == "unknown" ] ; then
 
26
    echo "$0: error: failed to determine isa bits on your arch."
18
27
    exit 1
19
28
fi
20
29
 
21
 
 
22
30
if [ -x /usr/bin/mysql_config-$bits ] ; then
23
31
    /usr/bin/mysql_config-$bits "$@"
24
32
else
25
33
    echo "$0: error: needed binary: /usr/bin/mysql_config-$bits is missing. Please check your MySQL installation."
26
34
    exit 1
27
35
fi
28