diff --git a/spk/firebird/Makefile b/spk/firebird/Makefile new file mode 100644 index 000000000000..eea6bcbaccd9 --- /dev/null +++ b/spk/firebird/Makefile @@ -0,0 +1,33 @@ +SPK_NAME = firebird +SPK_VERS = 4.0.3 +SPK_ICON = src/firebird.png +SPK_REV = 1 + +BETA = 1 + +DEPENDS = cross/$(SPK_NAME) + +include ../../mk/spksrc.common.mk + +DISPLAY_NAME = FirebirdSQL +DESCRIPTION = Firebird is a relational database with excelent concurrency and high performance. +CHANGELOG = "Add FirebirdSQL DB server in version 4.0.2" +HOMEPAGE = https://firebirdsql.org/ +MAINTAINER = vitkabele +LICENSE = MPL + +OS_MIN_VERS = 7.0 +REQUIRED_MIN_DSM = 7.0 +REQUIRED_MAX_DSM = 7.1 + +WIZARDS_DIR = src/wizard + +# Startable service properties +STARTABLE = yes +SERVICE_SETUP = src/service-setup.sh +SERVICE_USER = auto +SERVICE_PORT = 3050 +SERVICE_PORT_TITLE = $(DISPLAY_NAME) + +include ../../mk/spksrc.spk.mk + diff --git a/spk/firebird/src/firebird.png b/spk/firebird/src/firebird.png new file mode 100644 index 000000000000..b99ebe76bd8f Binary files /dev/null and b/spk/firebird/src/firebird.png differ diff --git a/spk/firebird/src/service-setup.sh b/spk/firebird/src/service-setup.sh new file mode 100644 index 000000000000..c7d2012f9ac2 --- /dev/null +++ b/spk/firebird/src/service-setup.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +FBGUARD_BIN_FILE="${SYNOPKG_PKGDEST}/bin/fbguard" + +# We set onetime because we want the systemd to take care about the failures +SERVICE_COMMAND="${FBGUARD_BIN_FILE} -pidfile ${PID_FILE} -daemon -onetime" + +SYSDBA_PASSWORD_FILE="${SYNOPKG_PKGDEST}/SYSDBA.password" + +service_postinst () { + set -x + cd "$SYNOPKG_PKGDEST" || exit 1 + bin/gbak -rep msg.gbak msg.fdb + bin/build_file + + # Make the message file accessible so other users can use isql + chmod go+r firebird.msg + + bin/gbak -rep security4.gbak security4.fdb + + echo "Remove unnecessary intermediate files" + rm -f bin/build_file msg.gbak msg.fdb security4.gbak + + if [ ! -f "${SYSDBA_PASSWORD_FILE}" ];then + SYSDBA_PASSWORD="${wizard_sysdba_password}" + + echo "Setting 'SYSDBA' password to '${SYSDBA_PASSWORD}'"; + + echo "create or alter user SYSDBA password '$SYSDBA_PASSWORD' using plugin Srp; commit; quit;" \ + | bin/isql -user sysdba security.db + + echo "$SYSDBA_PASSWORD" > "${SYSDBA_PASSWORD_FILE}"; + fi + + set +x +} + diff --git a/spk/firebird/src/wizard/install_uifile b/spk/firebird/src/wizard/install_uifile new file mode 100644 index 000000000000..1a31cf039afa --- /dev/null +++ b/spk/firebird/src/wizard/install_uifile @@ -0,0 +1,22 @@ +[ + { + "step_title": "Configuration of FirebirdSQL server", + "items": [ + { + "type": "textfield", + "desc": "SYSDBA user", + "subitems": [ + { + "key": "wizard_sysdba_password", + "desc": "User password", + "defaultValue": "masterpassword", + "validator": { + "allowBlank": false + } + } + ] + } + ] + } +] +