Hello community,

here is the log from the commit of package firebird for openSUSE:Factory 
checked in at 2016-07-14 10:48:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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.changes        2016-03-02 
14:20:43.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.firebird.new/firebird.changes   2016-07-14 
10:48:49.000000000 +0200
@@ -1,0 +2,106 @@
+Wed Jun 29 07:33:19 UTC 2016 - mkube...@suse.cz
+
+- add fake "Provides: libfbembed-devel" to libfbclient-devel
+  subpackage; this is a temporary workaround to allow LibreOffice
+  build both before and after firebird is upgraded to verison 3.0
+  in Factory; once FB3 is in Factory, LibreOffice BuildRequires
+  can be updated to libfbclient-devel (based on %suse_version) and
+  this hack can be dropped
+
+-------------------------------------------------------------------
+Tue May 31 11:27:53 UTC 2016 - mkube...@suse.cz
+
+- move libEnginge12.so and intl/ into firebird package as these
+  are also needed by embedded connections
+- include /etc/firebird/firebird.conf.d/*.conf into configuration
+- move the directive restricting DatabaseAccess to /srv/firebird
+  into a separate config file in firebird-server subpackage so
+  that it doesn't affect embedded-only installs
+- do-not-use-DatabaseAccess-Full-in-default-config.patch:
+  replaced by 50-server.conf
+- fix Group tag for libfbclient2 and libib_util subpackages
+- improve libib_util subpackage description
+
+-------------------------------------------------------------------
+Wed May 18 08:58:12 UTC 2016 - mkube...@suse.cz
+
+- libfbclient-devel cannot be used as a direct replacement for
+  libfbembed-devel so it's better to stop pretending so
+- some packages have (unnecessary) explicit build requirement for
+  firebird-devel whose contents was merged into libfbclient-devel;
+  add corresponding Provides and Obsoletes
+
+-------------------------------------------------------------------
+Wed May 11 23:30:43 UTC 2016 - mkube...@suse.cz
+
+- Fix-locking-on-big-endian-architectures.patch:
+  fix broken code (and failed build) on big endian architectures
+  (CORE-5232)
+- explicitely require autoconf 2.67 or newer for build
+
+-------------------------------------------------------------------
+Wed May 11 11:48:08 UTC 2016 - mkube...@suse.cz
+
+- upgrade to upstream version 3.0.0 (final)
+  * one executable for all modes => drop firebird-classic package
+  * true SMP support in SuperServer
+  * new object oriented C++ API
+  * per-database config files
+  * increased limits
+  * support multiple security databases
+  * boolean type
+  * SQL packages
+  * DDL triggers
+  * window functions
+  * statistical functions
+  * scrollable cursors
+  * IPv6 support
+- reorganize subpackages:
+  * firebird: only common files needed for both client and server
+  * firebird-server: server installation
+  * libfbclient2: client library
+  * firebird-utils: management utilities
+  * libib_util: libib_util library (utility functions for UDF)
+  * firebird-doc: documentation
+  * firebird-examples: API examples
+  * libfbclient-devel: devel files for libfbclient2
+  * libib_util-devel: devel files for libib_util
+- delete patches obsoleted by version upgrade:
+  * Added-check-for-failed-fork-system-call.patch
+  * Apply-Partial-patch-for-C-11-compilation-of-the-Fire.patch
+  * Backported-fix-for-CORE-4785-Bad-packet-of-op_execut.patch
+  * Backported-fix-for-CORE-4788-Superclassic-server-han.patch
+  * Fixed-CORE-3431-ISQL-pads-UTF-8-data-incorrectly.patch
+  * Fixed-s-tandalone-switch-in-posix-server.patch
+  * isql-fix-buffer-overflow-when-set-width-sets-bigger-.patch
+  * isql-fix-output-if-charset-is-different-from-locale.patch
+  * Libreoffice-patch-C-11-new-delete-replacement-functi.patch
+- delete add-experimental-support-for-m68k-architecture.patch
+  architecture specific settings are managed in a different way
+  in 3.0 so that this would need a complete rewrite; as this
+  has little chance to get upstreamed and I doubt anyone plans
+  to actually run Firebird 3.0 on openSUSE on m68k, let's just
+  drop it
+- update remaining patches:
+  * 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
+  * use-killproc-in-stop-branch-of-SuSE-init-script.patch
+- new patches (from post-3.0 development):
+  * unicode-handle-the-ICU-version-hack-from-SuSE.patch
+    compatibility with SUSE ICU versioning hack
+  * Make-the-generated-code-compatible-with-gcc-6-in-C-1.patch:
+    gcc6 compatibility
+  * Provide-sized-global-delete-operators-when-compiled-.patch:
+    gcc6 compatibility
+  * Allow-to-enforce-IPv4-or-IPv6-in-URL-like-connection.patch:
+    implement "inet4" and "inet6" protocols for URL-like connection
+    strings to enforce IPv4 or IPv6
+  * work-around-g-problem-in-SLE11.patch:
+    work around a bug in old g++ (needed for SLE11 build)
+- build with -fno-delete-null-pointer-checks
+- specfile cleanup
+
+-------------------------------------------------------------------

Old:
----
  Added-check-for-failed-fork-system-call.patch
  Apply-Partial-patch-for-C-11-compilation-of-the-Fire.patch
  Backported-fix-for-CORE-4785-Bad-packet-of-op_execut.patch
  Backported-fix-for-CORE-4788-Superclassic-server-han.patch
  Firebird-2.5.4.26856-0.tar.xz
  Fixed-CORE-3431-ISQL-pads-UTF-8-data-incorrectly.patch
  Fixed-s-tandalone-switch-in-posix-server.patch
  Libreoffice-patch-C-11-new-delete-replacement-functi.patch
  add-experimental-support-for-m68k-architecture.patch
  do-not-use-DatabaseAccess-Full-in-default-config.patch
  firebird-classic.changes
  firebird-classic.spec
  isql-fix-buffer-overflow-when-set-width-sets-bigger-.patch
  isql-fix-output-if-charset-is-different-from-locale.patch

New:
----
  50-server.conf
  Allow-to-enforce-IPv4-or-IPv6-in-URL-like-connection.patch
  Firebird-3.0.0.32483-0.tar.xz
  Fix-locking-on-big-endian-architectures.patch
  Make-the-generated-code-compatible-with-gcc-6-in-C-1.patch
  Provide-sized-global-delete-operators-when-compiled-.patch
  unicode-handle-the-ICU-version-hack-from-SuSE.patch
  work-around-g-problem-in-SLE11.patch

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

Other differences:
------------------
++++++ firebird.spec ++++++
--- /var/tmp/diff_new_pack.Xr067i/_old  2016-07-14 10:48:50.000000000 +0200
+++ /var/tmp/diff_new_pack.Xr067i/_new  2016-07-14 10:48:50.000000000 +0200
@@ -16,58 +16,52 @@
 #
 
 
-%define upversion 2.5.4.26856
-%define pkgversion Firebird-%{upversion}-0
-
-%if 0%{?suse_version} < 1130
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-%endif
+%define up_stage 0
 
 Name:           firebird
-Version:        %{upversion}
+Version:        3.0.0.32483
 Release:        0
-Source:         %{pkgversion}.tar.xz
-Source1:        README.SUSE
-Source99:       baselibs.conf
+Summary:        Database system (common files)
+License:        SUSE-IDPL-1.0 and SUSE-IBPL-1.0
+Group:          Productivity/Databases/Servers
 Url:            http://www.firebirdsql.org/
+Source:         Firebird-%{version}-%{up_stage}.tar.xz
+Source1:        README.SUSE
+Source2:        50-server.conf
+Source999:      baselibs.conf
+BuildRequires:  autoconf >= 2.67
 BuildRequires:  gcc-c++
 BuildRequires:  libedit-devel
 BuildRequires:  libicu-devel
+BuildRequires:  libtommath-devel
 BuildRequires:  libtool
 BuildRequires:  ncurses-devel
 BuildRequires:  pkg-config
 BuildRequires:  xz
-%ifnarch %{ix86} x86_64
-BuildRequires:  libatomic-ops-devel
-%endif
+BuildRequires:  zlib-devel
 Requires(pre):  pwdutils
-Requires:       %{name}-server = %{version}
-Summary:        An SQL database server
-License:        SUSE-IDPL-1.0 and SUSE-IBPL-1.0
-Group:          Productivity/Databases/Servers
 
-# SUSE specific patches
+%if 0%{?suse_version} < 1130
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+%endif
+
 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
-# backport from upstream 2.5 branch
-Patch11:        Backported-fix-for-CORE-4788-Superclassic-server-han.patch
-Patch12:        Backported-fix-for-CORE-4785-Bad-packet-of-op_execut.patch
-Patch13:        Fixed-s-tandalone-switch-in-posix-server.patch
-Patch14:        Added-check-for-failed-fork-system-call.patch
-Patch15:        Apply-Partial-patch-for-C-11-compilation-of-the-Fire.patch
-Patch16:        Libreoffice-patch-C-11-new-delete-replacement-functi.patch
-# backport from upstream 3.0 branch
-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
-# SUSE only, 2.5 only
-Patch31:        add-experimental-support-for-m68k-architecture.patch
+Patch5:         add-pkgconfig-files.patch
+Patch6:         unicode-handle-the-ICU-version-hack-from-SuSE.patch
+Patch7:         Make-the-generated-code-compatible-with-gcc-6-in-C-1.patch
+Patch8:         Provide-sized-global-delete-operators-when-compiled-.patch
+Patch9:         Allow-to-enforce-IPv4-or-IPv6-in-URL-like-connection.patch
+Patch10:        Fix-locking-on-big-endian-architectures.patch
+# work around a problem with old g++
+Patch91:        work-around-g-problem-in-SLE11.patch
 
 %description
+This package provides common files needed by both client and server
+installations of Firebird RDBMS.
+
 Firebird is a relational database offering many ANSI SQL standard
 features that runs on Linux, Windows, and a variety of Unix platforms.
 Firebird offers excellent concurrency, high performance, and powerful
@@ -76,39 +70,39 @@
 
 
 %prep
-%setup -n %{pkgversion}
+%setup -q -n Firebird-%{version}-%{up_stage}
+# --
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
-%patch11 -p1
-%patch12 -p1
-%patch13 -p1
-%patch14 -p1
-%patch15 -p1
-%patch16 -p1
-%patch21 -p1
-%patch22 -p1
-%patch23 -p1
-%patch31 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+# --
+# work around a problem with old g++
+%if 0%{?suse_version} < 1140
+%patch91 -p1
+%endif
 
 %build
-rm -vf builds/make.new/config/config.{guess,sub}
-%if 0%{suse_version} > 1320
-export CXXFLAGS="$RPM_OPT_FLAGS -std=gnu++98 -fno-lifetime-dse"
-%endif
+export CFLAGS="%{optflags} -fno-strict-aliasing"
+export CXXFLAGS="${CFLAGS} -fno-delete-null-pointer-checks"
 ./autogen.sh --prefix=%{_prefix} \
-  --enable-superserver \
-  --with-system-icu --with-system-editline \
-  --with-fbbin=%{_bindir} --with-fbsbin=%{_sbindir} \
+  --disable-binreloc \
+  --with-system-editline \
+  --with-fbbin=%{_bindir} \
+  --with-fbsbin=%{_sbindir} \
   --with-fbconf=%{_sysconfdir}/%{name} \
-  --with-fblib=%{_libdir} --with-fbinclude=%{_includedir}/%{name} \
+  --with-fblib=%{_libdir} \
+  --with-fbinclude=%{_includedir} \
   --with-fbdoc=%{_docdir}/%{name} \
   --with-fbudf=%{_libdir}/%{name}/udf \
   --with-fbsample=%{_docdir}/%{name}/sample \
-  --with-fbsample-db=%{_libdir}/%{name}/sample \
+  --with-fbsample-db=%{_localstatedir}/lib/%{name}/sample \
   --with-fbhelp=%{_libdir}/%{name}/lib \
   --with-fbintl=%{_libdir}/%{name}/intl \
   --with-fbmisc=%{_datadir}/%{name}/misc \
@@ -117,99 +111,141 @@
   --with-fblog=%{_localstatedir}/log/%{name} \
   --with-fbglock=%{_localstatedir}/run/%{name} \
   --with-fbplugins=%{_libdir}/%{name}/plugins
-make %{?jobs:CPU=%jobs}
+make %{?_smp_mflags}
 cd gen
-make -f Makefile.install buildRoot
+make %{?_smp_mflags} -f Makefile.install buildRoot
 chmod -R u+w buildroot%{_docdir}/%{name}
+cat >>buildroot%{_sysconfdir}/%{name}/firebird.conf <<EOT
+
+# allow additional config files
+include \$(dir_conf)/firebird.conf.d/*.conf
+EOT
 
 %install
-cp -r gen/buildroot/* ${RPM_BUILD_ROOT}/
-mkdir -p ${RPM_BUILD_ROOT}/etc/init.d
+chmod u+rw,a+rx gen/buildroot/usr/include/firebird/impl
+cp -r gen/buildroot/* %{buildroot}/
+mkdir -p %{buildroot}%{_initddir}
 install -m 755 gen/install/misc/firebird.init.d.suse \
-  ${RPM_BUILD_ROOT}/etc/init.d/firebird
-mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/pkgconfig
-cp -v gen/install/misc/*.pc ${RPM_BUILD_ROOT}%{_libdir}/pkgconfig/
-cd ${RPM_BUILD_ROOT}
+  %{buildroot}%{_initddir}/firebird
+mkdir -p %{buildroot}%{_libdir}/pkgconfig
+cp -v gen/install/misc/*.pc %{buildroot}%{_libdir}/pkgconfig/
+cd %{buildroot}
 mkdir -p .%{_libdir}/%{name}/utils
 mv -v .%{_sbindir}/*.sh .%{_libdir}/%{name}/utils/
 mv -v .%{_sbindir}/fb_config .%{_libdir}/%{name}/utils/
-mv -v .%{_bindir}/isql .%{_bindir}/isql-fb
-mv -v .%{_bindir}/gstat .%{_bindir}/gstat-fb
-rm -vf .%{_includedir}/%{name}/perf.h
 rm -vf .%{_libdir}/libicu*.so
+mv -vi .%{_bindir}/isql .%{_bindir}/isql-fb
+mv -vi .%{_bindir}/gstat .%{_bindir}/gstat-fb
+mv -vi .%{_includedir}/ibase.h .%{_includedir}/%{name}/
+mv -vi .%{_includedir}/iberror.h .%{_includedir}/%{name}/
+mv -vi .%{_includedir}/ib_util.h .%{_includedir}/%{name}/
 rm -vf .%{_includedir}/*.h
 chmod -R u+w .%{_docdir}/%{name}
 rm -vf .%{_datadir}/%{name}/misc/firebird.init.*
 rm -vf .%{_datadir}/%{name}/misc/rc.config.firebird
-rm -vf .%{_datadir}/%{name}/misc/firebird.xinetd
+mkdir -p .%{_sysconfdir}/xinetd.d
+mv -v .%{_datadir}/%{name}/misc/firebird.xinetd \
+  .%{_sysconfdir}/xinetd.d/%{name}
 mv -v .%{_sysconfdir}/%{name}/README .%{_sysconfdir}/%{name}/WhatsNew \
   .%{_docdir}/%{name}/
 mv -v .%{_sysconfdir}/%{name}/IDPLicense.txt .%{_docdir}/%{name}/
 mv -v .%{_sysconfdir}/%{name}/IPLicense.txt .%{_docdir}/%{name}/
-cp -v %{S:1} .%{_docdir}/%{name}/
+chmod -R go+rX .%{_datadir}/%{name}/misc
+cp -vi %{SOURCE1} .%{_docdir}/%{name}/
+mkdir -p .%{_sysconfdir}/%{name}/firebird.conf.d
+cp -v %{SOURCE2} .%{_sysconfdir}/%{name}/firebird.conf.d/
 mkdir -p srv/%{name}
-ln -s /etc/init.d/firebird usr/sbin/rcfirebird
+ln -s %{_initddir}/firebird usr/sbin/rcfirebird
 
 %files
 %defattr(-,root,root)
-%{_sbindir}/fbguard
-%{_sbindir}/rcfirebird
-%{_libdir}/%{name}/utils
 %dir %{_sysconfdir}/%{name}
-%config(noreplace) %{_sysconfdir}/%{name}/*.conf
-%{_libdir}/libib_util.so
+%config(noreplace) %{_sysconfdir}/%{name}/firebird.conf
+%dir %{_sysconfdir}/%{name}/firebird.conf.d
 %dir %{_libdir}/%{name}
 %dir %{_datadir}/%{name}
-%{_libdir}/%{name}/lib
 %{_libdir}/%{name}/intl
+%{_libdir}/%{name}/lib
+%{_libdir}/%{name}/plugins/libEngine12.so
 %{_datadir}/%{name}/misc
-%{_libdir}/%{name}/plugins
-%{_libdir}/%{name}/udf
-%attr(755,root,root) /etc/init.d/firebird
 %{_docdir}/%{name}/IDPLicense.txt
 %{_docdir}/%{name}/IPLicense.txt
 %{_docdir}/%{name}/README.SUSE
-
 %dir %{_localstatedir}/lib/%{name}
 %dir %{_localstatedir}/lib/%{name}/secdb
-%attr(0600,firebird,firebird) %config(noreplace) 
%{_localstatedir}/lib/%{name}/secdb/security2.fdb
-%dir %{_libdir}/%{name}/sample
-%attr(0600,firebird,firebird) %{_libdir}/%{name}/sample/*
 %attr(0750,firebird,firebird) %{_localstatedir}/log/%{name}
 %dir %attr(0750,firebird,firebird) /srv/firebird
 
 %pre
 getent group firebird >/dev/null || groupadd -r firebird || :
 getent passwd firebird >/dev/null \
-  || /usr/sbin/useradd -r -g firebird -c 'Firebird SQL server' \
+  || %{_sbindir}/useradd -r -g firebird -c 'Firebird SQL server' \
        -d /srv/firebird firebird \
   || :
 exit 0
 
-%post
-%restart_on_update
+# ----------------------------------------------------------------------------
+
+%package server
+Summary:        Server files of Firebird RDBMS
+Group:          Productivity/Databases/Servers
+Requires:       %{name} = %{version}
+Recommends:     %{name}-utils
+# replaces these two from Leap 42.x and older
+Provides:       firebird-classic = %{version}
+Provides:       firebird-superserver = %{version}
+Obsoletes:      firebird-classic < 3
+Obsoletes:      firebird-superserver < 3
+
+%description server
+This package provides files needed to run Firebird RDBMS as a server.
+
+Firebird is a relational database offering many ANSI SQL standard
+features that runs on Linux, Windows, and a variety of Unix platforms.
+Firebird offers excellent concurrency, high performance, and powerful
+language support for stored procedures and triggers. It has been used
+in production systems, under a variety of names, since 1981.
 
-%preun
-%stop_on_removal
 
-%postun
-%restart_on_update
+%files server
+%defattr(-,root,root)
+%{_sbindir}/fb_lock_print
+%{_sbindir}/fbguard
+%{_sbindir}/firebird
+%{_sbindir}/rcfirebird
+%config(noreplace) %{_sysconfdir}/%{name}/databases.conf
+%config(noreplace) %{_sysconfdir}/%{name}/fbtrace.conf
+%config(noreplace) %{_sysconfdir}/%{name}/plugins.conf
+%config(noreplace) %{_sysconfdir}/%{name}/firebird.conf.d/50-server.conf
+%config(noreplace) %{_sysconfdir}/xinetd.d/%{name}
+%exclude %{_libdir}/%{name}/plugins/libEngine12.so
+%{_libdir}/%{name}/plugins
+%{_libdir}/%{name}/udf
+%{_libdir}/%{name}/utils
+%attr(0600,firebird,firebird) %config(noreplace) 
%{_localstatedir}/lib/%{name}/secdb/security3.fdb
+%attr(755,root,root) %{_initddir}/firebird
+
+%post server
+%restart_on_update /etc/init.d/firebird
+
+%preun server
+%stop_on_removal /etc/init.d/firebird
+
+%postun server
+%restart_on_update /etc/init.d/firebird
 %insserv_cleanup
 
 # ----------------------------------------------------------------------------
 
-%package superserver
-Conflicts:      %{name}-classic
-Requires:       %{name} = %{version}
-Provides:       %{name}-server
-Summary:        SuperServer architecture binaries for Firebird SQL server
+%package utils
+Summary:        Firebird RDBMS management utilities
 Group:          Productivity/Databases/Servers
+Requires:       %{name} = %{version}
+# split out of firebird after 42.x
+Provides:       %{name}-superserver:%{_bindir}/gbak
 
-%description superserver
-SuperServer architecture binaries for Firebird SQL server. SuperServer
-architecture uses one multithreaded process for processing client
-connections with exclusive database lock and cache shared between
-connections.
+%description utils
+This package provides for Firebird RDBMS management.
 
 Firebird is a relational database offering many ANSI SQL standard
 features that runs on Linux, Windows, and a variety of Unix platforms.
@@ -218,22 +254,34 @@
 in production systems, under a variety of names, since 1981.
 
 
-%files superserver
+%files utils
 %defattr(-,root,root)
-%{_bindir}/*
-%{_sbindir}/fbserver
-%{_sbindir}/fbmgr.bin
-%{_sbindir}/fb_lock_print
+%{_bindir}/fbsvcmgr
+%{_bindir}/fbtracemgr
+%{_bindir}/gbak
+%{_bindir}/gfix
+%{_bindir}/gpre
+%{_bindir}/gsec
+%{_bindir}/gsplit
+%{_bindir}/gstat-fb
+%{_bindir}/isql-fb
+%{_bindir}/nbackup
+%{_bindir}/qli
 
 # ----------------------------------------------------------------------------
 
-%package devel
-Summary:        UDF support library for Firebird SQL server
-Group:          Development/Libraries/C and C++
+%package -n libfbclient2
+Summary:        Firebird RDBMS client library
+Group:          System/Libraries
+Requires:       %{name} >= 3.0
+Requires:       libib_util
+Provides:       libfbembed2_5 = %{version}
+Obsoletes:      libfbembed2_5 < 3
 
-%description devel
-This package is needed for development of client applications and user
-defined functions (UDF) for Firebird SQL server.
+%description -n libfbclient2
+Shared client library for Firebird SQL server. Can be used both to
+connect to remote servers and to access local databases in embedded
+mode.
 
 Firebird is a relational database offering many ANSI SQL standard
 features that runs on Linux, Windows, and a variety of Unix platforms.
@@ -242,23 +290,35 @@
 in production systems, under a variety of names, since 1981.
 
 
-%files devel
+%files -n libfbclient2
 %defattr(-,root,root)
-%{_includedir}/%{name}
-%{_docdir}/%{name}/sample
+%{_libdir}/libfbclient.so.*
+
+%post -n libfbclient2 -p /sbin/ldconfig
+
+%postun -n libfbclient2
+/sbin/ldconfig
 
 # ----------------------------------------------------------------------------
 
-%package doc
+%package -n libfbclient-devel
+Summary:        Development files for Firebird RDBMS client library
+Group:          Development/Libraries/C and C++
 Requires:       %{name} = %{version}
-Summary:        Documentation for Firebird SQL server
-Group:          Documentation/Other
-%if 0%{?suse_version} > 1110
-BuildArch:      noarch
-%endif
-
-%description doc
-Documentation for Firebird SQL server.
+Requires:       libfbclient2 = %{version}
+Suggests:       %{name}-examples
+Provides:       libfbclient2-devel = %{version}
+Obsoletes:      libfbclient2-devel < 3
+Provides:       firebird-devel = %{version}
+Obsoletes:      firebird-devel < 3
+# temporary workaround for LibreOffice build
+# once FB3 is in Factory, libreoffice buildrequires will be fixed
+# and this can be removed
+Provides:       libfbembed-devel
+
+%description -n libfbclient-devel
+This package is needed for development of client applications accessing
+Firebird RDBMS.
 
 Firebird is a relational database offering many ANSI SQL standard
 features that runs on Linux, Windows, and a variety of Unix platforms.
@@ -267,22 +327,27 @@
 in production systems, under a variety of names, since 1981.
 
 
-%files doc
+%files -n libfbclient-devel
 %defattr(-,root,root)
-%{_docdir}/%{name}
-%exclude %{_docdir}/%{name}/sample
-%exclude %{_docdir}/%{name}/IDPLicense.txt
-%exclude %{_docdir}/%{name}/IPLicense.txt
-%exclude %{_docdir}/%{name}/README.SUSE
+%exclude %{_includedir}/%{name}/ib_util.h
+%{_includedir}/%{name}
+%{_libdir}/libfbclient.so
+%{_libdir}/pkgconfig/fbclient.pc
 
 # ----------------------------------------------------------------------------
 
-%package -n libfbclient2
-Summary:        Firebird SQL server client library
-Group:          Development/Libraries/C and C++
+%package -n libib_util
+Summary:        Firebird RDBMS UDF support library
+Group:          System/Libraries
+Requires:       %{name} = %{version}
 
-%description -n libfbclient2
-Shared client library for Firebird SQL server.
+%description -n libib_util
+Library providing utility functions for Firebird RDBMS user defined
+functions (UDF).
+
+Note: this library may be also loaded via dlopen() by Engine12
+plugin as it's also needed for embedded connections (as long as UDFs
+are used).
 
 Firebird is a relational database offering many ANSI SQL standard
 features that runs on Linux, Windows, and a variety of Unix platforms.
@@ -291,26 +356,53 @@
 in production systems, under a variety of names, since 1981.
 
 
-%files -n libfbclient2
+%files -n libib_util
 %defattr(-,root,root)
-%{_libdir}/libfbclient.so.*
+%{_libdir}/libib_util.so
 
-%post -n libfbclient2
-/sbin/ldconfig
+%post -n libib_util -p /sbin/ldconfig
 
-%postun -n libfbclient2
+%postun -n libib_util
 /sbin/ldconfig
 
 # ----------------------------------------------------------------------------
 
-%package -n libfbclient2-devel
-Summary:        Development libraries and headers for Firebird SQL server
+%package -n libib_util-devel
+Summary:        Development files for Firebird RDBMS
 Group:          Development/Libraries/C and C++
-Requires:       %{name}-devel
+Requires:       %{name} = %{version}
 Requires:       libfbclient2 = %{version}
+Requires:       libib_util = %{version}
+Suggests:       %{name}-examples
+Provides:       firebird-devel:%{_includedir}/firebird/ib_util.h
+
+%description -n libib_util-devel
+This package provides header files for libib_util, support library for
+user defined functions (UDF) for Firebird RDBMS.
+
+Firebird is a relational database offering many ANSI SQL standard
+features that runs on Linux, Windows, and a variety of Unix platforms.
+Firebird offers excellent concurrency, high performance, and powerful
+language support for stored procedures and triggers. It has been used
+in production systems, under a variety of names, since 1981.
+
+
+%files -n libib_util-devel
+%defattr(-,root,root)
+%{_includedir}/%{name}/ib_util.h
+
+# ----------------------------------------------------------------------------
 
-%description -n libfbclient2-devel
-Development files for Firebird SQL server client library.
+%package doc
+Summary:        Documentation for Firebird RDBMS
+Group:          Documentation/Other
+Requires:       %{name} = %{version}
+%if 0%{?suse_version} > 1110
+BuildArch:      noarch
+%endif
+
+%description doc
+Documentation for Firebird RDBMS.
  
 Firebird is a relational database offering many ANSI SQL standard
 features that runs on Linux, Windows, and a variety of Unix platforms.
@@ -319,9 +411,38 @@
 in production systems, under a variety of names, since 1981.
 
 
-%files -n libfbclient2-devel
+%files doc
 %defattr(-,root,root)
-%{_libdir}/libfbclient.so
-%{_libdir}/pkgconfig/fbclient.pc
+%{_docdir}/%{name}
+%exclude %{_docdir}/%{name}/sample
+%exclude %{_docdir}/%{name}/IDPLicense.txt
+%exclude %{_docdir}/%{name}/IPLicense.txt
+%exclude %{_docdir}/%{name}/README.SUSE
+
+# ----------------------------------------------------------------------------
+
+%package examples
+Summary:        Example files for Firebird RDBMS
+Group:          Documentation/Other
+Requires:       %{name} = %{version}
+
+%description examples
+This package provides an example database and API usage examples for
+Firebird RDBMS.
+
+Firebird is a relational database offering many ANSI SQL standard
+features that runs on Linux, Windows, and a variety of Unix platforms.
+Firebird offers excellent concurrency, high performance, and powerful
+language support for stored procedures and triggers. It has been used
+in production systems, under a variety of names, since 1981.
+
+
+%files examples
+%defattr(-,root,root)
+%{_docdir}/%{name}/sample
+%dir %{_localstatedir}/lib/%{name}/sample
+%attr(0640,firebird,firebird) %{_localstatedir}/lib/%{name}/sample/*
+
+# ----------------------------------------------------------------------------
 
 %changelog

++++++ 50-server.conf ++++++
# Default value Full of DatabaseAccess directive is not very suitable
# for server installations allowing TCP access; restrict the access
# to a directory where databases are supposed to live
DatabaseAccess = Restrict /srv/firebird
++++++ Allow-to-enforce-IPv4-or-IPv6-in-URL-like-connection.patch ++++++
From: Michal Kubecek <mkube...@suse.cz>
Date: Wed, 4 May 2016 21:38:36 +0200
Subject: Allow to enforce IPv4 or IPv6 in URL-like connection string.
Patch-mainline: submitted
Git-commit: 13aa5420f24546b99c25a8651d135133d18583f2

---
 doc/README.IPv6                 | 13 +++++++++++++
 doc/README.connection_strings   |  7 +++++++
 src/remote/client/interface.cpp | 12 ++++++++++--
 src/remote/inet.cpp             | 26 +++++++++++++++++---------
 src/remote/inet_proto.h         |  5 +++--
 5 files changed, 50 insertions(+), 13 deletions(-)

diff --git a/doc/README.IPv6 b/doc/README.IPv6
index 04ee9ae63060..86d533b26c95 100644
--- a/doc/README.IPv6
+++ b/doc/README.IPv6
@@ -22,6 +22,19 @@ If a domain name is used in connection string, all addresses 
(IPv4 and IPv6)
 are tried in the order returned by resolver until a connection is established.
 Only if all attempts fail, the client fails to connect.
 
+New URL-style connection string format (see README.connection_strings) allows
+to restrict name lookup to only IPv4 or IPv6 addresses:
+
+  connect 'inet://server.example.org/test';
+  connect 'inet4://server.example.org/test';
+  connect 'inet6://server.example.org/test';
+
+First example tries all addresses, second only IPv4 ones, third only IPv6
+ones. This can be used to avoid connection delays on systems where name lookup
+returns IPv6 addresses for some host names but attempts to connect to them
+time out rather than failing immediatelly (as reported, this can happen even
+for name "localhost" on some systems).
+
 
 Server
 ------
diff --git a/doc/README.connection_strings b/doc/README.connection_strings
index d23d50724b04..99e4753df2e7 100644
--- a/doc/README.connection_strings
+++ b/doc/README.connection_strings
@@ -107,6 +107,13 @@ Examples:
     inet://myserver:fb_db/mydb
     inet://localhost:fb_db/mydb
 
+  The "inet" protocol can be replaced by "inet4" or "inet6" to restrict client
+  to IPv4 or IPv6 addresses corresponding to supplied name ("inet" protocol
+  tries all addresses in the order determined by OS):
+
+    inet4://myserver/mydb
+    inet6://myserver/mydb
+
   Connect via named pipes:
 
     wnet://myserver/C:\db\mydb.fdb
diff --git a/src/remote/client/interface.cpp b/src/remote/client/interface.cpp
index bdfcedf3bb10..29ddb708398d 100644
--- a/src/remote/client/interface.cpp
+++ b/src/remote/client/interface.cpp
@@ -92,6 +92,8 @@
 
 
 const char* const PROTOCOL_INET = "inet";
+const char* const PROTOCOL_INET4 = "inet4";
+const char* const PROTOCOL_INET6 = "inet6";
 const char* const PROTOCOL_WNET = "wnet";
 const char* const PROTOCOL_XNET = "xnet";
 
@@ -5419,6 +5421,7 @@ static rem_port* analyze(ClntAuthBlock& cBlock, PathName& 
attach_name, unsigned
  **************************************/
 
        rem_port* port = NULL;
