Skip to content

Commit eab59a8

Browse files
committed
firebird3: update to 3.0.12.33727~5a2babe
1 parent 1d43648 commit eab59a8

7 files changed

Lines changed: 208 additions & 59 deletions

File tree

srcpkgs/firebird3/INSTALL

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
case "${ACTION}" in
2+
post)
3+
if [ "$UPDATE" = "no" ]
4+
then
5+
# $2 = PKGNAME
6+
chmod 600 -- /var/lib/$2/system/security*.fdb
7+
echo "$2: POST INSTALL: ATTENTION! TRY ADD USER sysdba WITH PASSWORD masterkey ..."
8+
{ LD_LIBRARY_PATH="/usr/lib/$2/lib:$LD_LIBRARY_PATH" /usr/lib/$2/bin/gsec -add sysdba -pw masterkey && echo "... SUCCESSFULL."; } || echo "... FAIL."
9+
chown _firebird:_firebird -- /var/lib/$2/system/security*.fdb
10+
chown _firebird:_firebird /tmp/firebird
11+
find /tmp/firebird -type f -name 'fb_*' -user 0 -exec chown _firebird:_firebird -- {} \;
12+
fi
13+
;;
14+
esac

srcpkgs/firebird3/files/fb-exe

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/sh
2+
[ -z "$_FBEXE_" ] || exit 231
3+
export _FBEXE_=1
4+
5+
bn=$(basename -- "$0")
6+
EXE=${bn#*-} # prefix-name -> name
7+
FBDIRBIN=$(dirname -- "$(realpath -- "$0")")
8+
FBROOT=$(dirname -- "$FBDIRBIN")
9+
FBDIRLIB="$FBROOT/lib"
10+
11+
show(){
12+
echo "bn=$bn"
13+
echo "EXE=$EXE"
14+
echo "FBDIRBIN=$FBDIRBIN"
15+
echo "FBROOT=$FBROOT"
16+
echo "FBDIRLIB=$FBDIRLIB"
17+
exit 2
18+
}
19+
20+
#show
21+
22+
export LD_LIBRARY_PATH="$FBDIRLIB:$LD_LIBRARY_PATH"
23+
export FIREBIRD_MSG="$FBROOT/lib/msg"
24+
export PATH="$FBDIRBIN:$PATH"
25+
#exec "$FBDIRBIN/$EXE" "$@"
26+
exec "$EXE" "$@"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# default: off
2+
# description: firebirdXXX
3+
service gds-dbXXX
4+
{
5+
disable = yes
6+
flags = REUSE NODELAY
7+
socket_type = stream
8+
wait = no
9+
user = _firebird
10+
# These lines cause problems with Windows XP SP2 clients
11+
# using default firewall configuration (SF#1065511)
12+
# log_on_success += USERID
13+
# log_on_failure += USERID
14+
# Requires ServerMode = Classic in /etc/firebirdXXX/firebird.conf
15+
server = /usr/lib/firebirdXXX/sbin/firebird
16+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/sh
2+
FBUSER=_firebird
3+
FBGROUP=_firebird
4+
FBNAME=$(basename -- "$PWD")
5+
FBROOT="/usr/lib/$FBNAME"
6+
FBLOGDIR="/var/log/$FBNAME" # chmod 750
7+
FBLOGFILE="${FBLOGDIR}/firebird.log"
8+
9+
CHK(){ chpst -u $FBUSER:$FBGROUP test $@; }
10+
BKP(){ mv -T --backup=numbered -- "$1" "$1".bkp; }
11+
12+
D='/tmp/firebird' # 700 ?
13+
[ -e "$D" ] && { CHK -d "$D" -a -O "$D" || { BKP "$D"; install -m 750 -o $FBUSER -g $FBGROUP -d "$D"; } }
14+
15+
F="$FBLOGFILE"
16+
if ! CHK -f "$F" -a -w "$F"
17+
then
18+
if [ -e "$F" ]
19+
then
20+
BKP "$F"
21+
else
22+
D="$FBLOGDIR"
23+
CHK -d "$D" -a -w "$D" || { [ -e "$D" ] && BKP "$D"; install -m 750 -o $FBUSER -g $FBGROUP -d "$D"; }
24+
fi
25+
fi
26+
27+
F="/etc/${FBNAME}/fb_guard"
28+
CHK -f "$F" -a -O "$F" || install --backup -m 640 -o $FBUSER -g $FBGROUP /dev/null "$F"
29+
30+
export LD_LIBRARY_PATH="${FBROOT}/lib:$LD_LIBRARY_PATH"
31+
exec chpst -u $FBUSER:$FBGROUP /usr/lib/${FBNAME}/sbin/fbguard -forever
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--- a/builds/install/misc/databases.conf.in
2+
+++ b/builds/install/misc/databases.conf.in
3+
@@ -17,8 +17,9 @@
4+
#
5+
# Example Database:
6+
#
7+
-employee.fdb = $(dir_sampleDb)/employee.fdb
8+
-employee = $(dir_sampleDb)/employee.fdb
9+
+# employee.fdb = $(dir_sampleDb)/employee.fdb
10+
+# employee = $(dir_sampleDb)/employee.fdb
11+
+# help = /usr/share/doc/firebirdX/help/help.fdb
12+
13+
#
14+
# Master security database specific setup.
15+

srcpkgs/firebird3/patches/fix-std-isnan.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.

srcpkgs/firebird3/template

Lines changed: 106 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,92 @@
11
# Template file for 'firebird3'
22
pkgname=firebird3
3-
version=3.0.6.33328
4-
revision=2
3+
4+
version=3.0.12.33727
5+
revision=1
6+
7+
_commit=5a2babe70db5e9892b34ce4908b0a65f4d0b052a
8+
9+
[ -z "$_commit" ] || version=$version~${_commit:0:7}
10+
511
_build=0
6-
_uver=${version//./_}
12+
#_uver=${version//./_}
13+
14+
#_n1=${version%%.*}
15+
_n1=$(expr "$version" : '\([^.]*\)')
16+
#n2=$(expr "$version" : '\([^.]*.[^.]*\)')
17+
_n3=$(expr "$version" : '\([^.]*.[^.]*.[^.]*\)')
18+
_fbN=fb${_n1}
19+
720
build_style=gnu-configure
821
build_helper="qemu"
9-
configure_args="--prefix=/usr
10-
--with-fbbin=/usr/bin
11-
--with-fbconf=/etc/firebird
12-
--with-fbdoc=/usr/share/doc/firebird
13-
--with-fbhelp=/usr/share/doc/firebird/help
14-
--with-fbinclude=/usr/include/firebird
15-
--with-fblib=/usr/lib
16-
--with-fblog=/var/log
17-
--with-fbmsg=/usr/lib/firebird/msg
18-
--with-fbplugins=/usr/lib/firebird/plugins
19-
--with-fbsbin=/usr/lib/firebird/bin
20-
--with-fbudf=/usr/lib/firebird/UDF
21-
--with-fbsecure-db=/var/lib/firebird/system
22-
--with-fbintl=/usr/lib/firebird/intl
23-
--with-fbmisc
24-
--without-fbsample
22+
23+
_PREFIX=/usr/lib/${pkgname}
24+
_INCLUDE=/usr/include/${pkgname}
25+
configure_args="--prefix=${_PREFIX}
26+
--with-fbconf=/etc/${pkgname}
27+
--with-fbbin=${_PREFIX}/bin
28+
--with-fbsbin=${_PREFIX}/sbin
29+
--with-fblib=${_PREFIX}/lib
30+
--with-fbmsg=${_PREFIX}/lib/msg
31+
--with-fbudf=${_PREFIX}/lib/udf
32+
--with-fbintl=${_PREFIX}/lib/intl
33+
--with-fbplugins=${_PREFIX}/lib/plugins
34+
--with-fbsecure-db=/var/lib/${pkgname}/system
35+
--with-fblog=/var/log/${pkgname}
36+
--with-fbdoc=/usr/share/doc/${pkgname}
37+
--with-fbhelp=/usr/share/doc/${pkgname}/help
38+
--with-fbsample=/usr/share/${pkgname}/examples
39+
--with-fbinclude=${_INCLUDE}
2540
--without-fbsample-db
26-
--with-system-icu
41+
--without-fbmisc
2742
--with-system-editline"
28-
hostmakedepends="automake libtool pkg-config icu"
43+
44+
# --with-fbsample-db=/usr/share/${pkgname}/examples/empbuild
45+
# --with-service-name specify inet service name (default=gds_db)
46+
# --with-service-port specify inet service port (default=3050)
47+
# --with-ipc-name specify local IPC name (default=FirebirdIPI)
48+
49+
hostmakedepends="automake libtool pkg-config icu rsync"
2950
makedepends="boost-devel libedit-devel icu-devel ncurses-devel libatomic_ops-devel
3051
libtommath-devel zlib-devel"
31-
short_desc="Relational database offering many ANSI SQL standard features (V3)"
52+
53+
short_desc="Relational database offering many ANSI SQL standard features (V${_n1})"
3254
maintainer="Orphaned <orphan@voidlinux.org>"
3355
license="custom:IDPL-1.0, Interbase-1.0"
34-
homepage="https://www.firebirdsql.org/en/start/"
35-
distfiles="https://github.com/FirebirdSQL/firebird/releases/download/R${_uver%_*}/Firebird-${version}-${_build}.tar.bz2"
36-
checksum=34c1d2a29bbaf288e682cd1b5f8083f2baf73f351062245ace0bee35a3f7d35f
37-
replaces="firebird>=0"
56+
homepage="https://www.firebirdsql.org"
57+
58+
# distfiles="https://github.com/FirebirdSQL/firebird/releases/download/R${_uver%_*}/Firebird-${version}-${_build}.tar.bz2" # old
59+
# distfiles="https://github.com/FirebirdSQL/firebird/releases/download/v${_n3}/Firebird-${version}-${_build}.tar.bz2" # V3
60+
# distfiles="https://github.com/FirebirdSQL/firebird/releases/download/v${_n3}/Firebird-${version}-${_build}.tar.xz" # V4
61+
# distfiles="https://github.com/FirebirdSQL/firebird/releases/download/v${_n3}/Firebird-${version}-${_build}-source.tar.xz" # V5
62+
# distfiles="https://github.com/FirebirdSQL/firebird/archive/refs/tags/v${version}.tar.gz" # tags
63+
64+
if [ -z "$_commit" ]; then
65+
distfiles="https://github.com/FirebirdSQL/firebird/releases/download/v${_n3}/Firebird-${version}-${_build}.tar.bz2" # V3
66+
else
67+
distfiles="https://github.com/FirebirdSQL/firebird/archive/${_commit}.tar.gz"
68+
fi
69+
70+
checksum=d32e2ceaf0b9ea02082768bc6c89df9174729446df761b6c8e5fbca2a54d5fb3 #_commit=5a2babe70db5e9892b34ce4908b0a65f4d0b052a
71+
3872
nocross="Fails to build gpre_boot for host but builds for target"
3973

4074
CFLAGS="-fno-strict-aliasing"
4175
CXXFLAGS="-fno-delete-null-pointer-checks -Wno-deprecated -Wno-deprecated-declarations"
4276

77+
# Create firebird system user/group
78+
system_accounts="_firebird _firebird"
79+
_firebird_homedir="/var/lib/firebird"
80+
_firebird_descr="Firebird Database Owner"
81+
triggers="system-accounts"
82+
83+
conf_files="
84+
/etc/${pkgname}/databases.conf
85+
/etc/${pkgname}/fbtrace.conf
86+
/etc/${pkgname}/firebird.conf
87+
/etc/${pkgname}/plugins.conf
88+
/var/lib/${pkgname}/system/security${_n1}.fdb"
89+
4390
if [ "$CROSS_BUILD" ]; then
4491
configure_args+=" --enable-binreloc"
4592
configure_args+=" ac_cv_func_sem_init=no"
@@ -88,20 +135,17 @@ pre_configure() {
88135
# do not change permissions to read-only
89136
find -iname "*.sh.in" -exec sed -i "{}" \
90137
-e 's;"\x60whoami\x60";"root";' \
91-
-e 's;chown root:root;#&;' \
92-
-e 's;chown -R;#&;' \
138+
-e 's;chown root:root;echo skip: &;' \
139+
-e 's;chown -R;echo skip: &;' \
93140
-e 's;chmod 0444;chmod 0644;' \
94141
-e 's;chmod 0555;chmod 0755;' \;
95142

96143
NOCONFIGURE=1 ./autogen.sh
97144
}
98145

99146
do_install() {
100-
local _lib _v0=${version%.*} _v1=${version%.*.*} _v2=${version%.*.*.*}
101-
102147
cd ${wrksrc}/gen
103148
./install/makeInstallImage.sh
104-
105149
cd ${wrksrc}
106150

107151
# Fix permissions
@@ -111,37 +155,53 @@ do_install() {
111155
vlicense doc/license/IDPL.txt IDPL
112156
vlicense doc/license/README.license.usage.txt LICENSE
113157

114-
cp -pR gen/buildroot/* ${DESTDIR}/
158+
rsync -a --exclude={'*.sh',"${_PREFIX}/no","${_PREFIX}/yes","usr/share/${pkgname}/examples/prebuilt"} gen/buildroot/ ${DESTDIR}/ # Exclude unused files and dirs
159+
160+
vinstall ${FILESDIR}/fb-exe 755 ${_PREFIX}/bin
161+
162+
# Fix conflicts with isql from unixodbc and other versions Firebird
163+
mkdir -p ${DESTDIR}/usr/bin
164+
find ${DESTDIR}${_PREFIX}/bin -type f ! -name fb-exe -printf '%f\n' | xargs -I {} -n1 ln -sf ${_PREFIX}/bin/fb-exe ${DESTDIR}/usr/bin/${_fbN}-{}
115165

116-
# Conflicts with isql from unixodbc.
117-
mv ${DESTDIR}/usr/bin/isql{,-fb}
166+
vinstall ${FILESDIR}/firebird.xinetd 644 etc/xinetd.d ${pkgname} # xinetd, requires ServerMode = Classic
167+
vsv ${pkgname} # runit service, default ServerMode = Super, see: /etc/${pkgname}/firebird.conf
168+
169+
# REPLASE: firebirdXXX, gds-dbXXX
170+
vsed -i ${DESTDIR}${_PREFIX}/bin/fix-perm-fdb -e "s|firebirdXXX|${pkgname}|g"
171+
vsed -i ${DESTDIR}/etc/xinetd.d/${pkgname} -e "s|firebirdXXX|${pkgname}|g; s|gds-dbXXX|firebird${_n1}|g"
118172

119-
# TODO: create superserver?
120-
# system account?
121-
# runit service?
122173
# Example https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=firebird-superserver
123174
}
124175

125176
libfbclient3_package() {
126177
short_desc+=" - client libraries"
127-
replaces="libfbclient>=0"
178+
alternatives="libfbclient:/usr/lib/libfbclient.so.2:${_PREFIX}/lib/libfbclient.so.2"
128179
pkg_install() {
129-
vmove "usr/lib/libfbclient.so.*"
130-
vmove usr/lib/firebird/msg/firebird.msg
180+
vmove "${_PREFIX}/lib/libfbclient.so*"
181+
vmove "${_PREFIX}/lib/msg/firebird.msg" # add to alternatives?
182+
131183
vlicense doc/license/IDPL.txt IDPL
132184
vlicense doc/license/README.license.usage.txt LICENSE
133185
}
134186
}
135187

136188
libfbclient3-devel_package() {
137189
short_desc+=" - development files"
138-
replaces="libfbclient-devel>=0"
190+
191+
alternatives="libfbclient-devel:/usr/include/ibase.h:${_INCLUDE}/ibase.h
192+
libfbclient-devel:/usr/include/iberror.h:${_INCLUDE}/iberror.h
193+
libfbclient-devel:/usr/include/ib_util.h:${_INCLUDE}/ib_util.h
194+
libfbclient-devel:/usr/lib/libfbclient.so:/usr/lib/libfbclient.so.2"
195+
139196
depends="libfbclient3>=${version}_${revision}"
140197
pkg_install() {
141-
vmove usr/lib/firebird/bin/fb_config
142-
vmkdir usr/bin
143-
ln -s ../lib/firebird/bin/fb_config ${PKGDESTDIR}/usr/bin/fb_config
144-
vmove usr/include/firebird
145-
vmove usr/lib/libfbclient.so
198+
vmove ${_PREFIX}/sbin/fb_config # add to alternatives?
199+
vmove usr/include
200+
201+
# Delete unused link
202+
rm ${PKGDESTDIR}/usr/include/firebird # add to alternatives?
203+
204+
# Fix conflict, use alternatives
205+
rm ${PKGDESTDIR}/usr/include/*.h
146206
}
147207
}

0 commit comments

Comments
 (0)