-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create spk package definition with service configuration and package icon. Also provide UI install wizard to allow the user choose the password for the SYSDBA user.
- Loading branch information
Showing
4 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
|