{ "name": "mariadb", "version": "12.3.3", "summary": "MariaDB 12.3 LTS: the server, the mariadb client and tools, mariadb-backup and libmariadb", "category": "server", "license": "GPL-2.0-only", "homepage": "https://mariadb.org/", "source": { "url": "https://archive.mariadb.org/mariadb-12.3.3/source/mariadb-12.3.3.tar.gz", "sha256": "e99d739fd4a55f9a11dea7bd2287a262673e287550af3071c8469dd2bec0c163" }, "watch": {"kind": "index", "url": "https://archive.mariadb.org/", "regex": "href=\"mariadb-([0-9]+\\.[0-9]+\\.[0-9]+)/\"", "checksum": "https://archive.mariadb.org/mariadb-{version}/source/sha256sums.txt", "pin": "12.3"}, "deps": [ "openssl", "zlib", "pcre2", "fmt", "ncurses", "libxcrypt" ], "env_packages": [], "static": false, "nss": true, "check": "v=$(sbin/mariadbd --no-defaults --version | sed -n 's/.* Ver \\([0-9.]*\\).*/\\1/p') && [ -n \"$v\" ] && bin/my_print_defaults mysqld > /dev/null && t=$(mktemp -d) && chmod 755 \"$t\" && chown 65534:65534 \"$t\" && p=$(free_port) && pw=bvs-$RANDOM$RANDOM && m=v$RANDOM$RANDOM && TMPDIR=\"$t\" setpriv --reuid=65534 --regid=65534 --clear-groups bin/mariadb-install-db --no-defaults --basedir=\"$PREFIX\" --datadir=\"$t/data\" --auth-root-authentication-method=socket --skip-test-db --skip-name-resolve > \"$t/install.log\" 2>&1 && { sbin/mariadbd --no-defaults --user=nobody --basedir=\"$PREFIX\" --datadir=\"$t/data\" --socket=\"$t/mariadb.sock\" --port=\"$p\" --bind-address=127.0.0.1 --pid-file=\"$t/mariadb.pid\" --log-error=\"$t/error.log\" --tmpdir=\"$t\" --skip-name-resolve > \"$t/stdout.log\" 2>&1 & pid=$!; } && for i in $(seq 1 600); do bin/mariadb-admin --no-defaults -S \"$t/mariadb.sock\" -u root ping > /dev/null 2>&1 && break; kill -0 \"$pid\" 2> /dev/null || break; sleep 0.5; done && bin/mariadb-admin --no-defaults -S \"$t/mariadb.sock\" -u root ping > /dev/null && grep -E '^Uid:[[:space:]]+65534[[:space:]]' \"/proc/$pid/status\" > /dev/null && r() { bin/mariadb --no-defaults -S \"$t/mariadb.sock\" -u root -N -B \"$@\"; } && e=$(r -e \"SELECT GROUP_CONCAT(ENGINE ORDER BY ENGINE) FROM information_schema.ENGINES WHERE SUPPORT IN ('YES', 'DEFAULT')\") && ok=1 && for x in Aria CSV InnoDB MEMORY MRG_MyISAM MyISAM PERFORMANCE_SCHEMA SEQUENCE; do case \",$e,\" in *\",$x,\"*) ;; *) echo \"mariadb: no $x among the engines $e\" >&2; ok=0 ;; esac; done && [ $ok = 1 ] && [ \"$(r -e 'SELECT COUNT(*) FROM information_schema.PLUGINS WHERE PLUGIN_LIBRARY IS NOT NULL')\" = 0 ] && r -e \"CREATE DATABASE bvs; CREATE USER 'bvs'@'127.0.0.1' IDENTIFIED BY '$pw'; GRANT ALL ON bvs.* TO 'bvs'@'127.0.0.1'\" && b() { bin/mariadb --no-defaults -h 127.0.0.1 -P \"$p\" -u bvs --password=\"$pw\" -N -B bvs \"$@\"; } && b -e \"CREATE TABLE t (id INT PRIMARY KEY, v VARCHAR(64)) ENGINE=InnoDB; INSERT INTO t VALUES (1, '$m')\" && [ \"$(b -e 'SELECT v FROM t WHERE id = 1')\" = \"$m\" ] && b -e \"SHOW SESSION STATUS LIKE 'Ssl_version'\" | has -E '^Ssl_version[[:space:]]+TLSv1\\.[23]$' && CHECK_CPPFLAGS=\"-DPORT=$p -DPW=\\\"$pw\\\" -DVAL=\\\"$m\\\"\" check_lib libmariadb mysql.h 'MYSQL *c = mysql_init(NULL); MYSQL_RES *r; MYSQL_ROW w; if (!mysql_real_connect(c, \"127.0.0.1\", \"bvs\", PW, \"bvs\", PORT, NULL, 0)) { fprintf(stderr, \"libmariadb: %s\\n\", mysql_error(c)); return 1; } if (mysql_query(c, \"SELECT v FROM t WHERE id = 1\") || !(r = mysql_store_result(c)) || !(w = mysql_fetch_row(r)) || strcmp(w[0], VAL)) return 2; mysql_free_result(r); mysql_close(c)' && [ \"$(r -e 'SELECT COUNT(*) FROM bvs.t')\" = 1 ] && { bin/mariadb --no-defaults -h 127.0.0.1 -P \"$p\" -u bvs --password=\"x$pw\" -e 'SELECT 1' > \"$t/wrong.log\" 2>&1; has 'ERROR 1045' < \"$t/wrong.log\"; } && bin/mariadb-admin --no-defaults -S \"$t/mariadb.sock\" -u root shutdown && { wait \"$pid\"; pid=; } ; [ -z \"${pid:-}\" ] && has 'Shutdown complete' < \"$t/error.log\" && { bin/mariadb --no-defaults -h 127.0.0.1 -P \"$p\" -u bvs --password=\"$pw\" -e 'SELECT 1' > \"$t/stopped.log\" 2>&1; has \"ERROR 2002\\|ERROR 2003\" < \"$t/stopped.log\"; }; x=$?; [ -n \"${pid:-}\" ] && kill \"$pid\" 2> /dev/null && wait \"$pid\" 2> /dev/null; [ $x = 0 ] || cat \"$t/install.log\" \"$t/error.log\" \"$t/wrong.log\" \"$t/stopped.log\" >&2 2> /dev/null; rm -rf -- \"${t:?}\"; [ $x = 0 ] && echo \"MariaDB $v: its default option files readable, mariadb-install-db as uid 65534, mariadbd switching to nobody, a database, a user, an InnoDB table and a row over TCP with TLS (the mariadb client and a program linked with libmariadb) and over the unix socket, the engines $e compiled in and no plugin module; a wrong password and a stopped server refused\"; exit $x" }