diff --git a/SQLite-036ebf72.zip b/SQLite-036ebf72.zip deleted file mode 100644 index cd8475e64c23ad1c939dff35fb8778fabe86d896..0000000000000000000000000000000000000000 Binary files a/SQLite-036ebf72.zip and /dev/null differ diff --git a/db-18.1.32.tar.gz b/db-18.1.32.tar.gz deleted file mode 100644 index e7803b5a2a3adb7a42a838584282b4c18ebc2f5f..0000000000000000000000000000000000000000 Binary files a/db-18.1.32.tar.gz and /dev/null differ diff --git a/libdb.spec b/libdb.spec index f2ced79d71c85e9feca008c1172fff4a09b774f4..e26d718c4559fac62ef9c535fad39dc0d219fa09 100644 --- a/libdb.spec +++ b/libdb.spec @@ -1,245 +1,216 @@ -%define realver 036ebf72 - -Name: libdb -Version: 18.1.32 -Release: 2 -Summary: Berkeley DB is a family of embedded key-value database libraries providing scalable high-performance data management services to applications. -License: AGPL-3.0 and Public Domain -URL: http://www.oracle.com/database/berkeley-db/ -Source0: http://download.oracle.com/berkeley-db/db-%{version}.tar.gz -Source1: https://www.sqlite.org/cgi/src/zip/%{realver}/SQLite-%{realver}.zip - -BuildRequires: gcc gcc-c++ libtool tcl-devel java-devel chrpath gdb libdb libdb-cxx libdb-sql - -Provides: %{name}-utils -Obsoletes: %{name}-utils +Name: libdb +Version: 5.3.28 +Release: 35 +Summary: The Berkeley DB database library for C +License: BSD and LGPLv2 and Sleepycat +URL: https://www.oracle.com/database/berkeley-db/ + +Source0: http://download.oracle.com/otn/berkeley-db/db-%{version}.tar.gz +Source1: http://download.oracle.com/berkeley-db/db.1.85.tar.gz +Source2: http://www.gnu.org/licenses/lgpl-2.1.txt +Source3: libdb-5.3.28-manpages.tar.gz + +Patch0: libdb-multiarch.patch +Patch10: http://www.oracle.com/technology/products/berkeley-db/db/update/1.85/patch.1.1 +Patch11: http://www.oracle.com/technology/products/berkeley-db/db/update/1.85/patch.1.2 +Patch12: http://www.oracle.com/technology/products/berkeley-db/db/update/1.85/patch.1.3 +Patch13: http://www.oracle.com/technology/products/berkeley-db/db/update/1.85/patch.1.4 +Patch20: db-1.85-errno.patch +Patch22: db-4.6.21-1.85-compat.patch +Patch24: db-4.5.20-jni-include-dir.patch +Patch25: 007-mt19937db.c_license.patch +Patch26: java8-fix.patch +Patch27: db-5.3.21-memp_stat-upstream-fix.patch +Patch28: db-5.3.21-mutex_leak.patch +Patch29: db-5.3.28-lemon_hash.patch +Patch30: db-5.3.28-condition_variable.patch +Patch31: db-5.3.28-condition-variable-ppc.patch +Patch32: db-5.3.28-rpm-lock-check.patch +# downstream patch to hotfix rhbz#1464033, sent upstream +Patch33: db-5.3.28-cwd-db_config.patch +Patch34: libdb-5.3.21-region-size-check.patch +# Patch sent upstream +Patch35: checkpoint-opd-deadlock.patch +Patch36: db-5.3.28-atomic_compare_exchange.patch + +Patch9000: bugfix-fix-deadlock-on-mempool-file-locks.patch + +Patch9001: libdb-limit-cpu.patch +patch9002: libdb-cbd-race.patch + +BuildRequires: gcc gcc-c++ perl-interpreter libtool tcl-devel >= 8.5.2-3 +BuildRequires: java-devel >= 1:1.6.0 chrpath zlib-devel +Conflicts: filesystem < 3 + +Provides: %{name}-utils = %{version}-%{release} +Obsoletes: %{name}-utils < %{version}-%{release} +Provides: %{name}-cxx = %{version}-%{release} +Obsoletes: %{name}-cxx < %{version}-%{release} +Provides: %{name}-tcl = %{version}-%{release} +Obsoletes: %{name}-tcl < %{version}-%{release} +Provides: %{name}-sql = %{version}-%{release} +Obsoletes: %{name}-sql < %{version}-%{release} +Provides: %{name}-java = %{version}-%{release} +Obsoletes: %{name}-java < %{version}-%{release} %description -Berkeley DB is a family of embedded key-value database libraries -providing scalable high-performance data management services to applications. -The Berkeley DB products use simple function-call APIs for data access and management. -Berkeley DB enables the development of custom data management solutions, -without the overhead traditionally associated with such custom projects. -Berkeley DB provides a collection of well-proven building-block technologies -that can be configured to address any application need from the hand-held device to the data center, -from a local storage solution to a world-wide distributed one, from kilobytes to petabytes. - -%package devel -Summary: C development files for the Berkeley DB library -Requires: %{name}%{?_isa} = %{version}-%{release} -Provides: %{name}-devel-static -Obsoletes: %{name}-devel-static - -%description devel -This package contains the header files and libraries -for building programs which use the Berkeley DB in C. - -%package help -Summary: C development documentation files for the Berkeley DB library -Requires: %{name} = %{version}-%{release} -Requires: %{name}-devel = %{version}-%{release} -Obsoletes: %{name}-devel-doc -BuildArch: noarch - -%description help -This package contains the documentation for building programs which use the Berkeley DB. - -%package cxx -Summary: The Berkeley DB database library for C++ -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description cxx -The Berkeley DB supports C++ APIs. This package contains the libraries for C++. - -%package cxx-devel -Summary: C++ development files for the Berkeley DB library -Requires: %{name}-cxx%{?_isa} = %{version}-%{release} - -%description cxx-devel -This package contains the header files and libraries -for building programs which use the Berkeley DB in C++. - -%package tcl -Summary: The Berkeley DB database library for Tcl -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description tcl -The Berkeley DB supports Tcl APIs. This package contains the libraries for Tcl. - -%package tcl-devel -Summary: Tcl development files for the Berkeley DB library -Requires: %{name}-tcl%{?_isa} = %{version}-%{release} - -%description tcl-devel -This package contains the Tcl files and libraries -for building programs which use the Berkeley DB in Tcl. - -%package sql -Summary: The Berkeley DB database library for Sql -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description sql -The Berkeley DB supports Sql APIs. This package contains the libraries for Sql. - -%package sql-devel -Summary: Sql development files for the Berkeley DB library -Requires: %{name}-sql%{?_isa} = %{version}-%{release} - -%description sql-devel -This package contains the Sql files and libraries -for building programs which use the Berkeley DB in Sql. - -%package java -Summary: The Berkeley DB database library for Java -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description java -The Berkeley DB supports Java APIs. This package contains the libraries for Java. - -%package java-devel -Summary: Java development files for the Berkeley DB library -Requires: %{name}-java%{?_isa} = %{version}-%{release} - -%description java-devel -This package contains the java files and libraries -for building programs which use the Berkeley DB in java. +Oracle Berkeley DB provides the best open source embeddable databases +allowing developers the choice of SQL, Key/Value, XML/XQuery or Java +Object storage for their data model. At its core is a fast, scalable, +transactional database engine with proven reliability and availability. +Berkeley DB comes three versions: Berkeley DB, Berkeley DB Java +Edition, and Berkeley DB XML. + +%package devel +Summary: Header files for libdb +Requires: %{name} = %{version}-%{release} +Provides: %{name}-devel-doc = %{version}-%{release} +Obsoletes: %{name}-devel-doc < %{version}-%{release} +Provides: %{name}-devel-static = %{version}-%{release} +Obsoletes: %{name}-devel-static < %{version}-%{release} +Provides: %{name}-cxx-devel = %{version}-%{release} +Obsoletes: %{name}-cxx-devel < %{version}-%{release} +Provides: %{name}-tcl-devel = %{version}-%{release} +Obsoletes: %{name}-tcl-devel < %{version}-%{release} +Provides: %{name}-sql-devel = %{version}-%{release} +Obsoletes: %{name}-sql-devel < %{version}-%{release} +Provides: %{name}-java-devel = %{version}-%{release} +Obsoletes: %{name}-java-devel < %{version}-%{release} + +%description devel +Header files for libdb. + +%package_help %prep %setup -q -n db-%{version} -a 1 -cp -rf SQLite-%{realver}/tool lang/sql/sqlite -for code in db_pragma.c db_sequence.c; do - sed -i '/$(TOP)\/ext\/misc\/totype.c \\/a\$(TOP)\/..\/adapter\/'$code' \\' lang/sql/sqlite/Makefile.in -done +cp %{SOURCE2} . +tar -xf %{SOURCE3} -%build -test -d dist/build_db || mkdir dist/build_db - -for dir in dist lang/sql/sqlite; do - cp /usr/lib/rpm/config.{guess,sub} "$dir" -done - -pushd dist/build_db -%define _configure ../configure -%configure -C \ - --enable-compat185 --disable-dump185 --enable-shared --enable-static \ - --enable-tcl --with-tcl=%{_libdir} --enable-cxx --enable-sql \ - --enable-java --enable-test --disable-rpath --with-repmgr-ssl=no +%patch0 -p1 +pushd db.1.85/PORT/linux +%patch10 -p0 +popd +pushd db.1.85 +%patch11 -p0 +%patch12 -p0 +%patch13 -p0 +%patch20 -p1 +popd -%make_build +%patch22 -p1 +%patch24 -p1 +%patch25 -p1 +%patch26 -p1 +%patch27 -p1 +%patch28 -p1 +%patch29 -p1 +%patch30 -p1 +%patch31 -p1 +%patch32 -p1 +%patch33 -p1 +%patch34 -p1 +%patch35 -p1 +%patch36 -p1 + +%patch9000 -p1 + +%patch9001 -p1 +%patch9002 -p1 + +pushd dist +./s_config popd -%install -rm -rf ${RPM_BUILD_ROOT} -mkdir -p ${RPM_BUILD_ROOT}%{_includedir} -mkdir -p ${RPM_BUILD_ROOT}%{_libdir} +%build +CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" +CFLAGS="$CFLAGS -DSHAREDSTATEDIR='\"%{_sharedstatedir}\"' -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=3 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_SECURE_DELETE=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 -I../../../lang/sql/sqlite/ext/fts3/" +export CFLAGS -%make_install -C dist/build_db +make -C db.1.85/PORT/%{_os} OORG="$CFLAGS" -rm -f ${RPM_BUILD_ROOT}%{_libdir}/{libdb.a,libdb_cxx.a,libdb_tcl.a,libdb_sql.a} -rm -rf ${RPM_BUILD_ROOT}%{_prefix}/docs -rm -f ${RPM_BUILD_ROOT}%{_libdir}/*.la +test -d dist/dist-tls || mkdir dist/dist-tls -cp -a %{_libdir}/libdb-5.* ${RPM_BUILD_ROOT}%{_libdir} -cp -a %{_libdir}/libdb_cxx-5.* ${RPM_BUILD_ROOT}%{_libdir} -cp -a %{_libdir}/libdb_sql-5.* ${RPM_BUILD_ROOT}%{_libdir} +/bin/sh libtool --tag=CC --mode=compile %{__cc} $RPM_OPT_FLAGS -Idb.1.85/PORT/%{_os}/include -D_REENTRANT -c util/db_dump185.c -o dist/dist-tls/db_dump185.lo +/bin/sh libtool --tag=LD --mode=link %{__cc} -o dist/dist-tls/db_dump185 dist/dist-tls/db_dump185.lo db.1.85/PORT/%{_os}/libdb.a -chmod +x ${RPM_BUILD_ROOT}%{_libdir}/*.so* -chmod u+w ${RPM_BUILD_ROOT}%{_bindir} ${RPM_BUILD_ROOT}%{_bindir}/* -chrpath -d ${RPM_BUILD_ROOT}%{_libdir}/*.so ${RPM_BUILD_ROOT}%{_bindir}/* +for dir in dist lang/sql/sqlite lang/sql/jdbc lang/sql/odbc; do + cp /usr/lib/rpm/%{?_vendor}/config.{guess,sub} "$dir" +done -%pre +pushd dist/dist-tls +%define _configure ../configure +%configure -C \ + --enable-compat185 --enable-dump185 --enable-shared --enable-tcl --with-tcl=%{_libdir} \ + --enable-cxx --enable-sql --enable-java --enable-test --disable-rpath --with-tcl=%{_libdir}/tcl8.6 -%preun +%disable_rpath -%post -p /sbin/ldconfig +%make_build -%postun -p /sbin/ldconfig +popd -%post -p /sbin/ldconfig cxx +%install +%make_install STRIP=/bin/true -C dist/dist-tls -%postun -p /sbin/ldconfig cxx +%delete_la -%post -p /sbin/ldconfig tcl +chmod +x %{buildroot}%{_libdir}/*.so* -%postun -p /sbin/ldconfig tcl +install -d -m 0755 %{buildroot}%{_includedir}/libdb +mv %{buildroot}%{_includedir}/*.h %{buildroot}%{_includedir}/libdb/ -%post -p /sbin/ldconfig sql +for i in db.h db_cxx.h db_185.h; do + ln -s %{name}/$i %{buildroot}%{_includedir} +done -%postun -p /sbin/ldconfig sql +install -d -m 0755 %{buildroot}%{_datadir}/java +mv %{buildroot}%{_libdir}/*.jar %{buildroot}%{_datadir}/java/ -%post -p /sbin/ldconfig java +chmod u+w %{buildroot}%{_bindir} %{buildroot}%{_bindir}/* +chrpath -d ${RPM_BUILD_ROOT}%{_libdir}/*.so ${RPM_BUILD_ROOT}%{_bindir}/* + +rm -rf docs/{csharp,installation} +rm -rf %{buildroot}%{_prefix}/docs +rm -rf example/csharp +mv examples docs +install -d -m 0755 %{buildroot}%{_mandir}/man1 +mv man/* %{buildroot}%{_mandir}/man1/ -%postun -p /sbin/ldconfig java +%ldconfig_scriptlets %files -%doc README +%defattr(-,root,root) +%doc docs/license %license LICENSE -%{_libdir}/libdb-*.so -%{_bindir}/db*_archive -%{_bindir}/db*_checkpoint -%{_bindir}/db*_deadlock -%{_bindir}/db*_dump* -%{_bindir}/db*_hotbackup -%{_bindir}/db*_load -%{_bindir}/db*_printlog -%{_bindir}/db*_recover -%{_bindir}/db*_replicate -%{_bindir}/db*_stat -%{_bindir}/db*_upgrade -%{_bindir}/db*_verify -%{_bindir}/db*_tuner -%{_bindir}/db*_convert - -%files devel -%doc examples/* -%license EXAMPLES-LICENSE +%{_bindir}/* +%{_libdir}/*.so +%{_datadir}/java/*.jar +%exclude %{_libdir}/libdb.so +%exclude %{_libdir}/libdb_cxx.so +%exclude %{_libdir}/libdb_tcl.so +%exclude %{_libdir}/libdb_sql.so +%exclude %{_libdir}/libdb_java.so + +%files devel +%defattr(-,root,root) +%doc docs/* +%{_libdir}/*.a %{_libdir}/libdb.so -%{_includedir}/db.h -%{_includedir}/db_185.h -%{_libdir}/libdb-*.a -%{_libdir}/libdb_cxx-*.a -%{_libdir}/libdb_tcl-*.a -%{_libdir}/libdb_sql-*.a -%{_libdir}/libdb_java-*.a - -%files help -%doc docs/* - -%files cxx -%{_libdir}/libdb_cxx-*.so - -%files cxx-devel -%{_includedir}/db_cxx.h %{_libdir}/libdb_cxx.so - -%files tcl -%{_libdir}/libdb_tcl-*.so - -%files tcl-devel %{_libdir}/libdb_tcl.so - -%files sql -%{_libdir}/libdb_sql-*.so - -%files sql-devel -%{_bindir}/dbsql %{_libdir}/libdb_sql.so -%{_includedir}/dbsql.h - -%files java -%{_libdir}/libdb_java-*.so -%{_libdir}/*.jar - -%files java-devel %{_libdir}/libdb_java.so +%{_includedir}/* + +%files help +%defattr(-,root,root) +%doc README +%{_mandir}/man1 %changelog -* Thu Oct 10 2019 hanxinke - 18.1.32-2 -- Type:enhancement -- ID:NA -- SUG:NA -- DESC:add EXAMPLES-LICENSE to the devel package +* Wed Nov 6 2019 openEuler Buildteam - 5.3.28-35 +- Add Package version -* Tue Sep 24 2019 openEuler Buildteam - 18.1.32-1 +* Mon Nov 4 2019 openEuler Buildteam - 5.3.28-34 - Package init -