Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Mar 2014 21:25:03 +0000 (UTC)
From:      "Timur I. Bakeyev" <timur@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r348008 - in head/databases: . ntdb ntdb/files
Message-ID:  <201403122125.s2CLP3A1009073@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: timur
Date: Wed Mar 12 21:25:03 2014
New Revision: 348008
URL: http://svnweb.freebsd.org/changeset/ports/348008
QAT: https://qat.redports.org/buildarchive/r348008/

Log:
  Add new port databases/ntdb - it's revised version of databases/tdb, used by
  net/samba41 port.

Added:
  head/databases/ntdb/
  head/databases/ntdb/Makefile   (contents, props changed)
  head/databases/ntdb/distinfo   (contents, props changed)
  head/databases/ntdb/files/
  head/databases/ntdb/files/ntdb.3   (contents, props changed)
  head/databases/ntdb/files/ntdbbackup.8   (contents, props changed)
  head/databases/ntdb/files/ntdbdump.8   (contents, props changed)
  head/databases/ntdb/files/ntdbrestore.8   (contents, props changed)
  head/databases/ntdb/files/ntdbtool.8   (contents, props changed)
  head/databases/ntdb/files/patch-buildtools__wafsamba__samba_install.py   (contents, props changed)
  head/databases/ntdb/files/patch-wscript   (contents, props changed)
  head/databases/ntdb/pkg-descr   (contents, props changed)
Modified:
  head/databases/Makefile

Modified: head/databases/Makefile
==============================================================================
--- head/databases/Makefile	Wed Mar 12 21:15:41 2014	(r348007)
+++ head/databases/Makefile	Wed Mar 12 21:25:03 2014	(r348008)
@@ -246,6 +246,7 @@
     SUBDIR += nagios-check_postgres_replication
     SUBDIR += nagios-check_redis
     SUBDIR += namazu2
+    SUBDIR += ntdb
     SUBDIR += ocaml-mysql
     SUBDIR += ocaml-pgocaml
     SUBDIR += ocaml-sqlite3

