-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
98 additions
and
27 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,9 @@ | ||
case "${ACTION}" in | ||
post) | ||
if [ "$UPDATE" = "no" ] | ||
then | ||
gsec -add sysdba -pw masterkey || true | ||
firebird-fix-perm-fdb | ||
fi | ||
;; | ||
esac |
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,27 @@ | ||
#!/bin/sh | ||
bn=$(basename $0) | ||
ECHO(){ echo "$bn: $@"; } | ||
|
||
RunUser=_firebird | ||
RunGroup=_firebird | ||
databasesconf='/etc/firebird/databases.conf' | ||
|
||
# A number of predefined macros (syntax $(name)) is available for use in the configuration files | ||
# to substitute for a directory name (src: https://firebirdsql.org/file/documentation/release_notes/html/en/3_0/rlsnotes30.html#rnfb30-configparams-macrosubs) | ||
# dir_sampledb='/usr/examples/empbuild' # employee.fdb | ||
dir_secdb='/var/lib/firebird/system' | ||
|
||
chkperm(){ | ||
[ -e "$1" ] || { ECHO "Warning! No exists: $1" && return; } | ||
chpst -u $RunUser test -w "$1" && ECHO "Ok: $1" || { ECHO "Fix permissions: $1"; chown $RunUser:$RunGroup "$1" && chmod 660 "$1"; } | ||
} | ||
|
||
for i in $(grep '^[^#]*=.*\.fdb.*$' "$databasesconf" | | ||
sed "s|#.*||; s|^\(.*=\s*\)\(.*\)$|\2|; | ||
# s|\$(dir_sampledb)|$dir_sampledb|i; | ||
s|\$(dir_secdb)|$dir_secdb|i") # need more testing | ||
do | ||
chkperm "$i" | ||
done | ||
|
||
ECHO 'Done.' |
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,16 @@ | ||
# default: off | ||
# description: FirebirdSQL v3.0 | ||
service gds-db | ||
{ | ||
disable = yes | ||
flags = REUSE NODELAY | ||
socket_type = stream | ||
wait = no | ||
user = _firebird | ||
# These lines cause problems with Windows XP SP2 clients | ||
# using default firewall configuration (SF#1065511) | ||
# log_on_success += USERID | ||
# log_on_failure += USERID | ||
# Need ServerMode = Classic in /etc/firebird/firebird.conf | ||
server = /usr/lib/firebird/bin/firebird | ||
} |
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,3 @@ | ||
#!/bin/sh | ||
chpst -u _firebird:_firebird test -w /etc/firebird/fb_guard || install /dev/null -m 644 -o _firebird -g _firebird /etc/firebird/fb_guard | ||
exec chpst -u _firebird:_firebird /usr/lib/firebird/bin/fbguard -forever |
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,15 @@ | ||
--- a/builds/install/misc/databases.conf.in | ||
+++ b/builds/install/misc/databases.conf.in | ||
@@ -17,8 +17,9 @@ | ||
# | ||
# Example Database: | ||
# | ||
-employee.fdb = $(dir_sampleDb)/employee.fdb | ||
-employee = $(dir_sampleDb)/employee.fdb | ||
+# employee.fdb = $(dir_sampleDb)/employee.fdb | ||
+# employee = $(dir_sampleDb)/employee.fdb | ||
+help = /usr/share/doc/firebird/help/help.fdb | ||
|
||
# | ||
# Master security database specific setup. | ||
|
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
# Template file for 'firebird3' | ||
pkgname=firebird3 | ||
version=3.0.6.33328 | ||
revision=2 | ||
_build=0 | ||
_uver=${version//./_} | ||
version=3.0.12.33717 | ||
revision=1 | ||
_commit=af555f74ad07b7359aae1df69ea27ae44fc7e33b | ||
#_build=0 | ||
#_uver=${version//./_} | ||
build_style=gnu-configure | ||
build_helper="qemu" | ||
configure_args="--prefix=/usr | ||
|
@@ -23,23 +24,37 @@ configure_args="--prefix=/usr | |
--with-fbmisc | ||
--without-fbsample | ||
--without-fbsample-db | ||
--with-system-icu | ||
--with-system-editline" | ||
hostmakedepends="automake libtool pkg-config icu" | ||
# unrecognized options: --with-system-icu | ||
hostmakedepends="automake libtool pkg-config icu rsync" | ||
makedepends="boost-devel libedit-devel icu-devel ncurses-devel libatomic_ops-devel | ||
libtommath-devel zlib-devel" | ||
short_desc="Relational database offering many ANSI SQL standard features (V3)" | ||
maintainer="Orphaned <[email protected]>" | ||
license="custom:IDPL-1.0, Interbase-1.0" | ||
homepage="https://www.firebirdsql.org/en/start/" | ||
distfiles="https://github.com/FirebirdSQL/firebird/releases/download/R${_uver%_*}/Firebird-${version}-${_build}.tar.bz2" | ||
checksum=34c1d2a29bbaf288e682cd1b5f8083f2baf73f351062245ace0bee35a3f7d35f | ||
#distfiles="https://github.com/FirebirdSQL/firebird/releases/download/R${_uver%_*}/Firebird-${version}-${_build}.tar.bz2" | ||
distfiles="https://github.com/FirebirdSQL/firebird/archive/${_commit}.tar.gz" | ||
checksum=1f230ff03fb734c4d406729e69420ce400a9e53273dbc5dd550993e9d745c615 | ||
replaces="firebird>=0" | ||
nocross="Fails to build gpre_boot for host but builds for target" | ||
|
||
CFLAGS="-fno-strict-aliasing" | ||
CXXFLAGS="-fno-delete-null-pointer-checks -Wno-deprecated -Wno-deprecated-declarations" | ||
|
||
# Create firebird system user/group | ||
system_accounts="_firebird _firebird" | ||
_firebird_homedir="/var/lib/firebird" | ||
_firebird_descr="Firebird Database Owner" | ||
triggers="system-accounts" | ||
|
||
conf_files=" | ||
/etc/firebird/databases.conf | ||
/etc/firebird/fbtrace.conf | ||
/etc/firebird/firebird.conf | ||
/etc/firebird/plugins.conf | ||
/var/lib/firebird/system/security3.fdb" | ||
|
||
if [ "$CROSS_BUILD" ]; then | ||
configure_args+=" --enable-binreloc" | ||
configure_args+=" ac_cv_func_sem_init=no" | ||
|
@@ -97,8 +112,6 @@ pre_configure() { | |
} | ||
|
||
do_install() { | ||
local _lib _v0=${version%.*} _v1=${version%.*.*} _v2=${version%.*.*.*} | ||
|
||
cd ${wrksrc}/gen | ||
./install/makeInstallImage.sh | ||
|
||
|
@@ -111,14 +124,15 @@ do_install() { | |
vlicense doc/license/IDPL.txt IDPL | ||
vlicense doc/license/README.license.usage.txt LICENSE | ||
|
||
cp -pR gen/buildroot/* ${DESTDIR}/ | ||
rsync -a --exclude '*.sh' gen/buildroot/ ${DESTDIR}/ # exclude old broken scripts | ||
|
||
# Conflicts with isql from unixodbc. | ||
mv ${DESTDIR}/usr/bin/isql{,-fb} | ||
|
||
# TODO: create superserver? | ||
# system account? | ||
# runit service? | ||
vsv firebird3 # runit service, default ServerMode = Super, see: /etc/firebird/firebird.conf | ||
vinstall ${FILESDIR}/firebird.xinetd 644 etc/xinetd.d firebird3 # xinetd, need ServerMode = Classic | ||
vinstall ${FILESDIR}/firebird-fix-perm-fdb 755 usr/lib/firebird/bin | ||
ln -sf /usr/lib/firebird/bin/firebird-fix-perm-fdb ${DESTDIR}/usr/bin/firebird-fix-perm-fdb | ||
# Example https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=firebird-superserver | ||
} | ||
|
||
|