Skip to content

Commit

Permalink
Mark apr_dbd_freetds as unsupported and remove it from all builds
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1462772 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Nick Kew committed Mar 30, 2013
1 parent ad224ec commit 395cc0e
Show file tree
Hide file tree
Showing 20 changed files with 23 additions and 103 deletions.
3 changes: 3 additions & 0 deletions CHANGES
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes for APR 2.0.0

*) Mark apr_dbd_freetds as unsupported, and remove it from all builds
[Nick Kew]

*) Fix pool integrity checks with threads. Add new apr_pool_owner_set()
function. PR 43375, 52785. [Stefan Fritsch]

Expand Down
1 change: 0 additions & 1 deletion Makefile.in
Expand Up @@ -75,7 +75,6 @@ LDADD_dbd_oracle = @LDADD_dbd_oracle@
LDADD_dbd_sqlite2 = @LDADD_dbd_sqlite2@
LDADD_dbd_sqlite3 = @LDADD_dbd_sqlite3@
LDADD_dbd_mysql = @LDADD_dbd_mysql@
LDADD_dbd_freetds = @LDADD_dbd_freetds@
LDADD_dbd_odbc = @LDADD_dbd_odbc@
LDADD_dbm_db = @LDADD_dbm_db@
LDADD_dbm_gdbm = @LDADD_dbm_gdbm@
Expand Down
2 changes: 1 addition & 1 deletion README
Expand Up @@ -183,7 +183,7 @@ define APR_DECLARE_STATIC before you include any apr header files
in your source, and link to apr.lib instead.

On windows, selection of database drivers is via the environment values
DBD_LIST (for freetds, mysql, oracle, pgsql, sqlite2 and/or sqlite3)
DBD_LIST (for mysql, oracle, pgsql, sqlite2 and/or sqlite3)
and DBM_LIST (db and/or gdbm). DBD odbc and DBM sdbm are unconditionally
compiled and installed, do not include these in the list.

Expand Down
11 changes: 11 additions & 0 deletions README.FREETDS
@@ -0,0 +1,11 @@
The APR DBD Driver for FreeTDS has been removed from the build.
It is known to have problems, and we are not able to maintain it.

The source code is still available. If you want it and are able
to manage maintenance for yourself, you can patch the build and
work through issues that affect you, but you're on your own.

We expect that for most users, the ODBC driver will serve as
an alternative.

Sorry.
4 changes: 0 additions & 4 deletions apr.dsp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions build.conf
Expand Up @@ -52,7 +52,7 @@ dsp = libapr.dsp

modules =
crypto_openssl crypto_nss crypto_commoncrypto dbd_pgsql
dbd_sqlite2 dbd_sqlite3 dbd_oracle dbd_mysql dbd_freetds dbd_odbc
dbd_sqlite2 dbd_sqlite3 dbd_oracle dbd_mysql dbd_odbc
dbm_db dbm_gdbm dbm_ndbm

# gen_uri_delim.c
Expand Down Expand Up @@ -92,10 +92,6 @@ target = dbd/apr_dbd_oracle.la
paths = dbd/apr_dbd_mysql.c
target = dbd/apr_dbd_mysql.la

[dbd_freetds]
paths = dbd/apr_dbd_freetds.c
target = dbd/apr_dbd_freetds.la

[dbd_odbc]
paths = dbd/apr_dbd_odbc.c
target = dbd/apr_dbd_odbc.la
Expand Down
1 change: 0 additions & 1 deletion build/aprenv.py
Expand Up @@ -673,7 +673,6 @@ def APRAutoconf(self):
subst['@apu_have_sqlite3@'] = 0
subst['@apu_have_sqlite2@'] = 0
subst['@apu_have_oracle@'] = 0
subst['@apu_have_freetds@'] = 0
subst['@apu_have_odbc@'] = 0


Expand Down
58 changes: 0 additions & 58 deletions build/dbd.m4
Expand Up @@ -408,63 +408,6 @@ AC_DEFUN([APU_CHECK_DBD_ORACLE], [
LDFLAGS="$old_ldflags"
])

