Hello community,

here is the log from the commit of package firebird for openSUSE:Factory 
checked in at 2014-12-19 09:41:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/firebird (Old)
 and      /work/SRC/openSUSE:Factory/.firebird.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "firebird"

Changes:
--------
--- /work/SRC/openSUSE:Factory/firebird/firebird-classic.changes        
2014-07-10 09:32:13.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.firebird.new/firebird-classic.changes   
2014-12-19 09:40:15.000000000 +0100
@@ -1,0 +2,47 @@
+Sun Dec  7 21:33:46 UTC 2014 - [email protected]
+
+- upgrade to upstream version 2.5.4.26821
+  * server crash by malformed packet (bnc#908127, CORE-4029,
+    CORE-4030)
+  * various functional fixes
+- removed patches merged into upstream:
+  * Firebird-2.5.2.26539-0-fix-bashisms.patch:
+  * aarch64-support.patch
+  * firebird-2.5.2-CORE-4058.patch
+  * firebird-2.5.2-icu49.patch
+  * firebird-2.5.2-runlevel.patch
+  * firebird-fix-unsigned-char.diff
+  * firebird-s390x-fix_libdir.patch
+  * ppc64-libdir.patch
+- replace remaining patches by git based ones:
+  * firebird-2.5.1-chown.patch
+    -> allow-creating-buildRoot-as-non-root-user.patch
+  * firebird-2.5.1-config.patch
+    -> do-not-use-DatabaseAccess-Full-in-default-config.patch
+  * firebird-2.5.1-disable.patch
+    -> disable-xinetd-service-by-default.patch
+  * firebird-2.5.2-gpidfile.patch
+    -> fbguard-allow-creating-a-guard-pidfile.patch
+  * firebird-2.5.2-init.patch
+    -> use-killproc-in-stop-branch-of-SuSE-init-script.patch
+    (remaining part not upstreamed)
+  * firebird-2.5.2-isqlalign.patch
+    -> Fixed-CORE-3431-ISQL-pads-UTF-8-data-incorrectly.patch
+  * firebird-2.5.2-isqllocale.patch
+    -> isql-fix-output-if-charset-is-different-from-locale.patch
+  * firebird-2.5.2-isqlwidth.patch
+    -> isql-fix-buffer-overflow-when-set-width-sets-bigger-.patch
+  * firebird-2.5.2-pkgconfig.patch
+    -> add-pkgconfig-files.patch
+  * m68k-support.patch
+    -> add-experimental-support-for-m68k-architecture.patch
+- use xz compressed tarball
+
+-------------------------------------------------------------------
+Mon Nov 17 01:29:00 UTC 2014 - Led <[email protected]>
+
+- fix bashisms in scripts
+- add patches:
+  * Firebird-2.5.2.26539-0-fix-bashisms.patch
+
+-------------------------------------------------------------------
--- /work/SRC/openSUSE:Factory/firebird/firebird.changes        2014-11-26 
10:32:37.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.firebird.new/firebird.changes   2014-12-19 
09:40:15.000000000 +0100
@@ -1,0 +2,40 @@
+Sun Dec  7 21:33:46 UTC 2014 - [email protected]
+
+- upgrade to upstream version 2.5.4.26821
+  * server crash by malformed packet (bnc#908127, CORE-4029,
+    CORE-4030)
+  * various functional fixes
+- removed patches merged into upstream:
+  * Firebird-2.5.2.26539-0-fix-bashisms.patch:
+  * aarch64-support.patch
+  * firebird-2.5.2-CORE-4058.patch
+  * firebird-2.5.2-icu49.patch
+  * firebird-2.5.2-runlevel.patch
+  * firebird-fix-unsigned-char.diff
+  * firebird-s390x-fix_libdir.patch
+  * ppc64-libdir.patch
+- replace remaining patches by git based ones:
+  * firebird-2.5.1-chown.patch
+    -> allow-creating-buildRoot-as-non-root-user.patch
+  * firebird-2.5.1-config.patch
+    -> do-not-use-DatabaseAccess-Full-in-default-config.patch
+  * firebird-2.5.1-disable.patch
+    -> disable-xinetd-service-by-default.patch
+  * firebird-2.5.2-gpidfile.patch
+    -> fbguard-allow-creating-a-guard-pidfile.patch
+  * firebird-2.5.2-init.patch
+    -> use-killproc-in-stop-branch-of-SuSE-init-script.patch
+    (remaining part not upstreamed)
+  * firebird-2.5.2-isqlalign.patch
+    -> Fixed-CORE-3431-ISQL-pads-UTF-8-data-incorrectly.patch
+  * firebird-2.5.2-isqllocale.patch
+    -> isql-fix-output-if-charset-is-different-from-locale.patch
+  * firebird-2.5.2-isqlwidth.patch
+    -> isql-fix-buffer-overflow-when-set-width-sets-bigger-.patch
+  * firebird-2.5.2-pkgconfig.patch
+    -> add-pkgconfig-files.patch
+  * m68k-support.patch
+    -> add-experimental-support-for-m68k-architecture.patch
+- use xz compressed tarball
+
+-------------------------------------------------------------------