Added: head/databases/ntdb/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/ntdb/Makefile	Wed Mar 12 21:25:03 2014	(r348008)
@@ -0,0 +1,134 @@
+# $FreeBSD$
+
+PORTNAME=		ntdb
+PORTVERSION=		1.0
+PORTREVISION=		0
+PORTEPOCH=		0
+CATEGORIES=		databases
+MASTER_SITES=		${MASTER_SITE_SAMBA}
+MASTER_SITE_SUBDIR=	tdb
+
+MAINTAINER=		timur@FreeBSD.org
+COMMENT=		Not so Trivial DataBase
+
+LICENSE=		GPLv3
+
+USES=			compiler pkgconfig
+USE_PYTHON_BUILD=	2
+USE_LDCONFIG=		yes
+WAF_TOOL=		buildtools/bin/waf
+CONFIGURE_LOG=		bin/config.log
+
+PKGCONFIGDIR?=		${PREFIX}/libdata/pkgconfig
+PLIST_SUB+=		PKGCONFIGDIR=${PKGCONFIGDIR:S;${PREFIX}/;;}
+
+CONFIGURE_ARGS+=	--prefix=${PREFIX} \
+			--mandir=${MANPREFIX}/man \
+			--infodir=${PREFIX}/${INFO_PATH}/${INFO_SUBDIR}
+# Support staging
+DESTDIRNAME=		--destdir
+
+.include <bsd.port.options.mk>
+
+.include <bsd.port.pre.mk>
+
+.if ! ${PORT_OPTIONS:MMANPAGES}
+CONFIGURE_ENV+=		XSLTPROC="true"
+.else
+BUILD_DEPENDS+=		${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:${PORTSDIR}/textproc/docbook-xsl \
+			xsltproc:${PORTSDIR}/textproc/libxslt
+.endif
+
+PLIST_FILES=		bin/ntdbbackup \
+			bin/ntdbdump \
+			bin/ntdbrestore \
+			bin/ntdbtool \
+			include/ntdb.h \
+			lib/libntdb.so \
+			lib/libntdb.so.1 \
+			%%PKGCONFIGDIR%%/ntdb.pc
+
+# No fancy color error messages
+.if ${COMPILER_TYPE} == "clang"
+CFLAGS+=		-fno-color-diagnostics
+.endif
+CONFIGURE_ENV+=		NOCOLOR=yes
+MAKE_ENV+=		NOCOLOR=yes
+
+.if !defined(DISABLE_MAKE_JOBS) && !defined(MAKE_JOBS_UNSAFE)
+CONFIGURE_ARGS+=	--jobs=${MAKE_JOBS_NUMBER}
+_MAKE_JOBS+=		--jobs=${MAKE_JOBS_NUMBER}
+.endif
+
+USE_PYTHON_RUN=		yes
+PLIST_FILES+=		%%PYTHON_SITELIBDIR%%/ntdb.so
+PLIST_DIRSTRY+=		%%PYTHON_SITELIBDIR%% \
+			%%PYTHON_LIBDIR%%
+
+TDB_MAN3=		man/man3/ntdb.3.gz
+
+TDB_MAN8=		man/man8/ntdbbackup.8.gz \
+			man/man8/ntdbdump.8.gz \
+			man/man8/ntdbrestore.8.gz \
+			man/man8/ntdbtool.8.gz
+
+PLIST_FILES+=		${TDB_MAN3} ${TDB_MAN8}
+
+CONFIGURE_TARGET=	configure
+ALL_TARGET=		build
+INSTALL_TARGET=		install
+
+IGNORE_NONTHREAD_PYTHON=needs port lang/python${PYTHON_SUFFIX} to be build with THREADS support
+
+post-patch:
+			@${REINPLACE_CMD} -e 's|%%PKGCONFIGDIR%%|${PKGCONFIGDIR}|g' \
+				${BUILD_WRKSRC}/wscript
+
+# Use threading (or multiprocessing) but not thread (renamed in python 3+).
+pre-configure:
+			@if ! ${PYTHON_CMD} -c "import multiprocessing;" 2>/dev/null; then \
+				${ECHO_CMD}; \
+				${ECHO_MSG} "===>  ${PKGNAME} "${IGNORE_NONTHREAD_PYTHON:Q}.; \
+				${ECHO_CMD}; \
+				${FALSE}; \
+			fi
+
+do-configure:
+			@(cd ${CONFIGURE_WRKSRC} && \
+			    ${SET_LATE_CONFIGURE_ARGS} \
+				if ! ${SETENV} CC="${CC}" CPP="${CPP}" CXX="${CXX}" \
+					CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" CXXFLAGS="${CXXFLAGS}" \
+					LDFLAGS="${LDFLAGS}" \
+					INSTALL="/usr/bin/install -c ${_BINOWNGRP}" \
+					INSTALL_DATA="${INSTALL_DATA}" \
+					INSTALL_LIB="${INSTALL_LIB}" \
+					INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
+					INSTALL_SCRIPT="${INSTALL_SCRIPT}" \
+					${CONFIGURE_ENV} ${PYTHON_CMD} ${CONFIGURE_WRKSRC}/${WAF_TOOL} ${CONFIGURE_ARGS} ${CONFIGURE_TARGET}; then \
+						${ECHO_MSG} "===>  Script \"${CONFIGURE_SCRIPT}\" failed unexpectedly."; \
+						(${ECHO_CMD} ${CONFIGURE_FAIL_MESSAGE}) | ${FMT} 75 79 ; \
+						${FALSE}; \
+				fi)
+
+pre-build:
+.if ! ${PORT_OPTIONS:MMANPAGES}
+			-${MKDIR} ${BUILD_WRKSRC}/bin/default/man
+.	for man in ${TDB_MAN3} ${TDB_MAN8}
+			${INSTALL_MAN} ${FILESDIR}/`basename ${man} .gz` ${BUILD_WRKSRC}/bin/default/man
+.	endfor
+.endif
+
+do-build:
+			@(cd ${BUILD_WRKSRC}; \
+			if ! ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${BUILD_WRKSRC}/${WAF_TOOL} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET}; then \
+				if [ x != x${BUILD_FAIL_MESSAGE} ] ; then \
+					${ECHO_MSG} "===> Compilation failed unexpectedly."; \
+					(${ECHO_CMD} ${BUILD_FAIL_MESSAGE}) | ${FMT} 75 79 ; \
+				fi; \
+			${FALSE}; \
+			fi)
+
+do-install:
+			@(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${INSTALL_WRKSRC}/${WAF_TOOL} ${MAKE_ARGS} ${INSTALL_TARGET})
+
+.include <bsd.port.mk>

