-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
456 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
_PASSW_SET(){ | ||
local _n1=$(expr "${VERSION}" : '\([^.]*\)') | ||
local _securitydb=/var/lib/${PKGNAME}/system/security${_n1}.fdb | ||
LD_LIBRARY_PATH="/usr/lib/${PKGNAME}/lib:${LD_LIBRARY_PATH}" /usr/lib/${PKGNAME}/bin/isql <<EOF | ||
CONNECT '${_securitydb}' user SYSDBA; | ||
CREATE USER SYSDBA PASSWORD '${_pass}'; | ||
EOF | ||
} | ||
|
||
_PASSW_SAVE(){ | ||
local _savef=/etc/${PKGNAME}/SYSDBA.password-$(date +%Y%m%d%H%M%S) | ||
install -m 600 /dev/null "${_savef}" | ||
|
||
{ cat >> "${_savef}" <<EOF | ||
# This file was created when ${PKGNAME} was installed. | ||
# This file should not be readable by other users. | ||
# Remember the user password and you can delete this file. | ||
user=SYSDBA | ||
password=${_pass} | ||
EOF | ||
} && echo "SEE PASSWORD in file ${_savef}" && ln -srf "${_savef}" "/etc/${PKGNAME}/SYSDBA.password" | ||
return 0 | ||
} | ||
|
||
case "${ACTION}" in | ||
post) | ||
if [ "$UPDATE" = "no" ] | ||
then | ||
chmod 660 -- /var/lib/${PKGNAME}/system/security*.fdb | ||
|
||
echo "${PKGNAME}: Post install: WARNING! ATTEMPTING TO SET PASSWORD FOR USER SYSDBA ..." | ||
_pass=$(pwgen -1) && _PASSW_SET && echo 'SUCCESSFUL.' && _PASSW_SAVE || echo 'FAIL.' | ||
|
||
chown _firebird:_firebird -- /var/lib/${PKGNAME}/system/security*.fdb | ||
chown _firebird:_firebird /tmp/firebird | ||
find /tmp/firebird -type f -name 'fb_*' -user 0 -exec chown _firebird:_firebird -- {} \; | ||
fi | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
--- extern/cloop/Makefile 2020-06-26 12:02:51.000000000 +0200 | ||
+++ extern/cloop/Makefile 2020-09-16 18:36:31.230025798 +0200 | ||
@@ -4,9 +4,9 @@ | ||
|
||
TARGET := release | ||
|
||
-CC := $(CC) | ||
-CXX := $(CXX) | ||
-LD := $(CXX) | ||
+CC := $(CC_host) | ||
+CXX := $(CXX_host) | ||
+LD := $(CXX_host) | ||
|
||
SRC_DIR := src | ||
BUILD_DIR := build | ||
@@ -27,8 +27,9 @@ | ||
OBJS_C := $(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(SRCS_C)) | ||
OBJS_CPP := $(patsubst $(SRC_DIR)/%.cpp,$(OBJ_DIR)/%.o,$(SRCS_CPP)) | ||
|
||
-C_FLAGS := -ggdb -fPIC -MMD -MP -W -Wall -Wno-unused-parameter | ||
-CXX_FLAGS := $(C_FLAGS) | ||
+COMMON_C_FLAGS := -ggdb -fPIC -MMD -MP -W -Wall -Wno-unused-parameter | ||
+C_FLAGS := $(COMMON_C_FLAGS) $(CFLAGS_host) $(CPPFLAGS) | ||
+CXX_FLAGS := $(COMMON_C_FLAGS) $(CXXFLAGS_host) $(CPPFLAGS) | ||
FPC_FLAGS := -Mdelphi | ||
|
||
ifeq ($(TARGET),release) | ||
@@ -81,7 +82,7 @@ | ||
$(OBJ_DIR)/cloop/Parser.o \ | ||
$(OBJ_DIR)/cloop/Main.o \ | ||
|
||
- $(LD) $^ -o $@ | ||
+ $(LD) $(LDFLAGS_host) $^ -o $@ | ||
|
||
$(SRC_DIR)/tests/test1/CalcCApi.h: $(BIN_DIR)/cloop $(SRC_DIR)/tests/test1/Interface.idl | ||
$(BIN_DIR)/cloop $(SRC_DIR)/tests/test1/Interface.idl c-header $@ CALC_C_API_H CALC_I | ||
@@ -108,23 +109,23 @@ | ||
$(OBJ_DIR)/tests/test1/CalcCApi.o \ | ||
$(OBJ_DIR)/tests/test1/CTest.o \ | ||
|
||
- $(LD) $^ -shared -ldl -o $@ | ||
+ $(LD) $(LDFLAGS_host) $^ -shared -ldl -o $@ | ||
|
||
$(BIN_DIR)/test1-c$(EXE_EXT): \ | ||
$(OBJ_DIR)/tests/test1/CalcCApi.o \ | ||
$(OBJ_DIR)/tests/test1/CTest.o \ | ||
|
||
- $(LD) $^ -ldl -o $@ | ||
+ $(LD) $(LDFLAGS_host) $^ -ldl -o $@ | ||
|
||
$(BIN_DIR)/test1-cpp$(SHRLIB_EXT): \ | ||
$(OBJ_DIR)/tests/test1/CppTest.o \ | ||
|
||
- $(LD) $^ -shared -ldl -o $@ | ||
+ $(LD) $(LDFLAGS_host) $^ -shared -ldl -o $@ | ||
|
||
$(BIN_DIR)/test1-cpp$(EXE_EXT): \ | ||
$(OBJ_DIR)/tests/test1/CppTest.o \ | ||
|
||
- $(LD) $^ -ldl -o $@ | ||
+ $(LD) $(LDFLAGS_host) $^ -ldl -o $@ | ||
|
||
$(BIN_DIR)/test1-pascal$(SHRLIB_EXT): \ | ||
$(SRC_DIR)/tests/test1/PascalClasses.pas \ | ||
--- configure.ac 2020-06-26 12:02:51.000000000 +0200 | ||
+++ configure.ac 2020-09-17 04:29:43.550904331 +0200 | ||
@@ -1021,37 +1021,13 @@ | ||
AC_DEFINE(HAVE_STRUCT_DIRENT_D_TYPE,1,[Define this if struct dirent has d_type]),, | ||
[#include <dirent.h>]) | ||
|
||
-dnl EKU: try to determine the alignment of long and double | ||
-dnl replaces FB_ALIGNMENT and FB_DOUBLE_ALIGN in src/jrd/common.h | ||
-AC_MSG_CHECKING(alignment of long) | ||
-AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <semaphore.h> | ||
-main () { | ||
- struct s { | ||
- char a; | ||
- union { long long x; sem_t y; } b; | ||
- }; | ||
- exit((int)&((struct s*)0)->b); | ||
-}]])],[ac_cv_c_alignment=$ac_status],[ac_cv_c_alignment=$ac_status],[]) | ||
-AC_MSG_RESULT($ac_cv_c_alignment) | ||
AC_DEFINE_UNQUOTED(FB_ALIGNMENT, $ac_cv_c_alignment, [Alignment of long]) | ||
- | ||
-AC_MSG_CHECKING(alignment of double) | ||
-AC_RUN_IFELSE([AC_LANG_SOURCE([[main () { | ||
- struct s { | ||
- char a; | ||
- double b; | ||
- }; | ||
- exit((int)&((struct s*)0)->b); | ||
-}]])],[ac_cv_c_double_align=$ac_status],[ac_cv_c_double_align=$ac_status],[]) | ||
-AC_MSG_RESULT($ac_cv_c_double_align) | ||
AC_DEFINE_UNQUOTED(FB_DOUBLE_ALIGN, $ac_cv_c_double_align, [Alignment of double]) | ||
|
||
dnl EKU: Add any platform specific tests below | ||
case "$PLATFORM" in | ||
LINUX) | ||
- dnl MOD: Check for /proc/self/exe mainly used on linux systems | ||
- dnl this is used to determine path to executable file. | ||
- AC_CHECK_FILES(/proc/self/exe) | ||
+ AC_DEFINE_UNQUOTED(HAVE_PROC_SELF_EXEC, 1, [Void Linux has /proc/self/exe]) | ||
;; | ||
|
||
FREEBSD|GENTOOFREEBSD) | ||
@@ -1216,10 +1216,6 @@ | ||
]) | ||
done | ||
|
||
-if test "x$CROSS" != "x"; then | ||
-AC_CONFIG_FILES([gen/make.crossPlatform:builds/posix/make.$CROSS]) | ||
-fi | ||
- | ||
AC_CONFIG_FILES([ | ||
gen/Release/firebird/bin/fb_config:builds/install/posix-common/fb_config.in | ||
gen/Release/firebird/bin/posixLibrary.sh:builds/install/posix-common/posixLibrary.sh.in | ||
--- src/misc/writeBuildNum.sh 2020-06-26 12:02:52.000000000 +0200 | ||
+++ src/misc/writeBuildNum.sh 2020-09-17 04:42:28.645858727 +0200 | ||
@@ -114,7 +114,7 @@ | ||
$CXX $TestCpp -o $AOut | ||
if [ -x $AOut ] | ||
then | ||
- $AOut | ||
+ qemu-${XBPS_TARGET_QEMU_MACHINE}-static $AOut | ||
OdsVersion=$? | ||
else | ||
OdsVersion=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/sh | ||
[ -z "$_FBEXE_" ] || exit 231 | ||
export _FBEXE_=1 | ||
|
||
bn=$(basename -- "$0") | ||
EXE=${bn#*-} # prefix-name -> name | ||
FBDIRBIN=$(dirname -- "$(realpath -- "$0")") | ||
FBROOT=$(dirname -- "$FBDIRBIN") | ||
FBDIRLIB="$FBROOT/lib" | ||
|
||
show(){ | ||
echo "bn=$bn" | ||
echo "EXE=$EXE" | ||
echo "FBDIRBIN=$FBDIRBIN" | ||
echo "FBROOT=$FBROOT" | ||
echo "FBDIRLIB=$FBDIRLIB" | ||
exit 2 | ||
} | ||
|
||
#show | ||
|
||
export LD_LIBRARY_PATH="$FBDIRLIB:$LD_LIBRARY_PATH" | ||
export FIREBIRD_MSG="$FBROOT/lib/msg" | ||
export PATH="$FBDIRBIN:$PATH" | ||
#exec "$FBDIRBIN/$EXE" "$@" | ||
exec "$EXE" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# default: off | ||
# description: firebirdXXX | ||
service gds-dbXXX | ||
{ | ||
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 | ||
# Requires ServerMode = Classic in /etc/firebirdXXX/firebird.conf | ||
server = /usr/lib/firebirdXXX/sbin/firebird | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/sh | ||
FBUSER=_firebird | ||
FBGROUP=_firebird | ||
FBNAME=$(basename -- "$PWD") | ||
FBROOT="/usr/lib/$FBNAME" | ||
FBLOGDIR="/var/log/$FBNAME" # chmod 750 | ||
FBLOGFILE="${FBLOGDIR}/firebird.log" | ||
|
||
CHK(){ chpst -u $FBUSER:$FBGROUP test $@; } | ||
BKP(){ mv -T --backup=numbered -- "$1" "$1".bkp; } | ||
|
||
D='/tmp/firebird' # 700 ? | ||
[ -e "$D" ] && { CHK -d "$D" -a -O "$D" || { BKP "$D"; install -m 750 -o $FBUSER -g $FBGROUP -d "$D"; } } | ||
|
||
F="$FBLOGFILE" | ||
if ! CHK -f "$F" -a -w "$F" | ||
then | ||
if [ -e "$F" ] | ||
then | ||
BKP "$F" | ||
else | ||
D="$FBLOGDIR" | ||
CHK -d "$D" -a -w "$D" || { [ -e "$D" ] && BKP "$D"; install -m 750 -o $FBUSER -g $FBGROUP -d "$D"; } | ||
fi | ||
fi | ||
|
||
F="/etc/${FBNAME}/fb_guard" | ||
CHK -f "$F" -a -O "$F" || install --backup -m 640 -o $FBUSER -g $FBGROUP /dev/null "$F" | ||
|
||
export LD_LIBRARY_PATH="${FBROOT}/lib:$LD_LIBRARY_PATH" | ||
exec chpst -u $FBUSER:$FBGROUP /usr/lib/${FBNAME}/sbin/fbguard -forever |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- a/builds/install/misc/databases.conf 2024-01-11 04:17:47.000000000 +0300 | ||
+++ b/builds/install/misc/databases.conf 2024-01-14 05:39:44.684927372 +0300 | ||
@@ -17,8 +17,8 @@ | ||
# | ||
# Example Database: | ||
# | ||
-employee.fdb = $(dir_sampleDb)/employee.fdb | ||
-employee = $(dir_sampleDb)/employee.fdb | ||
+#employee.fdb = $(dir_sampleDb)/employee.fdb | ||
+#employee = $(dir_sampleDb)/employee.fdb | ||
|
||
# | ||
# Master security database specific setup. |
Oops, something went wrong.