Old:
----
  Firebird-2.5.2.26539-0-fix-bashisms.patch
  Firebird-2.5.2.26539-0.tar.bz2
  aarch64-support.patch
  firebird-2.5.1-chown.patch
  firebird-2.5.1-config.patch
  firebird-2.5.1-disable.patch
  firebird-2.5.2-CORE-4058.patch
  firebird-2.5.2-gpidfile.patch
  firebird-2.5.2-icu49.patch
  firebird-2.5.2-init.patch
  firebird-2.5.2-isqlalign.patch
  firebird-2.5.2-isqllocale.patch
  firebird-2.5.2-isqlwidth.patch
  firebird-2.5.2-pkgconfig.patch
  firebird-2.5.2-runlevel.patch
  firebird-fix-unsigned-char.diff
  firebird-s390x-fix_libdir.patch
  m68k-support.patch
  ppc64-libdir.patch

New:
----
  Firebird-2.5.4.26821-0.tar.xz
  Fixed-CORE-3431-ISQL-pads-UTF-8-data-incorrectly.patch
  add-experimental-support-for-m68k-architecture.patch
  add-pkgconfig-files.patch
  allow-creating-buildRoot-as-non-root-user.patch
  disable-xinetd-service-by-default.patch
  do-not-use-DatabaseAccess-Full-in-default-config.patch
  fbguard-allow-creating-a-guard-pidfile.patch
  isql-fix-buffer-overflow-when-set-width-sets-bigger-.patch
  isql-fix-output-if-charset-is-different-from-locale.patch
  use-killproc-in-stop-branch-of-SuSE-init-script.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ firebird-classic.spec ++++++
--- /var/tmp/diff_new_pack.F5dWp6/_old  2014-12-19 09:40:19.000000000 +0100
+++ /var/tmp/diff_new_pack.F5dWp6/_new  2014-12-19 09:40:19.000000000 +0100
@@ -16,7 +16,7 @@
 #
 
 
-%define upversion 2.5.2.26539
+%define upversion 2.5.4.26821
 %define pkgversion Firebird-%{upversion}-0
 %define bname firebird
 
@@ -27,7 +27,7 @@
 Name:           firebird-classic
 Version:        %{upversion}
 Release:        0
-Source:         %{pkgversion}.tar.bz2
+Source:         %{pkgversion}.tar.xz
 Source99:       baselibs.conf
 Url:            http://www.firebirdsql.org/
 BuildRequires:  gcc-c++
@@ -36,6 +36,7 @@
 BuildRequires:  libtool
 BuildRequires:  ncurses-devel
 BuildRequires:  pkg-config
+BuildRequires:  xz
 %ifnarch %{ix86} x86_64
 BuildRequires:  libatomic-ops-devel
 %endif
@@ -47,23 +48,18 @@
 License:        SUSE-IDPL-1.0 and SUSE-IBPL-1.0
 Group:          Productivity/Databases/Servers
 
-Patch1:         %{bname}-2.5.1-chown.patch
-Patch2:         %{bname}-2.5.2-gpidfile.patch
-Patch3:         %{bname}-2.5.2-init.patch
-Patch5:         %{bname}-2.5.1-disable.patch
-Patch6:         %{bname}-2.5.1-config.patch
-Patch7:         %{bname}-2.5.2-pkgconfig.patch
-Patch8:         %{bname}-2.5.2-runlevel.patch
-Patch9:         ppc64-libdir.patch
-Patch10:        %{bname}-2.5.2-icu49.patch
-Patch11:        %{bname}-2.5.2-CORE-4058.patch
-Patch12:        aarch64-support.patch
-Patch13:        firebird-fix-unsigned-char.diff
-Patch14:        m68k-support.patch
-Patch21:        %{bname}-2.5.2-isqlalign.patch
-Patch22:        %{bname}-2.5.2-isqllocale.patch
-Patch23:        %{bname}-2.5.2-isqlwidth.patch
-Patch24:        %{bname}-s390x-fix_libdir.patch
+Patch1:         allow-creating-buildRoot-as-non-root-user.patch
+Patch2:         fbguard-allow-creating-a-guard-pidfile.patch
+Patch3:         use-killproc-in-stop-branch-of-SuSE-init-script.patch
+Patch4:         disable-xinetd-service-by-default.patch
+Patch5:         do-not-use-DatabaseAccess-Full-in-default-config.patch
+Patch6:         add-pkgconfig-files.patch
+
+Patch21:        Fixed-CORE-3431-ISQL-pads-UTF-8-data-incorrectly.patch
+Patch22:        isql-fix-output-if-charset-is-different-from-locale.patch
+Patch23:        isql-fix-buffer-overflow-when-set-width-sets-bigger-.patch
+
+Patch31:        add-experimental-support-for-m68k-architecture.patch
 
 %description
 Classic architecture binaries for Firebird SQL server. These can be used
@@ -80,23 +76,16 @@
 
 %prep
 %setup -n %{pkgversion}
-%patch1
+%patch1 -p1
 %patch2 -p1
-%patch3
-%patch5
-%patch6
-%patch7
-%patch8 -p1
-%patch9 -p1
-%patch10 -p1
-%patch11 -p1
-%patch12 -p1
-%patch13 -p1
-%patch14 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
 %patch21 -p1
 %patch22 -p1
 %patch23 -p1
-%patch24 -p1
+%patch31 -p1
 
 %build
 rm -vf builds/make.new/config/config.{guess,sub}

++++++ firebird.spec ++++++
--- /var/tmp/diff_new_pack.F5dWp6/_old  2014-12-19 09:40:19.000000000 +0100
+++ /var/tmp/diff_new_pack.F5dWp6/_new  2014-12-19 09:40:19.000000000 +0100
@@ -16,7 +16,7 @@
 #
 
 
-%define upversion 2.5.2.26539
+%define upversion 2.5.4.26821
 %define pkgversion Firebird-%{upversion}-0
 
 %if 0%{?suse_version} < 1130