Added: head/databases/ntdb/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/ntdb/distinfo	Wed Mar 12 21:25:03 2014	(r348008)
@@ -0,0 +1,2 @@
+SHA256 (ntdb-1.0.tar.gz) = 817ae862b1e6976cab867468f209d8417a90c7c2fcf0ec079a45645d7e7ebf49
+SIZE (ntdb-1.0.tar.gz) = 794585

Added: head/databases/ntdb/files/ntdb.3
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/ntdb/files/ntdb.3	Wed Mar 12 21:25:03 2014	(r348008)
@@ -0,0 +1,115 @@
+'\" t
+.\"     Title: ntdb
+.\"    Author: [see the "AUTHOR" section]
+.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>;
+.\"      Date: 03/12/2014
+.\"    Manual: System Administration tools
+.\"    Source: Samba 4.1
+.\"  Language: English
+.\"
+.TH "NTDB" "3" "03/12/2014" "Samba 4\&.1" "System Administration tools"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+ntdb \- A not\-so trivial keyword/data database system
+.SH "SYNOPSIS"
+.sp
+.nf
+#include <ntdb\&.h>
+.fi
+.SH "DESCRIPTION"
+.PP
+If you have previously used the tdb library from Samba, much of this will seem familiar, but there are some API changes which a compiler will warn you about if you simply replace \*(Aqtdb\*(Aq with \*(Aqntdb\*(Aq in your code! The on\-disk format for ntdb is incompatible with tdb\&.
+.PP
+tdb\*(Aqs API was based on gdbm, and ntdb continues this tradition, with enhancements\&. A differences guide is available in the text file
+lib/ntdb/doc/TDB_porting\&.txt
+in the SAMBA source tree\&.
+.SH "NTDB API OVERVIEW"
+.PP
+The complete API is documented in the ntdb\&.h header, which is kept up\-to\-date and recommended reading\&.
+.PP
+Normal usage is to call ntdb_open() to create or open an ntdb file\&. ntdb_store() is used to add records, ntdb_fetch() is used to fetch them\&. Traversals are supported via callback (ntdb_traverse()) or iteration (ntdb_firstkey() and ntdb_nextkey())\&. Transactions are supported for batching updates or reads atomically, using ntdb_transaction_start() and ntdb_transaction_commit()\&.
+.SS "Use With Talloc"
+.PP
+ntdb_open() takes an optional linked list of attributes: in particular you can specify an alternate allocator (such as talloc):
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+#include <talloc\&.h>
+#include <ntdb\&.h>
+
+static void *my_alloc(const void *owner, size_t len, void *priv)
+{
+    return talloc_size(owner, len);
+}
+
+static void *my_expand(void *old, size_t newlen, void *priv)
+{
+    return talloc_realloc_size(NULL, old, newlen);
+}
+
+static void my_free(void *old, void *priv)
+{
+    talloc_free(old);
+}
+
+/* This opens an ntdb file as a talloc object with given parent\&. */
+struct ntdb_context *ntdb_open_talloc(const void *parent,
+                                      const char *filename)
+{
+     struct ntdb_context *ntdb;
+     union ntdb_attribute alloc;
+
+     alloc\&.base\&.attr = NTDB_ATTRIBUTE_ALLOCATOR;
+     alloc\&.base\&.next = NULL;
+     alloc\&.alloc\&.alloc = my_alloc;
+     alloc\&.alloc\&.expand = my_expand;
+     alloc\&.alloc\&.free = my_free;
+
+     ntdb = ntdb_open(filename, NTDB_DEFAULT, O_RDWR|O_CREAT, 0600,
+                      &alloc);
+     if (ntdb) {
+         talloc_steal(parent, ntdb);
+         talloc_set_name(ntdb, "%s", filename);
+     }
+     return ntdb;
+}
+.fi
+.if n \{\
+.RE
+.\}
+.SH "SEE ALSO"
+.PP
+
+\m[blue]\fB\%http://tdb.samba.org/\fR\m[]
+.SH "AUTHOR"
+.PP
+The original tdb software was created by Andrew Tridgell, and is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. ntdb was derived from tdb, but mostly rewritten by Rusty Russell\&.
+.SH "COPYRIGHT/LICENSE"
+.PP
+Copyright (C) Rusty Russell 2013, IBM Corporation
+.PP
+This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version\&.
+.PP
+This program 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\&.
+.PP
+You should have received a copy of the GNU General Public License along with this program; if not, see http://www\&.gnu\&.org/licenses/\&.

Added: head/databases/ntdb/files/ntdbbackup.8
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/ntdb/files/ntdbbackup.8	Wed Mar 12 21:25:03 2014	(r348008)
@@ -0,0 +1,133 @@
+'\" t
+.\"     Title: ntdbbackup
+.\"    Author: [see the "AUTHOR" section]
+.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>;
+.\"      Date: 03/12/2014
+.\"    Manual: System Administration tools
+.\"    Source: Samba 4.1
+.\"  Language: English
+.\"
+.TH "NTDBBACKUP" "8" "03/12/2014" "Samba 4\&.1" "System Administration tools"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+ntdbbackup \- tool for backing up and for validating the integrity of samba \&.ntdb files
+.SH "SYNOPSIS"
+.HP \w'\fBntdbbackup\fR\ 'u
+\fBntdbbackup\fR [\-s\ suffix] [\-v] [\-h]
+.SH "DESCRIPTION"
+.PP
+This tool is part of the
+\fBsamba\fR(1)
+suite\&.
+.PP
+\fBntdbbackup\fR
+is a tool that may be used to backup samba \&.ntdb files\&. This tool may also be used to verify the integrity of the \&.ntdb files prior to samba startup or during normal operation\&. If it finds file damage and it finds a prior backup the backup file will be restored\&.
+.SH "OPTIONS"
+.PP
+\-h
+.RS 4
+Get help information\&.
+.RE
+.PP
+\-s suffix
+.RS 4
+The
+\fB\-s\fR
+option allows the administrator to specify a file backup extension\&. This way it is possible to keep a history of ntdb backup files by using a new suffix for each backup\&.
+.RE
+.PP
+\-v
+.RS 4
+The
+\fB\-v\fR
+will check the database for damages (corrupt data) which if detected causes the backup to be restored\&.
+.RE
+.SH "COMMANDS"
+.PP
+\fIGENERAL INFORMATION\fR
+.PP
+The
+\fBntdbbackup\fR
+utility can safely be run at any time\&. It was designed so that it can be used at any time to validate the integrity of ntdb files, even during Samba operation\&. Typical usage for the command will be:
+.PP
+ntdbbackup [\-s suffix] *\&.ntdb
+.PP
+Before restarting samba the following command may be run to validate \&.ntdb files:
+.PP
+ntdbbackup \-v [\-s suffix] *\&.ntdb
+.PP
+Note that Samba 4 can use \&.tdb files instead, so you should use
+\fBtdbbackup\fR
+on those files\&.
+.PP
+Samba \&.tdb and \&.ntdb files are stored in various locations, be sure to run backup all \&.(n)tdb files on the system\&. Important files includes:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+
+\fBsecrets\&.(n)tdb\fR
+\- usual location is in the /usr/local/samba/private directory, or on some systems in /etc/samba\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+
+\fBpassdb\&.(n)tdb\fR
+\- usual location is in the /usr/local/samba/private directory, or on some systems in /etc/samba\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+
+\fB*\&.tdb\fR
+and
+\fB*\&.ntdb\fR
+located in the /usr/local/samba/var directory or on some systems in the /var/cache or /var/lib/samba directories\&.
+.RE
+.SH "VERSION"
+.PP
+This man page is correct for version 4 of the Samba suite\&.
+.SH "SEE ALSO"
+.PP
+tdbbackup(8), ntdbrestore(8)
+.SH "AUTHOR"
+.PP
+The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&.
+.PP
+The ntdbbackup man page was written by Rusty Russell, based on the tdbbackup man page by John H Terpstra\&.

Added: head/databases/ntdb/files/ntdbdump.8
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/ntdb/files/ntdbdump.8	Wed Mar 12 21:25:03 2014	(r348008)
@@ -0,0 +1,68 @@
+'\" t
+.\"     Title: ntdbdump
+.\"    Author: [see the "AUTHOR" section]
+.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>;
+.\"      Date: 03/12/2014
+.\"    Manual: System Administration tools
+.\"    Source: Samba 4.1
+.\"  Language: English
+.\"
+.TH "NTDBDUMP" "8" "03/12/2014" "Samba 4\&.1" "System Administration tools"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+ntdbdump \- tool for printing the contents of an NTDB file
+.SH "SYNOPSIS"
+.HP \w'\fBntdbdump\fR\ 'u
+\fBntdbdump\fR [\-k\ \fIkeyname\fR] [\-e] [\-h] {filename}
+.SH "DESCRIPTION"
+.PP
+This tool is part of the
+\fBsamba\fR(1)
+suite\&.
+.PP
+\fBntdbdump\fR
+is a very simple utility that \*(Aqdumps\*(Aq the contents of a NTDB (New Trivial DataBase) file to standard output in a human\-readable format\&.
+.PP
+This tool can be used when debugging problems with NTDB files\&. It is intended for those who are somewhat familiar with Samba internals\&.
+.SH "OPTIONS"
+.PP
+\-h
+.RS 4
+Get help information\&.
+.RE
+.PP
+\-k \fIkeyname\fR
+.RS 4
+The
+\fB\-k\fR
+option restricts dumping to a single key, if found\&.
+.RE
+.SH "SEE ALSO"
+.PP
+tdbdump(8), ntdbtool(8)
+.SH "VERSION"
+.PP
+This man page is correct for version 4 of the Samba suite\&.
+.SH "AUTHOR"
+.PP
+The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&.
+.PP
+The ntdbdump man page was written by Rusty Russell, base on the tdbdump man page by Jelmer Vernooij\&.

Added: head/databases/ntdb/files/ntdbrestore.8
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/ntdb/files/ntdbrestore.8	Wed Mar 12 21:25:03 2014	(r348008)
@@ -0,0 +1,57 @@
+'\" t
+.\"     Title: ntdbrestore
+.\"    Author: [see the "AUTHOR" section]
+.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>;
+.\"      Date: 03/12/2014
+.\"    Manual: System Administration tools
+.\"    Source: Samba 4.1
+.\"  Language: English
+.\"
+.TH "NTDBRESTORE" "8" "03/12/2014" "Samba 4\&.1" "System Administration tools"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+ntdbrestore \- tool for creating a NTDB file out of a ntdbdump output
+.SH "SYNOPSIS"
+.HP \w'\fBntdbrestore\fR\ 'u
+\fBntdbrestore\fR {ntdbfilename}
+.SH "DESCRIPTION"
+.PP
+This tool is part of the
+\fBsamba\fR(1)
+suite\&.
+.PP
+\fBntdbrestore\fR
+is a very simple utility that \*(Aqrestores\*(Aq the contents of dump file into NTDB (New Trivial DataBase) file\&. The dump file is obtained from the ntdbdump or tdbdump commands\&.
+.PP
+This tool wait on the standard input for the content of the dump and will write the ntdb in the ntdbfilename parameter\&.
+.PP
+This tool can be used to translate between ntdb and tdb files by dumping and restoring\&.
+.SH "VERSION"
+.PP
+This man page is correct for version 4 of the Samba suite\&.
+.SH "SEE ALSO"
+.PP
+ntdbdump(8), tdbrestore(8)
+.SH "AUTHOR"
+.PP
+The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&. ntdbrestore was written by Rusty Russell based on tdbrestore, which was initially written by Volker Lendecke based on an idea by Simon McVittie\&.
+.PP
+The ntdbrestore man page was written by Rusty Russell, based on the tdbrestore man page by Matthieu Patou\&.

Added: head/databases/ntdb/files/ntdbtool.8
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/ntdb/files/ntdbtool.8	Wed Mar 12 21:25:03 2014	(r348008)
@@ -0,0 +1,167 @@
+'\" t
+.\"     Title: ntdbtool
+.\"    Author: [see the "AUTHOR" section]
+.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>;
+.\"      Date: 03/12/2014
+.\"    Manual: System Administration tools
+.\"    Source: Samba 4.1
+.\"  Language: English
+.\"
+.TH "NTDBTOOL" "8" "03/12/2014" "Samba 4\&.1" "System Administration tools"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+ntdbtool \- manipulate the contents NTDB files
+.SH "SYNOPSIS"
+.HP \w'\fBntdbtool\fR\ 'u
+\fBntdbtool\fR
+.HP \w'\fBntdbtool\fR\ 'u
+\fBntdbtool\fR \fINTDBFILE\fR [\fICOMMANDS\fR...]
+.SH "DESCRIPTION"
+.PP
+This tool is part of the
+\fBsamba\fR(1)
+suite\&.
+.PP
+\fBntdbtool\fR
+a tool for displaying and altering the contents of Samba NTDB (New Trivial DataBase) files\&. Each of the commands listed below can be entered interactively or provided on the command line\&.
+.SH "COMMANDS"
+.PP
+\fBcreate\fR \fINTDBFILE\fR
+.RS 4
+Create a new database named
+\fINTDBFILE\fR\&.
+.RE
+.PP
+\fBopen\fR \fINTDBFILE\fR
+.RS 4
+Open an existing database named
+\fINTDBFILE\fR\&.
+.RE
+.PP
+\fBerase\fR
+.RS 4
+Erase the current database\&.
+.RE
+.PP
+\fBdump\fR
+.RS 4
+Dump the current database as strings\&.
+.RE
+.PP
+\fBcdump\fR
+.RS 4
+Dump the current database as connection records\&.
+.RE
+.PP
+\fBkeys\fR
+.RS 4
+Dump the current database keys as strings\&.
+.RE
+.PP
+\fBhexkeys\fR
+.RS 4
+Dump the current database keys as hex values\&.
+.RE
+.PP
+\fBinfo\fR
+.RS 4
+Print summary information about the current database\&.
+.RE
+.PP
+\fBinsert\fR \fIKEY\fR \fIDATA\fR
+.RS 4
+Insert a record into the current database\&.
+.RE
+.PP
+\fBmove\fR \fIKEY\fR \fINTDBFILE\fR
+.RS 4
+Move a record from the current database into
+\fINTDBFILE\fR\&.
+.RE
+.PP
+\fBstore\fR \fIKEY\fR \fIDATA\fR
+.RS 4
+Store (replace) a record in the current database\&.
+.RE
+.PP
+\fBshow\fR \fIKEY\fR
+.RS 4
+Show a record by key\&.
+.RE
+.PP
+\fBdelete\fR \fIKEY\fR
+.RS 4
+Delete a record by key\&.
+.RE
+.PP
+\fBlist\fR
+.RS 4
+Print the current database hash table and free list\&.
+.RE
+.PP
+\fBfree\fR
+.RS 4
+Print the current database and free list\&.
+.RE
+.PP
+\fB!\fR \fICOMMAND\fR
+.RS 4
+Execute the given system command\&.
+.RE
+.PP
+\fBfirst\fR
+.RS 4
+Print the first record in the current database\&.
+.RE
+.PP
+\fBnext\fR
+.RS 4
+Print the next record in the current database\&.
+.RE
+.PP
+\fBcheck\fR
+.RS 4
+Check the integrity of the current database\&.
+.RE
+.PP
+\fBrepack\fR
+.RS 4
+Repack a database using a temporary file to remove fragmentation\&.
+.RE
+.PP
+\fBquit\fR
+.RS 4
+Exit
+\fBntdbtool\fR\&.
+.RE
+.SH "SEE ALSO"
+.PP
+tdbtool(8)
+.SH "CAVEATS"
+.PP
+The contents of the Samba NTDB files are private to the implementation and should not be altered with
+\fBntdbtool\fR\&.
+.SH "VERSION"
+.PP
+This man page is correct for version 4\&.0 of the Samba suite\&.
+.SH "AUTHOR"
+.PP
+The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&.

Added: head/databases/ntdb/files/patch-buildtools__wafsamba__samba_install.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/ntdb/files/patch-buildtools__wafsamba__samba_install.py	Wed Mar 12 21:25:03 2014	(r348008)
@@ -0,0 +1,11 @@
+--- ./buildtools/wafsamba/samba_install.py.orig	2012-04-11 12:36:11.000000000 +0000
++++ ./buildtools/wafsamba/samba_install.py	2013-01-29 20:54:59.749863922 +0000
+@@ -109,7 +109,7 @@
+             inst_name    = bld.make_libname(t.target)
+     elif self.vnum:
+         vnum_base    = self.vnum.split('.')[0]
+-        install_name = bld.make_libname(target_name, version=self.vnum)
++        install_name = bld.make_libname(target_name, version=vnum_base)
+         install_link = bld.make_libname(target_name, version=vnum_base)
+         inst_name    = bld.make_libname(t.target)
+         if not self.private_library:

Added: head/databases/ntdb/files/patch-wscript
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/ntdb/files/patch-wscript	Wed Mar 12 21:25:03 2014	(r348008)
@@ -0,0 +1,11 @@
+--- ./wscript.orig	2013-11-15 21:37:13.000000000 +0000
++++ ./wscript	2014-03-12 12:53:25.482302689 +0000
+@@ -133,7 +133,7 @@
+     bld.RECURSE('lib/ccan')
+ 
+     if bld.env.standalone_ntdb:
+-        bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
++        bld.env.PKGCONFIGDIR = '%%PKGCONFIGDIR%%'
+         private_library = False
+     else:
+         private_library = True

Added: head/databases/ntdb/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/ntdb/pkg-descr	Wed Mar 12 21:25:03 2014	(r348008)
@@ -0,0 +1,6 @@
+TDB is a Trivial Database. In concept, it is very much like GDBM, and
+BSD's DB except that it allows multiple simultaneous writers and uses
+locking internally to keep writers from trampling on each other. TDB is
+also extremely small.
+
+WWW: http://tdb.samba.org/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403122125.s2CLP3A1009073>