Package Details: mysql-shell 8.0.18-3

Git Clone URL: https://aur.archlinux.org/mysql-shell.git (read-only)
Package Base: mysql-shell
Description: An interface supporting development and administration for the MySQL Server
Upstream URL: https://dev.mysql.com/downloads/shell/
Keywords: mysqlsh
Licenses: GPL
Submitter: rdoursenaud
Maintainer: FrederickZh
Last Packager: FrederickZh
Votes: 1
Popularity: 0.000038
First Submitted: 2018-06-15 10:18
Last Updated: 2019-10-31 08:48

Latest Comments

FrederickZh commented on 2019-08-16 10:23

I managed to get it built with this PKGBUILD:

# Maintainer: Frederick Zhang <frederick888@tsundere.moe>
pkgname=mysql-shell
pkgver=8.0.17
pkgrel=1
pkgdesc='An interface supporting development and administration for the MySQL Server'
arch=('x86_64' 'i686')
url="https://dev.mysql.com/downloads/shell/"
license=('GPL')
GTEST_VERSION="1.8.0"
source=(
    "https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell-$pkgver-src.tar.gz"
    "mysql-shell-$pkgver-src.tar.gz.asc::https://dev.mysql.com/downloads/gpg/?file=mysql-shell-$pkgver-src.tar.gz"
    "https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-$pkgver.tar.gz"
    "mysql-boost-$pkgver.tar.gz.asc::https://dev.mysql.com/downloads/gpg/?file=mysql-boost-$pkgver.tar.gz"
    "googletest-release-$GTEST_VERSION.zip::https://github.com/google/googletest/archive/release-$GTEST_VERSION.zip"
)
noextract=("googletest-release-$GTEST_VERSION.zip")
md5sums=(
    "8a1b15515ec6f3e21aa777bbfe77c721"
    "SKIP"
    "7472a25d91973cbba5d8a8f176a3080b"
    "SKIP"
    "adfafc8512ab65fd3cf7955ef0100ff5"
)
validpgpkeys=('A4A9406876FCBD3C456770C88C718D3B5072E1F5')
depends=('python2' 'openssl' 'protobuf')
makedepends=('v8-6.7-static' 'cmake' 'clang' 'zip' 'zlib' 'libsasl' 'rpcsvc-proto' 'python2' 'python2-colorama' 'python2-pylint' 'python2-lazy-object-proxy' 'python2-singledispatch' 'python2-wrapt' 'ninja' 'git' 'wget')

build() {
    msg2 "Configuring MySQL"
    cd "$srcdir/mysql-$pkgver"
    mkdir -p bld && cd $_
    cmake .. -DWITH_BOOST="../boost" -DWITH_SSL=system -DWITH_PROTOBUF=system
    cd "$srcdir/mysql-$pkgver/bld"
    msg2 "Building mysqlclient"
    cmake --build . --target mysqlclient
    msg2 "Building mysqlxclient"
    cmake --build . --target mysqlxclient

    msg2 "Configuring MySQL Shell"
    cd "$srcdir/$pkgname-$pkgver-src"
    mkdir -p bld && cd $_
    cmake .. \
        -DWITH_TESTS=1 \
        -DWITH_GMOCK="${srcdir}/googletest-release-$GTEST_VERSION.zip" \
        -DCMAKE_C_COMPILER=/usr/bin/clang \
        -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DMYSQL_SOURCE_DIR="$srcdir/mysql-$pkgver" \
        -DMYSQL_BUILD_DIR="$srcdir/mysql-$pkgver/bld" \
        -DHAVE_PYTHON=1 \
        -DHAVE_V8=1 \
        -DV8_INCLUDE_DIR="/usr/include" \
        -DV8_LIB_DIR="/usr/lib" \
        -DWITH_PROTOBUF="/usr"
    msg2 "Building MySQL Shell"
    make
}

package() {
    cd "$srcdir/$pkgname-$pkgver-src/bld"
    make DESTDIR="$pkgdir/" install
    cd "$srcdir/$pkgname-$pkgver-src"
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

In terms of dependencies, I've pushed V8 6.7.288.46 to https://aur.archlinux.org/packages/v8-6.7-static/ however separating libmysqlclient and libmysqlxclient from the build process is still a quite tricky. Ideally we can make some effort to ship libmysqlxclient with https://aur.archlinux.org/packages/mysql/ and fix the missing header issues in the package atm, but since libmysql(x)client and mysqlsh have to share the same versions of libraries e.g. protobuf, we'd like to link both of them dynamically to system libraries so that intermediate static ones from MySQL won't be required for the Shell, but again finger crossed that can always work... So perhaps it's just better to build static libmysql(x)client in this package...

FrederickZh commented on 2019-08-05 06:56

Is it better to rename this package to mysql-shell-bin? Personally I would expect it to be built from source based on the naming.