@@ -26,7 +26,7 @@
 Name:           firebird
 Version:        %{upversion}
 Release:        0
-Source:         %{pkgversion}.tar.bz2
+Source:         %{pkgversion}.tar.xz
 Source1:        README.SUSE
 Source99:       baselibs.conf
 Url:            http://www.firebirdsql.org/
@@ -36,6 +36,7 @@
 BuildRequires:  libtool
 BuildRequires:  ncurses-devel
 BuildRequires:  pkg-config
+BuildRequires:  xz
 %ifnarch %{ix86} x86_64
 BuildRequires:  libatomic-ops-devel
 %endif
@@ -45,24 +46,18 @@
 License:        SUSE-IDPL-1.0 and SUSE-IBPL-1.0
 Group:          Productivity/Databases/Servers
 
-Patch1:         %{name}-2.5.1-chown.patch
-Patch2:         %{name}-2.5.2-gpidfile.patch
-Patch3:         %{name}-2.5.2-init.patch
-Patch4:         Firebird-2.5.2.26539-0-fix-bashisms.patch
-Patch5:         %{name}-2.5.1-disable.patch
-Patch6:         %{name}-2.5.1-config.patch
-Patch7:         %{name}-2.5.2-pkgconfig.patch
-Patch8:         %{name}-2.5.2-runlevel.patch
-Patch9:         ppc64-libdir.patch
-Patch10:        %{name}-2.5.2-icu49.patch
-Patch11:        %{name}-2.5.2-CORE-4058.patch
-Patch12:        aarch64-support.patch
-Patch13:        firebird-fix-unsigned-char.diff
-Patch14:        m68k-support.patch
-Patch21:        %{name}-2.5.2-isqlalign.patch
-Patch22:        %{name}-2.5.2-isqllocale.patch
-Patch23:        %{name}-2.5.2-isqlwidth.patch
-Patch24:        %{name}-s390x-fix_libdir.patch
+Patch1:         allow-creating-buildRoot-as-non-root-user.patch
+Patch2:         fbguard-allow-creating-a-guard-pidfile.patch
+Patch3:         use-killproc-in-stop-branch-of-SuSE-init-script.patch
+Patch4:         disable-xinetd-service-by-default.patch
+Patch5:         do-not-use-DatabaseAccess-Full-in-default-config.patch
+Patch6:         add-pkgconfig-files.patch
+
+Patch21:        Fixed-CORE-3431-ISQL-pads-UTF-8-data-incorrectly.patch
+Patch22:        isql-fix-output-if-charset-is-different-from-locale.patch
+Patch23:        isql-fix-buffer-overflow-when-set-width-sets-bigger-.patch
+
+Patch31:        add-experimental-support-for-m68k-architecture.patch
 
 %description
 Firebird is a relational database offering many ANSI SQL standard
@@ -74,24 +69,16 @@
 
 %prep
 %setup -n %{pkgversion}
-%patch1
+%patch1 -p1
 %patch2 -p1
-%patch3
+%patch3 -p1
 %patch4 -p1
-%patch5
-%patch6
-%patch7
-%patch8 -p1
-%patch9 -p1
-%patch10 -p1
-%patch11 -p1
-%patch12 -p1
-%patch13 -p1
-%patch14 -p1
+%patch5 -p1
+%patch6 -p1
 %patch21 -p1
 %patch22 -p1
 %patch23 -p1
-%patch24 -p1
+%patch31 -p1
 
 %build
 rm -vf builds/make.new/config/config.{guess,sub}

++++++ Fixed-CORE-3431-ISQL-pads-UTF-8-data-incorrectly.patch ++++++
From: asfernandes <asfernandes@de594faa-8d1b-4a0c-9a6a-a7de5f8bf859>
Date: Tue, 5 Apr 2011 21:30:27 +0000
Subject: Fixed CORE-3431 - ISQL pads UTF-8 data incorrectly.

git-svn-id: 
https://firebird.svn.sourceforge.net/svnroot/firebird/firebird/trunk@52676 
de594faa-8d1b-4a0c-9a6a-a7de5f8bf859

Conflicts:

        src/isql/isql.epp
---
 src/isql/isql.epp | 159 ++++++++++++++++++++++++++++++++++++++++++++----------
 src/isql/isql.h   |   1 +
 2 files changed, 132 insertions(+), 28 deletions(-)

diff --git a/src/isql/isql.epp b/src/isql/isql.epp
index f5e5777..31c6d6b 100644
--- a/src/isql/isql.epp
+++ b/src/isql/isql.epp
@@ -131,6 +131,8 @@ using MsgFormat::SafeArg;
 #include "../isql/InputDevices.h"
 #include "../isql/OptionsBase.h"
 
+#include "../intl/charsets.h"
+#include <unicode/utf8.h>
 
 DATABASE DB = COMPILETIME "yachts.lnk";
 
@@ -245,6 +247,98 @@ const switch_info switches[] =
 };
 
 
