* [PR PATCH] firebird3: update to 3.0.10
@ 2023-03-14 3:10 onlylunix
2023-03-14 21:55 ` [PR PATCH] [Updated] " onlylunix
` (5 more replies)
0 siblings, 6 replies; 16+ messages in thread
From: onlylunix @ 2023-03-14 3:10 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 495 bytes --]
There is a new pull request by onlylunix against master on the void-packages repository
https://github.com/onlylunix/void-packages firebird3upd
https://github.com/void-linux/void-packages/pull/42755
firebird3: update to 3.0.10
#### Testing the changes
- I tested the changes in this PR: YES
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC, i686-LIBC)
A patch file from https://github.com/void-linux/void-packages/pull/42755.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-firebird3upd-42755.patch --]
[-- Type: text/x-diff, Size: 6979 bytes --]
From 706f9b4e21ae83574c34c1ee6fa544e83691d115 Mon Sep 17 00:00:00 2001
From: onlylunix <userpc2021@yandex.ru>
Date: Tue, 14 Mar 2023 05:51:36 +0300
Subject: [PATCH] firebird3: update to 3.0.10
---
srcpkgs/firebird3/INSTALL | 9 +++++
srcpkgs/firebird3/files/firebird-fix-perm-fdb | 23 ++++++++++++
srcpkgs/firebird3/files/firebird.xinetd | 16 +++++++++
srcpkgs/firebird3/files/firebird3/run | 3 ++
.../patches/fix-databases-conf.patch | 15 ++++++++
srcpkgs/firebird3/template | 36 +++++++++++++------
6 files changed, 92 insertions(+), 10 deletions(-)
create mode 100644 srcpkgs/firebird3/INSTALL
create mode 100755 srcpkgs/firebird3/files/firebird-fix-perm-fdb
create mode 100644 srcpkgs/firebird3/files/firebird.xinetd
create mode 100755 srcpkgs/firebird3/files/firebird3/run
create mode 100644 srcpkgs/firebird3/patches/fix-databases-conf.patch
diff --git a/srcpkgs/firebird3/INSTALL b/srcpkgs/firebird3/INSTALL
new file mode 100644
index 000000000000..f8863ec6163d
--- /dev/null
+++ b/srcpkgs/firebird3/INSTALL
@@ -0,0 +1,9 @@
+case "${ACTION}" in
+post)
+ if [ "$UPDATE" = "no" ]
+ then
+ gsec -add sysdba -pw masterkey || true
+ firebird-fix-perm-fdb
+ fi
+ ;;
+esac
diff --git a/srcpkgs/firebird3/files/firebird-fix-perm-fdb b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
new file mode 100755
index 000000000000..8b8bdfbb289a
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+RunUser=firebird
+RunGroup=firebird
+databasesconf='/etc/firebird/databases.conf'
+
+# !!! need shielding / !!!
+dir_sampledb='\/tmp'
+dir_secdb='\/var\/lib\/firebird\/system'
+
+checkfdb(){
+[ -e "$@" ] || { echo "$@ - WARNING: No exists!" && return; }
+chpst -u $RunUser test -w "$@" && echo "$@ - OK" || { echo "$@ - FIX PERMISSIONS..."; chown $RunUser:$RunGroup "$@" && chmod 660 "$@"; }
+}
+
+for i in $(grep '^[^#]*=.*\.fdb.*$' "$databasesconf" | sed "s/#.*//; s/^\(.*= *\)\(.*\)$/\2/; s/\$(dir_sampledb)/$dir_sampledb/i; s/\$(dir_secdb)/$dir_secdb/i") # need more testing
+do
+ checkfdb "$i"
+done
+
+install /dev/null -m 644 -o $RunUser -g $RunGroup /etc/firebird/fb_guard
+
+echo 'DONE.'
diff --git a/srcpkgs/firebird3/files/firebird.xinetd b/srcpkgs/firebird3/files/firebird.xinetd
new file mode 100644
index 000000000000..4d92c9b7710e
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird.xinetd
@@ -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
+}
diff --git a/srcpkgs/firebird3/files/firebird3/run b/srcpkgs/firebird3/files/firebird3/run
new file mode 100755
index 000000000000..88b2d4d9d5f5
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird3/run
@@ -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
diff --git a/srcpkgs/firebird3/patches/fix-databases-conf.patch b/srcpkgs/firebird3/patches/fix-databases-conf.patch
new file mode 100644
index 000000000000..3a9a55fc1c00
--- /dev/null
+++ b/srcpkgs/firebird3/patches/fix-databases-conf.patch
@@ -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.
+
diff --git a/srcpkgs/firebird3/template b/srcpkgs/firebird3/template
index 8f2285dc7729..cb8011e30833 100644
--- a/srcpkgs/firebird3/template
+++ b/srcpkgs/firebird3/template
@@ -1,9 +1,10 @@
# Template file for 'firebird3'
pkgname=firebird3
-version=3.0.6.33328
+#version=3.0.6.33328
+version=3.0.10
revision=1
_build=0
-_uver=${version//./_}
+#_uver=${version//./_}
build_style=gnu-configure
build_helper="qemu"
configure_args="--prefix=/usr
@@ -23,8 +24,9 @@ configure_args="--prefix=/usr
--with-fbmisc
--without-fbsample
--without-fbsample-db
- --with-system-icu
--with-system-editline"
+# unrecognized options: --with-system-icu
+
hostmakedepends="automake libtool pkg-config icu"
makedepends="boost-devel libedit-devel icu-devel ncurses-devel libatomic_ops-devel
libtommath-devel zlib-devel"
@@ -32,14 +34,29 @@ short_desc="Relational database offering many ANSI SQL standard features (V3)"
maintainer="Orphaned <orphan@voidlinux.org>"
license="custom"
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/refs/tags/v${version}.tar.gz"
+checksum=636bb3c4b4d982dd5fac7c8f2fb08789fa6d7815cecf6dd9cceb86743d7f10b9
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:84 firebird:84"
+firebird_homedir="/var/lib/firebird"
+firebird_descr="Firebird Database Owner"
+# make_dirs="/var/lib/firebird 0755 firebird firebird"
+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 +114,6 @@ pre_configure() {
}
do_install() {
- local _lib _v0=${version%.*} _v1=${version%.*.*} _v2=${version%.*.*.*}
-
cd ${wrksrc}/gen
./install/makeInstallImage.sh
@@ -113,9 +128,10 @@ do_install() {
cp -pR gen/buildroot/* ${DESTDIR}/
- # TODO: create superserver?
- # system account?
- # runit service?
+ # system account - see: system_accounts, e.t.c.
+ 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
+ vbin ${FILESDIR}/firebird-fix-perm-fdb
# Example https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=firebird-superserver
}
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] firebird3: update to 3.0.10
2023-03-14 3:10 [PR PATCH] firebird3: update to 3.0.10 onlylunix
@ 2023-03-14 21:55 ` onlylunix
2023-03-14 23:11 ` onlylunix
` (4 subsequent siblings)
5 siblings, 0 replies; 16+ messages in thread
From: onlylunix @ 2023-03-14 21:55 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 500 bytes --]
There is an updated pull request by onlylunix against master on the void-packages repository
https://github.com/onlylunix/void-packages firebird3upd
https://github.com/void-linux/void-packages/pull/42755
firebird3: update to 3.0.10
#### Testing the changes
- I tested the changes in this PR: YES
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC, i686-LIBC)
A patch file from https://github.com/void-linux/void-packages/pull/42755.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-firebird3upd-42755.patch --]
[-- Type: text/x-diff, Size: 6979 bytes --]
From 706f9b4e21ae83574c34c1ee6fa544e83691d115 Mon Sep 17 00:00:00 2001
From: onlylunix <userpc2021@yandex.ru>
Date: Tue, 14 Mar 2023 05:51:36 +0300
Subject: [PATCH] firebird3: update to 3.0.10
---
srcpkgs/firebird3/INSTALL | 9 +++++
srcpkgs/firebird3/files/firebird-fix-perm-fdb | 23 ++++++++++++
srcpkgs/firebird3/files/firebird.xinetd | 16 +++++++++
srcpkgs/firebird3/files/firebird3/run | 3 ++
.../patches/fix-databases-conf.patch | 15 ++++++++
srcpkgs/firebird3/template | 36 +++++++++++++------
6 files changed, 92 insertions(+), 10 deletions(-)
create mode 100644 srcpkgs/firebird3/INSTALL
create mode 100755 srcpkgs/firebird3/files/firebird-fix-perm-fdb
create mode 100644 srcpkgs/firebird3/files/firebird.xinetd
create mode 100755 srcpkgs/firebird3/files/firebird3/run
create mode 100644 srcpkgs/firebird3/patches/fix-databases-conf.patch
diff --git a/srcpkgs/firebird3/INSTALL b/srcpkgs/firebird3/INSTALL
new file mode 100644
index 000000000000..f8863ec6163d
--- /dev/null
+++ b/srcpkgs/firebird3/INSTALL
@@ -0,0 +1,9 @@
+case "${ACTION}" in
+post)
+ if [ "$UPDATE" = "no" ]
+ then
+ gsec -add sysdba -pw masterkey || true
+ firebird-fix-perm-fdb
+ fi
+ ;;
+esac
diff --git a/srcpkgs/firebird3/files/firebird-fix-perm-fdb b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
new file mode 100755
index 000000000000..8b8bdfbb289a
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+RunUser=firebird
+RunGroup=firebird
+databasesconf='/etc/firebird/databases.conf'
+
+# !!! need shielding / !!!
+dir_sampledb='\/tmp'
+dir_secdb='\/var\/lib\/firebird\/system'
+
+checkfdb(){
+[ -e "$@" ] || { echo "$@ - WARNING: No exists!" && return; }
+chpst -u $RunUser test -w "$@" && echo "$@ - OK" || { echo "$@ - FIX PERMISSIONS..."; chown $RunUser:$RunGroup "$@" && chmod 660 "$@"; }
+}
+
+for i in $(grep '^[^#]*=.*\.fdb.*$' "$databasesconf" | sed "s/#.*//; s/^\(.*= *\)\(.*\)$/\2/; s/\$(dir_sampledb)/$dir_sampledb/i; s/\$(dir_secdb)/$dir_secdb/i") # need more testing
+do
+ checkfdb "$i"
+done
+
+install /dev/null -m 644 -o $RunUser -g $RunGroup /etc/firebird/fb_guard
+
+echo 'DONE.'
diff --git a/srcpkgs/firebird3/files/firebird.xinetd b/srcpkgs/firebird3/files/firebird.xinetd
new file mode 100644
index 000000000000..4d92c9b7710e
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird.xinetd
@@ -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
+}
diff --git a/srcpkgs/firebird3/files/firebird3/run b/srcpkgs/firebird3/files/firebird3/run
new file mode 100755
index 000000000000..88b2d4d9d5f5
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird3/run
@@ -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
diff --git a/srcpkgs/firebird3/patches/fix-databases-conf.patch b/srcpkgs/firebird3/patches/fix-databases-conf.patch
new file mode 100644
index 000000000000..3a9a55fc1c00
--- /dev/null
+++ b/srcpkgs/firebird3/patches/fix-databases-conf.patch
@@ -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.
+
diff --git a/srcpkgs/firebird3/template b/srcpkgs/firebird3/template
index 8f2285dc7729..cb8011e30833 100644
--- a/srcpkgs/firebird3/template
+++ b/srcpkgs/firebird3/template
@@ -1,9 +1,10 @@
# Template file for 'firebird3'
pkgname=firebird3
-version=3.0.6.33328
+#version=3.0.6.33328
+version=3.0.10
revision=1
_build=0
-_uver=${version//./_}
+#_uver=${version//./_}
build_style=gnu-configure
build_helper="qemu"
configure_args="--prefix=/usr
@@ -23,8 +24,9 @@ configure_args="--prefix=/usr
--with-fbmisc
--without-fbsample
--without-fbsample-db
- --with-system-icu
--with-system-editline"
+# unrecognized options: --with-system-icu
+
hostmakedepends="automake libtool pkg-config icu"
makedepends="boost-devel libedit-devel icu-devel ncurses-devel libatomic_ops-devel
libtommath-devel zlib-devel"
@@ -32,14 +34,29 @@ short_desc="Relational database offering many ANSI SQL standard features (V3)"
maintainer="Orphaned <orphan@voidlinux.org>"
license="custom"
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/refs/tags/v${version}.tar.gz"
+checksum=636bb3c4b4d982dd5fac7c8f2fb08789fa6d7815cecf6dd9cceb86743d7f10b9
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:84 firebird:84"
+firebird_homedir="/var/lib/firebird"
+firebird_descr="Firebird Database Owner"
+# make_dirs="/var/lib/firebird 0755 firebird firebird"
+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 +114,6 @@ pre_configure() {
}
do_install() {
- local _lib _v0=${version%.*} _v1=${version%.*.*} _v2=${version%.*.*.*}
-
cd ${wrksrc}/gen
./install/makeInstallImage.sh
@@ -113,9 +128,10 @@ do_install() {
cp -pR gen/buildroot/* ${DESTDIR}/
- # TODO: create superserver?
- # system account?
- # runit service?
+ # system account - see: system_accounts, e.t.c.
+ 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
+ vbin ${FILESDIR}/firebird-fix-perm-fdb
# Example https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=firebird-superserver
}
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] firebird3: update to 3.0.10
2023-03-14 3:10 [PR PATCH] firebird3: update to 3.0.10 onlylunix
2023-03-14 21:55 ` [PR PATCH] [Updated] " onlylunix
@ 2023-03-14 23:11 ` onlylunix
2023-03-14 23:21 ` onlylunix
` (3 subsequent siblings)
5 siblings, 0 replies; 16+ messages in thread
From: onlylunix @ 2023-03-14 23:11 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 500 bytes --]
There is an updated pull request by onlylunix against master on the void-packages repository
https://github.com/onlylunix/void-packages firebird3upd
https://github.com/void-linux/void-packages/pull/42755
firebird3: update to 3.0.10
#### Testing the changes
- I tested the changes in this PR: YES
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC, i686-LIBC)
A patch file from https://github.com/void-linux/void-packages/pull/42755.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-firebird3upd-42755.patch --]
[-- Type: text/x-diff, Size: 11955 bytes --]
From 706f9b4e21ae83574c34c1ee6fa544e83691d115 Mon Sep 17 00:00:00 2001
From: onlylunix <userpc2021@yandex.ru>
Date: Tue, 14 Mar 2023 05:51:36 +0300
Subject: [PATCH 1/2] firebird3: update to 3.0.10
---
srcpkgs/firebird3/INSTALL | 9 +++++
srcpkgs/firebird3/files/firebird-fix-perm-fdb | 23 ++++++++++++
srcpkgs/firebird3/files/firebird.xinetd | 16 +++++++++
srcpkgs/firebird3/files/firebird3/run | 3 ++
.../patches/fix-databases-conf.patch | 15 ++++++++
srcpkgs/firebird3/template | 36 +++++++++++++------
6 files changed, 92 insertions(+), 10 deletions(-)
create mode 100644 srcpkgs/firebird3/INSTALL
create mode 100755 srcpkgs/firebird3/files/firebird-fix-perm-fdb
create mode 100644 srcpkgs/firebird3/files/firebird.xinetd
create mode 100755 srcpkgs/firebird3/files/firebird3/run
create mode 100644 srcpkgs/firebird3/patches/fix-databases-conf.patch
diff --git a/srcpkgs/firebird3/INSTALL b/srcpkgs/firebird3/INSTALL
new file mode 100644
index 000000000000..f8863ec6163d
--- /dev/null
+++ b/srcpkgs/firebird3/INSTALL
@@ -0,0 +1,9 @@
+case "${ACTION}" in
+post)
+ if [ "$UPDATE" = "no" ]
+ then
+ gsec -add sysdba -pw masterkey || true
+ firebird-fix-perm-fdb
+ fi
+ ;;
+esac
diff --git a/srcpkgs/firebird3/files/firebird-fix-perm-fdb b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
new file mode 100755
index 000000000000..8b8bdfbb289a
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+RunUser=firebird
+RunGroup=firebird
+databasesconf='/etc/firebird/databases.conf'
+
+# !!! need shielding / !!!
+dir_sampledb='\/tmp'
+dir_secdb='\/var\/lib\/firebird\/system'
+
+checkfdb(){
+[ -e "$@" ] || { echo "$@ - WARNING: No exists!" && return; }
+chpst -u $RunUser test -w "$@" && echo "$@ - OK" || { echo "$@ - FIX PERMISSIONS..."; chown $RunUser:$RunGroup "$@" && chmod 660 "$@"; }
+}
+
+for i in $(grep '^[^#]*=.*\.fdb.*$' "$databasesconf" | sed "s/#.*//; s/^\(.*= *\)\(.*\)$/\2/; s/\$(dir_sampledb)/$dir_sampledb/i; s/\$(dir_secdb)/$dir_secdb/i") # need more testing
+do
+ checkfdb "$i"
+done
+
+install /dev/null -m 644 -o $RunUser -g $RunGroup /etc/firebird/fb_guard
+
+echo 'DONE.'
diff --git a/srcpkgs/firebird3/files/firebird.xinetd b/srcpkgs/firebird3/files/firebird.xinetd
new file mode 100644
index 000000000000..4d92c9b7710e
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird.xinetd
@@ -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
+}
diff --git a/srcpkgs/firebird3/files/firebird3/run b/srcpkgs/firebird3/files/firebird3/run
new file mode 100755
index 000000000000..88b2d4d9d5f5
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird3/run
@@ -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
diff --git a/srcpkgs/firebird3/patches/fix-databases-conf.patch b/srcpkgs/firebird3/patches/fix-databases-conf.patch
new file mode 100644
index 000000000000..3a9a55fc1c00
--- /dev/null
+++ b/srcpkgs/firebird3/patches/fix-databases-conf.patch
@@ -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.
+
diff --git a/srcpkgs/firebird3/template b/srcpkgs/firebird3/template
index 8f2285dc7729..cb8011e30833 100644
--- a/srcpkgs/firebird3/template
+++ b/srcpkgs/firebird3/template
@@ -1,9 +1,10 @@
# Template file for 'firebird3'
pkgname=firebird3
-version=3.0.6.33328
+#version=3.0.6.33328
+version=3.0.10
revision=1
_build=0
-_uver=${version//./_}
+#_uver=${version//./_}
build_style=gnu-configure
build_helper="qemu"
configure_args="--prefix=/usr
@@ -23,8 +24,9 @@ configure_args="--prefix=/usr
--with-fbmisc
--without-fbsample
--without-fbsample-db
- --with-system-icu
--with-system-editline"
+# unrecognized options: --with-system-icu
+
hostmakedepends="automake libtool pkg-config icu"
makedepends="boost-devel libedit-devel icu-devel ncurses-devel libatomic_ops-devel
libtommath-devel zlib-devel"
@@ -32,14 +34,29 @@ short_desc="Relational database offering many ANSI SQL standard features (V3)"
maintainer="Orphaned <orphan@voidlinux.org>"
license="custom"
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/refs/tags/v${version}.tar.gz"
+checksum=636bb3c4b4d982dd5fac7c8f2fb08789fa6d7815cecf6dd9cceb86743d7f10b9
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:84 firebird:84"
+firebird_homedir="/var/lib/firebird"
+firebird_descr="Firebird Database Owner"
+# make_dirs="/var/lib/firebird 0755 firebird firebird"
+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 +114,6 @@ pre_configure() {
}
do_install() {
- local _lib _v0=${version%.*} _v1=${version%.*.*} _v2=${version%.*.*.*}
-
cd ${wrksrc}/gen
./install/makeInstallImage.sh
@@ -113,9 +128,10 @@ do_install() {
cp -pR gen/buildroot/* ${DESTDIR}/
- # TODO: create superserver?
- # system account?
- # runit service?
+ # system account - see: system_accounts, e.t.c.
+ 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
+ vbin ${FILESDIR}/firebird-fix-perm-fdb
# Example https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=firebird-superserver
}
From 306a831cef2b8e80386ac42bfbf3f176e44d8e4b Mon Sep 17 00:00:00 2001
From: onlylunix <userpc2021@yandex.ru>
Date: Wed, 15 Mar 2023 02:09:42 +0300
Subject: [PATCH 2/2] fix problems
---
srcpkgs/firebird3/files/firebird-fix-perm-fdb | 4 ++--
srcpkgs/firebird3/files/firebird.xinetd | 2 +-
srcpkgs/firebird3/files/firebird3/run | 4 ++--
srcpkgs/firebird3/patches/fix-std-isnan.patch | 13 -------------
srcpkgs/firebird3/template | 14 +++++---------
5 files changed, 10 insertions(+), 27 deletions(-)
delete mode 100644 srcpkgs/firebird3/patches/fix-std-isnan.patch
diff --git a/srcpkgs/firebird3/files/firebird-fix-perm-fdb b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
index 8b8bdfbb289a..97eff99c3c59 100755
--- a/srcpkgs/firebird3/files/firebird-fix-perm-fdb
+++ b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
@@ -1,7 +1,7 @@
#!/bin/sh
-RunUser=firebird
-RunGroup=firebird
+RunUser=_firebird
+RunGroup=_firebird
databasesconf='/etc/firebird/databases.conf'
# !!! need shielding / !!!
diff --git a/srcpkgs/firebird3/files/firebird.xinetd b/srcpkgs/firebird3/files/firebird.xinetd
index 4d92c9b7710e..f8f1f7fa348c 100644
--- a/srcpkgs/firebird3/files/firebird.xinetd
+++ b/srcpkgs/firebird3/files/firebird.xinetd
@@ -6,7 +6,7 @@ service gds-db
flags = REUSE NODELAY
socket_type = stream
wait = no
- user = firebird
+ user = _firebird
# These lines cause problems with Windows XP SP2 clients
# using default firewall configuration (SF#1065511)
# log_on_success += USERID
diff --git a/srcpkgs/firebird3/files/firebird3/run b/srcpkgs/firebird3/files/firebird3/run
index 88b2d4d9d5f5..f9e37a7a3829 100755
--- a/srcpkgs/firebird3/files/firebird3/run
+++ b/srcpkgs/firebird3/files/firebird3/run
@@ -1,3 +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
+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
diff --git a/srcpkgs/firebird3/patches/fix-std-isnan.patch b/srcpkgs/firebird3/patches/fix-std-isnan.patch
deleted file mode 100644
index 9da229bdc86f..000000000000
--- a/srcpkgs/firebird3/patches/fix-std-isnan.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/src/common/classes/FpeControl.h 2020-06-26 12:02:51.000000000 +0200
-+++ b/src/common/classes/FpeControl.h 2020-09-17 06:04:30.516565361 +0200
-@@ -42,6 +42,10 @@
- #include <ieeefp.h>
- #endif
-
-+#if !defined(__GLIBC__)
-+#define isinf std::isinf
-+#endif
-+
- namespace Firebird
- {
-
diff --git a/srcpkgs/firebird3/template b/srcpkgs/firebird3/template
index cb8011e30833..0f9287215977 100644
--- a/srcpkgs/firebird3/template
+++ b/srcpkgs/firebird3/template
@@ -1,10 +1,7 @@
# Template file for 'firebird3'
pkgname=firebird3
-#version=3.0.6.33328
version=3.0.10
-revision=1
-_build=0
-#_uver=${version//./_}
+revision=3
build_style=gnu-configure
build_helper="qemu"
configure_args="--prefix=/usr
@@ -32,9 +29,8 @@ makedepends="boost-devel libedit-devel icu-devel ncurses-devel libatomic_ops-dev
libtommath-devel zlib-devel"
short_desc="Relational database offering many ANSI SQL standard features (V3)"
maintainer="Orphaned <orphan@voidlinux.org>"
-license="custom"
+license="custom:IDPL, custom: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"
distfiles="https://github.com/FirebirdSQL/firebird/archive/refs/tags/v${version}.tar.gz"
checksum=636bb3c4b4d982dd5fac7c8f2fb08789fa6d7815cecf6dd9cceb86743d7f10b9
replaces="firebird>=0"
@@ -44,10 +40,9 @@ CFLAGS="-fno-strict-aliasing"
CXXFLAGS="-fno-delete-null-pointer-checks -Wno-deprecated -Wno-deprecated-declarations"
# Create firebird system user/group
-system_accounts="firebird:84 firebird:84"
+system_accounts="_firebird:84 _firebird:84"
firebird_homedir="/var/lib/firebird"
firebird_descr="Firebird Database Owner"
-# make_dirs="/var/lib/firebird 0755 firebird firebird"
triggers="system-accounts"
conf_files="
@@ -104,7 +99,7 @@ pre_configure() {
# do not change ownership to root:root and
# do not change permissions to read-only
find -iname "*.sh.in" -exec sed -i "{}" \
- -e 's;"`whoami`";"root";' \
+ -e 's;"$(whoami)";"root";' \
-e 's;chown root:root;#&;' \
-e 's;chown -R;#&;' \
-e 's;chmod 0444;chmod 0644;' \
@@ -127,6 +122,7 @@ do_install() {
vlicense doc/license/README.license.usage.txt LICENSE
cp -pR gen/buildroot/* ${DESTDIR}/
+ mv ${DESTDIR}/usr/bin/isql{,-fb} # fix conflict firebird3 and unixodbc
# system account - see: system_accounts, e.t.c.
vsv firebird3 # runit service, default ServerMode = Super, see: /etc/firebird/firebird.conf
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] firebird3: update to 3.0.10
2023-03-14 3:10 [PR PATCH] firebird3: update to 3.0.10 onlylunix
2023-03-14 21:55 ` [PR PATCH] [Updated] " onlylunix
2023-03-14 23:11 ` onlylunix
@ 2023-03-14 23:21 ` onlylunix
2023-03-15 11:40 ` abenson
` (2 subsequent siblings)
5 siblings, 0 replies; 16+ messages in thread
From: onlylunix @ 2023-03-14 23:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 500 bytes --]
There is an updated pull request by onlylunix against master on the void-packages repository
https://github.com/onlylunix/void-packages firebird3upd
https://github.com/void-linux/void-packages/pull/42755
firebird3: update to 3.0.10
#### Testing the changes
- I tested the changes in this PR: YES
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC, i686-LIBC)
A patch file from https://github.com/void-linux/void-packages/pull/42755.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-firebird3upd-42755.patch --]
[-- Type: text/x-diff, Size: 12593 bytes --]
From 706f9b4e21ae83574c34c1ee6fa544e83691d115 Mon Sep 17 00:00:00 2001
From: onlylunix <userpc2021@yandex.ru>
Date: Tue, 14 Mar 2023 05:51:36 +0300
Subject: [PATCH 1/3] firebird3: update to 3.0.10
---
srcpkgs/firebird3/INSTALL | 9 +++++
srcpkgs/firebird3/files/firebird-fix-perm-fdb | 23 ++++++++++++
srcpkgs/firebird3/files/firebird.xinetd | 16 +++++++++
srcpkgs/firebird3/files/firebird3/run | 3 ++
.../patches/fix-databases-conf.patch | 15 ++++++++
srcpkgs/firebird3/template | 36 +++++++++++++------
6 files changed, 92 insertions(+), 10 deletions(-)
create mode 100644 srcpkgs/firebird3/INSTALL
create mode 100755 srcpkgs/firebird3/files/firebird-fix-perm-fdb
create mode 100644 srcpkgs/firebird3/files/firebird.xinetd
create mode 100755 srcpkgs/firebird3/files/firebird3/run
create mode 100644 srcpkgs/firebird3/patches/fix-databases-conf.patch
diff --git a/srcpkgs/firebird3/INSTALL b/srcpkgs/firebird3/INSTALL
new file mode 100644
index 000000000000..f8863ec6163d
--- /dev/null
+++ b/srcpkgs/firebird3/INSTALL
@@ -0,0 +1,9 @@
+case "${ACTION}" in
+post)
+ if [ "$UPDATE" = "no" ]
+ then
+ gsec -add sysdba -pw masterkey || true
+ firebird-fix-perm-fdb
+ fi
+ ;;
+esac
diff --git a/srcpkgs/firebird3/files/firebird-fix-perm-fdb b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
new file mode 100755
index 000000000000..8b8bdfbb289a
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+RunUser=firebird
+RunGroup=firebird
+databasesconf='/etc/firebird/databases.conf'
+
+# !!! need shielding / !!!
+dir_sampledb='\/tmp'
+dir_secdb='\/var\/lib\/firebird\/system'
+
+checkfdb(){
+[ -e "$@" ] || { echo "$@ - WARNING: No exists!" && return; }
+chpst -u $RunUser test -w "$@" && echo "$@ - OK" || { echo "$@ - FIX PERMISSIONS..."; chown $RunUser:$RunGroup "$@" && chmod 660 "$@"; }
+}
+
+for i in $(grep '^[^#]*=.*\.fdb.*$' "$databasesconf" | sed "s/#.*//; s/^\(.*= *\)\(.*\)$/\2/; s/\$(dir_sampledb)/$dir_sampledb/i; s/\$(dir_secdb)/$dir_secdb/i") # need more testing
+do
+ checkfdb "$i"
+done
+
+install /dev/null -m 644 -o $RunUser -g $RunGroup /etc/firebird/fb_guard
+
+echo 'DONE.'
diff --git a/srcpkgs/firebird3/files/firebird.xinetd b/srcpkgs/firebird3/files/firebird.xinetd
new file mode 100644
index 000000000000..4d92c9b7710e
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird.xinetd
@@ -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
+}
diff --git a/srcpkgs/firebird3/files/firebird3/run b/srcpkgs/firebird3/files/firebird3/run
new file mode 100755
index 000000000000..88b2d4d9d5f5
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird3/run
@@ -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
diff --git a/srcpkgs/firebird3/patches/fix-databases-conf.patch b/srcpkgs/firebird3/patches/fix-databases-conf.patch
new file mode 100644
index 000000000000..3a9a55fc1c00
--- /dev/null
+++ b/srcpkgs/firebird3/patches/fix-databases-conf.patch
@@ -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.
+
diff --git a/srcpkgs/firebird3/template b/srcpkgs/firebird3/template
index 8f2285dc7729..cb8011e30833 100644
--- a/srcpkgs/firebird3/template
+++ b/srcpkgs/firebird3/template
@@ -1,9 +1,10 @@
# Template file for 'firebird3'
pkgname=firebird3
-version=3.0.6.33328
+#version=3.0.6.33328
+version=3.0.10
revision=1
_build=0
-_uver=${version//./_}
+#_uver=${version//./_}
build_style=gnu-configure
build_helper="qemu"
configure_args="--prefix=/usr
@@ -23,8 +24,9 @@ configure_args="--prefix=/usr
--with-fbmisc
--without-fbsample
--without-fbsample-db
- --with-system-icu
--with-system-editline"
+# unrecognized options: --with-system-icu
+
hostmakedepends="automake libtool pkg-config icu"
makedepends="boost-devel libedit-devel icu-devel ncurses-devel libatomic_ops-devel
libtommath-devel zlib-devel"
@@ -32,14 +34,29 @@ short_desc="Relational database offering many ANSI SQL standard features (V3)"
maintainer="Orphaned <orphan@voidlinux.org>"
license="custom"
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/refs/tags/v${version}.tar.gz"
+checksum=636bb3c4b4d982dd5fac7c8f2fb08789fa6d7815cecf6dd9cceb86743d7f10b9
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:84 firebird:84"
+firebird_homedir="/var/lib/firebird"
+firebird_descr="Firebird Database Owner"
+# make_dirs="/var/lib/firebird 0755 firebird firebird"
+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 +114,6 @@ pre_configure() {
}
do_install() {
- local _lib _v0=${version%.*} _v1=${version%.*.*} _v2=${version%.*.*.*}
-
cd ${wrksrc}/gen
./install/makeInstallImage.sh
@@ -113,9 +128,10 @@ do_install() {
cp -pR gen/buildroot/* ${DESTDIR}/
- # TODO: create superserver?
- # system account?
- # runit service?
+ # system account - see: system_accounts, e.t.c.
+ 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
+ vbin ${FILESDIR}/firebird-fix-perm-fdb
# Example https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=firebird-superserver
}
From 306a831cef2b8e80386ac42bfbf3f176e44d8e4b Mon Sep 17 00:00:00 2001
From: onlylunix <userpc2021@yandex.ru>
Date: Wed, 15 Mar 2023 02:09:42 +0300
Subject: [PATCH 2/3] fix problems
---
srcpkgs/firebird3/files/firebird-fix-perm-fdb | 4 ++--
srcpkgs/firebird3/files/firebird.xinetd | 2 +-
srcpkgs/firebird3/files/firebird3/run | 4 ++--
srcpkgs/firebird3/patches/fix-std-isnan.patch | 13 -------------
srcpkgs/firebird3/template | 14 +++++---------
5 files changed, 10 insertions(+), 27 deletions(-)
delete mode 100644 srcpkgs/firebird3/patches/fix-std-isnan.patch
diff --git a/srcpkgs/firebird3/files/firebird-fix-perm-fdb b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
index 8b8bdfbb289a..97eff99c3c59 100755
--- a/srcpkgs/firebird3/files/firebird-fix-perm-fdb
+++ b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
@@ -1,7 +1,7 @@
#!/bin/sh
-RunUser=firebird
-RunGroup=firebird
+RunUser=_firebird
+RunGroup=_firebird
databasesconf='/etc/firebird/databases.conf'
# !!! need shielding / !!!
diff --git a/srcpkgs/firebird3/files/firebird.xinetd b/srcpkgs/firebird3/files/firebird.xinetd
index 4d92c9b7710e..f8f1f7fa348c 100644
--- a/srcpkgs/firebird3/files/firebird.xinetd
+++ b/srcpkgs/firebird3/files/firebird.xinetd
@@ -6,7 +6,7 @@ service gds-db
flags = REUSE NODELAY
socket_type = stream
wait = no
- user = firebird
+ user = _firebird
# These lines cause problems with Windows XP SP2 clients
# using default firewall configuration (SF#1065511)
# log_on_success += USERID
diff --git a/srcpkgs/firebird3/files/firebird3/run b/srcpkgs/firebird3/files/firebird3/run
index 88b2d4d9d5f5..f9e37a7a3829 100755
--- a/srcpkgs/firebird3/files/firebird3/run
+++ b/srcpkgs/firebird3/files/firebird3/run
@@ -1,3 +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
+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
diff --git a/srcpkgs/firebird3/patches/fix-std-isnan.patch b/srcpkgs/firebird3/patches/fix-std-isnan.patch
deleted file mode 100644
index 9da229bdc86f..000000000000
--- a/srcpkgs/firebird3/patches/fix-std-isnan.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/src/common/classes/FpeControl.h 2020-06-26 12:02:51.000000000 +0200
-+++ b/src/common/classes/FpeControl.h 2020-09-17 06:04:30.516565361 +0200
-@@ -42,6 +42,10 @@
- #include <ieeefp.h>
- #endif
-
-+#if !defined(__GLIBC__)
-+#define isinf std::isinf
-+#endif
-+
- namespace Firebird
- {
-
diff --git a/srcpkgs/firebird3/template b/srcpkgs/firebird3/template
index cb8011e30833..0f9287215977 100644
--- a/srcpkgs/firebird3/template
+++ b/srcpkgs/firebird3/template
@@ -1,10 +1,7 @@
# Template file for 'firebird3'
pkgname=firebird3
-#version=3.0.6.33328
version=3.0.10
-revision=1
-_build=0
-#_uver=${version//./_}
+revision=3
build_style=gnu-configure
build_helper="qemu"
configure_args="--prefix=/usr
@@ -32,9 +29,8 @@ makedepends="boost-devel libedit-devel icu-devel ncurses-devel libatomic_ops-dev
libtommath-devel zlib-devel"
short_desc="Relational database offering many ANSI SQL standard features (V3)"
maintainer="Orphaned <orphan@voidlinux.org>"
-license="custom"
+license="custom:IDPL, custom: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"
distfiles="https://github.com/FirebirdSQL/firebird/archive/refs/tags/v${version}.tar.gz"
checksum=636bb3c4b4d982dd5fac7c8f2fb08789fa6d7815cecf6dd9cceb86743d7f10b9
replaces="firebird>=0"
@@ -44,10 +40,9 @@ CFLAGS="-fno-strict-aliasing"
CXXFLAGS="-fno-delete-null-pointer-checks -Wno-deprecated -Wno-deprecated-declarations"
# Create firebird system user/group
-system_accounts="firebird:84 firebird:84"
+system_accounts="_firebird:84 _firebird:84"
firebird_homedir="/var/lib/firebird"
firebird_descr="Firebird Database Owner"
-# make_dirs="/var/lib/firebird 0755 firebird firebird"
triggers="system-accounts"
conf_files="
@@ -104,7 +99,7 @@ pre_configure() {
# do not change ownership to root:root and
# do not change permissions to read-only
find -iname "*.sh.in" -exec sed -i "{}" \
- -e 's;"`whoami`";"root";' \
+ -e 's;"$(whoami)";"root";' \
-e 's;chown root:root;#&;' \
-e 's;chown -R;#&;' \
-e 's;chmod 0444;chmod 0644;' \
@@ -127,6 +122,7 @@ do_install() {
vlicense doc/license/README.license.usage.txt LICENSE
cp -pR gen/buildroot/* ${DESTDIR}/
+ mv ${DESTDIR}/usr/bin/isql{,-fb} # fix conflict firebird3 and unixodbc
# system account - see: system_accounts, e.t.c.
vsv firebird3 # runit service, default ServerMode = Super, see: /etc/firebird/firebird.conf
From 3143c5f5ecbc8dab4d7acdfde86307b95c2ec6c0 Mon Sep 17 00:00:00 2001
From: onlylunix <userpc2021@yandex.ru>
Date: Wed, 15 Mar 2023 02:21:24 +0300
Subject: [PATCH 3/3] set revision to 1
---
srcpkgs/firebird3/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/firebird3/template b/srcpkgs/firebird3/template
index 0f9287215977..e67b841aaf53 100644
--- a/srcpkgs/firebird3/template
+++ b/srcpkgs/firebird3/template
@@ -1,7 +1,7 @@
# Template file for 'firebird3'
pkgname=firebird3
version=3.0.10
-revision=3
+revision=1
build_style=gnu-configure
build_helper="qemu"
configure_args="--prefix=/usr
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: firebird3: update to 3.0.10
2023-03-14 3:10 [PR PATCH] firebird3: update to 3.0.10 onlylunix
` (2 preceding siblings ...)
2023-03-14 23:21 ` onlylunix
@ 2023-03-15 11:40 ` abenson
2023-03-15 15:59 ` [PR PATCH] [Closed]: " onlylunix
2023-03-15 17:37 ` onlylunix
5 siblings, 0 replies; 16+ messages in thread
From: abenson @ 2023-03-15 11:40 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 237 bytes --]
New comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/42755#issuecomment-1469849526
Comment:
Please [squash](https://www.git-tower.com/learn/git/faq/git-squash) these into a single commit.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Closed]: firebird3: update to 3.0.10
2023-03-14 3:10 [PR PATCH] firebird3: update to 3.0.10 onlylunix
` (3 preceding siblings ...)
2023-03-15 11:40 ` abenson
@ 2023-03-15 15:59 ` onlylunix
2023-03-15 17:37 ` onlylunix
5 siblings, 0 replies; 16+ messages in thread
From: onlylunix @ 2023-03-15 15:59 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 335 bytes --]
There's a closed pull request on the void-packages repository
firebird3: update to 3.0.10
https://github.com/void-linux/void-packages/pull/42755
Description:
#### Testing the changes
- I tested the changes in this PR: YES
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC, i686-LIBC)
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: firebird3: update to 3.0.10
2023-03-14 3:10 [PR PATCH] firebird3: update to 3.0.10 onlylunix
` (4 preceding siblings ...)
2023-03-15 15:59 ` [PR PATCH] [Closed]: " onlylunix
@ 2023-03-15 17:37 ` onlylunix
5 siblings, 0 replies; 16+ messages in thread
From: onlylunix @ 2023-03-15 17:37 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 166 bytes --]
New comment by onlylunix on void-packages repository
https://github.com/void-linux/void-packages/pull/42755#issuecomment-1470471368
Comment:
I create new PR #42789
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] firebird3: update to 3.0.10
2023-07-10 21:49 [PR PATCH] " onlylunix
2023-07-11 13:45 ` [PR PATCH] [Updated] " onlylunix
@ 2023-08-07 18:55 ` onlylunix
1 sibling, 0 replies; 16+ messages in thread
From: onlylunix @ 2023-08-07 18:55 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1148 bytes --]
There is an updated pull request by onlylunix against master on the void-packages repository
https://github.com/onlylunix/void-packages firebird3upd3.0.10-3
https://github.com/void-linux/void-packages/pull/44976
firebird3: update to 3.0.10
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture (x86_64-LIBC, i686-LIBC, x86_64-musl)
A patch file from https://github.com/void-linux/void-packages/pull/44976.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-firebird3upd3.0.10-3-44976.patch --]
[-- Type: text/x-diff, Size: 7955 bytes --]
From f061b1d133b2d50f50d04cd80c688cffe6105792 Mon Sep 17 00:00:00 2001
From: onlylunix <userpc2021@yandex.ru>
Date: Tue, 11 Jul 2023 00:38:31 +0300
Subject: [PATCH] firebird3: update to 3.0.11
---
srcpkgs/firebird3/INSTALL | 9 +++++
srcpkgs/firebird3/files/firebird-fix-perm-fdb | 27 ++++++++++++++
srcpkgs/firebird3/files/firebird.xinetd | 16 ++++++++
srcpkgs/firebird3/files/firebird3/run | 3 ++
.../patches/fix-databases-conf.patch | 15 ++++++++
srcpkgs/firebird3/patches/fix-std-isnan.patch | 13 -------
srcpkgs/firebird3/template | 37 ++++++++++++-------
7 files changed, 93 insertions(+), 27 deletions(-)
create mode 100644 srcpkgs/firebird3/INSTALL
create mode 100755 srcpkgs/firebird3/files/firebird-fix-perm-fdb
create mode 100644 srcpkgs/firebird3/files/firebird.xinetd
create mode 100755 srcpkgs/firebird3/files/firebird3/run
create mode 100644 srcpkgs/firebird3/patches/fix-databases-conf.patch
delete mode 100644 srcpkgs/firebird3/patches/fix-std-isnan.patch
diff --git a/srcpkgs/firebird3/INSTALL b/srcpkgs/firebird3/INSTALL
new file mode 100644
index 0000000000000..f8863ec6163d8
--- /dev/null
+++ b/srcpkgs/firebird3/INSTALL
@@ -0,0 +1,9 @@
+case "${ACTION}" in
+post)
+ if [ "$UPDATE" = "no" ]
+ then
+ gsec -add sysdba -pw masterkey || true
+ firebird-fix-perm-fdb
+ fi
+ ;;
+esac
diff --git a/srcpkgs/firebird3/files/firebird-fix-perm-fdb b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
new file mode 100755
index 0000000000000..54b3e9749a7f6
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
@@ -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.'
diff --git a/srcpkgs/firebird3/files/firebird.xinetd b/srcpkgs/firebird3/files/firebird.xinetd
new file mode 100644
index 0000000000000..f8f1f7fa348c4
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird.xinetd
@@ -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
+}
diff --git a/srcpkgs/firebird3/files/firebird3/run b/srcpkgs/firebird3/files/firebird3/run
new file mode 100755
index 0000000000000..f9e37a7a38291
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird3/run
@@ -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
diff --git a/srcpkgs/firebird3/patches/fix-databases-conf.patch b/srcpkgs/firebird3/patches/fix-databases-conf.patch
new file mode 100644
index 0000000000000..3a9a55fc1c00a
--- /dev/null
+++ b/srcpkgs/firebird3/patches/fix-databases-conf.patch
@@ -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.
+
diff --git a/srcpkgs/firebird3/patches/fix-std-isnan.patch b/srcpkgs/firebird3/patches/fix-std-isnan.patch
deleted file mode 100644
index 9da229bdc86f1..0000000000000
--- a/srcpkgs/firebird3/patches/fix-std-isnan.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/src/common/classes/FpeControl.h 2020-06-26 12:02:51.000000000 +0200
-+++ b/src/common/classes/FpeControl.h 2020-09-17 06:04:30.516565361 +0200
-@@ -42,6 +42,10 @@
- #include <ieeefp.h>
- #endif
-
-+#if !defined(__GLIBC__)
-+#define isinf std::isinf
-+#endif
-+
- namespace Firebird
- {
-
diff --git a/srcpkgs/firebird3/template b/srcpkgs/firebird3/template
index 575415d2128f1..ef86cc39b1c89 100644
--- a/srcpkgs/firebird3/template
+++ b/srcpkgs/firebird3/template
@@ -1,9 +1,7 @@
# Template file for 'firebird3'
pkgname=firebird3
-version=3.0.6.33328
-revision=2
-_build=0
-_uver=${version//./_}
+version=3.0.11
+revision=1
build_style=gnu-configure
build_helper="qemu"
configure_args="--prefix=/usr
@@ -23,23 +21,36 @@ 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 <orphan@voidlinux.org>"
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/archive/refs/tags/v${version}.tar.gz"
+checksum=47e6acecded1fb7d78900a42aafc619ba98b8b712bb9d25d55d5ad7c69cdd22f
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 +108,6 @@ pre_configure() {
}
do_install() {
- local _lib _v0=${version%.*} _v1=${version%.*.*} _v2=${version%.*.*.*}
-
cd ${wrksrc}/gen
./install/makeInstallImage.sh
@@ -111,14 +120,14 @@ 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
+ vbin ${FILESDIR}/firebird-fix-perm-fdb
# Example https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=firebird-superserver
}
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] firebird3: update to 3.0.10
2023-07-10 21:49 [PR PATCH] " onlylunix
@ 2023-07-11 13:45 ` onlylunix
2023-08-07 18:55 ` onlylunix
1 sibling, 0 replies; 16+ messages in thread
From: onlylunix @ 2023-07-11 13:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1148 bytes --]
There is an updated pull request by onlylunix against master on the void-packages repository
https://github.com/onlylunix/void-packages firebird3upd3.0.10-3
https://github.com/void-linux/void-packages/pull/44976
firebird3: update to 3.0.10
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture (x86_64-LIBC, i686-LIBC, x86_64-musl)
A patch file from https://github.com/void-linux/void-packages/pull/44976.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-firebird3upd3.0.10-3-44976.patch --]
[-- Type: text/x-diff, Size: 7941 bytes --]
From af42394cb27edb3a1d464c5bf955354cbb5baf3e Mon Sep 17 00:00:00 2001
From: onlylunix <userpc2021@yandex.ru>
Date: Tue, 11 Jul 2023 00:38:31 +0300
Subject: [PATCH] firebird3: update to 3.0.10
---
srcpkgs/firebird3/INSTALL | 9 +++++
srcpkgs/firebird3/files/firebird-fix-perm-fdb | 27 ++++++++++++++
srcpkgs/firebird3/files/firebird.xinetd | 16 ++++++++
srcpkgs/firebird3/files/firebird3/run | 3 ++
.../patches/fix-databases-conf.patch | 15 ++++++++
srcpkgs/firebird3/patches/fix-std-isnan.patch | 13 -------
srcpkgs/firebird3/template | 37 ++++++++++++-------
7 files changed, 93 insertions(+), 27 deletions(-)
create mode 100644 srcpkgs/firebird3/INSTALL
create mode 100755 srcpkgs/firebird3/files/firebird-fix-perm-fdb
create mode 100644 srcpkgs/firebird3/files/firebird.xinetd
create mode 100755 srcpkgs/firebird3/files/firebird3/run
create mode 100644 srcpkgs/firebird3/patches/fix-databases-conf.patch
delete mode 100644 srcpkgs/firebird3/patches/fix-std-isnan.patch
diff --git a/srcpkgs/firebird3/INSTALL b/srcpkgs/firebird3/INSTALL
new file mode 100644
index 000000000000..f8863ec6163d
--- /dev/null
+++ b/srcpkgs/firebird3/INSTALL
@@ -0,0 +1,9 @@
+case "${ACTION}" in
+post)
+ if [ "$UPDATE" = "no" ]
+ then
+ gsec -add sysdba -pw masterkey || true
+ firebird-fix-perm-fdb
+ fi
+ ;;
+esac
diff --git a/srcpkgs/firebird3/files/firebird-fix-perm-fdb b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
new file mode 100755
index 000000000000..54b3e9749a7f
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
@@ -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.'
diff --git a/srcpkgs/firebird3/files/firebird.xinetd b/srcpkgs/firebird3/files/firebird.xinetd
new file mode 100644
index 000000000000..f8f1f7fa348c
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird.xinetd
@@ -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
+}
diff --git a/srcpkgs/firebird3/files/firebird3/run b/srcpkgs/firebird3/files/firebird3/run
new file mode 100755
index 000000000000..f9e37a7a3829
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird3/run
@@ -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
diff --git a/srcpkgs/firebird3/patches/fix-databases-conf.patch b/srcpkgs/firebird3/patches/fix-databases-conf.patch
new file mode 100644
index 000000000000..3a9a55fc1c00
--- /dev/null
+++ b/srcpkgs/firebird3/patches/fix-databases-conf.patch
@@ -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.
+
diff --git a/srcpkgs/firebird3/patches/fix-std-isnan.patch b/srcpkgs/firebird3/patches/fix-std-isnan.patch
deleted file mode 100644
index 9da229bdc86f..000000000000
--- a/srcpkgs/firebird3/patches/fix-std-isnan.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/src/common/classes/FpeControl.h 2020-06-26 12:02:51.000000000 +0200
-+++ b/src/common/classes/FpeControl.h 2020-09-17 06:04:30.516565361 +0200
-@@ -42,6 +42,10 @@
- #include <ieeefp.h>
- #endif
-
-+#if !defined(__GLIBC__)
-+#define isinf std::isinf
-+#endif
-+
- namespace Firebird
- {
-
diff --git a/srcpkgs/firebird3/template b/srcpkgs/firebird3/template
index 575415d2128f..9f15fb9d27f5 100644
--- a/srcpkgs/firebird3/template
+++ b/srcpkgs/firebird3/template
@@ -1,9 +1,7 @@
# Template file for 'firebird3'
pkgname=firebird3
-version=3.0.6.33328
-revision=2
-_build=0
-_uver=${version//./_}
+version=3.0.10
+revision=1
build_style=gnu-configure
build_helper="qemu"
configure_args="--prefix=/usr
@@ -23,23 +21,36 @@ 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 <orphan@voidlinux.org>"
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/archive/refs/tags/v${version}.tar.gz"
+checksum=636bb3c4b4d982dd5fac7c8f2fb08789fa6d7815cecf6dd9cceb86743d7f10b9
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 +108,6 @@ pre_configure() {
}
do_install() {
- local _lib _v0=${version%.*} _v1=${version%.*.*} _v2=${version%.*.*.*}
-
cd ${wrksrc}/gen
./install/makeInstallImage.sh
@@ -111,14 +120,14 @@ 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
+ vbin ${FILESDIR}/firebird-fix-perm-fdb
# Example https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=firebird-superserver
}
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] firebird3: update to 3.0.10
2023-03-15 17:05 [PR PATCH] " onlylunix
` (5 preceding siblings ...)
2023-06-24 18:09 ` onlylunix
@ 2023-07-10 14:21 ` onlylunix
6 siblings, 0 replies; 16+ messages in thread
From: onlylunix @ 2023-07-10 14:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 519 bytes --]
There is an updated pull request by onlylunix against master on the void-packages repository
https://github.com/onlylunix/void-packages firebird3upd3.0.10-1
https://github.com/void-linux/void-packages/pull/42789
firebird3: update to 3.0.10
#### Testing the changes
- I tested the changes in this PR: YES
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC, i686-LIBC, x86_64-musl)
A patch file from https://github.com/void-linux/void-packages/pull/42789.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-firebird3upd3.0.10-1-42789.patch --]
[-- Type: text/x-diff, Size: 7674 bytes --]
From b3c3b9ea5e9a1de2a1a425cab31bda5929944c51 Mon Sep 17 00:00:00 2001
From: onlylunix <userpc2021@yandex.ru>
Date: Wed, 15 Mar 2023 20:00:21 +0300
Subject: [PATCH] firebird3: update to 3.0.10
---
srcpkgs/firebird3/INSTALL | 9 +++++
srcpkgs/firebird3/files/firebird-fix-perm-fdb | 22 +++++++++++
srcpkgs/firebird3/files/firebird.xinetd | 16 ++++++++
srcpkgs/firebird3/files/firebird3/run | 3 ++
.../patches/fix-databases-conf.patch | 15 ++++++++
srcpkgs/firebird3/patches/fix-std-isnan.patch | 13 -------
srcpkgs/firebird3/template | 37 ++++++++++++-------
7 files changed, 89 insertions(+), 26 deletions(-)
create mode 100644 srcpkgs/firebird3/INSTALL
create mode 100755 srcpkgs/firebird3/files/firebird-fix-perm-fdb
create mode 100644 srcpkgs/firebird3/files/firebird.xinetd
create mode 100755 srcpkgs/firebird3/files/firebird3/run
create mode 100644 srcpkgs/firebird3/patches/fix-databases-conf.patch
delete mode 100644 srcpkgs/firebird3/patches/fix-std-isnan.patch
diff --git a/srcpkgs/firebird3/INSTALL b/srcpkgs/firebird3/INSTALL
new file mode 100644
index 000000000000..f8863ec6163d
--- /dev/null
+++ b/srcpkgs/firebird3/INSTALL
@@ -0,0 +1,9 @@
+case "${ACTION}" in
+post)
+ if [ "$UPDATE" = "no" ]
+ then
+ gsec -add sysdba -pw masterkey || true
+ firebird-fix-perm-fdb
+ fi
+ ;;
+esac
diff --git a/srcpkgs/firebird3/files/firebird-fix-perm-fdb b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
new file mode 100755
index 000000000000..7a2b4edb936b
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+RunUser=_firebird
+RunGroup=_firebird
+databasesconf='/etc/firebird/databases.conf'
+
+dir_sampledb='/tmp'
+dir_secdb='/var/lib/firebird/system'
+
+checkfdb(){
+[ -e "$@" ] || { echo "$@ - WARNING: No exists!" && return; }
+chpst -u $RunUser test -w "$@" && echo "$@ - OK" || { echo "$@ - FIX PERMISSIONS..."; chown $RunUser:$RunGroup "$@" && chmod 660 "$@"; }
+}
+
+for i in $(grep '^[^#]*=.*\.fdb.*$' "$databasesconf" | sed "s|#.*||; s|^\(.*= *\)\(.*\)$|\2|; s|\$(dir_sampledb)|$dir_sampledb|i; s|\$(dir_secdb)|$dir_secdb|i") # need more testing
+do
+ checkfdb "$i"
+done
+
+install /dev/null -m 644 -o $RunUser -g $RunGroup /etc/firebird/fb_guard
+
+echo 'DONE.'
diff --git a/srcpkgs/firebird3/files/firebird.xinetd b/srcpkgs/firebird3/files/firebird.xinetd
new file mode 100644
index 000000000000..f8f1f7fa348c
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird.xinetd
@@ -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
+}
diff --git a/srcpkgs/firebird3/files/firebird3/run b/srcpkgs/firebird3/files/firebird3/run
new file mode 100755
index 000000000000..f9e37a7a3829
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird3/run
@@ -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
diff --git a/srcpkgs/firebird3/patches/fix-databases-conf.patch b/srcpkgs/firebird3/patches/fix-databases-conf.patch
new file mode 100644
index 000000000000..3a9a55fc1c00
--- /dev/null
+++ b/srcpkgs/firebird3/patches/fix-databases-conf.patch
@@ -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.
+
diff --git a/srcpkgs/firebird3/patches/fix-std-isnan.patch b/srcpkgs/firebird3/patches/fix-std-isnan.patch
deleted file mode 100644
index 9da229bdc86f..000000000000
--- a/srcpkgs/firebird3/patches/fix-std-isnan.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/src/common/classes/FpeControl.h 2020-06-26 12:02:51.000000000 +0200
-+++ b/src/common/classes/FpeControl.h 2020-09-17 06:04:30.516565361 +0200
-@@ -42,6 +42,10 @@
- #include <ieeefp.h>
- #endif
-
-+#if !defined(__GLIBC__)
-+#define isinf std::isinf
-+#endif
-+
- namespace Firebird
- {
-
diff --git a/srcpkgs/firebird3/template b/srcpkgs/firebird3/template
index 8f2285dc7729..49cbce63941f 100644
--- a/srcpkgs/firebird3/template
+++ b/srcpkgs/firebird3/template
@@ -1,9 +1,7 @@
# Template file for 'firebird3'
pkgname=firebird3
-version=3.0.6.33328
+version=3.0.10
revision=1
-_build=0
-_uver=${version//./_}
build_style=gnu-configure
build_helper="qemu"
configure_args="--prefix=/usr
@@ -23,23 +21,36 @@ 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 <orphan@voidlinux.org>"
license="custom"
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/archive/refs/tags/v${version}.tar.gz"
+checksum=636bb3c4b4d982dd5fac7c8f2fb08789fa6d7815cecf6dd9cceb86743d7f10b9
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 +108,6 @@ pre_configure() {
}
do_install() {
- local _lib _v0=${version%.*} _v1=${version%.*.*} _v2=${version%.*.*.*}
-
cd ${wrksrc}/gen
./install/makeInstallImage.sh
@@ -111,11 +120,13 @@ do_install() {
vlicense doc/license/IDPL.txt IDPL
vlicense doc/license/README.license.usage.txt LICENSE
- cp -pR gen/buildroot/* ${DESTDIR}/
+ # cp -pR gen/buildroot/* ${DESTDIR}/
+ rsync -a --exclude '*.sh' gen/buildroot/ ${DESTDIR}/ # exclude old broken scripts
+ mv ${DESTDIR}/usr/bin/isql{,-fb} # fix conflict firebird3 and unixodbc
- # 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
+ vbin ${FILESDIR}/firebird-fix-perm-fdb
# Example https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=firebird-superserver
}
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] firebird3: update to 3.0.10
2023-03-15 17:05 [PR PATCH] " onlylunix
` (4 preceding siblings ...)
2023-03-19 16:02 ` onlylunix
@ 2023-06-24 18:09 ` onlylunix
2023-07-10 14:21 ` onlylunix
6 siblings, 0 replies; 16+ messages in thread
From: onlylunix @ 2023-06-24 18:09 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 519 bytes --]
There is an updated pull request by onlylunix against master on the void-packages repository
https://github.com/onlylunix/void-packages firebird3upd3.0.10-1
https://github.com/void-linux/void-packages/pull/42789
firebird3: update to 3.0.10
#### Testing the changes
- I tested the changes in this PR: YES
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC, i686-LIBC, x86_64-musl)
A patch file from https://github.com/void-linux/void-packages/pull/42789.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-firebird3upd3.0.10-1-42789.patch --]
[-- Type: text/x-diff, Size: 8039 bytes --]
From 962976f2be03b7bee34895d4b4e58285a121510f Mon Sep 17 00:00:00 2001
From: onlylunix <userpc2021@yandex.ru>
Date: Wed, 15 Mar 2023 20:00:21 +0300
Subject: [PATCH] firebird3: update to 3.0.10
---
srcpkgs/firebird3/INSTALL | 9 ++++
srcpkgs/firebird3/files/firebird-fix-perm-fdb | 22 ++++++++++
srcpkgs/firebird3/files/firebird.xinetd | 16 +++++++
srcpkgs/firebird3/files/firebird3/run | 3 ++
.../patches/fix-databases-conf.patch | 15 +++++++
srcpkgs/firebird3/patches/fix-std-isnan.patch | 13 ------
srcpkgs/firebird3/template | 42 ++++++++++++-------
7 files changed, 92 insertions(+), 28 deletions(-)
create mode 100644 srcpkgs/firebird3/INSTALL
create mode 100755 srcpkgs/firebird3/files/firebird-fix-perm-fdb
create mode 100644 srcpkgs/firebird3/files/firebird.xinetd
create mode 100755 srcpkgs/firebird3/files/firebird3/run
create mode 100644 srcpkgs/firebird3/patches/fix-databases-conf.patch
delete mode 100644 srcpkgs/firebird3/patches/fix-std-isnan.patch
diff --git a/srcpkgs/firebird3/INSTALL b/srcpkgs/firebird3/INSTALL
new file mode 100644
index 000000000000..f8863ec6163d
--- /dev/null
+++ b/srcpkgs/firebird3/INSTALL
@@ -0,0 +1,9 @@
+case "${ACTION}" in
+post)
+ if [ "$UPDATE" = "no" ]
+ then
+ gsec -add sysdba -pw masterkey || true
+ firebird-fix-perm-fdb
+ fi
+ ;;
+esac
diff --git a/srcpkgs/firebird3/files/firebird-fix-perm-fdb b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
new file mode 100755
index 000000000000..7a2b4edb936b
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+RunUser=_firebird
+RunGroup=_firebird
+databasesconf='/etc/firebird/databases.conf'
+
+dir_sampledb='/tmp'
+dir_secdb='/var/lib/firebird/system'
+
+checkfdb(){
+[ -e "$@" ] || { echo "$@ - WARNING: No exists!" && return; }
+chpst -u $RunUser test -w "$@" && echo "$@ - OK" || { echo "$@ - FIX PERMISSIONS..."; chown $RunUser:$RunGroup "$@" && chmod 660 "$@"; }
+}
+
+for i in $(grep '^[^#]*=.*\.fdb.*$' "$databasesconf" | sed "s|#.*||; s|^\(.*= *\)\(.*\)$|\2|; s|\$(dir_sampledb)|$dir_sampledb|i; s|\$(dir_secdb)|$dir_secdb|i") # need more testing
+do
+ checkfdb "$i"
+done
+
+install /dev/null -m 644 -o $RunUser -g $RunGroup /etc/firebird/fb_guard
+
+echo 'DONE.'
diff --git a/srcpkgs/firebird3/files/firebird.xinetd b/srcpkgs/firebird3/files/firebird.xinetd
new file mode 100644
index 000000000000..f8f1f7fa348c
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird.xinetd
@@ -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
+}
diff --git a/srcpkgs/firebird3/files/firebird3/run b/srcpkgs/firebird3/files/firebird3/run
new file mode 100755
index 000000000000..f9e37a7a3829
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird3/run
@@ -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
diff --git a/srcpkgs/firebird3/patches/fix-databases-conf.patch b/srcpkgs/firebird3/patches/fix-databases-conf.patch
new file mode 100644
index 000000000000..3a9a55fc1c00
--- /dev/null
+++ b/srcpkgs/firebird3/patches/fix-databases-conf.patch
@@ -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.
+
diff --git a/srcpkgs/firebird3/patches/fix-std-isnan.patch b/srcpkgs/firebird3/patches/fix-std-isnan.patch
deleted file mode 100644
index 9da229bdc86f..000000000000
--- a/srcpkgs/firebird3/patches/fix-std-isnan.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/src/common/classes/FpeControl.h 2020-06-26 12:02:51.000000000 +0200
-+++ b/src/common/classes/FpeControl.h 2020-09-17 06:04:30.516565361 +0200
-@@ -42,6 +42,10 @@
- #include <ieeefp.h>
- #endif
-
-+#if !defined(__GLIBC__)
-+#define isinf std::isinf
-+#endif
-+
- namespace Firebird
- {
-
diff --git a/srcpkgs/firebird3/template b/srcpkgs/firebird3/template
index 8f2285dc7729..7662897c4ff5 100644
--- a/srcpkgs/firebird3/template
+++ b/srcpkgs/firebird3/template
@@ -1,9 +1,7 @@
# Template file for 'firebird3'
pkgname=firebird3
-version=3.0.6.33328
+version=3.0.10
revision=1
-_build=0
-_uver=${version//./_}
build_style=gnu-configure
build_helper="qemu"
configure_args="--prefix=/usr
@@ -23,23 +21,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 <orphan@voidlinux.org>"
-license="custom"
+license="custom:IDPL, custom: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/archive/refs/tags/v${version}.tar.gz"
+checksum=636bb3c4b4d982dd5fac7c8f2fb08789fa6d7815cecf6dd9cceb86743d7f10b9
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"
@@ -87,7 +99,7 @@ pre_configure() {
# do not change ownership to root:root and
# do not change permissions to read-only
find -iname "*.sh.in" -exec sed -i "{}" \
- -e 's;"`whoami`";"root";' \
+ -e 's;"$(whoami)";"root";' \
-e 's;chown root:root;#&;' \
-e 's;chown -R;#&;' \
-e 's;chmod 0444;chmod 0644;' \
@@ -97,8 +109,6 @@ pre_configure() {
}
do_install() {
- local _lib _v0=${version%.*} _v1=${version%.*.*} _v2=${version%.*.*.*}
-
cd ${wrksrc}/gen
./install/makeInstallImage.sh
@@ -111,11 +121,13 @@ do_install() {
vlicense doc/license/IDPL.txt IDPL
vlicense doc/license/README.license.usage.txt LICENSE
- cp -pR gen/buildroot/* ${DESTDIR}/
+ # cp -pR gen/buildroot/* ${DESTDIR}/
+ rsync -a --exclude '*.sh' gen/buildroot/ ${DESTDIR}/ # exclude old broken scripts
+ mv ${DESTDIR}/usr/bin/isql{,-fb} # fix conflict firebird3 and unixodbc
- # 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
+ vbin ${FILESDIR}/firebird-fix-perm-fdb
# Example https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=firebird-superserver
}
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] firebird3: update to 3.0.10
2023-03-15 17:05 [PR PATCH] " onlylunix
` (3 preceding siblings ...)
2023-03-17 13:09 ` onlylunix
@ 2023-03-19 16:02 ` onlylunix
2023-06-24 18:09 ` onlylunix
2023-07-10 14:21 ` onlylunix
6 siblings, 0 replies; 16+ messages in thread
From: onlylunix @ 2023-03-19 16:02 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 519 bytes --]
There is an updated pull request by onlylunix against master on the void-packages repository
https://github.com/onlylunix/void-packages firebird3upd3.0.10-1
https://github.com/void-linux/void-packages/pull/42789
firebird3: update to 3.0.10
#### Testing the changes
- I tested the changes in this PR: YES
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC, i686-LIBC, x86_64-musl)
A patch file from https://github.com/void-linux/void-packages/pull/42789.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-firebird3upd3.0.10-1-42789.patch --]
[-- Type: text/x-diff, Size: 8045 bytes --]
From cb1f7d14da791392216b39eb8038cf913639c890 Mon Sep 17 00:00:00 2001
From: onlylunix <userpc2021@yandex.ru>
Date: Wed, 15 Mar 2023 20:00:21 +0300
Subject: [PATCH] firebird3: update to 3.0.10
---
srcpkgs/firebird3/INSTALL | 9 ++++
srcpkgs/firebird3/files/firebird-fix-perm-fdb | 22 ++++++++++
srcpkgs/firebird3/files/firebird.xinetd | 16 +++++++
srcpkgs/firebird3/files/firebird3/run | 3 ++
.../patches/fix-databases-conf.patch | 15 +++++++
srcpkgs/firebird3/patches/fix-std-isnan.patch | 13 ------
srcpkgs/firebird3/template | 42 ++++++++++++-------
7 files changed, 92 insertions(+), 28 deletions(-)
create mode 100644 srcpkgs/firebird3/INSTALL
create mode 100755 srcpkgs/firebird3/files/firebird-fix-perm-fdb
create mode 100644 srcpkgs/firebird3/files/firebird.xinetd
create mode 100755 srcpkgs/firebird3/files/firebird3/run
create mode 100644 srcpkgs/firebird3/patches/fix-databases-conf.patch
delete mode 100644 srcpkgs/firebird3/patches/fix-std-isnan.patch
diff --git a/srcpkgs/firebird3/INSTALL b/srcpkgs/firebird3/INSTALL
new file mode 100644
index 000000000000..f8863ec6163d
--- /dev/null
+++ b/srcpkgs/firebird3/INSTALL
@@ -0,0 +1,9 @@
+case "${ACTION}" in
+post)
+ if [ "$UPDATE" = "no" ]
+ then
+ gsec -add sysdba -pw masterkey || true
+ firebird-fix-perm-fdb
+ fi
+ ;;
+esac
diff --git a/srcpkgs/firebird3/files/firebird-fix-perm-fdb b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
new file mode 100755
index 000000000000..7a2b4edb936b
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+RunUser=_firebird
+RunGroup=_firebird
+databasesconf='/etc/firebird/databases.conf'
+
+dir_sampledb='/tmp'
+dir_secdb='/var/lib/firebird/system'
+
+checkfdb(){
+[ -e "$@" ] || { echo "$@ - WARNING: No exists!" && return; }
+chpst -u $RunUser test -w "$@" && echo "$@ - OK" || { echo "$@ - FIX PERMISSIONS..."; chown $RunUser:$RunGroup "$@" && chmod 660 "$@"; }
+}
+
+for i in $(grep '^[^#]*=.*\.fdb.*$' "$databasesconf" | sed "s|#.*||; s|^\(.*= *\)\(.*\)$|\2|; s|\$(dir_sampledb)|$dir_sampledb|i; s|\$(dir_secdb)|$dir_secdb|i") # need more testing
+do
+ checkfdb "$i"
+done
+
+install /dev/null -m 644 -o $RunUser -g $RunGroup /etc/firebird/fb_guard
+
+echo 'DONE.'
diff --git a/srcpkgs/firebird3/files/firebird.xinetd b/srcpkgs/firebird3/files/firebird.xinetd
new file mode 100644
index 000000000000..f8f1f7fa348c
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird.xinetd
@@ -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
+}
diff --git a/srcpkgs/firebird3/files/firebird3/run b/srcpkgs/firebird3/files/firebird3/run
new file mode 100755
index 000000000000..f9e37a7a3829
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird3/run
@@ -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
diff --git a/srcpkgs/firebird3/patches/fix-databases-conf.patch b/srcpkgs/firebird3/patches/fix-databases-conf.patch
new file mode 100644
index 000000000000..3a9a55fc1c00
--- /dev/null
+++ b/srcpkgs/firebird3/patches/fix-databases-conf.patch
@@ -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.
+
diff --git a/srcpkgs/firebird3/patches/fix-std-isnan.patch b/srcpkgs/firebird3/patches/fix-std-isnan.patch
deleted file mode 100644
index 9da229bdc86f..000000000000
--- a/srcpkgs/firebird3/patches/fix-std-isnan.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/src/common/classes/FpeControl.h 2020-06-26 12:02:51.000000000 +0200
-+++ b/src/common/classes/FpeControl.h 2020-09-17 06:04:30.516565361 +0200
-@@ -42,6 +42,10 @@
- #include <ieeefp.h>
- #endif
-
-+#if !defined(__GLIBC__)
-+#define isinf std::isinf
-+#endif
-+
- namespace Firebird
- {
-
diff --git a/srcpkgs/firebird3/template b/srcpkgs/firebird3/template
index 8f2285dc7729..8f498070a33e 100644
--- a/srcpkgs/firebird3/template
+++ b/srcpkgs/firebird3/template
@@ -1,9 +1,7 @@
# Template file for 'firebird3'
pkgname=firebird3
-version=3.0.6.33328
+version=3.0.10
revision=1
-_build=0
-_uver=${version//./_}
build_style=gnu-configure
build_helper="qemu"
configure_args="--prefix=/usr
@@ -23,23 +21,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 <orphan@voidlinux.org>"
-license="custom"
+license="custom:IDPL, custom: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/archive/refs/tags/v${version}.tar.gz"
+checksum=636bb3c4b4d982dd5fac7c8f2fb08789fa6d7815cecf6dd9cceb86743d7f10b9
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:84 _firebird:84"
+_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"
@@ -87,7 +99,7 @@ pre_configure() {
# do not change ownership to root:root and
# do not change permissions to read-only
find -iname "*.sh.in" -exec sed -i "{}" \
- -e 's;"`whoami`";"root";' \
+ -e 's;"$(whoami)";"root";' \
-e 's;chown root:root;#&;' \
-e 's;chown -R;#&;' \
-e 's;chmod 0444;chmod 0644;' \
@@ -97,8 +109,6 @@ pre_configure() {
}
do_install() {
- local _lib _v0=${version%.*} _v1=${version%.*.*} _v2=${version%.*.*.*}
-
cd ${wrksrc}/gen
./install/makeInstallImage.sh
@@ -111,11 +121,13 @@ do_install() {
vlicense doc/license/IDPL.txt IDPL
vlicense doc/license/README.license.usage.txt LICENSE
- cp -pR gen/buildroot/* ${DESTDIR}/
+ # cp -pR gen/buildroot/* ${DESTDIR}/
+ rsync -a --exclude '*.sh' gen/buildroot/ ${DESTDIR}/ # exclude old broken scripts
+ mv ${DESTDIR}/usr/bin/isql{,-fb} # fix conflict firebird3 and unixodbc
- # 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
+ vbin ${FILESDIR}/firebird-fix-perm-fdb
# Example https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=firebird-superserver
}
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] firebird3: update to 3.0.10
2023-03-15 17:05 [PR PATCH] " onlylunix
` (2 preceding siblings ...)
2023-03-16 3:55 ` onlylunix
@ 2023-03-17 13:09 ` onlylunix
2023-03-19 16:02 ` onlylunix
` (2 subsequent siblings)
6 siblings, 0 replies; 16+ messages in thread
From: onlylunix @ 2023-03-17 13:09 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 519 bytes --]
There is an updated pull request by onlylunix against master on the void-packages repository
https://github.com/onlylunix/void-packages firebird3upd3.0.10-1
https://github.com/void-linux/void-packages/pull/42789
firebird3: update to 3.0.10
#### Testing the changes
- I tested the changes in this PR: YES
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC, i686-LIBC, x86_64-musl)
A patch file from https://github.com/void-linux/void-packages/pull/42789.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-firebird3upd3.0.10-1-42789.patch --]
[-- Type: text/x-diff, Size: 8046 bytes --]
From 3dcdddf59e3b642ef8c7965971febc6bbeff19be Mon Sep 17 00:00:00 2001
From: onlylunix <userpc2021@yandex.ru>
Date: Wed, 15 Mar 2023 20:00:21 +0300
Subject: [PATCH] firebird3: update to 3.0.10
---
srcpkgs/firebird3/INSTALL | 9 ++++
srcpkgs/firebird3/files/firebird-fix-perm-fdb | 22 ++++++++++
srcpkgs/firebird3/files/firebird.xinetd | 16 +++++++
srcpkgs/firebird3/files/firebird3/run | 3 ++
.../patches/fix-databases-conf.patch | 15 +++++++
srcpkgs/firebird3/patches/fix-std-isnan.patch | 13 ------
srcpkgs/firebird3/template | 42 ++++++++++++-------
7 files changed, 92 insertions(+), 28 deletions(-)
create mode 100644 srcpkgs/firebird3/INSTALL
create mode 100755 srcpkgs/firebird3/files/firebird-fix-perm-fdb
create mode 100644 srcpkgs/firebird3/files/firebird.xinetd
create mode 100755 srcpkgs/firebird3/files/firebird3/run
create mode 100644 srcpkgs/firebird3/patches/fix-databases-conf.patch
delete mode 100644 srcpkgs/firebird3/patches/fix-std-isnan.patch
diff --git a/srcpkgs/firebird3/INSTALL b/srcpkgs/firebird3/INSTALL
new file mode 100644
index 000000000000..f8863ec6163d
--- /dev/null
+++ b/srcpkgs/firebird3/INSTALL
@@ -0,0 +1,9 @@
+case "${ACTION}" in
+post)
+ if [ "$UPDATE" = "no" ]
+ then
+ gsec -add sysdba -pw masterkey || true
+ firebird-fix-perm-fdb
+ fi
+ ;;
+esac
diff --git a/srcpkgs/firebird3/files/firebird-fix-perm-fdb b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
new file mode 100755
index 000000000000..7a2b4edb936b
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+RunUser=_firebird
+RunGroup=_firebird
+databasesconf='/etc/firebird/databases.conf'
+
+dir_sampledb='/tmp'
+dir_secdb='/var/lib/firebird/system'
+
+checkfdb(){
+[ -e "$@" ] || { echo "$@ - WARNING: No exists!" && return; }
+chpst -u $RunUser test -w "$@" && echo "$@ - OK" || { echo "$@ - FIX PERMISSIONS..."; chown $RunUser:$RunGroup "$@" && chmod 660 "$@"; }
+}
+
+for i in $(grep '^[^#]*=.*\.fdb.*$' "$databasesconf" | sed "s|#.*||; s|^\(.*= *\)\(.*\)$|\2|; s|\$(dir_sampledb)|$dir_sampledb|i; s|\$(dir_secdb)|$dir_secdb|i") # need more testing
+do
+ checkfdb "$i"
+done
+
+install /dev/null -m 644 -o $RunUser -g $RunGroup /etc/firebird/fb_guard
+
+echo 'DONE.'
diff --git a/srcpkgs/firebird3/files/firebird.xinetd b/srcpkgs/firebird3/files/firebird.xinetd
new file mode 100644
index 000000000000..f8f1f7fa348c
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird.xinetd
@@ -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
+}
diff --git a/srcpkgs/firebird3/files/firebird3/run b/srcpkgs/firebird3/files/firebird3/run
new file mode 100755
index 000000000000..f9e37a7a3829
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird3/run
@@ -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
diff --git a/srcpkgs/firebird3/patches/fix-databases-conf.patch b/srcpkgs/firebird3/patches/fix-databases-conf.patch
new file mode 100644
index 000000000000..3a9a55fc1c00
--- /dev/null
+++ b/srcpkgs/firebird3/patches/fix-databases-conf.patch
@@ -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.
+
diff --git a/srcpkgs/firebird3/patches/fix-std-isnan.patch b/srcpkgs/firebird3/patches/fix-std-isnan.patch
deleted file mode 100644
index 9da229bdc86f..000000000000
--- a/srcpkgs/firebird3/patches/fix-std-isnan.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/src/common/classes/FpeControl.h 2020-06-26 12:02:51.000000000 +0200
-+++ b/src/common/classes/FpeControl.h 2020-09-17 06:04:30.516565361 +0200
-@@ -42,6 +42,10 @@
- #include <ieeefp.h>
- #endif
-
-+#if !defined(__GLIBC__)
-+#define isinf std::isinf
-+#endif
-+
- namespace Firebird
- {
-
diff --git a/srcpkgs/firebird3/template b/srcpkgs/firebird3/template
index 8f2285dc7729..5d4287a9534b 100644
--- a/srcpkgs/firebird3/template
+++ b/srcpkgs/firebird3/template
@@ -1,9 +1,7 @@
# Template file for 'firebird3'
pkgname=firebird3
-version=3.0.6.33328
+version=3.0.10
revision=1
-_build=0
-_uver=${version//./_}
build_style=gnu-configure
build_helper="qemu"
configure_args="--prefix=/usr
@@ -23,23 +21,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 <orphan@voidlinux.org>"
-license="custom"
+license="custom:IDPL, custom: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/archive/refs/tags/v${version}.tar.gz"
+checksum=636bb3c4b4d982dd5fac7c8f2fb08789fa6d7815cecf6dd9cceb86743d7f10b9
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:84 _firebird:84"
+_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"
@@ -87,7 +99,7 @@ pre_configure() {
# do not change ownership to root:root and
# do not change permissions to read-only
find -iname "*.sh.in" -exec sed -i "{}" \
- -e 's;"`whoami`";"root";' \
+ -e 's;"$(whoami)";"root";' \
-e 's;chown root:root;#&;' \
-e 's;chown -R;#&;' \
-e 's;chmod 0444;chmod 0644;' \
@@ -97,8 +109,6 @@ pre_configure() {
}
do_install() {
- local _lib _v0=${version%.*} _v1=${version%.*.*} _v2=${version%.*.*.*}
-
cd ${wrksrc}/gen
./install/makeInstallImage.sh
@@ -111,11 +121,13 @@ do_install() {
vlicense doc/license/IDPL.txt IDPL
vlicense doc/license/README.license.usage.txt LICENSE
- cp -pR gen/buildroot/* ${DESTDIR}/
+ # cp -pR gen/buildroot/* ${DESTDIR}/
+ rsync -a --exclude '*.sh' gen/buildroot/ ${DESTDIR}/ # exclude old broken scripts
+ mv ${DESTDIR}/usr/bin/isql{,-fb} # fix conflict firebird3 and unixodbc
- # 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
+ vbin ${FILESDIR}/firebird-fix-perm-fdb
# Example https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=firebird-superserver
}
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] firebird3: update to 3.0.10
2023-03-15 17:05 [PR PATCH] " onlylunix
2023-03-15 20:51 ` [PR PATCH] [Updated] " onlylunix
2023-03-15 21:12 ` onlylunix
@ 2023-03-16 3:55 ` onlylunix
2023-03-17 13:09 ` onlylunix
` (3 subsequent siblings)
6 siblings, 0 replies; 16+ messages in thread
From: onlylunix @ 2023-03-16 3:55 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 519 bytes --]
There is an updated pull request by onlylunix against master on the void-packages repository
https://github.com/onlylunix/void-packages firebird3upd3.0.10-1
https://github.com/void-linux/void-packages/pull/42789
firebird3: update to 3.0.10
#### Testing the changes
- I tested the changes in this PR: YES
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC, i686-LIBC, x86_64-musl)
A patch file from https://github.com/void-linux/void-packages/pull/42789.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-firebird3upd3.0.10-1-42789.patch --]
[-- Type: text/x-diff, Size: 8044 bytes --]
From 78491f5471abf56803b8ef17c0d3bff9972d5f5b Mon Sep 17 00:00:00 2001
From: onlylunix <userpc2021@yandex.ru>
Date: Wed, 15 Mar 2023 20:00:21 +0300
Subject: [PATCH] firebird3: update to 3.0.10
---
srcpkgs/firebird3/INSTALL | 9 ++++
srcpkgs/firebird3/files/firebird-fix-perm-fdb | 22 ++++++++++
srcpkgs/firebird3/files/firebird.xinetd | 16 +++++++
srcpkgs/firebird3/files/firebird3/run | 3 ++
.../patches/fix-databases-conf.patch | 15 +++++++
srcpkgs/firebird3/patches/fix-std-isnan.patch | 13 ------
srcpkgs/firebird3/template | 42 ++++++++++++-------
7 files changed, 92 insertions(+), 28 deletions(-)
create mode 100644 srcpkgs/firebird3/INSTALL
create mode 100755 srcpkgs/firebird3/files/firebird-fix-perm-fdb
create mode 100644 srcpkgs/firebird3/files/firebird.xinetd
create mode 100755 srcpkgs/firebird3/files/firebird3/run
create mode 100644 srcpkgs/firebird3/patches/fix-databases-conf.patch
delete mode 100644 srcpkgs/firebird3/patches/fix-std-isnan.patch
diff --git a/srcpkgs/firebird3/INSTALL b/srcpkgs/firebird3/INSTALL
new file mode 100644
index 000000000000..f8863ec6163d
--- /dev/null
+++ b/srcpkgs/firebird3/INSTALL
@@ -0,0 +1,9 @@
+case "${ACTION}" in
+post)
+ if [ "$UPDATE" = "no" ]
+ then
+ gsec -add sysdba -pw masterkey || true
+ firebird-fix-perm-fdb
+ fi
+ ;;
+esac
diff --git a/srcpkgs/firebird3/files/firebird-fix-perm-fdb b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
new file mode 100755
index 000000000000..7a2b4edb936b
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+RunUser=_firebird
+RunGroup=_firebird
+databasesconf='/etc/firebird/databases.conf'
+
+dir_sampledb='/tmp'
+dir_secdb='/var/lib/firebird/system'
+
+checkfdb(){
+[ -e "$@" ] || { echo "$@ - WARNING: No exists!" && return; }
+chpst -u $RunUser test -w "$@" && echo "$@ - OK" || { echo "$@ - FIX PERMISSIONS..."; chown $RunUser:$RunGroup "$@" && chmod 660 "$@"; }
+}
+
+for i in $(grep '^[^#]*=.*\.fdb.*$' "$databasesconf" | sed "s|#.*||; s|^\(.*= *\)\(.*\)$|\2|; s|\$(dir_sampledb)|$dir_sampledb|i; s|\$(dir_secdb)|$dir_secdb|i") # need more testing
+do
+ checkfdb "$i"
+done
+
+install /dev/null -m 644 -o $RunUser -g $RunGroup /etc/firebird/fb_guard
+
+echo 'DONE.'
diff --git a/srcpkgs/firebird3/files/firebird.xinetd b/srcpkgs/firebird3/files/firebird.xinetd
new file mode 100644
index 000000000000..f8f1f7fa348c
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird.xinetd
@@ -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
+}
diff --git a/srcpkgs/firebird3/files/firebird3/run b/srcpkgs/firebird3/files/firebird3/run
new file mode 100755
index 000000000000..f9e37a7a3829
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird3/run
@@ -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
diff --git a/srcpkgs/firebird3/patches/fix-databases-conf.patch b/srcpkgs/firebird3/patches/fix-databases-conf.patch
new file mode 100644
index 000000000000..3a9a55fc1c00
--- /dev/null
+++ b/srcpkgs/firebird3/patches/fix-databases-conf.patch
@@ -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.
+
diff --git a/srcpkgs/firebird3/patches/fix-std-isnan.patch b/srcpkgs/firebird3/patches/fix-std-isnan.patch
deleted file mode 100644
index 9da229bdc86f..000000000000
--- a/srcpkgs/firebird3/patches/fix-std-isnan.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/src/common/classes/FpeControl.h 2020-06-26 12:02:51.000000000 +0200
-+++ b/src/common/classes/FpeControl.h 2020-09-17 06:04:30.516565361 +0200
-@@ -42,6 +42,10 @@
- #include <ieeefp.h>
- #endif
-
-+#if !defined(__GLIBC__)
-+#define isinf std::isinf
-+#endif
-+
- namespace Firebird
- {
-
diff --git a/srcpkgs/firebird3/template b/srcpkgs/firebird3/template
index 8f2285dc7729..5c3b205b1d3a 100644
--- a/srcpkgs/firebird3/template
+++ b/srcpkgs/firebird3/template
@@ -1,9 +1,7 @@
# Template file for 'firebird3'
pkgname=firebird3
-version=3.0.6.33328
+version=3.0.10
revision=1
-_build=0
-_uver=${version//./_}
build_style=gnu-configure
build_helper="qemu"
configure_args="--prefix=/usr
@@ -23,23 +21,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 <orphan@voidlinux.org>"
-license="custom"
+license="custom:IDPL, custom: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/archive/refs/tags/v${version}.tar.gz"
+checksum=636bb3c4b4d982dd5fac7c8f2fb08789fa6d7815cecf6dd9cceb86743d7f10b9
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:84 _firebird:84"
+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"
@@ -87,7 +99,7 @@ pre_configure() {
# do not change ownership to root:root and
# do not change permissions to read-only
find -iname "*.sh.in" -exec sed -i "{}" \
- -e 's;"`whoami`";"root";' \
+ -e 's;"$(whoami)";"root";' \
-e 's;chown root:root;#&;' \
-e 's;chown -R;#&;' \
-e 's;chmod 0444;chmod 0644;' \
@@ -97,8 +109,6 @@ pre_configure() {
}
do_install() {
- local _lib _v0=${version%.*} _v1=${version%.*.*} _v2=${version%.*.*.*}
-
cd ${wrksrc}/gen
./install/makeInstallImage.sh
@@ -111,11 +121,13 @@ do_install() {
vlicense doc/license/IDPL.txt IDPL
vlicense doc/license/README.license.usage.txt LICENSE
- cp -pR gen/buildroot/* ${DESTDIR}/
+ # cp -pR gen/buildroot/* ${DESTDIR}/
+ rsync -a --exclude '*.sh' gen/buildroot/ ${DESTDIR}/ # exclude old broken scripts
+ mv ${DESTDIR}/usr/bin/isql{,-fb} # fix conflict firebird3 and unixodbc
- # 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
+ vbin ${FILESDIR}/firebird-fix-perm-fdb
# Example https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=firebird-superserver
}
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] firebird3: update to 3.0.10
2023-03-15 17:05 [PR PATCH] " onlylunix
2023-03-15 20:51 ` [PR PATCH] [Updated] " onlylunix
@ 2023-03-15 21:12 ` onlylunix
2023-03-16 3:55 ` onlylunix
` (4 subsequent siblings)
6 siblings, 0 replies; 16+ messages in thread
From: onlylunix @ 2023-03-15 21:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 519 bytes --]
There is an updated pull request by onlylunix against master on the void-packages repository
https://github.com/onlylunix/void-packages firebird3upd3.0.10-1
https://github.com/void-linux/void-packages/pull/42789
firebird3: update to 3.0.10
#### Testing the changes
- I tested the changes in this PR: YES
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC, i686-LIBC, x86_64-musl)
A patch file from https://github.com/void-linux/void-packages/pull/42789.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-firebird3upd3.0.10-1-42789.patch --]
[-- Type: text/x-diff, Size: 7832 bytes --]
From 009fd64feb90755b0c3587b56772d20e5f406bc2 Mon Sep 17 00:00:00 2001
From: onlylunix <userpc2021@yandex.ru>
Date: Wed, 15 Mar 2023 20:00:21 +0300
Subject: [PATCH] firebird3: update to 3.0.10
---
srcpkgs/firebird3/INSTALL | 9 +++++
srcpkgs/firebird3/files/firebird-fix-perm-fdb | 22 +++++++++++
srcpkgs/firebird3/files/firebird.xinetd | 16 ++++++++
srcpkgs/firebird3/files/firebird3/run | 3 ++
.../patches/fix-databases-conf.patch | 15 ++++++++
srcpkgs/firebird3/patches/fix-std-isnan.patch | 13 -------
srcpkgs/firebird3/template | 37 ++++++++++++-------
7 files changed, 89 insertions(+), 26 deletions(-)
create mode 100644 srcpkgs/firebird3/INSTALL
create mode 100755 srcpkgs/firebird3/files/firebird-fix-perm-fdb
create mode 100644 srcpkgs/firebird3/files/firebird.xinetd
create mode 100755 srcpkgs/firebird3/files/firebird3/run
create mode 100644 srcpkgs/firebird3/patches/fix-databases-conf.patch
delete mode 100644 srcpkgs/firebird3/patches/fix-std-isnan.patch
diff --git a/srcpkgs/firebird3/INSTALL b/srcpkgs/firebird3/INSTALL
new file mode 100644
index 000000000000..f8863ec6163d
--- /dev/null
+++ b/srcpkgs/firebird3/INSTALL
@@ -0,0 +1,9 @@
+case "${ACTION}" in
+post)
+ if [ "$UPDATE" = "no" ]
+ then
+ gsec -add sysdba -pw masterkey || true
+ firebird-fix-perm-fdb
+ fi
+ ;;
+esac
diff --git a/srcpkgs/firebird3/files/firebird-fix-perm-fdb b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
new file mode 100755
index 000000000000..7a2b4edb936b
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+RunUser=_firebird
+RunGroup=_firebird
+databasesconf='/etc/firebird/databases.conf'
+
+dir_sampledb='/tmp'
+dir_secdb='/var/lib/firebird/system'
+
+checkfdb(){
+[ -e "$@" ] || { echo "$@ - WARNING: No exists!" && return; }
+chpst -u $RunUser test -w "$@" && echo "$@ - OK" || { echo "$@ - FIX PERMISSIONS..."; chown $RunUser:$RunGroup "$@" && chmod 660 "$@"; }
+}
+
+for i in $(grep '^[^#]*=.*\.fdb.*$' "$databasesconf" | sed "s|#.*||; s|^\(.*= *\)\(.*\)$|\2|; s|\$(dir_sampledb)|$dir_sampledb|i; s|\$(dir_secdb)|$dir_secdb|i") # need more testing
+do
+ checkfdb "$i"
+done
+
+install /dev/null -m 644 -o $RunUser -g $RunGroup /etc/firebird/fb_guard
+
+echo 'DONE.'
diff --git a/srcpkgs/firebird3/files/firebird.xinetd b/srcpkgs/firebird3/files/firebird.xinetd
new file mode 100644
index 000000000000..f8f1f7fa348c
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird.xinetd
@@ -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
+}
diff --git a/srcpkgs/firebird3/files/firebird3/run b/srcpkgs/firebird3/files/firebird3/run
new file mode 100755
index 000000000000..f9e37a7a3829
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird3/run
@@ -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
diff --git a/srcpkgs/firebird3/patches/fix-databases-conf.patch b/srcpkgs/firebird3/patches/fix-databases-conf.patch
new file mode 100644
index 000000000000..3a9a55fc1c00
--- /dev/null
+++ b/srcpkgs/firebird3/patches/fix-databases-conf.patch
@@ -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.
+
diff --git a/srcpkgs/firebird3/patches/fix-std-isnan.patch b/srcpkgs/firebird3/patches/fix-std-isnan.patch
deleted file mode 100644
index 9da229bdc86f..000000000000
--- a/srcpkgs/firebird3/patches/fix-std-isnan.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/src/common/classes/FpeControl.h 2020-06-26 12:02:51.000000000 +0200
-+++ b/src/common/classes/FpeControl.h 2020-09-17 06:04:30.516565361 +0200
-@@ -42,6 +42,10 @@
- #include <ieeefp.h>
- #endif
-
-+#if !defined(__GLIBC__)
-+#define isinf std::isinf
-+#endif
-+
- namespace Firebird
- {
-
diff --git a/srcpkgs/firebird3/template b/srcpkgs/firebird3/template
index 8f2285dc7729..057741d137e2 100644
--- a/srcpkgs/firebird3/template
+++ b/srcpkgs/firebird3/template
@@ -1,9 +1,7 @@
# Template file for 'firebird3'
pkgname=firebird3
-version=3.0.6.33328
+version=3.0.10
revision=1
-_build=0
-_uver=${version//./_}
build_style=gnu-configure
build_helper="qemu"
configure_args="--prefix=/usr
@@ -23,23 +21,37 @@ configure_args="--prefix=/usr
--with-fbmisc
--without-fbsample
--without-fbsample-db
- --with-system-icu
--with-system-editline"
+# unrecognized options: --with-system-icu
+
hostmakedepends="automake libtool pkg-config icu"
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 <orphan@voidlinux.org>"
-license="custom"
+license="custom:IDPL, custom: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/archive/refs/tags/v${version}.tar.gz"
+checksum=636bb3c4b4d982dd5fac7c8f2fb08789fa6d7815cecf6dd9cceb86743d7f10b9
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:84 _firebird:84"
+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"
@@ -87,7 +99,7 @@ pre_configure() {
# do not change ownership to root:root and
# do not change permissions to read-only
find -iname "*.sh.in" -exec sed -i "{}" \
- -e 's;"`whoami`";"root";' \
+ -e 's;"$(whoami)";"root";' \
-e 's;chown root:root;#&;' \
-e 's;chown -R;#&;' \
-e 's;chmod 0444;chmod 0644;' \
@@ -97,8 +109,6 @@ pre_configure() {
}
do_install() {
- local _lib _v0=${version%.*} _v1=${version%.*.*} _v2=${version%.*.*.*}
-
cd ${wrksrc}/gen
./install/makeInstallImage.sh
@@ -112,10 +122,11 @@ do_install() {
vlicense doc/license/README.license.usage.txt LICENSE
cp -pR gen/buildroot/* ${DESTDIR}/
+ mv ${DESTDIR}/usr/bin/isql{,-fb} # fix conflict firebird3 and unixodbc
- # 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
+ vbin ${FILESDIR}/firebird-fix-perm-fdb
# Example https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=firebird-superserver
}
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] firebird3: update to 3.0.10
2023-03-15 17:05 [PR PATCH] " onlylunix
@ 2023-03-15 20:51 ` onlylunix
2023-03-15 21:12 ` onlylunix
` (5 subsequent siblings)
6 siblings, 0 replies; 16+ messages in thread
From: onlylunix @ 2023-03-15 20:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 519 bytes --]
There is an updated pull request by onlylunix against master on the void-packages repository
https://github.com/onlylunix/void-packages firebird3upd3.0.10-1
https://github.com/void-linux/void-packages/pull/42789
firebird3: update to 3.0.10
#### Testing the changes
- I tested the changes in this PR: YES
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC, i686-LIBC, x86_64-musl)
A patch file from https://github.com/void-linux/void-packages/pull/42789.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-firebird3upd3.0.10-1-42789.patch --]
[-- Type: text/x-diff, Size: 7866 bytes --]
From c099749699c0c3993abc5f55c1f877383313ebc5 Mon Sep 17 00:00:00 2001
From: onlylunix <userpc2021@yandex.ru>
Date: Wed, 15 Mar 2023 20:00:21 +0300
Subject: [PATCH] firebird3: update to 3.0.10
---
srcpkgs/firebird3/INSTALL | 9 +++++
srcpkgs/firebird3/files/firebird-fix-perm-fdb | 23 ++++++++++++
srcpkgs/firebird3/files/firebird.xinetd | 16 ++++++++
srcpkgs/firebird3/files/firebird3/run | 3 ++
.../patches/fix-databases-conf.patch | 15 ++++++++
srcpkgs/firebird3/patches/fix-std-isnan.patch | 13 -------
srcpkgs/firebird3/template | 37 ++++++++++++-------
7 files changed, 90 insertions(+), 26 deletions(-)
create mode 100644 srcpkgs/firebird3/INSTALL
create mode 100755 srcpkgs/firebird3/files/firebird-fix-perm-fdb
create mode 100644 srcpkgs/firebird3/files/firebird.xinetd
create mode 100755 srcpkgs/firebird3/files/firebird3/run
create mode 100644 srcpkgs/firebird3/patches/fix-databases-conf.patch
delete mode 100644 srcpkgs/firebird3/patches/fix-std-isnan.patch
diff --git a/srcpkgs/firebird3/INSTALL b/srcpkgs/firebird3/INSTALL
new file mode 100644
index 000000000000..f8863ec6163d
--- /dev/null
+++ b/srcpkgs/firebird3/INSTALL
@@ -0,0 +1,9 @@
+case "${ACTION}" in
+post)
+ if [ "$UPDATE" = "no" ]
+ then
+ gsec -add sysdba -pw masterkey || true
+ firebird-fix-perm-fdb
+ fi
+ ;;
+esac
diff --git a/srcpkgs/firebird3/files/firebird-fix-perm-fdb b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
new file mode 100755
index 000000000000..97eff99c3c59
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird-fix-perm-fdb
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+RunUser=_firebird
+RunGroup=_firebird
+databasesconf='/etc/firebird/databases.conf'
+
+# !!! need shielding / !!!
+dir_sampledb='\/tmp'
+dir_secdb='\/var\/lib\/firebird\/system'
+
+checkfdb(){
+[ -e "$@" ] || { echo "$@ - WARNING: No exists!" && return; }
+chpst -u $RunUser test -w "$@" && echo "$@ - OK" || { echo "$@ - FIX PERMISSIONS..."; chown $RunUser:$RunGroup "$@" && chmod 660 "$@"; }
+}
+
+for i in $(grep '^[^#]*=.*\.fdb.*$' "$databasesconf" | sed "s/#.*//; s/^\(.*= *\)\(.*\)$/\2/; s/\$(dir_sampledb)/$dir_sampledb/i; s/\$(dir_secdb)/$dir_secdb/i") # need more testing
+do
+ checkfdb "$i"
+done
+
+install /dev/null -m 644 -o $RunUser -g $RunGroup /etc/firebird/fb_guard
+
+echo 'DONE.'
diff --git a/srcpkgs/firebird3/files/firebird.xinetd b/srcpkgs/firebird3/files/firebird.xinetd
new file mode 100644
index 000000000000..f8f1f7fa348c
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird.xinetd
@@ -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
+}
diff --git a/srcpkgs/firebird3/files/firebird3/run b/srcpkgs/firebird3/files/firebird3/run
new file mode 100755
index 000000000000..f9e37a7a3829
--- /dev/null
+++ b/srcpkgs/firebird3/files/firebird3/run
@@ -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
diff --git a/srcpkgs/firebird3/patches/fix-databases-conf.patch b/srcpkgs/firebird3/patches/fix-databases-conf.patch
new file mode 100644
index 000000000000..3a9a55fc1c00
--- /dev/null
+++ b/srcpkgs/firebird3/patches/fix-databases-conf.patch
@@ -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.
+
diff --git a/srcpkgs/firebird3/patches/fix-std-isnan.patch b/srcpkgs/firebird3/patches/fix-std-isnan.patch
deleted file mode 100644
index 9da229bdc86f..000000000000
--- a/srcpkgs/firebird3/patches/fix-std-isnan.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/src/common/classes/FpeControl.h 2020-06-26 12:02:51.000000000 +0200
-+++ b/src/common/classes/FpeControl.h 2020-09-17 06:04:30.516565361 +0200
-@@ -42,6 +42,10 @@
- #include <ieeefp.h>
- #endif
-
-+#if !defined(__GLIBC__)
-+#define isinf std::isinf
-+#endif
-+
- namespace Firebird
- {
-
diff --git a/srcpkgs/firebird3/template b/srcpkgs/firebird3/template
index 8f2285dc7729..057741d137e2 100644
--- a/srcpkgs/firebird3/template
+++ b/srcpkgs/firebird3/template
@@ -1,9 +1,7 @@
# Template file for 'firebird3'
pkgname=firebird3
-version=3.0.6.33328
+version=3.0.10
revision=1
-_build=0
-_uver=${version//./_}
build_style=gnu-configure
build_helper="qemu"
configure_args="--prefix=/usr
@@ -23,23 +21,37 @@ configure_args="--prefix=/usr
--with-fbmisc
--without-fbsample
--without-fbsample-db
- --with-system-icu
--with-system-editline"
+# unrecognized options: --with-system-icu
+
hostmakedepends="automake libtool pkg-config icu"
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 <orphan@voidlinux.org>"
-license="custom"
+license="custom:IDPL, custom: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/archive/refs/tags/v${version}.tar.gz"
+checksum=636bb3c4b4d982dd5fac7c8f2fb08789fa6d7815cecf6dd9cceb86743d7f10b9
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:84 _firebird:84"
+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"
@@ -87,7 +99,7 @@ pre_configure() {
# do not change ownership to root:root and
# do not change permissions to read-only
find -iname "*.sh.in" -exec sed -i "{}" \
- -e 's;"`whoami`";"root";' \
+ -e 's;"$(whoami)";"root";' \
-e 's;chown root:root;#&;' \
-e 's;chown -R;#&;' \
-e 's;chmod 0444;chmod 0644;' \
@@ -97,8 +109,6 @@ pre_configure() {
}
do_install() {
- local _lib _v0=${version%.*} _v1=${version%.*.*} _v2=${version%.*.*.*}
-
cd ${wrksrc}/gen
./install/makeInstallImage.sh
@@ -112,10 +122,11 @@ do_install() {
vlicense doc/license/README.license.usage.txt LICENSE
cp -pR gen/buildroot/* ${DESTDIR}/
+ mv ${DESTDIR}/usr/bin/isql{,-fb} # fix conflict firebird3 and unixodbc
- # 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
+ vbin ${FILESDIR}/firebird-fix-perm-fdb
# Example https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=firebird-superserver
}
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2023-08-07 18:55 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-14 3:10 [PR PATCH] firebird3: update to 3.0.10 onlylunix
2023-03-14 21:55 ` [PR PATCH] [Updated] " onlylunix
2023-03-14 23:11 ` onlylunix
2023-03-14 23:21 ` onlylunix
2023-03-15 11:40 ` abenson
2023-03-15 15:59 ` [PR PATCH] [Closed]: " onlylunix
2023-03-15 17:37 ` onlylunix
2023-03-15 17:05 [PR PATCH] " onlylunix
2023-03-15 20:51 ` [PR PATCH] [Updated] " onlylunix
2023-03-15 21:12 ` onlylunix
2023-03-16 3:55 ` onlylunix
2023-03-17 13:09 ` onlylunix
2023-03-19 16:02 ` onlylunix
2023-06-24 18:09 ` onlylunix
2023-07-10 14:21 ` onlylunix
2023-07-10 21:49 [PR PATCH] " onlylunix
2023-07-11 13:45 ` [PR PATCH] [Updated] " onlylunix
2023-08-07 18:55 ` onlylunix
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).