From abffa9c62b61267e02a9bd7401d09ae7045a0177 Mon Sep 17 00:00:00 2001 From: jmarcus Date: Sat, 4 Jan 2003 21:41:48 +0000 Subject: [PATCH] Change all references to db3/DB3 to BDB. We now support Berkeley DB 3.0.17, 3.2.9, 3.3.11, 4.0.14, and 4.1.25. This means that --with-db3 is now --with-bdb. --- ChangeLog | 2 ++ bin/cnid/cnid_maint.in | 8 +++---- configure.in | 14 ++++++------- doc/DEVELOPER | 2 +- doc/FAQ | 10 ++++----- doc/INSTALL | 6 +++--- libatalk/cnid/Makefile.am | 4 ++-- libatalk/cnid/cnid_open.c | 4 ++-- macros/db3-check.m4 | 44 +++++++++++++++++++-------------------- 9 files changed, 48 insertions(+), 46 deletions(-) diff --git a/ChangeLog b/ChangeLog index b66ae9a2..e3ef2126 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ 2003-01-04 Joe Marcus Clarke + * Change all references to db3/DB3 to BDB since we now support + Berkeley DB3 and DB4. * Add DB 4.1.x support. 2002-09-26 Andrew Morgan diff --git a/bin/cnid/cnid_maint.in b/bin/cnid/cnid_maint.in index 23f3763c..e77af917 100755 --- a/bin/cnid/cnid_maint.in +++ b/bin/cnid/cnid_maint.in @@ -3,7 +3,7 @@ # # cnid_maint: A script to maintain the consistency of CNID databases. # -# $Id: cnid_maint.in,v 1.12 2002-08-31 08:05:40 jmarcus Exp $ +# $Id: cnid_maint.in,v 1.13 2003-01-04 21:41:48 jmarcus Exp $ # use strict; @@ -32,9 +32,9 @@ $START_CMD = '/usr/local/etc/rc.d/netatalk.sh start'; # Below is the example of a BSD ps. A SYSV example is: # /bin/ps -eflouid,pid,ppid,comm $PS_CMD = '@PS@ -axouser,pid,ppid,command'; -$DB_STAT = '@DB3_PATH@bin/db_stat'; -$DB_RECOVER = '@DB3_PATH@bin/db_recover'; -$DB_VERIFY = '@DB3_PATH@bin/db_verify'; +$DB_STAT = '@BDB_PATH@bin/db_stat'; +$DB_RECOVER = '@BDB_PATH@bin/db_recover'; +$DB_VERIFY = '@BDB_PATH@bin/db_verify'; $APPLE_VOLUMES_FILE = '@PKGCONFDIR@/AppleVolumes.default'; ## End edit section diff --git a/configure.in b/configure.in index 3576b81b..860ab757 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.174 2002-12-05 11:16:33 srittau Exp $ +dnl $Id: configure.in,v 1.175 2003-01-04 21:41:48 jmarcus Exp $ dnl configure.in for netatalk AC_INIT(bin/adv1tov2/adv1tov2.c) @@ -224,8 +224,8 @@ AC_ARG_ENABLE(force-uidgid, fi ) -dnl Don't use DB3 unless it's needed -db3_required=no +dnl Don't use BDB unless it's needed +bdb_required=no dnl Determine DID scheme AC_MSG_CHECKING([for DID scheme to use]) @@ -239,7 +239,7 @@ if test "x$did_scheme" = "xlast"; then AC_DEFINE(USE_LASTDID, 1) AC_MSG_RESULT([last]) elif test "x$did_scheme" = "xcnid"; then - db3_required="yes" + bdb_required="yes" AC_DEFINE(CNID_DB, 1) AC_MSG_RESULT([enabling build with CNID DB support]) else @@ -301,9 +301,9 @@ if test "$USE_CDB" = "yes"; then AC_DEFINE(CNID_DB_CDB, 1) fi -dnl Check for Berkeley DB3 library -if test "x$db3_required" = "xyes"; then - AC_PATH_DB3(, [AC_MSG_ERROR([Berkeley DB3 library not found!])]) +dnl Check for Berkeley DB library +if test "x$bdb_required" = "xyes"; then + AC_PATH_BDB(, [AC_MSG_ERROR([Berkeley DB library not found!])]) fi dnl Check for quota support diff --git a/doc/DEVELOPER b/doc/DEVELOPER index 5c13b4a6..03d9ad34 100644 --- a/doc/DEVELOPER +++ b/doc/DEVELOPER @@ -146,4 +146,4 @@ Berkeley DB is a programmatic toolkit that provides fast, reliable, scalable, and mission-critical database support to software developers. BDB 3 can downloaded from http://www.sleepycat.com/download.html -Netatalk's CNID database uses the library and header files from BDB3. +Netatalk's CNID database uses the library and header files from BDB. diff --git a/doc/FAQ b/doc/FAQ index 442682c2..e962801c 100644 --- a/doc/FAQ +++ b/doc/FAQ @@ -1,5 +1,5 @@ Netatalk Frequently Asked Questions -($Id: FAQ,v 1.9 2002-10-04 23:38:44 srittau Exp $) +($Id: FAQ,v 1.10 2003-01-04 21:41:48 jmarcus Exp $) ----------------------------------------------------------------------------- @@ -54,7 +54,7 @@ Q28a: How can I set Samba to hide the netatalk specific files (e.g. Q29: I compiled Samba with the --with-netatalk flag. What did that do? Q30: What about the differences in naming schemes, and legal/illegal characters between Windows, Macs (and unix?) -Q31: Where can I get the cnid-db (berkely db3) software? (needed for +Q31: Where can I get the cnid-db (Berkely DB) software? (needed for --with-did=cnid) Q32: What about security in Netatalk? @@ -209,8 +209,8 @@ Q7: I'm getting this message in my logs: A: Compile with the --with-did=last flag set. This activates a different method of calculating inodes in the software, and will hopefully fix some of these problems. This code, along with the CNID code, was still being - worked out in Pre7. The cnid/db3 flags also go along with this: - --with-db3=PATH specify path to Berkeley DB3 installation + worked out in Pre7. The cnid/bdb flags also go along with this: + --with-bdb=PATH specify path to Berkeley DB installation --with-did=[scheme] set DID scheme (cnid,last) (For more information on CNID, see the README.cnid file [may not exist yet], @@ -559,7 +559,7 @@ A: Check out the documentation about the 'mswindows' flag in afpd.conf (?). respectively). Educating the end user is important for this problem. -Q31: Where can I get the cnid-db (berkely db3) software? (needed for +Q31: Where can I get the cnid-db (Berkely DB) software? (needed for --with-did=cnid) A: First check to see if your unix has a port or package. If not, diff --git a/doc/INSTALL b/doc/INSTALL index 79223d30..2114c6d8 100644 --- a/doc/INSTALL +++ b/doc/INSTALL @@ -85,7 +85,7 @@ This step reads the options to the ./configure program and checks your system against the requirements of those options. It generally fails if your system doesn't meet the requirements. You should read the DEVELOPER file because some of these options require external sources -to function correctly. (PAM, OpenSSL, Berkeley DB3, TCP Wrappers, etc). +to function correctly. (PAM, OpenSSL, Berkeley DB, TCP Wrappers, etc). Netatalk options to the ./configure script: Use ./configure --help for a complete list. @@ -99,10 +99,10 @@ a complete list. --enable-dropkludge: enable the experimental dropbox fix (INSECURE!), ---with-db3=PATH: specify path to Berkeley DB3 installation, +--with-bdb=PATH: specify path to Berkeley DB installation, --with-did=[scheme]: set DID scheme (cnid,last), - CNID is a new scheme using Berkeley DB3 files to store a + CNID is a new scheme using Berkeley DB files to store a per-volume cnid database persistently. The last DID scheme recreates version 37b behaviour where diff --git a/libatalk/cnid/Makefile.am b/libatalk/cnid/Makefile.am index 2d04daaa..c7fabbf5 100644 --- a/libatalk/cnid/Makefile.am +++ b/libatalk/cnid/Makefile.am @@ -1,7 +1,7 @@ # Makefile.am for libatalk/cnid/ -CFLAGS = @CFLAGS@ @DB3_CFLAGS@ -LIBS = @LIBS@ @DB3_LIBS@ +CFLAGS = @CFLAGS@ @BDB_CFLAGS@ +LIBS = @LIBS@ @BDB_LIBS@ noinst_LTLIBRARIES = libcnid.la diff --git a/libatalk/cnid/cnid_open.c b/libatalk/cnid/cnid_open.c index 213a07c0..674343ef 100644 --- a/libatalk/cnid/cnid_open.c +++ b/libatalk/cnid/cnid_open.c @@ -1,5 +1,5 @@ /* - * $Id: cnid_open.c,v 1.48 2003-01-04 20:52:15 jmarcus Exp $ + * $Id: cnid_open.c,v 1.49 2003-01-04 21:41:49 jmarcus Exp $ * * Copyright (c) 1999. Adrian Sun (asun@zoology.washington.edu) * All Rights Reserved. See COPYRIGHT. @@ -106,7 +106,7 @@ DB_INIT_LOG | DB_INIT_TXN) #ifndef CNID_DB_CDB /* Let's try and use the youngest lock detector if present. - * If we can't do that, then let DB3 use its default deadlock detector. */ + * If we can't do that, then let BDB use its default deadlock detector. */ #if defined DB_LOCK_YOUNGEST #define DEAD_LOCK_DETECT DB_LOCK_YOUNGEST #else /* DB_LOCK_YOUNGEST */ diff --git a/macros/db3-check.m4 b/macros/db3-check.m4 index 120fd485..fdab9360 100644 --- a/macros/db3-check.m4 +++ b/macros/db3-check.m4 @@ -1,30 +1,30 @@ -dnl $Id: db3-check.m4,v 1.7 2002-02-07 05:08:36 jmarcus Exp $ -dnl Autoconf macro to check for the Berkeley DB3 library +dnl $Id: db3-check.m4,v 1.8 2003-01-04 21:41:49 jmarcus Exp $ +dnl Autoconf macro to check for the Berkeley DB library -AC_DEFUN([AC_PATH_DB3], [ - trydb3dir="" - AC_ARG_WITH(db3, - [ --with-db3=PATH specify path to Berkeley DB3 installation], +AC_DEFUN([AC_PATH_BDB], [ + trybdbdir="" + AC_ARG_WITH(bdb, + [ --with-bdb=PATH specify path to Berkeley DB installation], if test "x$withval" != "xno"; then - trydb3dir="$withval" + trybdbdir="$withval" fi ) - db3found=no - for db3dir in "" "$trydb3dir" "$trydb3dir/include" "$trydb3dir/include/db3" "/usr/local/BerkeleyDB.3.3/include" "/usr/local/include/db3" "/usr/local/include" "/usr/include/db3" "/usr/include" ; do - if test -f "$db3dir/db.h" ; then - db3libdir="`echo $db3dir | sed 's/include\/db3$/lib/'`" - db3libdir="`echo $db3libdir | sed 's/include$/lib/'`" + bdbfound=no + for bdbdir in "" "$trybdbdir" "$trybdbdir/include" "$trybdbdir/include/db3" "/usr/local/BerkeleyDB.3.3/include" "/usr/local/include/db3" "/usr/local/include" "/usr/include/db3" "/usr/include" ; do + if test -f "$bdbdir/db.h" ; then + bdblibdir="`echo $bdbdir | sed 's/include\/db3$/lib/'`" + bdblibdir="`echo $bdblibdir | sed 's/include$/lib/'`" savedcflags="$CFLAGS" savedldflags="$LDFLAGS" - CFLAGS="$CFLAGS -I$db3dir" - LDFLAGS="-L$db3libdir $LDFLAGS" + CFLAGS="$CFLAGS -I$bdbdir" + LDFLAGS="-L$bdblibdir $LDFLAGS" AC_CHECK_LIB(db, main, [ - db3found=yes - DB3_CFLAGS="-I$db3dir" - DB3_LIBS="-L$db3libdir -ldb" - DB3_PATH="`echo $db3dir | sed 's,include/db3$,,'`" + bdbfound=yes + BDB_CFLAGS="-I$bdbdir" + BDB_LIBS="-L$bdblibdir -ldb" + BDB_PATH="`echo $bdbdir | sed 's,include/db3$,,'`" ]) CFLAGS="$savedcflags" LDFLAGS="$savedldflags" @@ -32,13 +32,13 @@ AC_DEFUN([AC_PATH_DB3], [ fi done - if test "x$db3found" = "xyes"; then + if test "x$bdbfound" = "xyes"; then ifelse([$1], , :, [$1]) else ifelse([$2], , :, [$2]) fi - AC_SUBST(DB3_CFLAGS) - AC_SUBST(DB3_LIBS) - AC_SUBST(DB3_PATH) + AC_SUBST(BDB_CFLAGS) + AC_SUBST(BDB_LIBS) + AC_SUBST(BDB_PATH) ]) -- 2.39.2