+namespace IcuUtil
+{
+       // Duplicate from ICU to not need to link ISQL with it. It's used by 
U8_NEXT_UNSAFE.
+       static const uint8_t utf8_countTrailBytes[256] = {
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+               1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+               1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+
+               2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+               3, 3, 3, 3, 3,
+               3, 3, 3,    /* illegal in Unicode */
+               4, 4, 4, 4, /* illegal in Unicode */
+               5, 5,       /* illegal in Unicode */
+               0, 0        /* illegal bytes 0xfe and 0xff */
+       };
+
+       // Return the number of characters of a string.
+       static unsigned charLength(SSHORT sqlsubtype, unsigned len, const char* 
str)
+       {
+               if (sqlsubtype != CS_UNICODE_FSS && sqlsubtype != CS_UTF8)
+                       return len;
+
+               unsigned charLen = 0;
+               unsigned i = 0;
+
+               while (i < len)
+               {
+                       UChar32 c;
+                       U8_NEXT_UNSAFE(str, i, c);
+                       ++charLen;
+               }
+
+               return charLen;
+       }
+
+       // Pads a string to a specified column width.
+       static void pad(char* buffer, SSHORT sqlsubtype, unsigned len, const 
char* str, unsigned width,
+               bool right)
+       {
+               if (sqlsubtype != CS_UNICODE_FSS && sqlsubtype != CS_UTF8)
+               {
+                       // Truncate if necessary.
+                       if (len > width)
+                               len = width;
+
+                       sprintf(buffer, (right ? "%*.*s" : "%-*.*s"), width, 
len, str);
+                       return;
+               }
+
+               unsigned i = 0;
+
+               while (i < len && width > 0)
+               {
+                       UChar32 c;
+                       U8_NEXT_UNSAFE(str, i, c);
+                       --width;
+               }
+
+               if (right)
+               {
+                       while (width-- > 0)
+                               *buffer++ = ' ';
+               }
+
+               memcpy(buffer, str, i);
+               buffer += i;
+
+               if (!right)
+               {
+                       while (width-- > 0)
+                               *buffer++ = ' ';
+               }
+
+               *buffer = '\0';
+       }
+}
+
+
 static inline bool commit_trans(isc_tr_handle* x)
 {
        if (isc_commit_transaction (isc_status, x)) {
@@ -583,6 +677,7 @@ int ISQL_main(int argc, char* argv[])
        TEXT tabname[WORDLENGTH];
        tabname[0] = '\0';
        isqlGlob.db_SQL_dialect = 0;
+       isqlGlob.att_charset = 0;
 
        // Output goes to stdout by default
        isqlGlob.Out = stdout;
@@ -5864,6 +5959,7 @@ void ISQL_get_version(bool call_by_create_db)
                isc_info_ods_version,
                isc_info_ods_minor_version,
                isc_info_db_sql_dialect,
+               frb_info_att_charset,
                Version_info ? isc_info_firebird_version: isc_info_end,
                isc_info_end
        };
@@ -6020,6 +6116,10 @@ void ISQL_get_version(bool call_by_create_db)
                        }
                        break;
 
+               case frb_info_att_charset:
+                       isqlGlob.att_charset = gds__vax_integer(p, length);
+                       break;
+
                default:
                        isqlGlob.printf("Internal error: Unexpected 
isc_info_value %d%s",
                                                        item, NEWLINE);
@@ -7360,18 +7460,6 @@ static bool checkSpecial(TEXT* const p, const int 
length, const double value)
 }
 
 
