Mail archive
alpine-aports

[alpine-aports] [PATCH 1/2] main/mariadb: create user in .pre-install script

From: Sören Tempel <soeren+git_at_soeren-tempel.net>
Date: Mon, 16 Nov 2015 20:23:56 +0100

---
 main/mariadb/APKBUILD            | 7 ++++---
 main/mariadb/mariadb.pre-install | 6 ++++++
 2 files changed, 10 insertions(+), 3 deletions(-)
 create mode 100644 main/mariadb/mariadb.pre-install
diff --git a/main/mariadb/APKBUILD b/main/mariadb/APKBUILD
index d55889d..3cbd619 100644
--- a/main/mariadb/APKBUILD
+++ b/main/mariadb/APKBUILD
_at_@ -1,20 +1,21 @@
+# Contributor: Sören Tempel <soeren+alpine_at_soeren-tempel.net>
 # Contributor: Łukasz Jendrysik <scadu_at_yandex.com>
 # Contributor: Carlo Landmeter <clandmeter_at_gmail.com>
 # Maintainer: Natanael Copa <ncopa_at_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 0000000..2e6e668
--- /dev/null
+++ b/main/mariadb/mariadb.pre-install
_at_@ -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
+
-- 
2.6.3
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Nov 16 2015 - 20:23:56 GMT