%define db4_versions 4.3.29 4.5.20 4.6.21 %define _libdb_a libdb-${soversion}.a %define _libcxx_a libdb_cxx-${soversion}.a Summary: The Berkeley DB database library for Red Hat Linux 7.x compatibility Name: compat-db Version: 4.6.21 Release: 1%{?dist} Source0: http://download.oracle.com/berkeley-db/db-4.3.29.tar.gz Source1: http://download.oracle.com/berkeley-db/db-4.5.20.tar.gz Source2: http://download.oracle.com/berkeley-db/db-4.6.21.tar.gz Patch2: db-4.3.29-64bit.patch Patch3: db-4.3.29-sparc64.patch Patch4: db-4.5.20-glibc.patch # Upstream db-4.3.29 patches Patch20: http://www.oracle.com/technology/products/berkeley-db/db/update/4.2.52/patch.4.3.29.1 # Upstream db-4.5.20 patches Patch30: http://www.oracle.com/technology/products/berkeley-db/db/update/4.5.20/patch.4.5.20.1 Patch31: http://www.oracle.com/technology/products/berkeley-db/db/update/4.5.20/patch.4.5.20.2 # Upstream db-4.6.21 patches Patch40: http://www.oracle.com/technology/products/berkeley-db/db/update/4.6.21/patch.4.6.21.1 Patch41: http://www.oracle.com/technology/products/berkeley-db/db/update/4.6.21/patch.4.6.21.2 Obsoletes: db1, db1-devel Obsoletes: db2, db2-devel, db2-utils Obsoletes: db3, db3-devel, db3-utils Obsoletes: db31, db32, db3x Obsoletes: db4 < 4.6, db4-devel < 4.6, db4-utils < 4.6, db4-tcl < 4.6, db4-java < 4.6 URL: http://www.oracle.com/database/berkeley-db/ License: BSD Group: System Environment/Libraries BuildRequires: findutils, libtool, perl, sed, ed BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides embedded database support for both traditional and client/server applications. This package contains various versions of Berkeley DB which were included in previous releases of Red Hat Linux. %prep %setup -q -c -a 1 -a 2 pushd db-4.3.29 %patch2 -p1 -b .64bit %patch3 -p1 -b .sparc64 %patch20 -p0 popd pushd db-4.5.20 %patch30 -p0 %patch31 -p0 %patch3 -p1 -b .sparc64 popd pushd db-4.6.21 %patch40 -p0 %patch41 -p0 %patch3 -p1 -b .sparc64 popd %patch4 -p1 -b .glibc mkdir docs for version in %{db4_versions} ; do mkdir docs/db-${version} install -m644 db*${version}/{README,LICENSE} docs/db-${version} done %build # Set CFLAGS for use when building db2, where there's no configure script to # pick it up from a %%configure macro. CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS # Cause C++ libraries to be linked with libstdc++. LIBXSO_LIBS=-lstdc++; export LIBXSO_LIBS for version in %{db4_versions} ; do pushd db-${version}/dist # Link 4.1.25 and 4.2.52 against -lpthread unset LIBSO_LIBS [ "$version" != "4.0.14" ] && export LIBSO_LIBS=-lpthread # XXX --enable-posixmutexes is useful for threads but useless for interprocess locking. # XXX --enable-diagnostic should be disabled for production (but is useful). # XXX --enable-debug_{r,w}op should be disabled for production. # XXX --enable-java libtoolize --copy --force cp -f %{_datadir}/aclocal/libtool.m4 aclocal/libtool.ac ./s_config mkdir build_unix cd build_unix ln -s ../configure %configure --prefix=%{_prefix} \ --enable-compat185 \ --enable-shared --disable-static \ --enable-rpc \ --enable-cxx \ # --enable-diagnostic \ # --enable-debug --enable-debug_rop --enable-debug_wop \ # --enable-posixmutexes soversion=`echo ${version} | cut -f1,2 -d.` make libdb=%{_libdb_a} libcxx=%{_libcxx_a} %{?_smp_mflags} popd done # remove dangling tags symlink from examples. rm -f examples_cxx/tags rm -f examples_c/tags %install rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_bindir} mkdir -p ${RPM_BUILD_ROOT}%{_libdir} for version in %{db4_versions} ; do pushd db-${version}/dist/build_unix %makeinstall libdb=%{_libdb_a} libcxx=%{_libcxx_a} # Move headers to special directory to avoid conflicts mkdir -p ${RPM_BUILD_ROOT}%{_includedir}/db${version} mv db.h db_185.h db_cxx.h ${RPM_BUILD_ROOT}%{_includedir}/db${version} # Rename the utilities. major=`echo ${version} | cut -c1,3` for bin in ${RPM_BUILD_ROOT}%{_bindir}/*db_* ; do t=`echo ${bin} | sed "s,db_,db${major}_,g"` mv ${bin} ${t} done popd done # Nuke non-versioned symlinks and headers rm -f ${RPM_BUILD_ROOT}%{_libdir}/libdb-4.so \ ${RPM_BUILD_ROOT}%{_libdir}/libdb.so \ ${RPM_BUILD_ROOT}%{_libdir}/libdb_cxx-4.so \ ${RPM_BUILD_ROOT}%{_libdir}/libdb_cxx.so \ ${RPM_BUILD_ROOT}%{_includedir}/db.h \ ${RPM_BUILD_ROOT}%{_includedir}/db_185.h \ ${RPM_BUILD_ROOT}%{_includedir}/db_cxx.h # Make sure all shared libraries have the execute bit set. chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/libdb*.so* # Make %{_libdir}/db/libdb.so symlinks to ease detection for autofoo for version in %{db4_versions} ; do mkdir -p ${RPM_BUILD_ROOT}/%{_libdir}/db${version} pushd ${RPM_BUILD_ROOT}/%{_libdir}/db${version} ln -s ../libdb-`echo ${version} | cut -b 1-3`.so libdb.so ln -s ../libdb_cxx-`echo ${version} | cut -b 1-3`.so libdb_cxx.so popd done # On Linux systems, move the shared libraries to lib directory. %ifos linux if [ "%{_libdir}" != "%{_lib}" ]; then mkdir -p ${RPM_BUILD_ROOT}/%{_lib} mv ${RPM_BUILD_ROOT}%{_libdir}/libdb*?.?.so* ${RPM_BUILD_ROOT}/%{_lib}/ mv ${RPM_BUILD_ROOT}%{_libdir}/db* ${RPM_BUILD_ROOT}/%{_lib}/ fi %endif # Remove unpackaged files. rm -fr ${RPM_BUILD_ROOT}%{_libdir}/*.la rm -fr ${RPM_BUILD_ROOT}%{_prefix}/docs/ %clean rm -rf ${RPM_BUILD_ROOT} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root) %doc docs/* %ifos linux /%{_lib}/libdb-?.?.so /%{_lib}/libdb_cxx-?.?.so /%{_lib}/db* %else %{_libdir}/libdb-?.?.so %{_libdir}/libdb_cxx-?.?.so %{_libdir}/db* %endif %{_bindir}/berkeley_db*_svc %{_bindir}/db*_archive %{_bindir}/db*_checkpoint %{_bindir}/db*_deadlock %{_bindir}/db*_dump* %{_bindir}/db*_load %{_bindir}/db*_printlog %{_bindir}/db*_recover %{_bindir}/db*_stat %{_bindir}/db*_upgrade %{_bindir}/db*_verify %{_bindir}/db*_hotbackup %{_bindir}/db*_codegen %{_includedir}/* %changelog * Wed Jul 09 2008 Jindrich Novy 4.6.21-1 - move db-4.6.21 to compat-db (#449741) - remove db-4.2.52 - fix license - package db46_codegen * Mon Feb 25 2008 Jindrich Novy 4.5.20-5 - manual rebuild because of gcc-4.3 (#434183) * Tue Feb 19 2008 Fedora Release Engineering - 4.5.20-4 - Autorebuild for GCC 4.3 * Sat Aug 18 2007 Jindrich Novy 4.5.20-3 - remove db4 provides to workaround RPM obsoletes/provides problem (#111071), automatic library provides should be enough for compat-db - obsolete old db4s again * Fri Aug 17 2007 Jindrich Novy 4.5.20-2 - fix self-obsoletion * Mon Jul 30 2007 Jindrich Novy 4.5.20-1 - add 4.5.20 to compat-db - package db45_hotbackup - correct open() calls so that compat-db compiles with the new glibc - apply db185 patches to all compat-db db4s * Sun Nov 26 2006 Jindrich Novy 4.3.29-2 - include also headers for db4-4.2.52 - sync db4 and compat-db licenses to BSD-style as the result of consultation with legal department - BuildPreReq -> BuildRequires, rpmlint fixes * Fri Nov 10 2006 Jindrich Novy 4.3.29-1 - add 4.3.29 and remove 4.1.25 - spec reduction diet, remove old unapplied patches - apply patches 3-5 with upstream fixes for 4.2.52 - apply first upstream fix patch for 4.3.29 - all patches/sources now point to correct URLs - ship headers for db-4.3.29 * Wed Jul 12 2006 Jesse Keating - 4.2.52-5.1 - rebuild * Mon Jul 10 2006 Jindrich Novy 4.2.52-5 - package libdb_cxx, which is a dependency for OpenOffice.org-1.x and other legacy software (#198130), thanks to Sivasankar Chander * Tue Feb 14 2006 Jindrich Novy 4.2.52-4 - clarify pointer usage in db_load.c (#110697) * Fri Feb 10 2006 Jesse Keating - 4.2.52-3.2.1 - bump again for double-long bug on ppc(64) * Tue Feb 07 2006 Jesse Keating - 4.2.52-3.2 - rebuilt for new gcc4.1 snapshot and glibc changes * Fri Dec 09 2005 Jesse Keating - rebuilt * Wed Oct 12 2005 Karsten Hopp 4.2.52-3 - add Buildprereq ed (#163025) * Tue Nov 16 2004 Jeff Johnson 4.2.52-2 - link libdb-4.1.so against -lpthread (#114150). - link libdb-4.2.so against -lpthread (#139487). * Thu Nov 11 2004 Jeff Johnson 4.2.52-1 - apply patch.4.1.25.2. - retire db-4.2.52 with patch.4.2.52.{1,2} into compat-db. - nuke db2 and db-3.3.11. - nuke db1 as well. * Mon Sep 13 2004 Bill Nottingham - return of db1 to compat-db - remove: db-3.1, db-3.2 - remove: c++, tcl sublibraries * Tue Mar 02 2004 Elliot Lee - rebuilt * Fri Feb 13 2004 Elliot Lee - rebuilt * Thu Dec 11 2003 Jeff Johnson 4.1.25-1 - retire db-4.1.25 to compat-db. * Mon Dec 08 2003 Florian La Roche - rebuild for new tcl * Thu Aug 21 2003 Nalin Dahyabhai 4.0.14-6 - rebuild * Tue Aug 19 2003 Nalin Dahyabhai 4.0.14-5 - add missing tcl-devel buildrequires (#101814) * Thu Jun 26 2003 Jeff Johnson 4.0.14-3 - compile on all platforms, use gcc296 only on i386/alpha/ia64 - avoid ppc64 toolchain for the nonce. * Wed May 7 2003 Bill Nottingham 4.0.14-2 - build db-4.x with system compiler, not compat-gcc * Mon May 5 2003 Jeff Johnson 4.0.14-1 - add db4.0.14 to the mess. * Wed Jan 22 2003 Tim Powers - rebuilt * Tue Nov 19 2002 Nalin Dahyabhai 3.3.11-3 - add sed as a built-time dependency * Wed Sep 25 2002 Nalin Dahyabhai - fold x86-64 changes into mainline * Mon Sep 09 2002 Tim Powers - x86-64 specific build * Sun May 26 2002 Tim Powers 3.3.11-2 - automated rebuild * Thu May 16 2002 Nalin Dahyabhai 3.3.11-1 - pull in db 3.3, obsolete db3 and db32 in addition to db31 - build with compat-gcc/compat-gcc-c++ to get C++ shared libraries suitable for use in applications built with db3-devel on RHL 7.x - pull in db2, obsolete db2/db2-devel/db3-devel, rename to compat-db - obsolete db3x * Thu Mar 28 2002 Nalin Dahyabhai 3.2.9-4 - rebuild * Thu Mar 28 2002 Nalin Dahyabhai 3.2.9-3 - don't list the tcl include path before other flags when building libdb_tcl 3.1.x (tcl is in /usr, so this pulls in /usr/include/db.h, which is wrong) * Mon Mar 25 2002 Nalin Dahyabhai 3.2.9-2 - rebuild * Mon Mar 25 2002 Nalin Dahyabhai 3.2.9-1 - rename to db3x and merge in db 3.1 and db 3.2 compatibility stuffs * Mon Apr 16 2001 Nalin Dahyabhai - rename to db31, drop the -devel subpackage, merge the -utils package - remove berkeley_db_svc, libdb_tcl.so (conflicts with current -utils) * Thu Apr 05 2001 Nalin Dahyabhai - fix URLs in docs for the -utils and -devel subpackages to point to the images in the main package's documentation directory (#33328) - change Copyright: GPL to License: BSDish * Fri Mar 23 2001 Bill Nottingham - turn off --enable-debug * Tue Dec 12 2000 Jeff Johnson - rebuild to remove 777 directories. * Sat Nov 11 2000 Jeff Johnson - don't build with --enable-diagnostic. - add build prereq on tcl. - default value for %%_lib macro if not found. * Tue Oct 17 2000 Jeff Johnson - add /usr/lib/libdb-3.1.so symlink to %%files. - remove dangling tags symlink from examples. * Mon Oct 9 2000 Jeff Johnson - rather than hack *.la (see below), create /usr/lib/libdb-3.1.so symlink. - turn off --enable-diagnostic for performance. * Fri Sep 29 2000 Jeff Johnson - update to 3.1.17. - disable posix mutexes Yet Again. * Tue Sep 26 2000 Jeff Johnson - add c++ and posix mutex support. * Thu Sep 14 2000 Jakub Jelinek - put nss_db into a separate package * Wed Aug 30 2000 Matt Wilson - rebuild to cope with glibc locale binary incompatibility, again * Wed Aug 23 2000 Jeff Johnson - remove redundant strip of libnss_db* that is nuking symbols. - change location in /usr/lib/libdb-3.1.la to point to /lib (#16776). * Thu Aug 17 2000 Jeff Johnson - summaries from specspo. - all of libdb_tcl* (including symlinks) in db3-utils, should be db3->tcl? * Wed Aug 16 2000 Jakub Jelinek - temporarily build nss_db in this package, should be moved into separate nss_db package soon * Wed Jul 19 2000 Jakub Jelinek - rebuild to cope with glibc locale binary incompatibility * Wed Jul 12 2000 Prospector - automatic rebuild * Sun Jun 11 2000 Jeff Johnson - upgrade to 3.1.14. - create db3-utils sub-package to hide tcl dependency, enable tcl Yet Again. - FHS packaging. * Mon Jun 5 2000 Jeff Johnson - disable tcl Yet Again, base packages cannot depend on libtcl.so. * Sat Jun 3 2000 Jeff Johnson - enable tcl, rebuild against tcltk 8.3.1 (w/o pthreads). * Tue May 30 2000 Matt Wilson - include /lib/libdb.so in the devel package * Wed May 10 2000 Jeff Johnson - put in "System Environment/Libraries" per msw instructions. * Tue May 9 2000 Jeff Johnson - install shared library in /lib, not /usr/lib. - move API docs to db3-devel. * Mon May 8 2000 Jeff Johnson - don't rename db_* to db3_*. * Tue May 2 2000 Jeff Johnson - disable --enable-test --enable-debug_rop --enable-debug_wop. - disable --enable-posixmutexes --enable-tcl as well, to avoid glibc-2.1.3 problems. * Mon Apr 24 2000 Jeff Johnson - add 3.0.55.1 alignment patch. - add --enable-posixmutexes (linux threads has not pthread_*attr_setpshared). - add --enable-tcl (needed -lpthreads). * Sat Apr 1 2000 Jeff Johnson - add --enable-debug_{r,w}op for now. - add variable to set shm perms. * Sat Mar 25 2000 Jeff Johnson - update to 3.0.55 * Tue Dec 29 1998 Jeff Johnson - Add --enable-cxx to configure. * Thu Jun 18 1998 Jeff Johnson - Create.