-static void align_string(char* out, unsigned clen, unsigned slen, const char* 
s)
-{
-       if (slen > clen)
-               slen = clen;
-       memcpy(out, s, slen);
-       if (clen > slen)
-               memset(out + slen, ' ', clen - slen);
-       out[clen] = ' ';
-       out[clen + 1] = '\0';
-}
-
-
 static SSHORT print_item(TEXT** s, XSQLVAR* var, const int length)
 {
 /**************************************
@@ -7659,12 +7747,12 @@ static SSHORT print_item(TEXT** s, XSQLVAR* var, const 
int length)
                                        sprintf(p, "%-*s ", length, buff2);
                                ISQL_FREE(buff2);
                        }
-                       else if (List) {
+                       else if (List)
                                isqlGlob.printf("%s%s", string, NEWLINE);
-                       }
                        else
                        {
-                               align_string(p, length, var->sqllen, 
var->sqldata);
+                               IcuUtil::pad(p, var->sqlsubtype, 
strlen(var->sqldata), var->sqldata, length, false);
+                               strcat(p, " ");
                        }
                        break;
 
@@ -7752,12 +7840,12 @@ static SSHORT print_item(TEXT** s, XSQLVAR* var, const 
int length)
                                        }
                                        ISQL_FREE(buff2);
                                }
-                               else if (List) {
+                               else if (List)
                                        isqlGlob.printf("%s%s", 
avary->vary_string, NEWLINE);
-                               }
                                else
                                {
-                                       align_string(p, length, 
avary->vary_length, avary->vary_string);
+                                       IcuUtil::pad(p, var->sqlsubtype, 
avary->vary_length, avary->vary_string, length, false);
+                                       strcat(p, " ");
                                }
                                break;
                        }
@@ -8195,16 +8283,20 @@ static void process_header(const XSQLDA* sqlda, const 
int pad[], TEXT header[],
        for (const XSQLVAR* const end = var + sqlda->sqld; var < end; var++, 
i++)
        {
                const SSHORT type = var->sqltype & ~1;
-               if (type == SQL_TEXT || type == SQL_VARYING)
-                       sprintf(p, "%-*.*s ", pad[i], pad[i], var->aliasname);
-               else
-                       sprintf(p, "%*s ", pad[i], var->aliasname);
+
+               IcuUtil::pad(p, isqlGlob.att_charset, var->aliasname_length, 
var->aliasname, pad[i],
+                       (type != SQL_TEXT && type != SQL_VARYING));
+               strcat(p, " ");
+
+               p += strlen(p);
+
                // Separators need not go on forever no more than a line
-               size_t limit = strlen(p);
-               for (size_t j = 1; j < limit && j < 80; j++)
+               unsigned limit = IcuUtil::charLength(isqlGlob.att_charset, 
var->aliasname_length, var->aliasname);
+               limit = MAX(limit, pad[i]) + 1;
+
+               for (unsigned j = 1; j < limit && j < 80; j++)
                        *p2++ = '=';
                *p2++ = BLANK;
-               p += limit;
        }
        *p2 = '\0';
 }
@@ -8443,7 +8535,7 @@ static SLONG process_sqlda_display(XSQLDA* const sqlda, 
SLONG buffer[], int pad[
 
                USHORT data_length, disp_length, alignment;
                data_length = disp_length = alignment = var->sqllen;
-               SSHORT namelength = var->aliasname_length;
+               SSHORT namelength = IcuUtil::charLength(isqlGlob.att_charset, 
var->aliasname_length, var->aliasname);
 
                // Minimum display length should not be less than that needed
                // for displaying null
@@ -8485,6 +8577,8 @@ static SLONG process_sqlda_display(XSQLDA* const sqlda, 
SLONG buffer[], int pad[
                        // OCTETS data is displayed in hex
                        if (var->sqlsubtype == 1)
                                disp_length = 2 * var->sqllen;
+                       else if (var->sqlsubtype == 4)
+                               disp_length /= 4;
                        break;
                case SQL_VARYING:
                        data_length += sizeof(USHORT) + 1;
@@ -8492,6 +8586,8 @@ static SLONG process_sqlda_display(XSQLDA* const sqlda, 
SLONG buffer[], int pad[
                        // OCTETS data is displayed in hex
                        if (var->sqlsubtype == 1)
                                disp_length = 2 * var->sqllen;
+                       else if (var->sqlsubtype == 4)
+                               disp_length /= 4;
                        break;
                case SQL_SHORT:
                        disp_length = SHORT_LEN;
@@ -8522,7 +8618,10 @@ static SLONG process_sqlda_display(XSQLDA* const sqlda, 
SLONG buffer[], int pad[
 
                // This is the print width of each column
 
-               pad[i] = (disp_length > namelength ? disp_length : namelength);
+               if (disp_length < namelength)
+                       disp_length = namelength;
+
+               pad[i] = disp_length;
 
                // Is there a collist entry, then use that width, but only for 
text
                if (type == SQL_TEXT || type == SQL_VARYING)
@@ -8531,8 +8630,11 @@ static SLONG process_sqlda_display(XSQLDA* const sqlda, 
SLONG buffer[], int pad[
                                pad[i] = global_Col_default;
                }
 
+               if ((type == SQL_TEXT || type == SQL_VARYING) && 
var->sqlsubtype == 4)
+                       disp_length *= 4;
+
                // The total line length
-               linelength += pad[i] + 1;
+               linelength += disp_length + 1;
 
                // Allocate space in buffer for data
 
@@ -8540,6 +8642,7 @@ static SLONG process_sqlda_display(XSQLDA* const sqlda, 
SLONG buffer[], int pad[
                var->sqldata = (SCHAR*) buffer + offset;
                offset += data_length;
        }
+
        return linelength;
 }
 
diff --git a/src/isql/isql.h b/src/isql/isql.h
index e076c3c..9d350e4 100644
--- a/src/isql/isql.h
+++ b/src/isql/isql.h
@@ -362,6 +362,7 @@ public:
        // from isql.epp
        USHORT major_ods;
        USHORT minor_ods;
+       USHORT att_charset;
        void printf(const char* buffer, ...);
        void prints(const char* buffer);
 };
-- 
1.8.4.5

++++++ add-experimental-support-for-m68k-architecture.patch ++++++
From: Andreas Schwab <[email protected]>
Date: Sun, 7 Dec 2014 21:44:27 +0100
Subject: add experimental support for m68k architecture

As this is probably never going to get to upstream, one cannot expect
architecture id to be persistent. Whenever upstream adds a new
architecture, the id is going to collide, patch will need an update and
database file will not be compatible with new binaries (so that backup
and restore will be needed). As noone is likely to be actually using
Firebird on m68k for real data, there should be no harm.
---
 src/jrd/common.h  | 6 ++++++
 src/jrd/inf_pub.h | 1 +
 src/jrd/pag.cpp   | 8 ++++++--
 src/jrd/utl.cpp   | 3 ++-
 4 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/src/jrd/common.h b/src/jrd/common.h
index 875040f..b7d1a33 100644
--- a/src/jrd/common.h
+++ b/src/jrd/common.h
@@ -202,6 +202,12 @@
 
 
 
+#ifdef __mc68000__
+#define IMPLEMENTATION  isc_info_db_impl_linux_m68k /* 85  */
+#undef FB_ALIGNMENT
+#define FB_ALIGNMENT 4
+#endif /* mc68000 */
+
 #endif /* LINUX */
 
 
diff --git a/src/jrd/inf_pub.h b/src/jrd/inf_pub.h
index de6bec3..8e7884aa 100644
--- a/src/jrd/inf_pub.h
+++ b/src/jrd/inf_pub.h
@@ -217,6 +217,7 @@ enum  info_db_implementations
        isc_info_db_impl_linux_alpha = 83,
        isc_info_db_impl_linux_arm64 = 84,
        isc_info_db_impl_linux_ppc64el = 85,
+       isc_info_db_impl_linux_m68k = 86,
 
        isc_info_db_impl_last_value   // Leave this LAST!
 };
