diff options
-rw-r--r-- | Makefile.am | 6 | ||||
-rw-r--r-- | NEWS | 11 | ||||
-rw-r--r-- | NOTE-WARNING | 35 | ||||
-rw-r--r-- | README | 20 | ||||
-rw-r--r-- | configure.ac | 39 | ||||
-rw-r--r-- | doc/gdbm.texi | 27 | ||||
-rw-r--r-- | export/.gitignore | 5 | ||||
-rw-r--r-- | export/Makefile.am | 21 | ||||
-rw-r--r-- | export/export.c | 103 |
9 files changed, 26 insertions, 241 deletions
diff --git a/Makefile.am b/Makefile.am index 43a6c2f..6e00dec 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,16 +15,12 @@ # You should have received a copy of the GNU General Public License # along with GDBM. If not, see <http://www.gnu.org/licenses/>. */ -ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = build-aux/config.rpath NOTE-WARNING git2chg.awk if COMPAT_OPT MAYBE_COMPAT = compat endif -if ENABLE_EXPORT - MAYBE_EXPORT = export -endif -SUBDIRS = po src doc $(MAYBE_COMPAT) $(MAYBE_EXPORT) tests +SUBDIRS = po src doc $(MAYBE_COMPAT) tests AM_DISTCHECK_CONFIGURE_FLAGS = --enable-libgdbm-compat @@ -1,9 +1,18 @@ -GNU dbm NEWS -- history of user-visible changes. 2018-01-03 +GNU dbm NEWS -- history of user-visible changes. 2018-05-19 Copyright (C) 1990-2018 Free Software Foundation, Inc. See the end of file for copying conditions. Please send gdbm bug reports to <bug-gdbm@gnu.org>. +Version 1.14.90 + +* Implement database consistency checks + +* Improved error checking + +* Removed gdbm-1.8.3 compatibility layer + + Version 1.14.1 - 2018-01-03 * Increment soname current version number. diff --git a/NOTE-WARNING b/NOTE-WARNING index 6b1c197..3f21c13 100644 --- a/NOTE-WARNING +++ b/NOTE-WARNING @@ -7,28 +7,17 @@ system architectures, or potentially even different compilers. Differences in byte order, the size of file offsets, and even structure packing make gdbm files non-portable. -Gdbm version 1.9 includes `large file' support, enabling it on operating -systems where it is not the default. `Large file' support is essentially -when a system uses 64bit file offsets. Gdbm has, of course, supported `large -files' on systems where it was the default for a very long time. - -On some systems, such as Solaris, this functionality is not enabled by -default. Gdbm will now enable it. THIS MEANS THAT GDBM 1.9 MAY NOT BE -ABLE TO ACCESS DATABASES CREATED BY PREVIOUS VERIONS ON THE SAME SYSTEM. - -Running the `configure' script with the `--disable-largefile' flag should -produce a backwards-compatible build on such a system. However, for maximum -compatibility, and increased functionality, you may want to have your -application produce a portable copy of your database with the 1.8.3 version -of the library, and then load it back into version 1.9. - -Gdbm 1.9 contains a utility designed to help you produce such a portable -copy: gdbmexport. To build it, configure the package with the ---enable-gdbm-export option. For the information on how to use this -utility, refer to the documentation, chapter 17 "Export a database into -a portable format." (run `info gdbm gdbmexport' to access it, once -gdbm 1.9 has been installed, or `info -f doc/gdbm.info gdbmexport' to -access the shipped info file). - +Therefore, if you intend to send your database to somebody over the wire, +please dump it into a portable format using gdbm_dump and send the resulting +file instead. The receiving party will be able to recreate the database from +the dump using the gdbm_load command. + +Please refer to the documentation, chapters 22 and 23, for a detailed +discussion of these two tools. Run `info gdbm gdbm_dump', if gdbm is +already installed on your system, or `info -f doc/gdbm.info gdbm_dump' +to read the docs from the source tree. + +The documentation is also available online at +http://www.gnu.org.ua/software/gdbm/manual. @@ -1,5 +1,4 @@ GNU dbm README -Copyright (C) 2011, 2016-2018 Free Software Foundation, Inc. See the end of file for copying conditions. * Introduction @@ -42,23 +41,6 @@ to install them elsewhere, define the variable COMPATINCLUDEDIR, e.g. ./configure --enable-libgdbm-compat COMPATINCLUDEDIR=/usr/include/gdbm -** --enable-gdbm-export - -Build and install gdbmexport with the specified gdbm 1.8 library. - -** --with-gdbm183-library=LIB - -Build gdbmexport with specified (static) library. LIB must be -a loader argument valid for the use with cc(1), e.g.: -lgdbm-1.8. - -** --gdbm183-libdir=DIR - -Build gdbmexport with the gdbm library from the specified directory. - -** --gdbm183-includedir=DIR - -Build gdbmexport with gdbm.h from the specified directory. - ** --without-readline Don't compile GNU Readline support. By default, configure enables @@ -99,7 +81,7 @@ To track the development, visit * Copyright information: -Copyright (C) 2011, 2016 Free Software Foundation, Inc. +Copyright (C) 2011, 2016-2018 Free Software Foundation, Inc. Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that the diff --git a/configure.ac b/configure.ac index 3511f0d..25c4ff4 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ m4_define([_GDBM_VERSION_MAJOR], 1) m4_define([_GDBM_VERSION_MINOR], 14) -m4_define([_GDBM_VERSION_PATCH], 1) +m4_define([_GDBM_VERSION_PATCH], 90) AC_INIT([gdbm], _GDBM_VERSION_MAJOR._GDBM_VERSION_MINOR[]m4_ifdef([_GDBM_VERSION_PATCH],._GDBM_VERSION_PATCH), @@ -53,34 +53,6 @@ AC_ARG_ENABLE([libgdbm-compat], AC_ARG_VAR([COMPATINCLUDEDIR],[installation directory for dbm.h and ndbm.h]) test -z "$COMPATINCLUDEDIR" && COMPATINCLUDEDIR='$(includedir)' -AC_ARG_ENABLE([gdbm-export], - AC_HELP_STRING( - [--enable-gdbm-export], - [Build and install gdbmexport with specified gdbm 1.8 library. (Default is NO.)]), - [want_export=$enableval], - [want_export=no]) - -AC_ARG_WITH([gdbm183-library], - AC_HELP_STRING( - [--with-gdbm183-library], - [Build gdbmexport with specified (static) library.]), - [GDBM183_LIBRARY=$withval], - [GDBM183_LIBRARY="-lgdbm"]) - -AC_ARG_WITH([gdbm183-libdir], - AC_HELP_STRING( - [--with-gdbm183-libdir], - [Build gdbmexport with the gdbm library in the specified directory.]), - [GDBM183_LIBDIR=$withval], - [GDBM183_LIBDIR="/usr/local/lib"]) - -AC_ARG_WITH([gdbm183-includedir], - AC_HELP_STRING( - [--with-gdbm183-includedir], - [Build gdbmexport with gdbm.h in the specified directory.]), - [GDBM183_INCLUDEDIR=$withval], - [GDBM183_INCLUDEDIR="/usr/local/include"]) - dnl Check for programs AC_PROG_CC AC_PROG_CPP @@ -132,11 +104,7 @@ AC_TYPE_OFF_T AC_CHECK_SIZEOF(off_t) AC_CHECK_MEMBERS([struct stat.st_blksize]) -AC_SUBST(GDBM183_LIBRARY) -AC_SUBST(GDBM183_LIBDIR) -AC_SUBST(GDBM183_INCLUDEDIR) AM_CONDITIONAL([COMPAT_OPT], [test "$want_compat" = yes]) -AM_CONDITIONAL([ENABLE_EXPORT], [test "$want_export" = yes]) # Check for Curses libs. for lib in ncurses curses termcap @@ -214,7 +182,6 @@ cat <<EOF GDBM settings summary: Compatibility library ......................... $status_compat -Compatibility export tool ..................... $status_export Memory mapped I/O ............................. $mapped_io GNU Readline .................................. $status_readline Debugging support ............................. $status_debug @@ -223,7 +190,6 @@ Debugging support ............................. $status_debug EOF ], [status_compat=$want_compat -status_export=$want_export mapped_io=$mapped_io status_readline=$status_readline status_debug=$status_debug]) @@ -232,7 +198,6 @@ AC_CONFIG_FILES([Makefile src/Makefile src/gdbm.h doc/Makefile - compat/Makefile - export/Makefile]) + compat/Makefile]) AC_OUTPUT diff --git a/doc/gdbm.texi b/doc/gdbm.texi index 1631a6a..2aac1c3 100644 --- a/doc/gdbm.texi +++ b/doc/gdbm.texi @@ -124,7 +124,6 @@ Programs * gdbmtool:: Examine and modify a GDBM database. * gdbm_dump:: Dump the database into a flat file. * gdbm_load:: Load the database from a flat file. -* gdbmexport:: Export a database into a portable format. * Exit codes:: Exit codes returned by GDBM utilities. Other topics: @@ -2324,8 +2323,6 @@ dump is created. The global variable @code{filemode} specifies the permissions to use for the created output file. - -See also @ref{gdbmexport}. @end deffn @deffn {command verb} fetch @var{key} @@ -2744,30 +2741,6 @@ Print a terse invocation syntax summary along with a list of available command line options. @end table -@node gdbmexport -@chapter Export a database into a portable format. -@prindex gdbmexport - -The @command{gdbmexport} utility converts the database of an older -GDBM version into a binary flat format. - -The utility takes two mandatory arguments: the name of the database -file to convert and the output file name, e.g.: - -@example -$ gdbmexport junk.gdbm junk.flat -@end example - -In addition the following two options are understood: - -@table @option -@item -h -Display short usage summary and exit. - -@item -v -Display program version and licensing information, and exit. -@end table - @node Exit codes @chapter Exit codes @cindex exit code diff --git a/export/.gitignore b/export/.gitignore deleted file mode 100644 index 62e7a85..0000000 --- a/export/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -gdbmexport diff --git a/export/Makefile.am b/export/Makefile.am deleted file mode 100644 index 9272427..0000000 --- a/export/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -# This file is part of GDBM. -*- Makefile -*- -# Copyright (C) 2007, 2011, 2017-2018 Free Software Foundation, Inc. -# -# GDBM is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GDBM is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GDBM. If not, see <http://www.gnu.org/licenses/>. */ - -AM_CPPFLAGS = -I$(GDBM183_INCLUDEDIR) -I$(srcdir)/../src - -bin_PROGRAMS = gdbmexport -gdbmexport_SOURCES = export.c -gdbmexport_LDADD = -L$(GDBM183_LIBDIR) $(GDBM183_LIBRARY) diff --git a/export/export.c b/export/export.c deleted file mode 100644 index ede4858..0000000 --- a/export/export.c +++ /dev/null @@ -1,103 +0,0 @@ -/* export.c - Stand alone flat file exporter for older versions of GDBM. */ - -/* This file is part of GDBM, the GNU data base manager. - Copyright (C) 2007, Free Software Foundation, Inc. - - GDBM is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - GDBM is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with GDBM. If not, see <http://www.gnu.org/licenses/>. */ - -/* Include system configuration before all else. */ -#include "autoconf.h" - -#include "systems.h" - -#include <gdbm.h> - -/* Pull in gdbm_export() */ -#define GDBM_EXPORT_18 -#include "gdbmexp.c" - -void -usage (char *s) -{ - printf ("Usage: %s database outfile\n", s); - printf (" or: %s [-hv]\n", s); - printf ("Convert GDBM database into a flat dump format.\n"); - printf ("Linked with %s\n", gdbm_version); - printf ("\n"); - printf ("Report bugs to <%s>.\n", PACKAGE_BUGREPORT); -} - - -void -version () -{ - printf ("gdbmexport (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION); - printf ("Copyright (C) 2007 Free Software Foundation, Inc.\n"); - printf ("License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n"); - printf ("This is free software: you are free to change and redistribute it.\n"); - printf ("There is NO WARRANTY, to the extent permitted by law.\n"); -} - - -int -main(int argc, char *argv[]) -{ - int c; - GDBM_FILE dbf; - int flags = 0; - - while ((c = getopt (argc, argv, "hlv")) != -1) - switch (c) - { - case 'h': - usage (argv[0]); - exit (0); - - case 'l': - flags = GDBM_NOLOCK; - break; - - case 'v': - version (); - exit (0); - - default: - usage (argv[0]); - exit (1); - } - - if (argc != 3) - { - usage (argv[0]); - exit (1); - } - - dbf = gdbm_open (argv[1], 0, GDBM_READER | flags, 0600, NULL); - if (dbf == NULL) - { - fprintf (stderr, "%s: couldn't open database, %s\n", argv[0], - gdbm_strerror (gdbm_errno)); - exit (1); - } - - if (gdbm_export (dbf, argv[2], GDBM_WRCREAT | flags, 0600) == -1) - { - fprintf (stderr, "%s: export failed, %s\n", - argv[0], gdbm_strerror (gdbm_errno)); - gdbm_close (dbf); - exit (1); - } - gdbm_close (dbf); - exit (0); -} |