dnl
AC_DEFUN([APU_CHECK_DBD_FREETDS], [
apu_have_freetds=0
old_libs="$LIBS"
old_cppflags="$CPPFLAGS"
old_ldflags="$LDFLAGS"
AC_ARG_WITH([freetds],
APR_HELP_STRING([--with-freetds=DIR], [specify FreeTDS location]),
[
if test "$withval" = "yes"; then
AC_CHECK_HEADERS(sybdb.h, AC_CHECK_LIB(sybdb, tdsdbopen, [apu_have_freetds=1]))
if test "$apu_have_freetds" = "0"; then
AC_CHECK_HEADERS(freetds/sybdb.h, AC_CHECK_LIB(sybdb, tdsdbopen, [apu_have_freetds=1]))
fi
elif test "$withval" = "no"; then
:
else
sybdb_CPPFLAGS="-I$withval/include"
sybdb_LDFLAGS="-L$withval/lib "
APR_ADDTO(CPPFLAGS, [$sybdb_CPPFLAGS])
APR_ADDTO(LDFLAGS, [$sybdb_LDFLAGS])
AC_MSG_NOTICE(checking for freetds in $withval)
AC_CHECK_HEADERS(sybdb.h, AC_CHECK_LIB(sybdb, tdsdbopen, [apu_have_freetds=1]))
if test "$apu_have_freetds" = "0"; then
AC_CHECK_HEADERS(freetds/sybdb.h, AC_CHECK_LIB(sybdb, tdsdbopen, [apu_have_freetds=1]))
fi
if test "$apu_have_freetds" != "0"; then
APR_ADDTO(INCLUDES, [-I$withval/include])
fi
fi
], [
AC_CHECK_HEADERS(sybdb.h, AC_CHECK_LIB(sybdb, tdsdbopen, [apu_have_freetds=1]))
if test "$apu_have_freetds" = "0"; then
AC_CHECK_HEADERS(freetds/sybdb.h, AC_CHECK_LIB(sybdb, tdsdbopen, [apu_have_freetds=1]))
fi
])
AC_SUBST(apu_have_freetds)
dnl Since we have already done the AC_CHECK_LIB tests, if we have it,
dnl we know the library is there.
if test "$apu_have_freetds" = "1"; then
APR_ADDTO(LDADD_dbd_freetds, [$sybdb_LDFLAGS -lsybdb])
dnl Erm, I needed pcreposix, but I think that dependency has gone
dnl from the current code
dnl APR_ADDTO(LDADD_dbd_freetds, [-lpcreposix])
fi
AC_SUBST(LDADD_dbd_freetds)
LIBS="$old_libs"
CPPFLAGS="$old_cppflags"
LDFLAGS="$old_ldflags"
])
dnl

