aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2015-11-16 20:23:56 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2015-11-18 08:04:07 +0000
commitbce627835dabf7ec2b1eec947f24601a1a42a0e9 (patch)
tree9b29dc1891b37840f4810ae1c66576cc2b4188ad /main
parent4f5540c218aeeb5ffce5c2b2823823685cc8ae75 (diff)
downloadaports-bce627835dabf7ec2b1eec947f24601a1a42a0e9.tar.bz2
aports-bce627835dabf7ec2b1eec947f24601a1a42a0e9.tar.xz
main/mariadb: create user in .pre-install script
Diffstat (limited to 'main')
-rw-r--r--main/mariadb/APKBUILD7
-rw-r--r--main/mariadb/mariadb.pre-install6
2 files changed, 10 insertions, 3 deletions
diff --git a/main/mariadb/APKBUILD b/main/mariadb/APKBUILD
index d55889db96..3cbd6194c7 100644
--- a/main/mariadb/APKBUILD
+++ b/main/mariadb/APKBUILD
@@ -1,20 +1,21 @@
+# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
-
pkgname=mariadb
pkgver=10.1.8
-pkgrel=0
+pkgrel=1
pkgdesc="A fast SQL database server"
url="http://www.mariadb.org"
pkgusers="mysql"
pkggroups="mysql"
arch="all"
-license='GPL'
+license="GPL"
depends="$pkgname-common"
depends_dev="openssl-dev zlib-dev"
makedepends="cmake openssl-dev zlib-dev readline-dev libaio-dev ncurses-dev
linux-headers"
+install="$pkgname.pre-install"
source="https://downloads.mariadb.org/interstitial/mariadb-$pkgver/source/mariadb-$pkgver.tar.gz
$pkgname.initd
fix-mysql-install-db-path.patch
diff --git a/main/mariadb/mariadb.pre-install b/main/mariadb/mariadb.pre-install
new file mode 100644
index 0000000000..2e6e668e7f
--- /dev/null
+++ b/main/mariadb/mariadb.pre-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+addgroup -S mysql 2>/dev/null
+adduser -h /var/lib/mysql -s /sbin/nologin -G mysql -D mysql 2>/dev/null
+exit 0
+