diff --git a/src/jrd/pag.cpp b/src/jrd/pag.cpp
index a6e9322..de12c4d 100644
--- a/src/jrd/pag.cpp
+++ b/src/jrd/pag.cpp
@@ -165,10 +165,11 @@ static const int CLASS_LINUX_HPPA = 40;           // 
LINUX/HPPA
 static const int CLASS_LINUX_ALPHA = 41;       // LINUX/ALPHA
 static const int CLASS_LINUX_ARM64 = 42;       // LINUX/ARM64
 static const int CLASS_LINUX_PPC64EL = 43;     // LINUX/PowerPc64EL
+static const int CLASS_LINUX_M68K = 44;                // LINUX/M68K
 
 
 static const int CLASS_MAX10 = CLASS_LINUX_AMD64;      // This should not be 
changed, no new ports with ODS10
-static const int CLASS_MAX = CLASS_LINUX_PPC64EL;
+static const int CLASS_MAX = CLASS_LINUX_M68K;
 
 // ARCHITECTURE COMPATIBILITY CLASSES
 
@@ -269,7 +270,8 @@ static const ArchitectureType archMatrix[CLASS_MAX + 1] =
        archBigEndian,    // CLASS_LINUX_HPPA
        archLittleEndian, // CLASS_LINUX_ALPHA
        archLittleEndian, // CLASS_LINUX_ARM64
-       archLittleEndian  // CLASS_LINUX_PPC64EL
+       archLittleEndian, // CLASS_LINUX_PPC64EL
+       archBigEndian     // CLASS_LINUX_M68K
 
 };
 
@@ -338,6 +340,8 @@ const SSHORT CLASS          = CLASS_LINUX_ALPHA;
 const SSHORT CLASS             = CLASS_LINUX_ARM64;
 #elif defined(PPC64EL)
 const SSHORT CLASS             = CLASS_LINUX_PPC64EL;
+#elif defined(__mc68000__)
+const SSHORT CLASS             = CLASS_LINUX_M68K;
 #else
 #error no support on other hardware for Linux
 #endif
diff --git a/src/jrd/utl.cpp b/src/jrd/utl.cpp
index 63263a0..bd0472d 100644
--- a/src/jrd/utl.cpp
+++ b/src/jrd/utl.cpp
@@ -229,7 +229,8 @@ static const TEXT* const impl_implementation[] =
        "Firebird/linux HPPA",                  // 82
        "Firebird/linux ALPHA",                 // 83
        "Firebird/linux ARM64",                 // 84
-       "Firebird/linux PPC64EL"                // 85
+       "Firebird/linux PPC64EL",               // 85
+       "Firebird/linux M68K"                   // 86
 
 };
 
-- 
1.8.4.5

++++++ add-pkgconfig-files.patch ++++++
From: Michal Kubecek <[email protected]>
Date: Sun, 3 Jun 2012 15:29:08 +0200
Subject: add pkgconfig files

---
 builds/install/arch-specific/linux/classic/fbembed.pc.in | 10 ++++++++++
 builds/install/arch-specific/linux/super/fbclient.pc.in  | 10 ++++++++++
 configure.in                                             |  6 ++++++
 3 files changed, 26 insertions(+)
 create mode 100644 builds/install/arch-specific/linux/classic/fbembed.pc.in
 create mode 100644 builds/install/arch-specific/linux/super/fbclient.pc.in

diff --git a/builds/install/arch-specific/linux/classic/fbembed.pc.in 
b/builds/install/arch-specific/linux/classic/fbembed.pc.in
new file mode 100644
index 0000000..1a7ee2c
--- /dev/null
+++ b/builds/install/arch-specific/linux/classic/fbembed.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@FB_LIBDIR@
+includedir=@FB_INCDIR@
+
+Name: fbembed
+Description: Firebird embedded client library
+Version: @FIREBIRD_VERSION@
+Cflags: -I${includedir}
+Libs: -L${libdir} -lfbembed
diff --git a/builds/install/arch-specific/linux/super/fbclient.pc.in 
b/builds/install/arch-specific/linux/super/fbclient.pc.in
new file mode 100644
index 0000000..e1a1de5
--- /dev/null
+++ b/builds/install/arch-specific/linux/super/fbclient.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@FB_LIBDIR@
+includedir=@FB_INCDIR@
+
+Name: fbclient
+Description: Firebird client library
+Version: @FIREBIRD_VERSION@
+Cflags: -I${includedir}
+Libs: -L${libdir} -lfbclient
diff --git a/configure.in b/configure.in
index 729f98d..fd91863 100644
--- a/configure.in
+++ b/configure.in
@@ -1360,6 +1360,12 @@ case "$PLATFORM" in
                      
gen/install/misc/rc.config.firebird:builds/install/arch-specific/linux/misc/rc.config.firebird.in
                      