AC_DEFUN([APU_CHECK_DBD_ODBC], [
Expand Down Expand Up @@ -565,7 +508,6 @@ AC_DEFUN([APU_CHECK_DBD_ODBC], [
test $apu_have_mysql = 1 && apu_dbd_tests="$apu_dbd_tests mysql"
test $apu_have_sqlite2 = 1 && apu_dbd_tests="$apu_dbd_tests sqlite2"
test $apu_have_sqlite3 = 1 && apu_dbd_tests="$apu_dbd_tests sqlite3"
test $apu_have_freetds = 1 && apu_dbd_tests="$apu_dbd_tests freetds"
test $apu_have_odbc = 1 && apu_dbd_tests="$apu_dbd_tests odbc"
AC_SUBST(apu_dbd_tests)
])
6 changes: 2 additions & 4 deletions build/dso.m4
Expand Up @@ -42,7 +42,6 @@ AC_DEFUN([APR_MODULAR_DSO], [
test $apu_have_mysql = 1 && objs="$objs dbd/apr_dbd_mysql.lo"
test $apu_have_sqlite2 = 1 && objs="$objs dbd/apr_dbd_sqlite2.lo"
test $apu_have_sqlite3 = 1 && objs="$objs dbd/apr_dbd_sqlite3.lo"
test $apu_have_freetds = 1 && objs="$objs dbd/apr_dbd_freetds.lo"
test $apu_have_odbc = 1 && objs="$objs dbd/apr_dbd_odbc.lo"
test $apu_have_db = 1 && objs="$objs dbm/apr_dbm_berkeleydb.lo"
test $apu_have_gdbm = 1 && objs="$objs dbm/apr_dbm_gdbm.lo"
Expand All @@ -64,10 +63,10 @@ AC_DEFUN([APR_MODULAR_DSO], [
fi
LIBS="$LIBS $LDADD_crypto_openssl $LDADD_crypto_nss $LDADD_crypto_commoncrypto"
LIBS="$LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3 $LDADD_dbd_oracle $LDADD_dbd_mysql $LDADD_dbd_freetds $LDADD_dbd_odbc"
LIBS="$LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3 $LDADD_dbd_oracle $LDADD_dbd_mysql $LDADD_dbd_odbc"
LIBS="$LIBS $LDADD_dbm_db $LDADD_dbm_gdbm $LDADD_dbm_ndbm"
APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_crypto_openssl $LDADD_crypto_nss $LDADD_crypto_commoncrypto"
APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3 $LDADD_dbd_oracle $LDADD_dbd_mysql $LDADD_dbd_freetds $LDADD_dbd_odbc"
APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3 $LDADD_dbd_oracle $LDADD_dbd_mysql $LDADD_dbd_odbc"
APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_dbm_db $LDADD_dbm_gdbm $LDADD_dbm_ndbm"
else
Expand All @@ -82,7 +81,6 @@ AC_DEFUN([APR_MODULAR_DSO], [
test $apu_have_mysql = 1 && dsos="$dsos dbd/apr_dbd_mysql.la"
test $apu_have_sqlite2 = 1 && dsos="$dsos dbd/apr_dbd_sqlite2.la"
test $apu_have_sqlite3 = 1 && dsos="$dsos dbd/apr_dbd_sqlite3.la"
test $apu_have_freetds = 1 && dsos="$dsos dbd/apr_dbd_freetds.la"
test $apu_have_odbc = 1 && dsos="$dsos dbd/apr_dbd_odbc.la"
test $apu_have_db = 1 && dsos="$dsos dbm/apr_dbm_db.la"
test $apu_have_gdbm = 1 && dsos="$dsos dbm/apr_dbm_gdbm.la"
Expand Down
16 changes: 1 addition & 15 deletions build/rpm/apr.spec.in
Expand Up @@ -68,16 +68,6 @@ Requires: apr-util = %{version}-%{release}
This package provides the SQLite driver for the apr-util DBD
(database abstraction) interface.

%package freetds
Group: Development/Libraries
Summary: APR utility library FreeTDS DBD driver
BuildRequires: freetds-devel
Requires: apr-util = %{version}-%{release}

%description freetds
This package provides the FreeTDS driver for the apr-util DBD
(database abstraction) interface.

%package odbc
Group: Development/Libraries
Summary: APR utility library ODBC DBD driver
Expand Down Expand Up @@ -118,7 +108,7 @@ This package provides crypto support for apr-util based on Mozilla NSS.
--with-installbuilddir=%{_libdir}/apr/build-%{aprver} \
--with-devrandom=/dev/urandom \
--without-gdbm \
--with-sqlite3 --with-pgsql --with-mysql --with-freetds --with-odbc \
--with-sqlite3 --with-pgsql --with-mysql --with-odbc \
--with-berkeley-db \
--with-crypto --with-openssl --with-nss \
--without-sqlite2
Expand Down Expand Up @@ -171,10 +161,6 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-)
%{_libdir}/apr-%{aprver}/apr_dbd_sqlite*

%files freetds
%defattr(-,root,root,-)
%{_libdir}/apr-%{aprver}/apr_dbd_freetds*

%files odbc
%defattr(-,root,root,-)
%{_libdir}/apr-%{aprver}/apr_dbd_odbc*
Expand Down
1 change: 0 additions & 1 deletion configure.in
Expand Up @@ -2661,7 +2661,6 @@ APU_CHECK_DBD_MYSQL
APU_CHECK_DBD_SQLITE3
APU_CHECK_DBD_SQLITE2
APU_CHECK_DBD_ORACLE
APU_CHECK_DBD_FREETDS
APU_CHECK_DBD_ODBC

dnl select an XML parser
Expand Down
3 changes: 0 additions & 3 deletions dbd/NWGNUmakefile
Expand Up @@ -166,9 +166,6 @@ endif
ifeq "$(APU_HAVE_SQLITE3)" "1"
TARGET_nlm += $(OBJDIR)/dbdsqli3.nlm $(OBJDIR)/dbdsqli3.nlm $(EOLIST)
endif
ifeq "$(APU_HAVE_FREETDS)" "1"
TARGET_nlm += $(OBJDIR)/dbdfreetds.nlm $(OBJDIR)/dbdfreetds.nlm $(EOLIST)
endif

#
# If there is an LIB target, put it here
Expand Down
3 changes: 0 additions & 3 deletions dbd/apr_dbd.c
Expand Up @@ -133,9 +133,6 @@ APR_DECLARE(apr_status_t) apr_dbd_init(apr_pool_t *pool)
#if APU_HAVE_ORACLE
DRIVER_LOAD("oracle", apr_dbd_oracle_driver, pool);
#endif
#if APU_HAVE_FREETDS
DRIVER_LOAD("freetds", apr_dbd_freetds_driver, pool);
#endif
#if APU_HAVE_ODBC
DRIVER_LOAD("odbc", apr_dbd_odbc_driver, pool);
#endif
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions dbd/apr_dbd_freetds.c → dbd/unsupported/apr_dbd_freetds.c
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

#ifdef I_CAN_DEAL_WITH_THIS_PARTIAL_DRIVER_AND_UNMAINTAINED_CODE_FOR_FREETDS

#include "apu.h"
#include "apr_private.h"

Expand Down Expand Up @@ -803,3 +805,5 @@ APR_MODULE_DECLARE_DATA const apr_dbd_driver_t apr_dbd_freetds_driver = {
#endif
};
#endif

#endif
File renamed without changes.
1 change: 0 additions & 1 deletion include/apr.h.in
Expand Up @@ -674,7 +674,6 @@ typedef int apr_wait_t;
#define APU_HAVE_SQLITE3 @apu_have_sqlite3@
#define APU_HAVE_SQLITE2 @apu_have_sqlite2@
#define APU_HAVE_ORACLE @apu_have_oracle@
#define APU_HAVE_FREETDS @apu_have_freetds@
#define APU_HAVE_ODBC @apu_have_odbc@

#define APU_HAVE_CRYPTO @apu_have_crypto@
Expand Down
1 change: 0 additions & 1 deletion include/apr.hnw
Expand Up @@ -475,7 +475,6 @@ typedef int apr_wait_t;
#define APU_HAVE_SQLITE3 0
#define APU_HAVE_SQLITE2 0
#define APU_HAVE_ORACLE 0
#define APU_HAVE_FREETDS 0
#define APU_HAVE_ODBC 0
#endif

Expand Down
1 change: 0 additions & 1 deletion include/apr.hw
Expand Up @@ -648,7 +648,6 @@ typedef int apr_wait_t;
#define APU_HAVE_SQLITE3 0
#define APU_HAVE_SQLITE2 0
#define APU_HAVE_ORACLE 0
#define APU_HAVE_FREETDS 0
#define APU_HAVE_ODBC 0
#endif

Expand Down
4 changes: 0 additions & 4 deletions libapr.dsp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 395cc0e

Please sign in to comment.