+       int inet_af = AF_UNSPEC;
 
        cBlock.loadClnt(pb, &parSet);
        authenticateStep0(cBlock);
@@ -5443,7 +5446,12 @@ static rem_port* analyze(ClntAuthBlock& cBlock, 
PathName& attach_name, unsigned
        else
 #endif
 
-       if (ISC_analyze_protocol(PROTOCOL_INET, attach_name, node_name, 
INET_SEPARATOR) ||
+       if (ISC_analyze_protocol(PROTOCOL_INET4, attach_name, node_name, 
INET_SEPARATOR))
+               inet_af = AF_INET;
+       else if (ISC_analyze_protocol(PROTOCOL_INET6, attach_name, node_name, 
INET_SEPARATOR))
+               inet_af = AF_INET6;
+       if (inet_af != AF_UNSPEC ||
+               ISC_analyze_protocol(PROTOCOL_INET, attach_name, node_name, 
INET_SEPARATOR) ||
                ISC_analyze_tcp(attach_name, node_name))
        {
                if (node_name.isEmpty())
@@ -5455,7 +5463,7 @@ static rem_port* analyze(ClntAuthBlock& cBlock, PathName& 
attach_name, unsigned
                }
 
                port = INET_analyze(&cBlock, attach_name, node_name.c_str(), 
flags & ANALYZE_UV, pb,
-                       cBlock.getConfig(), ref_db_name);
+                       cBlock.getConfig(), ref_db_name, inet_af);
        }
 
        // We have a local connection string. If it's a file on a network share,
diff --git a/src/remote/inet.cpp b/src/remote/inet.cpp
index 40f43bbfd9c0..7191db3d9c1f 100644
--- a/src/remote/inet.cpp
+++ b/src/remote/inet.cpp
@@ -453,7 +453,8 @@ static rem_port*            inet_try_connect(       PACKET*,
                                                                        const 
TEXT*,
                                                                        
ClumpletReader&,
                                                                        
RefPtr<Config>*,
-                                                                       const 
PathName*);
+                                                                       const 
PathName*,
+                                                                       int);
 static bool            inet_write(XDR*);
 static rem_port* listener_socket(rem_port* port, USHORT flag, const addrinfo* 
pai);
 
