Skip to content

Commit be669a4

Browse files
vitkabeleVít Kabele
authored andcommitted
Add spk/firebird (#5837)
1 parent 048176f commit be669a4

File tree

4 files changed

+92
-0
lines changed

4 files changed

+92
-0
lines changed

spk/firebird/Makefile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
SPK_NAME = firebird
2+
SPK_VERS = 4.0.3
3+
SPK_ICON = src/firebird.png
4+
SPK_REV = 1
5+
6+
BETA = 1
7+
8+
DEPENDS = cross/$(SPK_NAME)
9+
10+
include ../../mk/spksrc.common.mk
11+
12+
DISPLAY_NAME = FirebirdSQL
13+
DESCRIPTION = Firebird is a relational database with excelent concurrency and high performance.
14+
CHANGELOG = "Add FirebirdSQL DB server in version 4.0.2"
15+
HOMEPAGE = https://firebirdsql.org/
16+
MAINTAINER = vitkabele
17+
LICENSE = MPL
18+
19+
OS_MIN_VERS = 7.0
20+
REQUIRED_MIN_DSM = 7.0
21+
REQUIRED_MAX_DSM = 7.1
22+
23+
WIZARDS_DIR = src/wizard
24+
25+
# Startable service properties
26+
STARTABLE = yes
27+
SERVICE_SETUP = src/service-setup.sh
28+
SERVICE_USER = auto
29+
SERVICE_PORT = 3050
30+
SERVICE_PORT_TITLE = $(DISPLAY_NAME)
31+
32+
include ../../mk/spksrc.spk.mk
33+

spk/firebird/src/firebird.png

65.9 KB
Loading

spk/firebird/src/service-setup.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/sh
2+
3+
FBGUARD_BIN_FILE="${SYNOPKG_PKGDEST}/bin/fbguard"
4+
5+
# We set onetime because we want the systemd to take care about the failures
6+
SERVICE_COMMAND="${FBGUARD_BIN_FILE} -pidfile ${PID_FILE} -daemon -onetime"
7+
8+
SYSDBA_PASSWORD_FILE="${SYNOPKG_PKGDEST}/SYSDBA.password"
9+
10+
service_postinst () {
11+
set -x
12+
cd "$SYNOPKG_PKGDEST" || exit 1
13+
bin/gbak -rep msg.gbak msg.fdb
14+
bin/build_file
15+
16+
# Make the message file accessible so other users can use isql
17+
chmod go+r firebird.msg
18+
19+
bin/gbak -rep security4.gbak security4.fdb
20+
21+
echo "Remove unnecessary intermediate files"
22+
rm -f bin/build_file msg.gbak msg.fdb security4.gbak
23+
24+
if [ ! -f "${SYSDBA_PASSWORD_FILE}" ];then
25+
SYSDBA_PASSWORD="${wizard_sysdba_password}"
26+
27+
echo "Setting 'SYSDBA' password to '${SYSDBA_PASSWORD}'";
28+
29+
echo "create or alter user SYSDBA password '$SYSDBA_PASSWORD' using plugin Srp; commit; quit;" \
30+
| bin/isql -user sysdba security.db
31+
32+
echo "$SYSDBA_PASSWORD" > "${SYSDBA_PASSWORD_FILE}";
33+
fi
34+
35+
set +x
36+
}
37+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[
2+
{
3+
"step_title": "Configuration of FirebirdSQL server",
4+
"items": [
5+
{
6+
"type": "textfield",
7+
"desc": "SYSDBA user",
8+
"subitems": [
9+
{
10+
"key": "wizard_sysdba_password",
11+
"desc": "User password",
12+
"defaultValue": "masterpassword",
13+
"validator": {
14+
"allowBlank": false
15+
}
16+
}
17+
]
18+
}
19+
]
20+
}
21+
]
22+

0 commit comments

Comments
 (0)