mirror of
https://github.com/openwrt/packages.git
synced 2025-12-26 11:16:31 +04:00
apr-util: add drivers
This adds the following drivers as extra packages: - openssl - mysql - odbc - pgsql - sqlite3 - gdbm (dbm) - ldap This also removes the gratuitous dependency on libsqlite3 from libaprutil (dbd_sqlite3 was nevery packaged before, after all). With this ldap and session-crypto support can be enabled in apache. The mysql driver is currently marked BROKEN, because apr-util still uses mysql server headers, which aren't part of mariadb-connector-c. But there's work underway at apr-util upstream to fix that so that BROKEN can be removed during a feature version bump. The gdbm dbm driver got added together with a patch that fixes the error handling. Patch is from Debian. Resolves #10886 Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This commit is contained in:
79
libs/apr-util/patches/002-fix-gdbm-error-handling.patch
Normal file
79
libs/apr-util/patches/002-fix-gdbm-error-handling.patch
Normal file
@@ -0,0 +1,79 @@
|
||||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=889170
|
||||
# needs to be submitted upstream
|
||||
--- apr-util.orig/dbm/apr_dbm_gdbm.c
|
||||
+++ apr-util/dbm/apr_dbm_gdbm.c
|
||||
@@ -36,13 +36,22 @@
|
||||
static apr_status_t g2s(int gerr)
|
||||
{
|
||||
if (gerr == -1) {
|
||||
- /* ### need to fix this */
|
||||
- return APR_EGENERAL;
|
||||
+ return APR_OS_START_USEERR + gdbm_errno;
|
||||
}
|
||||
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
|
||||
+static apr_status_t gdat2s(datum d)
|
||||
+{
|
||||
+ if (d.dptr == NULL) {
|
||||
+ return APR_OS_START_USEERR + gdbm_errno;
|
||||
+ }
|
||||
+
|
||||
+ return APR_SUCCESS;
|
||||
+}
|
||||
+
|
||||
+
|
||||
static apr_status_t datum_cleanup(void *dptr)
|
||||
{
|
||||
if (dptr)
|
||||
@@ -55,19 +64,15 @@ static apr_status_t set_error(apr_dbm_t
|
||||
{
|
||||
apr_status_t rv = APR_SUCCESS;
|
||||
|
||||
- /* ### ignore whatever the DBM said (dbm_said); ask it explicitly */
|
||||
-
|
||||
- if ((dbm->errcode = gdbm_errno) == GDBM_NO_ERROR) {
|
||||
+ if (dbm_said == APR_SUCCESS) {
|
||||
+ dbm->errcode = GDBM_NO_ERROR;
|
||||
dbm->errmsg = NULL;
|
||||
}
|
||||
else {
|
||||
+ dbm->errcode = dbm_said;
|
||||
dbm->errmsg = gdbm_strerror(gdbm_errno);
|
||||
- rv = APR_EGENERAL; /* ### need something better */
|
||||
}
|
||||
|
||||
- /* captured it. clear it now. */
|
||||
- gdbm_errno = GDBM_NO_ERROR;
|
||||
-
|
||||
return rv;
|
||||
}
|
||||
|
||||
@@ -144,7 +149,7 @@ static apr_status_t vt_gdbm_fetch(apr_db
|
||||
|
||||
/* store the error info into DBM, and return a status code. Also, note
|
||||
that *pvalue should have been cleared on error. */
|
||||
- return set_error(dbm, APR_SUCCESS);
|
||||
+ return set_error(dbm, gdat2s(rd));
|
||||
}
|
||||
|
||||
static apr_status_t vt_gdbm_store(apr_dbm_t *dbm, apr_datum_t key,
|
||||
@@ -203,7 +208,7 @@ static apr_status_t vt_gdbm_firstkey(apr
|
||||
apr_pool_cleanup_null);
|
||||
|
||||
/* store any error info into DBM, and return a status code. */
|
||||
- return set_error(dbm, APR_SUCCESS);
|
||||
+ return set_error(dbm, gdat2s(rd));
|
||||
}
|
||||
|
||||
static apr_status_t vt_gdbm_nextkey(apr_dbm_t *dbm, apr_datum_t *pkey)
|
||||
@@ -223,7 +228,7 @@ static apr_status_t vt_gdbm_nextkey(apr_
|
||||
apr_pool_cleanup_null);
|
||||
|
||||
/* store any error info into DBM, and return a status code. */
|
||||
- return set_error(dbm, APR_SUCCESS);
|
||||
+ return set_error(dbm, gdat2s(rd));
|
||||
}
|
||||
|
||||
static void vt_gdbm_freedatum(apr_dbm_t *dbm, apr_datum_t data)
|
||||
Reference in New Issue
Block a user