@@ -532,7 +533,8 @@ rem_port* INET_analyze(ClntAuthBlock* cBlock,
                                           bool uv_flag,
                                           ClumpletReader &dpb,
                                           RefPtr<Config>* config,
-                                          const PathName* ref_db_name)
+                                          const PathName* ref_db_name,
+                                          int af)
 {
 /**************************************
  *
@@ -624,7 +626,7 @@ rem_port* INET_analyze(ClntAuthBlock* cBlock,
                }
        }
 
-       rem_port* port = inet_try_connect(packet, rdb, file_name, node_name, 
dpb, config, ref_db_name);
+       rem_port* port = inet_try_connect(packet, rdb, file_name, node_name, 
dpb, config, ref_db_name, af);
 
        P_ACPT* accept = NULL;
        switch (packet->p_operation)
@@ -708,7 +710,8 @@ rem_port* INET_connect(const TEXT* name,
                                           PACKET* packet,
                                           USHORT flag,
                                           ClumpletReader* dpb,
-                                          RefPtr<Config>* config)
+                                          RefPtr<Config>* config,
+                                          int af)
 {
 /**************************************
  *
@@ -800,7 +803,10 @@ rem_port* INET_connect(const TEXT* name,
 
        struct addrinfo gai_hints;
        memset(&gai_hints, 0, sizeof(gai_hints));
-       gai_hints.ai_family = ((packet || host.hasData() || !ipv6) ? AF_UNSPEC 
: AF_INET6);
+       if (packet)
+               gai_hints.ai_family = af;
+       else
+               gai_hints.ai_family = ((host.hasData() || !ipv6) ? AF_UNSPEC : 
AF_INET6);
        gai_hints.ai_socktype = SOCK_STREAM;
 
 #if !defined(WIN_NT) && !defined(__clang__)
@@ -811,7 +817,7 @@ rem_port* INET_connect(const TEXT* name,
 
        gai_hints.ai_flags =
 #ifndef ANDROID
-               AI_V4MAPPED |
+               ((af == AF_UNSPEC) ? AI_V4MAPPED : 0) |
 #endif
                        AI_ADDRCONFIG | (packet ? 0 : AI_PASSIVE);
 
@@ -825,7 +831,8 @@ rem_port* INET_connect(const TEXT* name,
                retry_gai = false;
                n = getaddrinfo(host_str, protocol.c_str(), &gai_hints, 
&gai_result);
 
-               if ((n == EAI_FAMILY || (!host_str && n == EAI_NONAME)) && 
(gai_hints.ai_family == AF_INET6))
+               if ((n == EAI_FAMILY || (!host_str && n == EAI_NONAME)) &&
+                       (gai_hints.ai_family == AF_INET6) && (af != AF_INET6))
                {
                        // May be on a system without IPv6 support, try IPv4
                        gai_hints.ai_family = AF_UNSPEC;
@@ -2639,7 +2646,8 @@ static rem_port* inet_try_connect(PACKET* packet,
                                                                  const TEXT* 
node_name,
                                                                  
ClumpletReader& dpb,
                                                                  
RefPtr<Config>* config,
-                                                                 const 
PathName* ref_db_name)
+                                                                 const 
PathName* ref_db_name,
+                                                                 int af)
 {
 /**************************************
  *
@@ -2671,7 +2679,7 @@ static rem_port* inet_try_connect(PACKET* packet,
        rem_port* port = NULL;
        try
        {
-               port = INET_connect(node_name, packet, false, &dpb, config);
+               port = INET_connect(node_name, packet, false, &dpb, config, af);
        }
        catch (const Exception&)
        {
diff --git a/src/remote/inet_proto.h b/src/remote/inet_proto.h
index af00e8fa5ddb..6aeebace22bd 100644
--- a/src/remote/inet_proto.h
+++ b/src/remote/inet_proto.h
@@ -34,9 +34,10 @@ namespace Firebird
 }
 
 rem_port*      INET_analyze(ClntAuthBlock*, const Firebird::PathName&, const 
TEXT*,
-                                                bool, 
Firebird::ClumpletReader&, Firebird::RefPtr<Config>*, const 
Firebird::PathName*);
+                                                bool, 
Firebird::ClumpletReader&, Firebird::RefPtr<Config>*,
+                                                const Firebird::PathName*, int 
af = AF_UNSPEC);
 rem_port*      INET_connect(const TEXT*, struct packet*, USHORT, 
Firebird::ClumpletReader*,
-                                                Firebird::RefPtr<Config>*);
+                                                Firebird::RefPtr<Config>*, int 
af = AF_UNSPEC);
 rem_port*      INET_reconnect(SOCKET);
 rem_port*      INET_server(SOCKET);
 void           setStopMainThread(FPTR_INT func);
-- 
2.8.2

++++++ Firebird-2.5.4.26856-0.tar.xz -> Firebird-3.0.0.32483-0.tar.xz ++++++
/work/SRC/openSUSE:Factory/firebird/Firebird-2.5.4.26856-0.tar.xz 
/work/SRC/openSUSE:Factory/.firebird.new/Firebird-3.0.0.32483-0.tar.xz differ: 
char 26, line 1

++++++ Fix-locking-on-big-endian-architectures.patch ++++++
From: James Clarke <jrt...@jrtc27.com>
Date: Sat, 7 May 2016 22:09:09 +0100
Subject: Fix locking on big-endian architectures
Patch-mainline: not tagged yet
Git-commit: 0dc0a4b59548c8abc37f0995f5aec6d5a44dce16
References: CORE-5232

4e4d8002e5fe9968b4d5a493fdb567ed773ccbab extended locks to have 64-bit
keys in most cases, but some were left as 32-bit. However, code using
these 32-bit locks assumed that the significant bytes of the key's long
value started from lck_string[0], which is false on big-endian
architectures.  This commit adds Lock::getKeyString(), which gets a
pointer to the first used byte of lck_string, and should be used in
place of accessing lck_string directly.

---
 src/jrd/GlobalRWLock.cpp |  2 +-
 src/jrd/Relation.cpp     |  2 +-
 src/jrd/btr.cpp          |  4 ++--
 src/jrd/cch.cpp          |  2 +-
 src/jrd/lck.cpp          | 10 +++++-----
 src/jrd/lck.h            | 11 ++++++++++-
 src/jrd/met.epp          |  4 ++--
 7 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/src/jrd/GlobalRWLock.cpp b/src/jrd/GlobalRWLock.cpp
index 97c10cb4ea3c..8258b079516e 100644
--- a/src/jrd/GlobalRWLock.cpp
+++ b/src/jrd/GlobalRWLock.cpp
@@ -78,7 +78,7 @@ GlobalRWLock::GlobalRWLock(thread_db* tdbb, MemoryPool& p, 
lck_t lckType,
 
        cachedLock = FB_NEW_RPT(getPool(), lockLen)
                Lock(tdbb, lockLen, lckType, this, lockCaching ? 
blocking_ast_cached_lock : NULL);
-       memcpy(&cachedLock->lck_key, lockStr, lockLen);
+       memcpy(cachedLock->getKeyString(), lockStr, lockLen);
 }
 
 GlobalRWLock::~GlobalRWLock()
diff --git a/src/jrd/Relation.cpp b/src/jrd/Relation.cpp
index 360faa195a8b..b32c8ba704ef 100644
--- a/src/jrd/Relation.cpp
+++ b/src/jrd/Relation.cpp
@@ -308,7 +308,7 @@ Lock* jrd_rel::createLock(thread_db* tdbb, MemoryPool* 
pool, jrd_rel* relation,
        const USHORT relLockLen = relation->getRelLockKeyLength();
 
        Lock* lock = FB_NEW_RPT(*pool, relLockLen) Lock(tdbb, relLockLen, 
lckType, relation);
-       relation->getRelLockKey(tdbb, &lock->lck_key.lck_string[0]);
+       relation->getRelLockKey(tdbb, lock->getKeyString());
 
        lock->lck_type = lckType;
        switch (lckType)
diff --git a/src/jrd/btr.cpp b/src/jrd/btr.cpp
index a643d2bd67f7..da25a053358b 100644
--- a/src/jrd/btr.cpp
+++ b/src/jrd/btr.cpp
@@ -223,7 +223,7 @@ BtrPageGCLock::~BtrPageGCLock()
 
 void BtrPageGCLock::disablePageGC(thread_db* tdbb, const PageNumber &page)
 {
-       page.getLockStr(lck_key.lck_string);
+       page.getLockStr(getKeyString());
        LCK_lock(tdbb, this, LCK_read, LCK_WAIT);
 }
 
@@ -235,7 +235,7 @@ void BtrPageGCLock::enablePageGC(thread_db* tdbb)
 bool BtrPageGCLock::isPageGCAllowed(thread_db* tdbb, const PageNumber& page)
 {
        BtrPageGCLock lock(tdbb);
-       page.getLockStr(lock.lck_key.lck_string);
+       page.getLockStr(lock.getKeyString());
 
        ThreadStatusGuard temp_status(tdbb);
 
diff --git a/src/jrd/cch.cpp b/src/jrd/cch.cpp
index ea1651c830b6..e241fd83609f 100644
--- a/src/jrd/cch.cpp
+++ b/src/jrd/cch.cpp
@@ -4055,7 +4055,7 @@ static LockState lock_buffer(thread_db* tdbb, BufferDesc* 
bdb, const SSHORT wait
                        fb_assert(lock->lck_ast != NULL);
                }
 
-               bdb->bdb_page.getLockStr(lock->lck_key.lck_string);
+               bdb->bdb_page.getLockStr(lock->getKeyString());
                if (LCK_lock_opt(tdbb, lock, lock_type, wait))
                {
                        if (!lock->lck_ast)
diff --git a/src/jrd/lck.cpp b/src/jrd/lck.cpp
index 8176af9fe3e8..be62b0c53c3d 100644
--- a/src/jrd/lck.cpp
+++ b/src/jrd/lck.cpp
@@ -739,7 +739,7 @@ SINT64 LCK_read_data(thread_db* tdbb, Lock* lock)
 
        const SINT64 data =
                dbb->dbb_lock_mgr->readData2(lock->lck_type,
-                                                                        
lock->lck_key.lck_string, lock->lck_length,
+                                                                        
lock->getKeyString(), lock->lck_length,
                                                                         
lock->lck_owner_handle);
        fb_assert(LCK_CHECK_LOCK(lock));
        return data;
@@ -909,7 +909,7 @@ static void enqueue(thread_db* tdbb, CheckStatusWrapper* 
statusVector, Lock* loc
        fb_assert(LCK_CHECK_LOCK(lock));
 
        lock->lck_id = dbb->dbb_lock_mgr->enqueue(tdbb, statusVector, 
lock->lck_id,
-               lock->lck_type, lock->lck_key.lck_string, lock->lck_length,
+               lock->lck_type, lock->getKeyString(), lock->lck_length,
                level, lock->lck_ast, lock->lck_object, lock->lck_data, wait,
                lock->lck_owner_handle);
 
@@ -1036,7 +1036,7 @@ static Lock* hash_get_lock(Lock* lock, USHORT* hash_slot, 
Lock*** prior)
        if (!att->att_compatibility_table)
                hash_allocate(lock);
 
-       const USHORT hash_value = hash_func((UCHAR*) &lock->lck_key, 
lock->lck_length);
+       const USHORT hash_value = hash_func(lock->getKeyString(), 
lock->lck_length);
 
        if (hash_slot)
                *hash_slot = hash_value;
@@ -1061,7 +1061,7 @@ static Lock* hash_get_lock(Lock* lock, USHORT* hash_slot, 
Lock*** prior)
                {
                        // check that the keys are the same
 
-                       if (!memcmp(lock->lck_key.lck_string, 
collision->lck_key.lck_string, lock->lck_length))
+                       if (!memcmp(lock->getKeyString(), 
collision->getKeyString(), lock->lck_length))
                                return collision;
                }
 
@@ -1426,7 +1426,7 @@ static bool internal_enqueue(thread_db* tdbb, 
CheckStatusWrapper* statusVector,
        // with the local ast handler, passing it the lock block itself
 
        lock->lck_id = dbb->dbb_lock_mgr->enqueue(tdbb, statusVector, 
lock->lck_id,
-               lock->lck_type, (const UCHAR*) &lock->lck_key, lock->lck_length,
+               lock->lck_type, lock->getKeyString(), lock->lck_length,
                level, external_ast, lock, lock->lck_data, wait, 
lock->lck_owner_handle);
 
        // If the lock exchange failed, set the lock levels appropriately
diff --git a/src/jrd/lck.h b/src/jrd/lck.h
index 71596f9b10e9..6dcb1be67fdc 100644
--- a/src/jrd/lck.h
+++ b/src/jrd/lck.h
@@ -134,10 +134,19 @@ public:
 
        union
        {
-               UCHAR lck_string[1];
+               UCHAR lck_string[8];
                SINT64 lck_long;
        } lck_key;                                              // Lock key 
string
 
+       UCHAR* getKeyString()
+       {
+#ifdef WORDS_BIGENDIAN
+               if (lck_length <= 8)
+                       return &lck_key.lck_string[8-lck_length];
+#endif
+               return &lck_key.lck_string[0];
+       }
+
        UCHAR lck_tail[1];                              // Makes the allocator 
happy
 };
 
diff --git a/src/jrd/met.epp b/src/jrd/met.epp
index 61210258d46e..1bd4ba46dc4f 100644
--- a/src/jrd/met.epp
+++ b/src/jrd/met.epp
@@ -1390,7 +1390,7 @@ void MET_dsql_cache_release(thread_db* tdbb, int type, 
const MetaName& name, con
        const USHORT key_length = item->lock->lck_length;
        AutoPtr<Lock> temp_lock(FB_NEW_RPT(*tdbb->getDefaultPool(), key_length)
                Lock(tdbb, key_length, LCK_dsql_cache));
-       memcpy(temp_lock->lck_key.lck_string, item->lock->lck_key.lck_string, 
key_length);
+       memcpy(temp_lock->getKeyString(), item->lock->getKeyString(), 
key_length);
 
        if (LCK_lock(tdbb, temp_lock, LCK_EX, LCK_WAIT))
                LCK_release(tdbb, temp_lock);
@@ -4134,7 +4134,7 @@ static DSqlCacheItem* get_dsql_cache_item(thread_db* 
tdbb, int type, const Quali
                item->locked = false;
                item->lock = FB_NEW_RPT(*attachment->att_pool, key.length())
                        Lock(tdbb, key.length(), LCK_dsql_cache, item, 
blocking_ast_dsql_cache);
-               memcpy(item->lock->lck_key.lck_string, key.c_str(), 
key.length());
+               memcpy(item->lock->getKeyString(), key.c_str(), key.length());
        }
        else
        {
-- 
2.8.2

++++++ Make-the-generated-code-compatible-with-gcc-6-in-C-1.patch ++++++
From: asfernandes <asfernan...@users.sourceforge.net>
Date: Sat, 5 Mar 2016 03:39:36 +0000
Subject: Make the generated code compatible with gcc 6 in C++-14 mode.
 (cherry picked from commit 3618aa2171674babf79ef935aa049c40a3db1321)
Patch-mainline: 
Git-commit: 3618aa2171674babf79ef935aa049c40a3db1321
References: bsc#964466 CORE-5099

---
 src/gpre/c_cxx.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gpre/c_cxx.cpp b/src/gpre/c_cxx.cpp
index df175dca9465..bafce8f282bf 100644
--- a/src/gpre/c_cxx.cpp
+++ b/src/gpre/c_cxx.cpp
@@ -2820,7 +2820,7 @@ static void gen_request(const gpre_req* request)
                printa(0, "static %sshort\n   isc_%dl = %d;",
                           (request->req_flags & REQ_extend_dpb) ? "" : 
CONST_STR,
                           request->req_ident, request->req_length);
-               printa(0, "static %schar\n   isc_%d [] = {", CONST_STR, 
request->req_ident);
+               printa(0, "static %sunsigned char\n   isc_%d [] = {", 
CONST_STR, request->req_ident);
 
                const TEXT* string_type = "blr";
                if (gpreGlob.sw_raw)
-- 
2.8.2

++++++ Provide-sized-global-delete-operators-when-compiled-.patch ++++++
From: Michal Kubecek <mkube...@suse.cz>
Date: Mon, 25 Apr 2016 08:55:36 +0200
Subject: Provide sized global delete operators when compiled in C++14 mode
Patch-mainline: submitted
Git-commit: 038f9fbf559e56032e4cb49eb7ce4c3ead23fda9
References: bsc#964466 CORE-5099

---
 src/common/classes/alloc.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/common/classes/alloc.h b/src/common/classes/alloc.h
index b1026ce2aac4..fda5bfebb0cc 100644
--- a/src/common/classes/alloc.h
+++ b/src/common/classes/alloc.h
@@ -331,6 +331,16 @@ inline void operator delete[](void* mem, 
Firebird::MemoryPool& pool ALLOC_PARAMS
        MemoryPool::globalFree(mem);
 }
 
+#if __cplusplus >= 201402L
+inline void operator delete(void* mem, std::size_t s ALLOC_PARAMS) throw()
+{
+       MemoryPool::globalFree(mem);
+}
+inline void operator delete[](void* mem, std::size_t s ALLOC_PARAMS) throw()
+{
+       MemoryPool::globalFree(mem);
+}
+#endif
 #ifdef DEBUG_GDS_ALLOC
 
 #ifdef __clang__
-- 
2.8.2

++++++ README.SUSE ++++++
--- /var/tmp/diff_new_pack.Xr067i/_old  2016-07-14 10:48:50.000000000 +0200
+++ /var/tmp/diff_new_pack.Xr067i/_new  2016-07-14 10:48:50.000000000 +0200
@@ -1,31 +1,79 @@
-1. Packaging
+This file focuses on topics specific to openSUSE / SLE packages. For
+generic Firebird introduction, read Firebird 3 Quickstart and Release
+Notes documents (both provided in firebird-doc package).
 
-Package firebird contains only common files shared by all architectures.
-For server functionality, one of the following subpackages is needed:
 
-  firebird-superserver - SuperServer architecture
-  firebird-classic     - Classic and SuperClassic architecture
+1. Upgrade from version 2.5
+---------------------------
 
-Client libraries are contained in two packages:
+Firebird 3 brings some incompatible changes which make fully automated
+upgrade of existing 2.5 setups impossible.
 
-  libfbclient2  - standard client for shared database
-  libfbembed2_5 - embedded server
+First, new database file format (On-disk structure, ODS) is used. To
+migrate existing databases, backup them with gbak before the upgrade and
+restore after the upgrade.
 
-There are three devel packages:
+Second, new authentication scheme is used by default so that old
+security databases (with users and passwords) cannot be migrated. You
+can either create a new security database from scratch as described in
 
-  libfbclient2-devel - devel files for libfbclient2
-  libfbembed-devel   - devel files for libfbembed2_5
-  firebird-devel     - common headers and development examples
+  
http://www.firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-compat-initsec.html
+
+or migrate the old one (without passwords) as described in
+
+  
http://www.firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-compat-upgrade-secdb.html
+
+Both sections are also available in firebird-doc package in file
+
+  /usr/share/doc/packages/firebird/ReleaseNotes.pdf
+
+Chapter 12 "Compatibility Issues" of release notes also lists other
+possible incompatibilities and is worth reading for anyone upgrading
+from Firebird 2.5 to 3.0 for the first time.
+
+
+2. Packaging
+------------
+
+Package firebird contains only common files needed both for client and
+server installations. The rest is divided into subpackages:
+
+  firebird-server     - server functionality
+  libfbclient2        - client library (both remote and embedded)
+  libib_util          - utility functions for UDF
+  firebird-utils      - management utilities
+  firebird-doc        - documentation
+  libfbclient-devel   - devel files for libfbclient2
+  libib_util-devel    - devel files for libib_util
+  firebird-examples   - example database and API examples
 
 Two of Firebird utilities - isql and gstat - have names colliding with
 tools from other packages. They have been renamed to isql-fb and
 gstat-fb respectively.
 
+Unlike in pre-3.0 versions, Firebird 3 provides one executable which can
+handle all three threading modes (Classic, SuperClassic and SuperServer)
+depending on ServerMode directive in firebird.conf. The client library
+libfbclient2 can now be used both to connect to remote servers and to
+access local database files in embedded mode. 
+
+By default, the server listens on TCP port 3050 to both IPv4 and IPv6
+connections. This can be configured using RemoteBindAddress,
+RemoteServicePort and IPv6V6Only directives.
+
+
+3. Configuration
+----------------
 
-2. Configuration
+Unlike in Firebird 2.5, no default sysdba password is set by default.
+Before using Firebird 3.0, one needs to initialize the security database
+as described in
 
-Default sysdba password is "masterkey" as usual. Location of Firebird
-security database is /var/lib/firebird/secdb/security2.fdb
+  
http://www.firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-compat-initsec.html
+
+(or section "Initializing the Security Database" of release notes
+provided in /usr/share/doc/packages/firebird/ReleaseNotes.pdf (package
+firebird-doc).
 
 Config files are in /etc/firebird. Default config files are mostly the
 same as upstream defaults, the only difference is default value of
@@ -35,9 +83,13 @@
 directive or define an alias for it in aliases.conf.
 
 
-3. Starting the server
+4. Starting the server
+----------------------
+
+Set the ServerMode directive in firebird.conf to your preferred
+operating mode. Then start the server:
 
-- SuperServer:
+- SuperServer or SuperClassic:
 
   * once: /etc/init.d/firebird start
   * always: insserv firebird
@@ -45,9 +97,5 @@
 - Classic:
 
   * in /etc/xinetd.d/firebird, change value of "disable" to "yes"
-  * check that xinetd is running and reload its configuration
-
-- SuperClassic:
-
-  The same as for SuperServer (with firebird-classic package installed)
+  * check if xinetd is running and reload its configuration or start it
 

++++++ add-pkgconfig-files.patch ++++++
--- /var/tmp/diff_new_pack.Xr067i/_old  2016-07-14 10:48:50.000000000 +0200
+++ /var/tmp/diff_new_pack.Xr067i/_new  2016-07-14 10:48:50.000000000 +0200
@@ -1,36 +1,18 @@
 From: Michal Kubecek <mkube...@suse.cz>
-Date: Sun, 3 Jun 2012 15:29:08 +0200
+Date: Tue, 12 Jun 2012 14:32:44 +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
+ builds/install/arch-specific/linux/misc/fbclient.pc.in | 10 ++++++++++
+ configure.ac                                           |  1 +
+ 2 files changed, 11 insertions(+)
+ create mode 100644 builds/install/arch-specific/linux/misc/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
+diff --git a/builds/install/arch-specific/linux/misc/fbclient.pc.in 
b/builds/install/arch-specific/linux/misc/fbclient.pc.in
 new file mode 100644
-index 0000000..1a7ee2c
+index 000000000000..d49fdc5821c5
 --- /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
++++ b/builds/install/arch-specific/linux/misc/fbclient.pc.in
 @@ -0,0 +1,10 @@
 +prefix=@prefix@
 +exec_prefix=@exec_prefix@
@@ -40,25 +22,20 @@
 +Name: fbclient
 +Description: Firebird client library
 +Version: @FIREBIRD_VERSION@
-+Cflags: -I${includedir}
++Cflags: -I${includedir}/firebird
 +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)
+diff --git a/configure.ac b/configure.ac
+index 3e65f10d2a34..c7abfa06d468 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1215,6 +1215,7 @@ case "$PLATFORM" in
+         
gen/install/misc/firebird.init.d.gentoo:builds/install/arch-specific/linux/firebird.init.d.gentoo.in
+         
gen/install/misc/firebird.init.d.slackware:builds/install/arch-specific/linux/firebird.init.d.slackware.in
+         
gen/install/misc/rc.config.firebird:builds/install/arch-specific/linux/rc.config.firebird.in
++        
gen/install/misc/fbclient.pc:builds/install/arch-specific/linux/misc/fbclient.pc.in
+         
gen/Release/firebird/bin/linuxLibrary.sh:builds/install/arch-specific/linux/linuxLibrary.sh.in
+         
gen/install/misc/firebird-classic@.service:builds/install/arch-specific/linux/firebird-classic.service.in
+         
gen/install/misc/firebird-classic.socket:builds/install/arch-specific/linux/firebird-classic.socket.in
 -- 
-1.8.4.5
+2.8.1
 

++++++ allow-creating-buildRoot-as-non-root-user.patch ++++++
--- /var/tmp/diff_new_pack.Xr067i/_old  2016-07-14 10:48:50.000000000 +0200
+++ /var/tmp/diff_new_pack.Xr067i/_new  2016-07-14 10:48:50.000000000 +0200
@@ -1,37 +1,29 @@
 From: Michal Kubecek <mkube...@suse.cz>
-Date: Sun, 3 Jun 2012 15:15:28 +0200
+Date: Tue, 12 Jun 2012 14:05:11 +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(-)
+ builds/install/arch-specific/linux/makeInstallImage.sh.in | 5 -----
+ 1 file changed, 5 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 
+diff --git a/builds/install/arch-specific/linux/makeInstallImage.sh.in 
b/builds/install/arch-specific/linux/makeInstallImage.sh.in
+index b437fc01f6d2..1a7f2bc98442 100644
+--- a/builds/install/arch-specific/linux/makeInstallImage.sh.in
++++ b/builds/install/arch-specific/linux/makeInstallImage.sh.in
+@@ -28,11 +28,6 @@
+ # 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=..
+ BuiltFBDir=Release/firebird  # Where the just build fb exists.
 -- 
-1.8.4.5
+2.8.1
 

++++++ baselibs.conf ++++++
--- /var/tmp/diff_new_pack.Xr067i/_old  2016-07-14 10:48:50.000000000 +0200
+++ /var/tmp/diff_new_pack.Xr067i/_new  2016-07-14 10:48:50.000000000 +0200
@@ -1,6 +1,4 @@
-firebird
+libib_util
     +/usr/lib(64)?/libib_util.so
 libfbclient2
     +/usr/lib(64)?/libfbclient.*
-libfbembed2_5
-    +/usr/lib(64)?/libfbembed.*

++++++ disable-xinetd-service-by-default.patch ++++++
--- /var/tmp/diff_new_pack.Xr067i/_old  2016-07-14 10:48:50.000000000 +0200
+++ /var/tmp/diff_new_pack.Xr067i/_new  2016-07-14 10:48:50.000000000 +0200
@@ -1,17 +1,17 @@
 From: Michal Kubecek <mkube...@suse.cz>
-Date: Sun, 3 Jun 2012 15:24:13 +0200
+Date: Tue, 12 Jun 2012 14:09:14 +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 +++--
+ builds/install/arch-specific/linux/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
+diff --git a/builds/install/arch-specific/linux/firebird.xinetd.in 
b/builds/install/arch-specific/linux/firebird.xinetd.in
+index 3f3c46819cb0..aca87f8fc19f 100644
+--- a/builds/install/arch-specific/linux/firebird.xinetd.in
++++ b/builds/install/arch-specific/linux/firebird.xinetd.in
 @@ -7,11 +7,12 @@
  
  service @FB_SERVICE_NAME@
@@ -28,5 +28,5 @@
  # using default firewall configuration (SF#1065511)
  #     log_on_success  += USERID
 -- 
-1.8.4.5
+2.8.1
 

++++++ fbguard-allow-creating-a-guard-pidfile.patch ++++++
--- /var/tmp/diff_new_pack.Xr067i/_old  2016-07-14 10:48:50.000000000 +0200
+++ /var/tmp/diff_new_pack.Xr067i/_new  2016-07-14 10:48:50.000000000 +0200
@@ -1,18 +1,18 @@
 From: Michal Kubecek <mkube...@suse.cz>
-Date: Sun, 3 Jun 2012 15:18:30 +0200
+Date: Tue, 8 May 2012 21:13:41 +0200
 Subject: fbguard: allow creating a guard pidfile
 
-To cooperate with killproc better, add option -gpidfile to create
+To better cooperate with killproc, 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
+index 2727bdf25756..60f9b090241a 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)
+@@ -91,6 +91,7 @@ int CLIB_ROUTINE main( int argc, char **argv)
        bool daemon = false;
        const TEXT* prog_name = argv[0];
        const TEXT* pidfilename = 0;
@@ -20,7 +20,7 @@
        int guard_exit_code = 0;
  
        const TEXT* const* const end = argc + argv;
-@@ -122,9 +123,13 @@ int CLIB_ROUTINE main( int argc, char **argv)
+@@ -116,9 +117,13 @@ int CLIB_ROUTINE main( int argc, char **argv)
                        case 'P':
                                pidfilename = *argv++;
                                break;
@@ -35,7 +35,7 @@
                                                prog_name);
                                exit(-1);
                                break;
-@@ -232,6 +237,22 @@ int CLIB_ROUTINE main( int argc, char **argv)
+@@ -213,6 +218,22 @@ int CLIB_ROUTINE main( int argc, char **argv)
                        }
                }
  
@@ -58,7 +58,7 @@
                // 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)
+@@ -283,6 +304,9 @@ int CLIB_ROUTINE main( int argc, char **argv)
        if (pidfilename) {
                remove(pidfilename);
        }
@@ -69,5 +69,5 @@
        exit(guard_exit_code);
  } // main
 -- 
-1.8.4.5
+2.8.1
 

++++++ unicode-handle-the-ICU-version-hack-from-SuSE.patch ++++++
From: Michal Kubecek <mkube...@suse.cz>
Date: Mon, 1 Sep 2014 11:49:49 +0200
Subject: unicode: handle the ICU version hack from SuSE

OpenSuSE >= 13.1 adds minor version into ICU soname to cope with
repeated upstream ABI breakages. We therefore need to make
unicode_util functions adapt to this.
---
 src/common/unicode_util.cpp | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/src/common/unicode_util.cpp b/src/common/unicode_util.cpp
index e72ee291973d..b232252b91a3 100644
--- a/src/common/unicode_util.cpp
+++ b/src/common/unicode_util.cpp
@@ -52,6 +52,8 @@
 
 // The next major ICU version after 4.8 is 49.
 #define ICU_NEW_VERSION_MEANING        49
+// openSUSE >= 13.1 adds minor version to soname
+#define ICU_VERSION_SUSE_HACK 51
 
 
 using namespace Firebird;
@@ -347,7 +349,9 @@ static void formatFilename(PathName& filename, const char* 
templateName,
        int majorVersion, int minorVersion)
 {
        string s;
-       if (majorVersion >= ICU_NEW_VERSION_MEANING)
+       if (majorVersion >= ICU_VERSION_SUSE_HACK)
+               s.printf("%d_%d", majorVersion, minorVersion);
+       else if (majorVersion >= ICU_NEW_VERSION_MEANING)
                s.printf("%d", majorVersion);
        else
                s.printf("%d%d", majorVersion, minorVersion);
@@ -970,13 +974,20 @@ UnicodeUtil::ICU* UnicodeUtil::loadICU(const string& 
icuVersion, const string& c
                        &majorVersion, &minorVersion);
 
                if (n == 1)
-                       minorVersion = 0;
+               {
+                       n = sscanf((*i == "default" ? version : *i).c_str(), 
"%d_%d",
+                       &majorVersion, &minorVersion);
+                       if (n == 1)
+                               minorVersion = 0;
+               }
                else if (n != 2)
                        continue;
 
                string configVersion;
 
-               if (majorVersion >= ICU_NEW_VERSION_MEANING)
+               if (majorVersion >= ICU_VERSION_SUSE_HACK)
+                       configVersion.printf("%d_%d", majorVersion, 
minorVersion);
+               else if (majorVersion >= ICU_NEW_VERSION_MEANING)
                {
                        minorVersion = 0;
                        configVersion.printf("%d", majorVersion);
@@ -1138,7 +1149,7 @@ UnicodeUtil::ConversionICU& 
UnicodeUtil::getConversionICU()
        LocalStatus ls;
        CheckStatusWrapper lastError(&ls);
        string version;
-       const int majorArray[] = {5, 4, 3, 6, 0};
+       const int majorArray[] = {5, 51, 52, 53, 54, 55, 56, 57, 58, 59, 4, 3, 
6, 0};
 
        for (const int* major = majorArray; *major; ++major)
        {
@@ -1180,7 +1191,9 @@ string UnicodeUtil::getDefaultIcuVersion()
        string rc;
        UnicodeUtil::ConversionICU& icu(UnicodeUtil::getConversionICU());
 
-       if (icu.vMajor >= ICU_NEW_VERSION_MEANING)
+       if (icu.vMajor >= ICU_VERSION_SUSE_HACK)
+               rc.printf("%d_%d", icu.vMajor, icu.vMinor);
+       else if (icu.vMajor >= ICU_NEW_VERSION_MEANING)
                rc.printf("%d", icu.vMajor);
        else
                rc.printf("%d.%d", icu.vMajor, icu.vMinor);
-- 
2.8.1

++++++ use-killproc-in-stop-branch-of-SuSE-init-script.patch ++++++
--- /var/tmp/diff_new_pack.Xr067i/_old  2016-07-14 10:48:50.000000000 +0200
+++ /var/tmp/diff_new_pack.Xr067i/_new  2016-07-14 10:48:50.000000000 +0200
@@ -1,17 +1,17 @@
 From: Michal Kubecek <mkube...@suse.cz>
-Date: Sun, 3 Jun 2012 15:21:44 +0200
+Date: Tue, 12 Jun 2012 14:07:38 +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 ++++++++-----------
+ .../arch-specific/linux/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
+diff --git a/builds/install/arch-specific/linux/firebird.init.d.suse.in 
b/builds/install/arch-specific/linux/firebird.init.d.suse.in
+index 5f3e33cd26b8..b5787ebdde09 100644
+--- a/builds/install/arch-specific/linux/firebird.init.d.suse.in
++++ b/builds/install/arch-specific/linux/firebird.init.d.suse.in
 @@ -43,6 +43,7 @@ test "$START_FIREBIRD" = yes || exit 0
  
  FIREBIRD=@FB_CONFDIR@
@@ -45,7 +45,7 @@
        # already running to match LSB spec.
 -      startproc -u $FBRunUser $FBSBIN/fbguard -pidfile $pidfile -forever
 +      startproc -u $FBRunUser $FBSBIN/fbguard -forever \
-+              -pidfile $pidfile -gpidfile $gpidfile
++              -pidfile "$pidfile" -gpidfile "$gpidfile"
  
        # Remember status and be verbose
        rc_status -v
@@ -60,10 +60,10 @@
 -              sleep 1
 -      fi
 -              
-+      killproc -p $gpidfile ${FBSBIN}/fbguard
++      killproc -p "$gpidfile" ${FBSBIN}/fbguard
  
        # Remember status and be verbose
        rc_status -v
 -- 
-1.8.4.5
+2.8.1
 

++++++ work-around-g-problem-in-SLE11.patch ++++++
From: Michal Kubecek <mkube...@suse.cz>
Date: Wed, 11 Nov 2015 09:17:32 +0100
Subject: work around g++ problem in SLE11

SLE11 version of g++ requires full template parameters when referencing
a base class constructor. As Firebird 3 code uses only class name in
several places, patch it to add full base class specification if built
on SLE11 (or anything older than OpenSuSE 11.4).

Another problem is the MAX_TRA_NUMBER constant: old g++ requires it to
be explicitely marked with LL suffix if it exceeds the range of long int.
---
 src/common/StatusHolder.h        |  4 ++--
 src/common/classes/alloc.cpp     |  6 +++---
 src/include/firebird/Interface.h |  4 ++--
 src/jrd/constants.h              |  2 +-
 src/jrd/trace/TraceObjects.h     |  4 ++--
 src/yvalve/YObjects.h            |  2 +-
 src/yvalve/why.cpp               | 18 +++++++++---------
 7 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/src/common/StatusHolder.h b/src/common/StatusHolder.h
index e2d444f5192f..398076640779 100644
--- a/src/common/StatusHolder.h
+++ b/src/common/StatusHolder.h
@@ -141,7 +141,7 @@ class DynamicStatusVector : public 
DynamicVector<ISC_STATUS_LENGTH>
 {
 public:
        DynamicStatusVector()
-               : DynamicVector(*getDefaultMemoryPool())
+               : DynamicVector<ISC_STATUS_LENGTH>(*getDefaultMemoryPool())
        { }
 
        ISC_STATUS load(const IStatus* status);
@@ -254,7 +254,7 @@ class StatusHolder : public BaseStatus<StatusHolder>
 {
 public:
        StatusHolder()
-               : BaseStatus(*getDefaultMemoryPool()), m_raised(false)
+               : BaseStatus<StatusHolder>(*getDefaultMemoryPool()), 
m_raised(false)
        { }
 
        ISC_STATUS save(IStatus* status);
diff --git a/src/common/classes/alloc.cpp b/src/common/classes/alloc.cpp
index accd5d07487a..264eb66f8157 100644
--- a/src/common/classes/alloc.cpp
+++ b/src/common/classes/alloc.cpp
@@ -405,7 +405,7 @@ public:
        {
                MemBlock* rc = new(memory) MemBlock(size);
 
-               MemBaseHunk::newBlock(size);
+               MemBaseHunk<MemSmallHunk>::newBlock(size);
 
                return rc;
        }
@@ -441,7 +441,7 @@ private:
 
 public:
        MemMediumHunk(MemMediumHunk** top, size_t spaceAllocated)
-               : MemBaseHunk(spaceAllocated, hdrSize()),
+               : MemBaseHunk<MemMediumHunk>(spaceAllocated, hdrSize()),
                  prev(NULL),
                  useCount(0)
        {
@@ -468,7 +468,7 @@ public:
        {
                MemBlock* rc = new(memory) MemBlock(size, this);
 
-               MemBaseHunk::newBlock(size);
+               MemBaseHunk<MemMediumHunk>::newBlock(size);
                incrUsage();
 
                return rc;
diff --git a/src/include/firebird/Interface.h b/src/include/firebird/Interface.h
index 29eb8ba1e862..70e6f4e35fbf 100644
--- a/src/include/firebird/Interface.h
+++ b/src/include/firebird/Interface.h
@@ -240,7 +240,7 @@ namespace Firebird
        {
        public:
                CheckStatusWrapper(IStatus* aStatus)
-                       : BaseStatusWrapper(aStatus)
+                       : BaseStatusWrapper<CheckStatusWrapper>(aStatus)
                {
                }
 
@@ -254,7 +254,7 @@ namespace Firebird
        {
        public:
                ThrowStatusWrapper(IStatus* aStatus)
-                       : BaseStatusWrapper(aStatus)
+                       : BaseStatusWrapper<ThrowStatusWrapper>(aStatus)
                {
                }
 
diff --git a/src/jrd/constants.h b/src/jrd/constants.h
index 2f8c9ebe57c7..830e2dedb902 100644
--- a/src/jrd/constants.h
+++ b/src/jrd/constants.h
@@ -442,7 +442,7 @@ const int DDL_TRIGGER_DROP_MAPPING                          
= 47;
 #define PASSWORD_SWITCH "PASSWORD"
 
 // The highest transaction number possible
-const TraNumber MAX_TRA_NUMBER = 0x0000FFFFFFFFFFFF;   // ~2.8 * 10^14
+const TraNumber MAX_TRA_NUMBER = 0x0000FFFFFFFFFFFFLL; // ~2.8 * 10^14
 
 // Number of streams, conjuncts, indices that will be statically allocated
 // in various arrays. Larger numbers will have to be allocated dynamically
diff --git a/src/jrd/trace/TraceObjects.h b/src/jrd/trace/TraceObjects.h
index 5bfce6c3b7c5..bf6f42ba9dc9 100644
--- a/src/jrd/trace/TraceObjects.h
+++ b/src/jrd/trace/TraceObjects.h
@@ -143,7 +143,7 @@ class TraceBLRStatementImpl : public 
BLRPrinter<TraceBLRStatementImpl>
 {
 public:
        TraceBLRStatementImpl(const jrd_req* stmt, PerformanceInfo* perf) :
-               BLRPrinter(stmt->getStatement()->blr.begin(), 
stmt->getStatement()->blr.getCount()),
+               
BLRPrinter<TraceBLRStatementImpl>(stmt->getStatement()->blr.begin(), 
stmt->getStatement()->blr.getCount()),
                m_stmt(stmt),
                m_perf(perf)
        {}
@@ -161,7 +161,7 @@ class TraceFailedBLRStatement : public 
BLRPrinter<TraceFailedBLRStatement>
 {
 public:
        TraceFailedBLRStatement(const unsigned char* blr, unsigned length) :
-               BLRPrinter(blr, length)
+               BLRPrinter<TraceFailedBLRStatement>(blr, length)
        {}
 
        ISC_INT64 getStmtID()           { return 0; }
diff --git a/src/yvalve/YObjects.h b/src/yvalve/YObjects.h
index 78b568eef3a3..529d75dc9586 100644
--- a/src/yvalve/YObjects.h
+++ b/src/yvalve/YObjects.h
@@ -253,7 +253,7 @@ public:
 
 private:
        YTransaction(YTransaction* from)
-               : YHelper(from->next),
+               : YHelper<YTransaction, 
Firebird::ITransactionImpl<YTransaction, Firebird::CheckStatusWrapper> 
>(from->next),
                  attachment(from->attachment),
                  childBlobs(getPool()),
                  childCursors(getPool()),
diff --git a/src/yvalve/why.cpp b/src/yvalve/why.cpp
index ec596c447bd4..935bf050bafc 100644
--- a/src/yvalve/why.cpp
+++ b/src/yvalve/why.cpp
@@ -3848,7 +3848,7 @@ YHelper<Impl, Intf>::YHelper(NextInterface* aNext)
 
 
 YEvents::YEvents(YAttachment* aAttachment, IEvents* aNext, IEventCallback* 
aCallback)
-       : YHelper(aNext)
+       : YHelper<YEvents, Firebird::IEventsImpl<YEvents, 
Firebird::CheckStatusWrapper> >(aNext)
 {
        attachment = aAttachment;
        callback = aCallback;
@@ -3904,7 +3904,7 @@ void YEvents::cancel(CheckStatusWrapper* status)
 
 
 YRequest::YRequest(YAttachment* aAttachment, IRequest* aNext)
-       : YHelper(aNext),
+       : YHelper<YRequest, Firebird::IRequestImpl<YRequest, 
Firebird::CheckStatusWrapper> >(aNext),
          attachment(aAttachment),
          userHandle(NULL)
 {
@@ -4043,7 +4043,7 @@ void YRequest::free(CheckStatusWrapper* status)
 
 
 YBlob::YBlob(YAttachment* aAttachment, YTransaction* aTransaction, IBlob* 
aNext)
-       : YHelper(aNext),
+       : YHelper<YBlob, Firebird::IBlobImpl<YBlob, 
Firebird::CheckStatusWrapper> >(aNext),
          attachment(aAttachment),
          transaction(aTransaction)
 {
@@ -4165,7 +4165,7 @@ int YBlob::seek(CheckStatusWrapper* status, int mode, int 
offset)
 
 
 YStatement::YStatement(YAttachment* aAttachment, IStatement* aNext)
-       : YHelper(aNext),
+       : YHelper<YStatement, Firebird::IStatementImpl<YStatement, 
Firebird::CheckStatusWrapper> >(aNext),
          attachment(aAttachment), cursor(NULL), input(true), output(false)
 {
        attachment->childStatements.add(this);
@@ -4431,7 +4431,7 @@ void YStatement::free(CheckStatusWrapper* status)
 
 
 YResultSet::YResultSet(YAttachment* anAttachment, YTransaction* aTransaction, 
IResultSet* aNext)
-       : YHelper(aNext),
+       : YHelper<YResultSet, Firebird::IResultSetImpl<YResultSet, 
Firebird::CheckStatusWrapper> >(aNext),
          attachment(anAttachment),
          transaction(aTransaction),
          statement(NULL)
@@ -4442,7 +4442,7 @@ YResultSet::YResultSet(YAttachment* anAttachment, 
YTransaction* aTransaction, IR
 
 YResultSet::YResultSet(YAttachment* anAttachment, YTransaction* aTransaction,
                        YStatement* aStatement, IResultSet* aNext)
-       : YHelper(aNext),
+       : YHelper<YResultSet, Firebird::IResultSetImpl<YResultSet, 
Firebird::CheckStatusWrapper> >(aNext),
          attachment(anAttachment),
          transaction(aTransaction),
          statement(aStatement)
@@ -4667,7 +4667,7 @@ void YResultSet::close(CheckStatusWrapper* status)
 
 
 YTransaction::YTransaction(YAttachment* aAttachment, ITransaction* aNext)
-       : YHelper(aNext),
+       : YHelper<YTransaction, Firebird::ITransactionImpl<YTransaction, 
Firebird::CheckStatusWrapper> >(aNext),
          attachment(aAttachment),
          childBlobs(getPool()),
          childCursors(getPool()),
@@ -4924,7 +4924,7 @@ YTransaction* YTransaction::enterDtc(CheckStatusWrapper* 
status)
 
 
 YAttachment::YAttachment(IProvider* aProvider, IAttachment* aNext, const 
PathName& aDbPath)
-       : YHelper(aNext),
+       : YHelper<YAttachment, Firebird::IAttachmentImpl<YAttachment, 
Firebird::CheckStatusWrapper> >(aNext),
          provider(aProvider),
          dbPath(getPool(), aDbPath),
          childBlobs(getPool()),
@@ -5497,7 +5497,7 @@ void YAttachment::getNextTransaction(CheckStatusWrapper* 
status, ITransaction* t
 
 
 YService::YService(IProvider* aProvider, IService* aNext, bool utf8)
-       : YHelper(aNext),
+       : YHelper<YService, Firebird::IServiceImpl<YService, 
Firebird::CheckStatusWrapper> >(aNext),
          provider(aProvider),
          utf8Connection(utf8)
 {
-- 
2.8.1


Reply via email to