Ravenports generated: 26 Jun 2018 21:48
[ravenports.git] / bucket_5B / firebird30
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               firebird30
4 VERSION=                3.0.3
5 KEYWORDS=               databases
6 VARIANTS=               standard
7 SDESC[standard]=        Firebird-2 relational SQL database
8 HOMEPAGE=               https://www.firebirdsql.org/
9 CONTACT=                nobody
10
11 DOWNLOAD_GROUPS=        main
12 SITES[main]=            https://github.com/FirebirdSQL/firebird/releases/download/R3_0_3/
13 DISTFILE[1]=            Firebird-3.0.3.32900-0.tar.bz2:main
14 DF_INDEX=               1
15 SPKGS[standard]=        complete
16                         server
17                         client
18                         docs
19
20 OPTIONS_AVAILABLE=      none
21 OPTIONS_STANDARD=       none
22
23 BROKEN[freebsd]=        isc_file.cpp:1698: undefined reference to `iconv_open'
24 BROKEN[linux]=          free fails, invalid size: 0x00007f739ca112a0 ***
25 BROKEN[dragonfly]=      Hits several z->z_Magic == ZALLOC_SLAB_MAGIC assertions
26 NOT_FOR_ARCH=           aarch64
27
28 BUILDRUN_DEPENDS=       libedit:single:standard
29                         icu:single:standard
30 EXRUN[server]=          firebird25:client:standard
31
32 USERS=                  firebird
33 GROUPS=                 firebird
34 USERGROUP_SPKG=         server
35
36 USES=                   cpe gmake libtool:build pkgconfig zlib
37                         c++:server,client
38
39 DISTNAME=               Firebird-3.0.3.32900-0
40
41 LICENSE=                CUSTOM1:server CUSTOM2:server
42 LICENSE_NAME=           CUSTOM1:"Initial Developer's Public License"
43                         CUSTOM2:"InterBase Public License"
44 LICENSE_FILE=           CUSTOM1:{{WRKSRC}}/builds/install/misc/IDPLicense.txt
45                         CUSTOM2:{{WRKSRC}}/builds/install/misc/IPLicense.txt
46 LICENSE_SCHEME=         multi
47
48 MUST_CONFIGURE=         gnu
49 CONFIGURE_ARGS=         --prefix=/var/db/firebird
50                         --exec-prefix={{PREFIX}}
51                         --with-fbconf={{PREFIX}}/etc/firebird
52                         --with-fbglock=/var/db/firebird
53                         --with-fbhelp=/var/db/firebird/help
54                         --with-fbintl={{PREFIX}}/libexec/firebird/intl
55                         --with-fblog=/var/db/firebird
56                         --with-fbmsg={{PREFIX}}/share/firebird
57                         --with-fbplugins={{PREFIX}}/libexec/firebird/plugins
58                         --with-fbsbin={{PREFIX}}/sbin
59                         --with-fbsecure-db=/var/db/firebird
60                         --with-fbudf={{PREFIX}}/libexec/firebird/UDF
61                         --with-system-editline
62                         --with-builtin-tommath
63 CONFIGURE_ENV=          PTHREAD_LIBS="-lpthread"
64                         ac_cv_header_atomic_ops_h="no"
65                         ac_cv_lib_atomic_ops_main="no"
66                         ac_cv_lib_edit_readline="yes"
67
68 MAKE_ENV=               FIREBIRD_TMP="{{WRKDIR}}"
69                         FIREBIRD_LOCK="{{WRKDIR}}"
70 SINGLE_JOB=             yes
71
72 PLIST_SUB=              SOVERSION=3.0.3
73                         SOMINOR=3.0
74                         SOMAJOR=3
75                         LOCALSTATEDIR=/var/db/firebird
76                         CONFDIR=etc/firebird
77 RC_SUBR=                firebird:server
78 SUB_FILES=              pkg-message-server
79 SUB_LIST=               DOCDIR={{STD_DOCDIR}}
80
81 CFLAGS=                 -Wno-deprecated
82 VAR_OPSYS[freebsd]=     CONFIGURE_ARGS=--enable-raw-devices=no
83 VAR_OPSYS[dragonfly]=   CONFIGURE_ARGS=--enable-raw-devices=no
84
85 post-patch:
86         ${REINPLACE_CMD} -e 's|<malloc.h>|<stdlib.h>|' \
87                 ${WRKSRC}/src/common/classes/alloc.h \
88                 ${WRKSRC}/extern/cloop/src/tests/test1/CTest.c
89
90 post-patch-dragonfly:
91         # exit failure on dragonfly
92         # assertion: z->z_Magic == ZALLOC_SLAB_MAGIC in _slabfree
93         # these aren't acceptable fixes
94         ${REINPLACE_CMD} -e '/dontCleanup = false/ s/false/true/' \
95                 ${WRKSRC}/src/common/classes/init.cpp
96         ${REINPLACE_CMD} -e '/delete m_head;/d' \
97                 ${WRKSRC}/src/isql/InputDevices.cpp
98
99 do-install-linux:
100         @${MKDIR} ${STAGEDIR}${PREFIX}/bin \
101                 ${STAGEDIR}${PREFIX}/lib \
102                 ${STAGEDIR}${PREFIX}/include \
103                 ${STAGEDIR}${PREFIX}/sbin \
104                 ${STAGEDIR}${PREFIX}/share/firebird \
105                 ${STAGEDIR}${PREFIX}/etc/firebird \
106                 ${STAGEDIR}${PREFIX}/libexec/firebird/udf \
107                 ${STAGEDIR}/var/db/firebird/help \
108                 ${STAGEDIR}${PREFIX}/libexec/firebird/intl \
109                 ${STAGEDIR}${PREFIX}/libexec/firebird/plugins
110         ${INSTALL_LIB} ${WRKSRC}/gen/firebird/lib/libib_util.so \
111                 ${WRKSRC}/gen/firebird/lib/libfbclient.so.3.0.3 \
112                 ${WRKSRC}/gen/firebird/lib/libfbembed.so.3.0.3 \
113                 ${STAGEDIR}${PREFIX}/lib
114 .for ext in so so.3 so.3.0
115         ${LN} -fs libfbclient.so.3.0.3 ${STAGEDIR}${PREFIX}/lib/libfbclient.${ext}
116         ${LN} -fs libfbembed.so.3.0.3 ${STAGEDIR}${PREFIX}/lib/libfbembed.${ext}
117         ${LN} -fs libfbembed.so.3.0.3 ${STAGEDIR}${PREFIX}/lib/libgds.${ext}
118 .endfor
119         ${INSTALL_DATA} ${WRKSRC}/gen/firebird/include/*.h ${STAGEDIR}${PREFIX}/include
120         ${INSTALL_DATA} ${WRKSRC}/gen/firebird/*.msg ${STAGEDIR}${PREFIX}/share/firebird
121         ${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${WRKSRC}/gen/install/misc/firebird.conf \
122                 > ${WRKDIR}/firebird.conf
123         ${INSTALL_DATA} ${WRKDIR}/firebird.conf ${STAGEDIR}${PREFIX}/etc/firebird/firebird.conf.sample
124         ${INSTALL_DATA} ${WRKSRC}/gen/install/misc/aliases.conf \
125                 ${STAGEDIR}${PREFIX}/etc/firebird/aliases.conf.sample
126         ${INSTALL_DATA} ${WRKSRC}/gen/install/misc/fbtrace.conf \
127                 ${STAGEDIR}${PREFIX}/etc/firebird/fbtrace.conf
128         ${INSTALL_DATA} ${WRKSRC}/gen/install/misc/fbintl.conf \
129                 ${STAGEDIR}${PREFIX}/libexec/firebird/intl/fbintl.conf
130 .for bin in gpre isql-fb qli fbguard fbsplit fbstat fbsvcmgr fbtracemgr gbak gdef gfix gsec nbackup
131         ${INSTALL_PROGRAM} ${WRKSRC}/gen/firebird/bin/${bin} ${STAGEDIR}${PREFIX}/bin
132 .endfor
133 .for sbin in fb_inet_server fb_lock_print fb_smp_server fbserver
134         ${INSTALL_PROGRAM} ${WRKSRC}/gen/firebird/bin/${sbin} ${STAGEDIR}${PREFIX}/sbin
135 .endfor
136 .for udf_so in ib_udf.so fbudf.so
137         ${INSTALL} ${STRIP} -m 0555 ${WRKSRC}/gen/firebird/UDF/${udf_so} \
138                 ${STAGEDIR}${PREFIX}/libexec/firebird/udf
139 .endfor
140 .for udf_sql in src/extlib/ib_udf2.sql src/extlib/fbudf/fbudf.sql
141         ${INSTALL} -m 0444 ${WRKSRC}/${udf_sql} ${STAGEDIR}${PREFIX}/libexec/firebird/udf
142 .endfor
143         ${INSTALL} ${STRIP} -m 0555 ${WRKSRC}/gen/firebird/plugins/libfbtrace.so \
144                 ${STAGEDIR}${PREFIX}/libexec/firebird/plugins
145         ${INSTALL} -m 0660 ${WRKSRC}/gen/firebird/security2.fdb \
146                 ${STAGEDIR}/var/db/firebird/security2.fdb.sample
147         ${INSTALL} -m 0440 ${WRKSRC}/gen/firebird/help/help.fdb \
148                 ${STAGEDIR}/var/db/firebird/help
149         ${INSTALL} ${STRIP} -m 0555 ${WRKSRC}/gen/firebird/intl/libfbintl.so \
150                 ${STAGEDIR}${PREFIX}/libexec/firebird/intl/fbintl.so
151         # docs
152         @${MKDIR} ${STAGEDIR}${STD_DOCDIR}/sql.extensions \
153                 ${STAGEDIR}${STD_DOCDIR}/license \
154                 ${STAGEDIR}${STD_DOCDIR}/upgrade
155         ${INSTALL_DATA} ${WRKSRC}/doc/sql.extensions/* \
156                 ${STAGEDIR}${STD_DOCDIR}/sql.extensions
157         ${INSTALL_DATA} ${WRKSRC}/doc/license/* \
158                 ${STAGEDIR}${STD_DOCDIR}/license
159         ${INSTALL_DATA} ${WRKSRC}/src/misc/upgrade/v2/* \
160                 ${STAGEDIR}${STD_DOCDIR}/upgrade
161 .for F in WhatsNew README.* Firebird* ReleaseNotes.pdf ambiguity.txt ods11-index-structure.html
162         ${INSTALL_DATA} ${WRKSRC}/doc/${F} ${STAGEDIR}${STD_DOCDIR}
163 .endfor
164
165 [FILE:568:descriptions/desc.server]
166 Firebird is a relational database offering many ANSI SQL-99 features
167 that runs on Linux, Windows, and a variety of Unix platforms.  Firebird
168 offers excellent concurrency, high performance, and powerful language
169 support for stored procedures and triggers.  It has been used in
170 production systems, under a variety of names since 1981.
171
172 Firebird is completely free of any registration, licensing or deployment
173 fees.  It may be deployed freely for use with any third-party software,
174 whether commercial or not.
175
176 This package contains the Firebird server and related files.
177
178
179 [FILE:193:descriptions/desc.client]
180 Firebird is a relational database offering many ANSI SQL-99 features
181 that runs on Linux, Windows, and a variety of Unix platforms.
182
183 This package contains the Firebird client and related files.
184
185
186 [FILE:109:distinfo]
187 4aadb7a0e3528cb7af332ac4466058e6ace7694be0fffdabff8739d028f7595d      9720454 Firebird-3.0.3.32900-0.tar.bz2
188
189
190 [FILE:870:manifests/plist.server]
191 @sample %%CONFDIR%%/aliases.conf.sample
192 @sample %%LOCALSTATEDIR%%/security2.fdb.sample
193 %%CONFDIR%%/fbtrace.conf
194 @(firebird,firebird,) %%LOCALSTATEDIR%%/help/help.fdb
195 bin/
196  fbguard
197  fbsplit
198  fbstat
199  fbsvcmgr
200  fbtracemgr
201  gbak
202  gdef
203  gfix
204  gsec
205  nbackup
206 @(,firebird,) libexec/firebird/intl/fbintl.conf
207 @(,firebird,) libexec/firebird/intl/fbintl.so
208 @(,firebird,) libexec/firebird/plugins/libfbtrace.so
209 @(,firebird,) libexec/firebird/udf/fbudf.so
210 @(,firebird,) libexec/firebird/udf/fbudf.sql
211 @(,firebird,) libexec/firebird/udf/ib_udf.so
212 @(,firebird,) libexec/firebird/udf/ib_udf2.sql
213 sbin/
214  fb_inet_server
215  fb_lock_print
216  fb_smp_server
217  fbserver
218 @preunexec [ -s %%LOCALSTATEDIR%%/firebird.log ] || rm -f %%LOCALSTATEDIR%%/firebird.log
219 @rmtry %%LOCALSTATEDIR%%/isc_event1.`hostname`
220 @rmtry %%LOCALSTATEDIR%%/isc_init1.`hostname`
221 @rmtry %%LOCALSTATEDIR%%/isc_lock1.`hostname`
222
223
224 [FILE:443:manifests/plist.client]
225 @sample %%CONFDIR%%/firebird.conf.sample
226 bin/
227  gpre
228  isql-fb
229  qli
230 include/
231  ib_util.h
232  ibase.h
233  iberror.h
234  perf.h
235 lib/
236  libfbclient.so
237  libfbclient.so.%%SOMAJOR%%
238  libfbclient.so.%%SOMINOR%%
239  libfbclient.so.%%SOVERSION%%
240  libfbembed.so
241  libfbembed.so.%%SOMAJOR%%
242  libfbembed.so.%%SOMINOR%%
243  libfbembed.so.%%SOVERSION%%
244  libgds.so
245  libgds.so.%%SOMAJOR%%
246  libgds.so.%%SOMINOR%%
247  libib_util.so
248 share/firebird/
249  de_DE.msg
250  firebird.msg
251  fr_FR.msg
252
253
254 [FILE:287:patches/patch-builds_install_misc_firebird.conf.in]
255 --- builds/install/misc/firebird.conf.in.orig   2018-02-02 11:00:35 UTC
256 +++ builds/install/misc/firebird.conf.in
257 @@ -189,7 +189,7 @@
258  #
259  # Type: string (special format)
260  #
261 -#UdfAccess = Restrict UDF
262 +UdfAccess = Restrict %%PREFIX%%/libexec/firebird/udf
263  
264  
265  # ----------------------------
266
267
268 [FILE:861:patches/patch-builds_posix_Makefile.in]
269 --- builds/posix/Makefile.in.orig       2018-02-02 11:00:35 UTC
270 +++ builds/posix/Makefile.in
271 @@ -127,8 +127,7 @@ extern:
272         $(MAKE) -C $(ROOT)/extern/cloop TARGET=release WITH_FPC=0 BUILD_DIR=$(TMP_ROOT)/cloop OUT_DIR=$(GEN_ROOT)/$(TARGET)/cloop
273  
274  ifeq ($(TOMBUILD_FLG),Y)
275 -       echo $(LIBTOOL)
276 -       $(MAKE) -C $(ROOT)/extern/libtommath -f makefile.shared LIBTOOL=$(LIBTOOL)
277 +       $(MAKE) -C $(ROOT)/extern/libtommath -f makefile.shared
278         ln -sf $(TOMMATH_SO).$(TOMMATH_VER) $(LIB)
279         ln -sf $(TOMMATH_SO) $(LIB)
280  endif
281 @@ -455,7 +454,8 @@ $(GSTAT):           $(GSTAT_Objects) $(COMMON_LIB
282  isql:                  $(ISQL)
283  
284  $(ISQL):               $(ISQL_Objects) $(COMMON_LIB)
285 -       $(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LIBEDITLINE) $(LINK_LIBS)
286 +       $(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) \
287 +           $(LIBEDITLINE) $(LINK_LIBS) $(ICU_LIBS)
288  
289  nbackup:               $(NBACKUP)
290  
291
292
293 [FILE:1435:patches/patch-builds_posix_make.defaults]
294 --- builds/posix/make.defaults.orig     2018-02-02 11:00:35 UTC
295 +++ builds/posix/make.defaults
296 @@ -144,7 +144,7 @@ RM_R=               rm -rf
297  CHMOD=                 chmod
298  CHMOD_6=               chmod 666
299  CHMOD_7=               chmod 777
300 -CHMOD_S7=              chmod 06777
301 +CHMOD_S7=              chmod 04555
302  MV=                    mv -f
303  TOUCH=                 touch
304  CP=                    cp
305 @@ -240,7 +240,7 @@ LIBFBINTL_SO = $(FB_BUILD)/intl/$(LIB_PR
306  
307  ifeq ($(EDITLINE_FLG),Y)
308    ifeq ($(STD_EDITLINE), true)
309 -       LIBEDITLINE := -l$(READLINE)
310 +       LIBEDITLINE := $(shell pkgconf libedit --libs)
311    else
312         LIBEDITLINE := $(LIB)/libedit.a
313    endif
314 @@ -343,7 +343,7 @@ CREATE_DB   = $(RBIN)/create_db$(EXEC_EXT)
315  GDS_DROP       = $(BIN)/gds_drop$(EXEC_EXT)
316  FBSVCMGR       = $(BIN)/fbsvcmgr$(EXEC_EXT)
317  FBTRACEMGR     = $(BIN)/fbtracemgr$(EXEC_EXT)
318 -GSTAT          = $(BIN)/gstat$(EXEC_EXT)
319 +GSTAT          = $(BIN)/fbstat$(EXEC_EXT)
320  NBACKUP                = $(BIN)/nbackup$(EXEC_EXT)
321  LOCKPRINT      = $(BIN)/fb_lock_print$(EXEC_EXT)
322  GSEC           = $(BIN)/gsec$(EXEC_EXT)
323 @@ -364,13 +364,13 @@ SECURITY_FDB      = $(FIREBIRD)/security3.fdb
324  QLI            = $(BIN)/qli$(EXEC_EXT)
325  
326  # From isql
327 -ISQL            = $(BIN)/isql$(EXEC_EXT)
328 -RUN_ISQL        = $(RBIN)/isql$(EXEC_EXT)
329 +ISQL            = $(BIN)/isql-fb$(EXEC_EXT)
330 +RUN_ISQL        = $(RBIN)/isql-fb$(EXEC_EXT)
331  
332  # From burp
333  GBAK            = $(BIN)/gbak$(EXEC_EXT)
334  RUN_GBAK        = $(RBIN)/gbak$(EXEC_EXT)
335 -GSPLIT          = $(BIN)/gsplit$(EXEC_EXT)
336 +GSPLIT          = $(BIN)/fbsplit$(EXEC_EXT)
337  
338  # From gpre
339  # (gpre current is a link to one of the others)
340
341
342 [FILE:810:patches/patch-builds_posix_prefix.freebsd__amd64]
343 --- builds/posix/prefix.freebsd_amd64.orig      2018-02-02 11:00:35 UTC
344 +++ builds/posix/prefix.freebsd_amd64
345 @@ -20,5 +20,13 @@
346  
347  EXE_LINK_OPTIONS+=-Wl,-rpath,../gen/firebird/lib
348  
349 -PROD_FLAGS=-O -fno-builtin -DFREEBSD -DAMD64 -pipe -MMD -fPIC
350 -DEV_FLAGS=-ggdb -DFREEBSD -DAMD64 -pipe -MMD -p -fPIC -Wall -Wno-non-virtual-dtor
351 +COMMON_FLAGS=-DFREEBSD -DAMD64 -pipe -MMD -fPIC
352 +PROD_FLAGS=$(COMMON_FLAGS) -O0 -g -fno-builtin -Wno-deprecated
353 +DEV_FLAGS=$(COMMON_FLAGS) -ggdb -p -Wall -Wno-non-virtual-dtor
354 +
355 +# This file must be compiled with SSE4.2 support
356 +%/CRC32C.o: COMMON_FLAGS += -msse4
357 +
358 +# These files are generated incorrectly (e.g. array.epp => array.cpp)
359 +%/array.o %/blob.o %/alice_meta.o %/restore.o %/backup.o: COMMON_FLAGS += -Wno-narrowing
360 +%/OdsDetection.o %/dba.o: COMMON_FLAGS += -Wno-narrowing
361
362
363 [FILE:1212:patches/patch-configure]
364 --- configure.orig      2018-02-02 11:09:08 UTC
365 +++ configure
366 @@ -2958,7 +2958,7 @@ $as_echo "#define AIX 1" >>confdefs.h
367         EXPORT_SYMBOLS_STYLE=aix
368      ;;
369  
370 -  amd64-*-freebsd* | x86_64*-*-freebsd* | x86_64*-*-k*bsd*-gnu)
371 +  amd64-*-freebsd* | x86_64*-*-freebsd* | x86_64-*-dragonfly* | x86_64*-*-k*bsd*-gnu)
372      MAKEFILE_PREFIX=freebsd_amd64
373      case "$build" in
374          x86_64*-*-k*bsd-gnu)      # Debian/kFreeBSD
375 @@ -2990,7 +2990,7 @@ $as_echo "#define FREEBSD 1" >>confdefs.
376      SHRLIB_EXT=so
377      ;;
378  
379 -  *-*-freebsd* | *-*-k*bsd*-gnu)
380 +  *-*-freebsd* | *-*-dragonfly* | *-*-k*bsd*-gnu)
381      MAKEFILE_PREFIX=freebsd
382      case "$build" in
383          *-*-k*bsd-gnu)      # Debian/kFreeBSD
384 @@ -4623,7 +4623,7 @@ $as_echo "$as_me: WARNING: we do not kno
385  $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
386          flag=no
387          case "${host_cpu}-${host_os}" in
388 -                *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
389 +                *-aix* | *-freebsd* | *-dragonfly* | *-darwin*) flag="-D_THREAD_SAFE";;
390                  *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
391          esac
392          { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
393
394
395 [FILE:1837:patches/patch-debian-fbserver-startup]
396 Description: fix fbguard to exit to the OS only after fbserver is ready
397  Exiting right after forking causes a race condition making it possible that
398  the service says it is startew, but the fbserver process isn't ready yet to
399  serve requests, because it hasn't called listen() yet.
400  .
401  The patch makes fbserver send SIGUSR1 to the fbguard parent process, which
402  waits for SIGUSR1 before it returns the controll to the OS.
403 Bug-Debian: https://bugs.debian.org/859234
404 Forwarded: https://sourceforge.net/p/firebird/mailman/message/35769037/
405 Author: Damyan Ivanov <dmn@debian.org>
406
407 see separate src/remote/inet.cpp patch (partial)
408
409 --- src/utilities/guard/guard.cpp.orig  2018-02-02 11:00:36 UTC
410 +++ src/utilities/guard/guard.cpp
411 @@ -162,13 +162,32 @@ int CLIB_ROUTINE main( int argc, char **
412                 exit(-5);
413         }
414  
415 +       sigset_t ss, save_sig_mask;
416 +       sigemptyset(&ss);
417 +       sigaddset(&ss, SIGUSR1);
418 +       sigprocmask(SIG_BLOCK, &ss, &save_sig_mask);
419 +
420         // detach from controlling tty
421         if (daemon && fork()) {
422 +               int sig;
423 +
424 +               struct timespec ts = { .tv_sec=15, .tv_nsec= 0 };
425 +               do {
426 +                       sig = sigtimedwait( &ss, NULL, &ts );
427 +               } while ( sig == EINTR );
428 +
429 +               if ( sig != SIGUSR1 ) {
430 +                       fprintf( stderr, "Time out waiting for fbserver process start\n");
431 +                       exit(-4);
432 +               }
433 +
434                 exit(0);
435         }
436 +       sigprocmask(SIG_SETMASK, &save_sig_mask, NULL);
437         divorce_terminal(0);
438  
439         time_t timer = 0;
440 +       bool first_start = true;
441  
442         do {
443                 int ret_code;
444 @@ -187,6 +206,18 @@ int CLIB_ROUTINE main( int argc, char **
445                 }
446                 timer = time(0);
447  
448 +               if (first_start)
449 +               {
450 +                       char pid[10];
451 +                       snprintf(pid, sizeof(pid), "%d", getppid());
452 +                       setenv("FB_SIGNAL_PROCESS", pid, 1);
453 +                       first_start = false;
454 +               }
455 +               else
456 +               {
457 +                       unsetenv("FB_SIGNAL_PROCESS");
458 +               }
459 +
460                 pid_t child_pid =
461                         UTIL_start_process(SERVER_BINARY, server_args, prog_name);
462                 if (child_pid == -1)
463
464
465 [FILE:1563:patches/patch-debian-no-copy-from-icu]
466 Description: Link isql with ICU instead of embedding part of it in the source
467 Author: Damyan Ivanov <dmn@debian.org>
468
469 see builds/posix/Makefile.in patch for rest (partial)
470
471 --- src/isql/isql.epp.orig      2018-02-02 11:00:36 UTC
472 +++ src/isql/isql.epp
473 @@ -168,34 +168,6 @@ const char* UNKNOWN = "*unknown*";
474  
475  namespace IcuUtil
476  {
477 -       // Duplicate from ICU to not need to link ISQL with it. It's used by U8_NEXT_UNSAFE.
478 -       static const uint8_t utf8_countTrailBytes[256] = {
479 -               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
480 -               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
481 -               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
482 -               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
483 -
484 -               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
485 -               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
486 -               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
487 -               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
488 -
489 -               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
490 -               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
491 -               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
492 -               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
493 -
494 -               1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
495 -               1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
496 -
497 -               2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
498 -               3, 3, 3, 3, 3,
499 -               3, 3, 3,    /* illegal in Unicode */
500 -               4, 4, 4, 4, /* illegal in Unicode */
501 -               5, 5,       /* illegal in Unicode */
502 -               0, 0        /* illegal bytes 0xfe and 0xff */
503 -       };
504 -
505         // Return the number of characters of a string.
506         static unsigned charLength(SSHORT charset, unsigned len, const char* str)
507         {
508
509
510 [FILE:329:patches/patch-extern_btyacc_Makefile]
511 --- extern/btyacc/Makefile.orig 2018-02-02 11:00:35 UTC
512 +++ extern/btyacc/Makefile
513 @@ -42,7 +42,7 @@ OTHERS              = README README.BYACC \
514  all:           $(PROGRAM)
515  
516  $(PROGRAM):     $(OBJS) $(LIBS)
517 -               $(CC) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS)
518 +               $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS)
519  
520  clean:;                rm -f $(OBJS)
521  
522
523
524 [FILE:863:patches/patch-extern_cloop_makefile]
525 Description: make cloop build honor compiler/linker flags from the environment
526 Author: Damyan Ivanov <dmn@debian.org>
527 Forwarded: no
528
529 --- extern/cloop/Makefile.orig  2018-02-02 11:00:35 UTC
530 +++ extern/cloop/Makefile
531 @@ -6,7 +6,7 @@ TARGET  := release
532  
533  CC     := gcc
534  CXX    := g++
535 -LD     := $(CXX)
536 +LD     := $(CXX) $(LDFLAGS)
537  
538  SRC_DIR                := src
539  BUILD_DIR      := build
540 @@ -27,8 +27,9 @@ SRCS_CPP := $(foreach sdir,$(SRC_DIRS),$
541  OBJS_C := $(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(SRCS_C))
542  OBJS_CPP := $(patsubst $(SRC_DIR)/%.cpp,$(OBJ_DIR)/%.o,$(SRCS_CPP))
543  
544 -C_FLAGS := -ggdb -fPIC -MMD -MP -W -Wall -Wno-unused-parameter
545 -CXX_FLAGS := $(C_FLAGS)
546 +COMMON_C_FLAGS := -ggdb -fPIC -MMD -MP -W -Wall -Wno-unused-parameter
547 +C_FLAGS := $(COMMON_C_FLAGS) $(CFLAGS) $(CPPFLAGS)
548 +CXX_FLAGS := $(COMMON_C_FLAGS) $(CXXFLAGS) $(CPPFLAGS)
549  FPC_FLAGS := -Mdelphi
550  
551  ifeq ($(TARGET),release)
552
553
554 [FILE:474:patches/patch-src-common-classes-FpeControl.h]
555 --- src/common/classes/FpeControl.h.orig        2018-02-02 11:00:35 UTC
556 +++ src/common/classes/FpeControl.h
557 @@ -223,13 +223,13 @@ inline bool isinf(double x)
558         return (!_finite (x) && !isnan(x));
559  }
560  #else
561 -#ifndef isinf
562 +#if !defined isinf  && !defined __FreeBSD__ && !defined __DragonFly__
563  template <typename F>
564  inline bool isinf(F x)
565  {
566         return !isnan(x) && isnan(x - x);
567  }
568 -#endif // isinf
569 +#endif // isinf || FreeBSD || DragonFly
570  #endif // WIN_NT
571  
572  namespace Firebird {
573
574
575 [FILE:296:patches/patch-src_common_os_posix_SyncSignals.cpp]
576 --- src/common/os/posix/SyncSignals.cpp.orig    2018-02-02 11:00:35 UTC
577 +++ src/common/os/posix/SyncSignals.cpp
578 @@ -54,9 +54,6 @@
579  #include <errno.h>
580  #include <unistd.h>
581  
582 -#if defined FREEBSD || defined NETBSD || defined DARWIN || defined HPUX
583 -#define sigset      signal
584 -#endif
585  
586  namespace {
587  
588
589
590 [FILE:616:patches/patch-src_remote_SockAddr.h]
591 --- src/remote/SockAddr.h.orig  2018-02-02 11:00:36 UTC
592 +++ src/remote/SockAddr.h
593 @@ -90,6 +90,7 @@ public:
594  
595  #define AF_INET6_POSIX         10
596  #define AF_INET6_WINDOWS       23
597 +#define AF_INET6_BSD           28
598  #define AF_INET6_DARWIN                30
599  
600  inline void SockAddr::checkAndFixFamily()
601 @@ -98,6 +99,8 @@ inline void SockAddr::checkAndFixFamily(
602         if (data.sock.sa_family == AF_INET6_WINDOWS)
603  #elif AF_INET6 == AF_INET6_WINDOWS
604         if (data.sock.sa_family == AF_INET6_POSIX)
605 +#elif AF_INET6 == AF_INET6_BSD
606 +       if (data.sock.sa_family == AF_INET6_BSD)
607  #elif AF_INET6 == AF_INET6_DARWIN
608         if (data.sock.sa_family == AF_INET6_DARWIN)
609  #else
610
611
612 [FILE:785:patches/patch-src_remote_inet.cpp]
613 --- src/remote/inet.cpp.orig    2018-02-02 11:00:36 UTC
614 +++ src/remote/inet.cpp
615 @@ -866,7 +866,7 @@ rem_port* INET_connect(const TEXT* name,
616                 gai_hints.ai_family = ((host.hasData() || !ipv6) ? AF_UNSPEC : AF_INET6);
617         gai_hints.ai_socktype = SOCK_STREAM;
618  
619 -#if !defined(WIN_NT) && !defined(__clang__)
620 +#if !defined(WIN_NT) && !defined(__FreeBSD__) && !defined(__DragonFly__)
621         gai_hints.ai_protocol = SOL_TCP;
622  #else
623         gai_hints.ai_protocol = IPPROTO_TCP;
624 @@ -1071,6 +1071,12 @@ static rem_port* listener_socket(rem_por
625  
626         inet_ports->registerPort(port);
627  
628 +       char *parent_pid;
629 +       if (parent_pid = getenv("FB_SIGNAL_PROCESS"))
630 +       {
631 +               kill(atoi(parent_pid), SIGUSR1);
632 +       }
633 +
634         if (flag & SRVR_multi_client)
635         {
636                 // Prevent the generation of dummy keepalive packets on the connect port.
637
638
639 [FILE:1896:files/firebird.in]
640 #!/bin/sh
641 #
642 # PROVIDE: firebird
643 # REQUIRE: LOGIN
644 # KEYWORD: shutdown
645 #
646 # Add the following line to /etc/rc.conf to enable Firebird Database:
647 #
648 #
649 # firebird_enable:      Set it to "YES" to enable firebird.
650 #                       Default is "NO".
651 # firebird_mode:        Set it to "superclassic" or "superserver" to enable firebird.
652 #                       Default is "superclassic".
653 # firebird_flags:       Set options to run fbserver or fb_smp_server.
654 #                       Default is "-el /var/db/firebird".
655 # firebird_pidfile:     Set full path to pid file.
656 #                       Default is "/var/run/firebird.pid".
657 #
658
659 . /etc/rc.subr
660
661 name=firebird
662 rcvar=firebird_enable
663
664 load_rc_config $name
665
666 firebird_enable=${firebird_enable:-"NO"}
667 firebird_mode=${firebird_mode:-"superclassic"}
668 firebird_flags=${firebird_flags:-"-el /var/db/firebird"}
669 firebird_pidfile=${firebird_pidfile:-"/var/run/${name}.pid"}
670 firebird_user=firebird
671
672 command=%%PREFIX%%/sbin/fb_smp_server
673 command_args="${firebird_flags} &"
674 pidfile=${firebird_pidfile}
675 start_precmd="start_precmd"
676 start_postcmd="start_postcmd"
677 stop_postcmd="stop_postcmd"
678 reload_postcmd="reload_postcmd"
679
680 start_precmd()
681 {
682         touch ${firebird_pidfile}
683         chown "${firebird_user}:wheel" ${firebird_pidfile} ||
684                 err 1 "Cannot chown ${firebird_pidfile}"
685 }
686
687 start_postcmd()
688 {
689         pgrep -u ${firebird_user} ${command_app} > ${firebird_pidfile}
690         echo "Current firebird mode is $firebird_mode"
691 }
692
693 stop_postcmd()
694 {
695         rm -f ${pidfile}
696 }
697
698 reload_postcmd()
699 {
700         rm -f ${pidfile}
701         run_rc_command start
702 }
703
704 case "${firebird_mode}" in
705         superclassic)
706                 command=%%PREFIX%%/sbin/fb_smp_server
707                 command_app=fb_smp_server
708                 ;;
709         superserver)
710                 command=%%PREFIX%%/sbin/fbserver
711                 command_app=fbserver
712                 ;;
713         *)
714                 warn "$firebird_mode is an invalid value for firebird_mode"
715                 return 1
716                 ;;
717 esac
718
719 run_rc_command "$1"
720
721
722 [FILE:838:files/pkg-install-server]
723 #!/bin/sh
724
725 PATH=/bin:/usr/bin:/usr/sbin
726
727 buildwarning() {
728 cat <<EOF
729 ###############################################################################
730
731                              ** IMPORTANT **
732
733 Keep in mind that if you build firebird server as 'root', this may cause
734 conflicts with SysV semaphores of running services.
735
736 If you want to cancel it, press ctrl-C now if you need check some things
737 before of build it.
738
739 ###############################################################################
740 EOF
741         sleep 5
742 }
743
744 case $2 in
745 PRE-INSTALL)
746         buildwarning
747 ;;
748 POST-INSTALL)
749         cd /var/db/firebird
750
751 # Lock files
752
753 for i in isc_init1 isc_lock1 isc_event1
754 do
755         FileName=$i.`hostname`
756         touch $FileName
757         chmod uga=rw $FileName
758         chown firebird:firebird $FileName
759 done
760
761 touch firebird.log
762 chown firebird:firebird firebird.log security2.fdb
763
764 ;;
765
766 esac
767
768
769 [FILE:1468:files/pkg-message-server.in]
770 ###############################################################################
771
772 Firebird was installed.
773
774 1) Support for Super Server has been added
775 2) Before start the server ensure that the following line exists in /etc/services:
776
777 gds_db          3050/tcp  #InterBase Database Remote Protocol
778
779 3) If you use inetd (Classic Server) then add the following line to /etc/inetd.conf
780
781 gds_db  stream  tcp     nowait  firebird        %%PREFIX%%/sbin/fb_inet_server  fb_inet_server
782
783 And finally restart inetd.
784
785 4) If you want to use SuperClassic Server then you must add the following lines
786    to /etc/rc.conf file.
787
788  firebird_enable="YES"
789  firebird_mode="superclassic"
790
791 5) If you want to use Super Server then you must add the following lines to
792    /etc/rc.conf file.
793
794  firebird_enable="YES"
795  firebird_mode="superserver"
796
797  Note: Keep in mind that you only can add one of them but never both modes on
798        the same time
799
800 6) Bedore doing anything serious with Firebird, it is STRONGLY recommended
801    that you change the SYSDBA password with:
802
803  # gsec -user SYSDBA -pass masterkey
804  GSEC> modify SYSDBA -pw newpassword
805  GSEC> quit
806
807 7) See documentation in %%DOCDIR%%/ for more information.
808 8) Some firebird tools were renamed for avoid conflicts with some other ports
809
810         %%PREFIX%%/bin/isql   -> %%PREFIX%%/bin/isql-fb
811         %%PREFIX%%/bin/gstat  -> %%PREFIX%%/bin/fbstat
812         %%PREFIX%%/bin/gsplit -> %%PREFIX%%/bin/fbsplit
813
814 ################################################################################
815
816
817 [FILE:192:dragonfly/patch-builds_posix_empty.vers]
818 --- builds/posix/empty.vers.orig        2018-02-02 11:00:35 UTC
819 +++ builds/posix/empty.vers
820 @@ -21,3 +21,5 @@
821  #  Contributor(s): ______________________________________.
822  
823  main
824 +__progname
825 +environ
826
827
828 [FILE:192:freebsd/patch-builds_posix_empty.vers]
829 --- builds/posix/empty.vers.orig        2018-02-02 11:00:35 UTC
830 +++ builds/posix/empty.vers
831 @@ -21,3 +21,5 @@
832  #  Contributor(s): ______________________________________.
833  
834  main
835 +__progname
836 +environ
837