gen/firebird/bin/linuxLibrary.sh:builds/install/arch-specific/linux/misc/linuxLibrary.sh.in]
       ,[chmod a+x gen/install/scripts/*.sh gen/install/*sh 2>/dev/null])
+    if test $FIREBIRD_ARCH_TYPE = super; then
+      
AC_CONFIG_FILES([gen/install/misc/fbclient.pc:${INSTALL_SRC_DIR}/fbclient.pc.in])
+    fi
+    if test $FIREBIRD_ARCH_TYPE = classic; then
+      
AC_CONFIG_FILES([gen/install/misc/fbembed.pc:${INSTALL_SRC_DIR}/fbembed.pc.in])
+    fi
     ;;
 
   HPUX)
-- 
1.8.4.5

++++++ allow-creating-buildRoot-as-non-root-user.patch ++++++
From: Michal Kubecek <[email protected]>
Date: Sun, 3 Jun 2012 15:15:28 +0200
Subject: allow creating buildRoot as non-root user

Do not use chown in "make buildRoot" so that it doesn't require
to be run as root.
---
 .../install/arch-specific/linux/misc/makeInstallImage.sh.in | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/builds/install/arch-specific/linux/misc/makeInstallImage.sh.in 
b/builds/install/arch-specific/linux/misc/makeInstallImage.sh.in
index cda8e63..ee6fab8 100644
--- a/builds/install/arch-specific/linux/misc/makeInstallImage.sh.in
+++ b/builds/install/arch-specific/linux/misc/makeInstallImage.sh.in
@@ -28,10 +28,15 @@
 # This script builds an image of the installed system into 
 # the gen/buildroot directory.
 
-if [ "`whoami`" != "root" ]; then
-       echo 'You must be root to build package'
-       exit 1
-fi
+#if [ "`whoami`" != "root" ]; then
+#      echo 'You must be root to build package'
+#      exit 1
+#fi
+
+function chown
+{
+  :
+}
 
 # Making an assumption that this program is being run in the gen directory
 BuildRootDir=..
-- 
1.8.4.5

++++++ disable-xinetd-service-by-default.patch ++++++
From: Michal Kubecek <[email protected]>
Date: Sun, 3 Jun 2012 15:24:13 +0200
Subject: disable xinetd service by default

In default xinetd service file, disable the service by default.
Also start the server as user firebird, not root.
---
 builds/install/arch-specific/linux/misc/firebird.xinetd.in | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/builds/install/arch-specific/linux/misc/firebird.xinetd.in 
b/builds/install/arch-specific/linux/misc/firebird.xinetd.in
index 14f50ce..6e7c887 100644
--- a/builds/install/arch-specific/linux/misc/firebird.xinetd.in
+++ b/builds/install/arch-specific/linux/misc/firebird.xinetd.in
@@ -7,11 +7,12 @@
 
 service @FB_SERVICE_NAME@
 {
-       disable = no
+       disable         = yes
        flags           = REUSE
+       protocol        = tcp
        socket_type     = stream
        wait            = no
-       user            = root
+       user            = firebird
 # These lines cause problems with Windows XP SP2 clients
 # using default firewall configuration (SF#1065511)
 #      log_on_success  += USERID
-- 
1.8.4.5

++++++ do-not-use-DatabaseAccess-Full-in-default-config.patch ++++++
From: Michal Kubecek <[email protected]>
Date: Sun, 3 Jun 2012 15:26:31 +0200
Subject: do not use DatabaseAccess Full in default config

In default firebird.conf, do not use "DatabaseAccess Full" as it
is not very secure setting.
---
 builds/install/misc/firebird.conf.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/builds/install/misc/firebird.conf.in 
b/builds/install/misc/firebird.conf.in
index 9651eae..d651030 100644
--- a/builds/install/misc/firebird.conf.in
+++ b/builds/install/misc/firebird.conf.in
@@ -92,6 +92,7 @@
 # Type: string (special format)
 #
 #DatabaseAccess = Full
+DatabaseAccess = Restrict /srv/firebird
 
 
 # ----------------------------
-- 
1.8.4.5

++++++ fbguard-allow-creating-a-guard-pidfile.patch ++++++
From: Michal Kubecek <[email protected]>
Date: Sun, 3 Jun 2012 15:18:30 +0200
Subject: fbguard: allow creating a guard pidfile

To cooperate with killproc better, add option -gpidfile to create
a pidfile with fbguard PID.
---
 src/utilities/guard/guard.cpp | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/src/utilities/guard/guard.cpp b/src/utilities/guard/guard.cpp
index beeef10..4052f94 100644
--- a/src/utilities/guard/guard.cpp
+++ b/src/utilities/guard/guard.cpp
@@ -97,6 +97,7 @@ int CLIB_ROUTINE main( int argc, char **argv)
        bool daemon = false;
        const TEXT* prog_name = argv[0];
        const TEXT* pidfilename = 0;
+       const TEXT* gpidfilename = 0;
        int guard_exit_code = 0;
 
        const TEXT* const* const end = argc + argv;
@@ -122,9 +123,13 @@ int CLIB_ROUTINE main( int argc, char **argv)
                        case 'P':
                                pidfilename = *argv++;
                                break;
+                       case 'G':
+                               gpidfilename = *argv++;
+                               break;
                        default:
                                fprintf(stderr,
-                                               "Usage: %s [-signore | -onetime 
| -forever (default)] [-daemon] [-pidfile filename]\n",
+                                               "Usage: %s [-signore | -onetime 
| -forever (default)] [-daemon]\n"
+                                               "        [-pidfile filename] 
[-gpidfile filename]\n",
                                                prog_name);
                                exit(-1);
                                break;
@@ -232,6 +237,22 @@ int CLIB_ROUTINE main( int argc, char **argv)
                        }
                }
 
+               if (gpidfilename)
+               {
+                       FILE *gpf = fopen(gpidfilename, "w");
+                       if (gpf)
+                       {
+                               unsigned guard_pid = getpid();
+                               fprintf(gpf, "%d", guard_pid);
+                               fclose(gpf);
+                       }
+                       else
+                       {
+                               gds__log("%s: guardian could not open %s for 
writing, error %d\n",
+                                                prog_name, gpidfilename, 
errno);
+                       }
+               }
+
                // wait for child to die, and evaluate exit status
                bool shutdown_child = true;
                if (!shutting_down)
@@ -302,6 +323,9 @@ int CLIB_ROUTINE main( int argc, char **argv)
        if (pidfilename) {
                remove(pidfilename);
        }
+       if (gpidfilename) {
+               remove(gpidfilename);
+       }
        UTIL_ex_unlock(fd_guard);
        exit(guard_exit_code);
 } // main
-- 
1.8.4.5

++++++ isql-fix-buffer-overflow-when-set-width-sets-bigger-.patch ++++++
From: mkubecek <mkubecek@de594faa-8d1b-4a0c-9a6a-a7de5f8bf859>
Date: Tue, 29 May 2012 20:19:58 +0000
Subject: isql: fix buffer overflow when 'set width' sets bigger
 width than column's natural size

git-svn-id: 
https://firebird.svn.sourceforge.net/svnroot/firebird/firebird/trunk@54566 
de594faa-8d1b-4a0c-9a6a-a7de5f8bf859
---
 src/isql/isql.epp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/isql/isql.epp b/src/isql/isql.epp
index 93828ca..99b3967 100644
--- a/src/isql/isql.epp
+++ b/src/isql/isql.epp
@@ -8639,6 +8639,7 @@ static SLONG process_sqlda_display(XSQLDA* const sqlda, 
SLONG buffer[], int pad[
                {
                        if (!global_Cols.find(var->aliasname, &pad[i]) && 
global_Col_default)
                                pad[i] = global_Col_default;
+                       disp_length = pad[i];
                }
 
                if ((type == SQL_TEXT || type == SQL_VARYING) && 
var->sqlsubtype == 4)
-- 
1.8.4.5

++++++ isql-fix-output-if-charset-is-different-from-locale.patch ++++++
From: mkubecek <mkubecek@de594faa-8d1b-4a0c-9a6a-a7de5f8bf859>
Date: Tue, 29 May 2012 20:14:54 +0000
Subject: isql: fix output if charset is different from locale

git-svn-id: 
https://firebird.svn.sourceforge.net/svnroot/firebird/firebird/trunk@54565 
de594faa-8d1b-4a0c-9a6a-a7de5f8bf859
---
 src/isql/isql.epp | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/isql/isql.epp b/src/isql/isql.epp
index 31c6d6b..93828ca 100644
--- a/src/isql/isql.epp
+++ b/src/isql/isql.epp
@@ -306,7 +306,18 @@ namespace IcuUtil
                        if (len > width)
                                len = width;
 
-                       sprintf(buffer, (right ? "%*.*s" : "%-*.*s"), width, 
len, str);
+                       if (right) {
+                               memcpy(buffer + width - len, str, len);
+                               if (width > len)
+                                       memset(buffer, ' ', width - len);
+                       }
+                       else
+                       {
+                               memcpy(buffer, str, len);
+                               if (width > len)
+                                       memset(buffer + len, ' ', width - len);
+                       }
+                       buffer[width] = '\0';
                        return;
                }
 
-- 
1.8.4.5

++++++ use-killproc-in-stop-branch-of-SuSE-init-script.patch ++++++
From: Michal Kubecek <[email protected]>
Date: Sun, 3 Jun 2012 15:21:44 +0200
Subject: use killproc in stop branch of SuSE init script

In "stop" branch of SuSE init script, use killproc and fbguard
pidfile.
---
 .../arch-specific/linux/misc/firebird.init.d.suse.in  | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/builds/install/arch-specific/linux/misc/firebird.init.d.suse.in 
b/builds/install/arch-specific/linux/misc/firebird.init.d.suse.in
index 1d18309..45611a9 100644
--- a/builds/install/arch-specific/linux/misc/firebird.init.d.suse.in
+++ b/builds/install/arch-specific/linux/misc/firebird.init.d.suse.in
@@ -43,6 +43,7 @@ test "$START_FIREBIRD" = yes || exit 0
 
 FIREBIRD=@FB_CONFDIR@
 FBRunUser=firebird
+FBRunGroup=firebird
 INSTANCE=default
 
 makeFbDir() {
@@ -55,14 +56,15 @@ makeFbDir() {
                        chmod $mode $mDir
                fi
        fi
-       chown $FBRunUser:$FBRunUser $mDir
+       chown $FBRunUser:$FBRunGroup $mDir
 }
-runDir=/var/run/firebird
-makeFbDir $runDir
+runDir=@FB_GUARDDIR@
+makeFbDir $runDir 0755
 lockDir=/tmp/firebird
 makeFbDir $lockDir 0770
 
 pidfile="$runDir/$INSTANCE.pid"
+gpidfile="$runDir/${INSTANCE}-guard.pid"
 
 export FIREBIRD
 
@@ -116,7 +118,8 @@ case "$1" in
 
        # NOTE: startproc return 0, even if service is
        # already running to match LSB spec.
-       startproc -u $FBRunUser $FBSBIN/fbguard -pidfile $pidfile -forever
+       startproc -u $FBRunUser $FBSBIN/fbguard -forever \
+               -pidfile $pidfile -gpidfile $gpidfile
 
        # Remember status and be verbose
        rc_status -v
@@ -126,13 +129,7 @@ case "$1" in
        ## Stop daemon with killproc(8) and if this fails
        ## set echo the echo return value.
 
-       ## I had to use generic approach here - I can't test on suse. AP.
-       if [ -f $pidfile ]
-       then
-               kill `cat $pidfile`
-               sleep 1
-       fi
-               
+       killproc -p $gpidfile ${FBSBIN}/fbguard
 
        # Remember status and be verbose
        rc_status -v
-- 
1.8.4.5

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to