tags 460302 + patch

thank you,


Hi,

Here is an NMU to resolve this bug.  I'm not sure if you will like it
but it seems to me to be the most straightforward fix.

It also puts the man pages back in.  I don't know what happened to them.
I don't see them in samba git anymore either?

I didn't add the patch from #425716 because I wasn't sure if you were
comfortable with it.

Thanks,

Barry deFreese


diff -u tdb-1.1.1~svn26294/debian/control tdb-1.1.1~svn26294/debian/control
--- tdb-1.1.1~svn26294/debian/control
+++ tdb-1.1.1~svn26294/debian/control
@@ -44,7 +44,7 @@
 Package: python-tdb
 Section: python
 Architecture: any
-Depends: ${python:Depends}, libtdb1 (= ${binary:Version})
+Depends: ${python:Depends}, ${shlibs:Depends}, libtdb1 (= ${binary:Version})
 Provides: ${python:Provides}
 Description: Python bindings for TDB
  TDB is a simple database API. 
diff -u tdb-1.1.1~svn26294/debian/changelog tdb-1.1.1~svn26294/debian/changelog
--- tdb-1.1.1~svn26294/debian/changelog
+++ tdb-1.1.1~svn26294/debian/changelog
@@ -1,3 +1,16 @@
+tdb (1.1.1~svn26294-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * 10_include_signalh.diff (Closes: #460302).
+    + Include signal.h in tdb.h.
+  * Re-add manpages. (Closes: #439809).
+    + Fix manpage sections.
+    + Escape hyphens as minus signs.
+  * Fix return value in tdb_delete.3. (Closes: #385389).
+  * Add ${shlibs:Depends} on python-tdb package.
+
+ -- Barry deFreese <[EMAIL PROTECTED]>  Sat, 08 Mar 2008 22:34:03 -0500
+
 tdb (1.1.1~svn26294-1) unstable; urgency=low
 
   * New upstream snapshot.
only in patch2:
unchanged:
--- tdb-1.1.1~svn26294.orig/debian/manpages/tdb_store.3
+++ tdb-1.1.1~svn26294/debian/manpages/tdb_store.3
@@ -0,0 +1,55 @@
+.TH TDB_STORE 3 "Aug 16, 2000" "Samba" "Linux Programmer's Manual"
+.SH NAME
+tdb_store \- store a record in a tdb database.
+.SH SYNOPSIS
+.nf
+.B #include <tdb.h>
+.sp
+.BI "int tdb_store(TDB_CONTEXT *" tdb ", TDB_DATA " key ", TDB_DATA " record ", int " flag ");"
+.sp
+.SH DESCRIPTION
+Store a lump of data pointed to by 
+.I record
+in the
+.I tdb
+database under the index pointed to by
+.I key.
+The TDB_DATA structure used by both 
+.I key 
+and 
+.I record 
+is defined as:
+.PP
+.RS
+.nf
+typedef struct {
+	char *dptr;
+	size_t dsize;
+} TDB_DATA;
+.fi
+.RE
+.PP
+The 
+.I flag
+determines the way that tdb_store behaves and can be any one of the
+following values.
+.TP
+.B TDB_REPLACE
+Insert a record creating a new one or overwriting an existing one.
+.TP
+.B TDB_INSERT
+Insert a new entry but refuse to overwrite an existing entry.
+.TP
+.B TDB_MODIFY
+Replace an existing record with a new one. This will fail if,
+a record does not already exist.
+.PP
+.SH "RETURN VALUE"
+A return value of 0 indicates success and \-1 indicates failure.
+.SH AUTHORS
+Software: Andrew Tridgell <[EMAIL PROTECTED]> and 
+Luke Kenneth Casson Leighton
+Man page: Ben Woodard <[EMAIL PROTECTED]>
+.SH "SEE ALSO"
+.BR gdbm (3),
+.BR tdb(3)
only in patch2:
unchanged:
--- tdb-1.1.1~svn26294.orig/debian/manpages/tdb_close.3
+++ tdb-1.1.1~svn26294/debian/manpages/tdb_close.3
@@ -0,0 +1,19 @@
+.TH TDB_CLOSE 3 "Aug 16, 2000" "Samba" "Linux Programmer's Manual"
+.SH NAME
+tdb_close \- close a tdb database
+.SH SYNOPSIS
+.nf
+.B #include <tdb.h>
+.sp
+.BI "int tdb_close(TDB_CONTEXT *" tdb ");"
+.sp
+.SH DESCRIPTION
+Closes a TDB database and frees memory any memory that was used.
+.SH "RETURN VALUE"
+Returns zero on success and \-1 on failure.
+.SH AUTHORS
+Software: Andrew Tridgell and Luke Kenneth Casson Leighton
+Man page: Ben Woodard <[EMAIL PROTECTED]>
+.SH "SEE ALSO"
+.BR gdbm (3),
+.BR tdb(3)
only in patch2:
unchanged:
--- tdb-1.1.1~svn26294.orig/debian/manpages/tdb_error.3
+++ tdb-1.1.1~svn26294/debian/manpages/tdb_error.3
@@ -0,0 +1,25 @@
+.TH TDB_ERROR 3 "Aug 16, 2000" "Samba" "Linux Programmer's Manual"
+.SH NAME
+tdb_error - return tdb database error state information.
+tdb_errorstr - return a printable string representing the error state of a tdb\
+	 database
+.SH SYNOPSIS
+.nf
+.B #include <tdb.h>
+.sp
+.BI "enum TDB_ERROR tdb_error(TDB_CONTEXT *" tdb ");"
+.BI "char *tdb_errorstr(TDB_CONTEXT *" tdb ");"
+.sp
+.SH DESCRIPTION
+.I tdb_error returns the current error state of the
+.I tdb
+database.
+.I tdb_errorstr 
+returns a printable string that describes the error state of the
+database.
+.SH AUTHORS
+Software: Andrew Tridgell <[EMAIL PROTECTED]> and Luke Kenneth
+Casson Leighton Man page: Ben Woodard <[EMAIL PROTECTED]>
+.SH "SEE ALSO"
+.BR gdbm (3),
+.BR tdb(3)
only in patch2:
unchanged:
--- tdb-1.1.1~svn26294.orig/debian/manpages/tdb_open.3
+++ tdb-1.1.1~svn26294/debian/manpages/tdb_open.3
@@ -0,0 +1,59 @@
+.TH TDB_OPEN 3 "Aug 16, 2000" "Samba" "Linux Programmer's Manual"
+.SH NAME
+tdb_open \- Open a tdb database.
+.SH SYNOPSIS
+.nf
+.B #include <tdb.h>
+.sp
+.BI "TDB_CONTEXT *tdb_open(const char *" pathname ", int " hash_size ","
+.BI "        int " tdb_flags ", int " open_flags ", mode_t " mode " );"
+.sp
+.SH DESCRIPTION
+Open the database, creating it if necessary. The 
+.I hash 
+size is advisory, use zero for a default value. 
+.I tdb_flags
+can be one of
+.TP
+.B TDB_CLEAR_IF_FIRST
+Clear database if we are the only one with it open.
+.TP
+.B TDB_INTERNAL
+Don't use a file, instead store the data in memory. The 
+.I pathname
+,
+.I open_flags
+, and
+.I mode
+are ignored in
+this case. This is useful if you need a quick associative array or map.
+.TP
+.B TDB_NOLOCK
+Don't do any locking (this is always turned on for read-only file
+descriptors)
+.TP
+.B TDB_NOMMAP 
+Don't use mmap.
+.TP
+.B TDB_CONVERT 
+Create a database in the reverse of native endian: normally when the
+database is created (or cleared with TDB_CLEAR_IF_FIRST), it is
+created in native endian order.  This flag is set (or unset)
+automatically for existing databases.
+.PP
+The 
+.I open_flags 
+and 
+.I mode 
+are passed straight to the open call on the database file. A flags
+value of O_WRONLY is invalid.
+.SH "RETURN VALUE"
+On success a pointer to an opaque data structure, a TDB_CONTEXT is
+returned. On error a NULL is returned.
+.SH AUTHORS
+Software: Andrew Tridgell <[EMAIL PROTECTED]> and Luke Kenneth Casson Leighton
+Man page: Ben Woodard <[EMAIL PROTECTED]>
+.SH "SEE ALSO"
+.BR open (2),
+.BR gdbm (3),
+.BR tdb(3)
only in patch2:
unchanged:
--- tdb-1.1.1~svn26294.orig/debian/manpages/tdb_firstkey.3
+++ tdb-1.1.1~svn26294/debian/manpages/tdb_firstkey.3
@@ -0,0 +1,82 @@
+.TH TDB_FIRSTKEY 3 "Aug 16, 2000" "Samba" "Linux Programmer's Manual"
+.SH NAME
+tdb_firstkey - return the key of the first record in a tdb database
+tdb_nextkey - return the key of next record in the tdb database
+.SH SYNOPSIS
+.nf
+.B #include <tdb.h>
+.sp
+.BI "TDB_DATA tdb_firstkey(TDB_CONTEXT *" tdb ");"
+.BI "TDB_DATA tdb_nextkey(TDB_CONTEXT *" tdb ", TDB_DATA " prev_key ");"
+.sp
+.SH DESCRIPTION
+.I tdb_firstkey 
+fetches the key of the first entry in the 
+.I tdb 
+database.
+.I tdb_nextkey
+fetches the key of the entry immediately after 
+.I prev_key
+in the database.
+.sp 
+The TDB_DATA structure returned by both these functions is defined as:
+.PP
+.RS
+.nf
+typedef struct {
+	char *dptr;
+	size_t dsize;
+} TDB_DATA;
+.fi
+.RE
+.PP
+.sp
+The order in which this traverses the database is its own internal
+hash order. Do not expect the keys to be in any recognizably sorted
+order.
+.sp
+These functions are reliable even if other writers are accessing the
+database (or you are replacing or deleting elements as you traverse),
+except in the case of nested
+.I tdb_firstkey
+or
+.I tdb_nextkey
+calls.  For example, the following outer traversal may fail to
+traverse all the elements, or may even traverse elements twice if
+other processes are manipulating the database:
+.PP
+.RS
+.nf
+	TDB_DATA i, j;
+
+	for (i = tdb_firstkey(tdb); i.dptr; i = tdb_nextkey(tdb, i)) {
+		for (j = tdb_firstkey(tdb); j.dptr; j = tdb_nextkey(tdb, j)) {
+		...
+		}
+	}
+.fi
+.RE
+.PP
+If such behaviour is desired, use
+.I tdb_traverse
+instead.
+.sp
+.SH "RETURN VALUE"
+If the call succeeds, then a TDB_DATA structure is returned with the
+.I dptr 
+structure filled in. If the call fails or you have reached the end of
+the database then
+.I dptr 
+will be set to NULL.
+.sp
+.B NOTE:
+The caller is responsible for freeing the data pointed to by
+.I dptr
+.
+.SH AUTHORS
+Software: Andrew Tridgell <[EMAIL PROTECTED]> and 
+Luke Kenneth Casson Leighton
+Man page: Ben Woodard <[EMAIL PROTECTED]>
+.SH "SEE ALSO"
+.BR gdbm (3),
+.BR tdb(3)
only in patch2:
unchanged:
--- tdb-1.1.1~svn26294.orig/debian/manpages/tdb.3
+++ tdb-1.1.1~svn26294/debian/manpages/tdb.3
@@ -0,0 +1,32 @@
+.TH TDB 3 "Aug 16, 2000" "Samba" "Linux Programmer's Manual"
+.SH NAME
+tdb - trivial database
+.SH SYNOPSIS
+A database similar to gdbm which allows multiple simultaneous writers.
+.SH DESCRIPTION
+This is a simple database API. It was inspired by the realisation that
+in Samba we have several ad-hoc bits of code that essentially
+implement small databases for sharing structures between parts of
+Samba. As I was about to add another I realised that a generic
+database module was called for to replace all the ad-hoc bits.
+.sp
+I based the interface on gdbm. I couldn't use gdbm as we need to be
+able to have multiple writers to the databases at one time.
+.SH AUTHORS
+Software: Andrew Tridgell <[EMAIL PROTECTED]> and 
+Luke Kenneth Casson Leighton
+Man page: Ben Woodard <[EMAIL PROTECTED]>
+.SH "SEE ALSO"
+.BR gdbm (3),
+.BR tdb_open (3),
+.BR tdb_close (3),
+.BR tdb_delete (3),
+.BR tdb_error (3),
+.BR tdb_exists (3),
+.BR tdb_fetch (3),
+.BR tdb_firstkey (3),
+.BR tdb_store (3),
+.BR tdb_traverse (3),
+.BR tdb_lockall (3),
+.BR tdb_lockkeys (3),
+.BR tdb_chainlock (3)
only in patch2:
unchanged:
--- tdb-1.1.1~svn26294.orig/debian/manpages/tdb_traverse.3
+++ tdb-1.1.1~svn26294/debian/manpages/tdb_traverse.3
@@ -0,0 +1,52 @@
+.TH TDB_TRAVERSE 3 "Aug 16, 2000" "Samba" "Linux Programmer's Manual"
+.SH NAME
+tdb_traverse \- visit every element in a tdb database
+.SH SYNOPSIS
+.nf
+.B #include <tdb.h>
+.sp
+.BI "int tdb_traverse(TDB_CONTEXT *" tdb ", "
+.BI "        int (*" fn ")(TDB_CONTEXT *,TDB_DATA,TDB_DATA,void *),"
+.BI "        void *state);"
+.sp
+.SH DESCRIPTION
+.I tdb_traverse is the only sure way to visit all the items within a
+given database,
+.I tdb
+Because this function has intimate knowledge of the internals of the
+database, it is able to cope with writers touching the database at the
+same time it is trying to traverse it.
+.sp
+If 
+.I fn 
+is supplied it will be called with the 
+.I state parameter 
+for each element in the database, as the forth argument. The First argument is
+the database
+.I tdb
+the second is the key and the third is the data. If this function call returns 
+anything but 0, the traversal will stop. Unlike in tdb_fetch() the programmer
+is not required to free either the pointer from either the key or data
+parameters that are passed into the function. The
+.I fn
+function should have the prototype:
+.nf
+.in 10
+int (*tdb_traverse_func)(TDB_CONTEXT *, TDB_DATA, TDB_DATA, void *);
+.fi
+.PP
+.sp
+Calling tdb_traverse with a NULL 
+.I fn 
+parameter is the appropriate way to count the number of elements in
+the database.
+.SH "RETURN VALUE"
+The return value is the number of elements traversed or \-1 if there
+was an error.
+.SH AUTHORS
+Software: Andrew Tridgell <[EMAIL PROTECTED]> and 
+Luke Kenneth Casson Leighton
+Man page: Ben Woodard <[EMAIL PROTECTED]>
+.SH "SEE ALSO"
+.BR gdbm (3),
+.BR tdb(3)
only in patch2:
unchanged:
--- tdb-1.1.1~svn26294.orig/debian/manpages/tdb_fetch.3
+++ tdb-1.1.1~svn26294/debian/manpages/tdb_fetch.3
@@ -0,0 +1,45 @@
+.TH TDB_FETCH 3 "Aug 16, 2000" "Samba" "Linux Programmer's Manual"
+.SH NAME
+tdb_fetch - fetch a record from a tdb database
+.SH SYNOPSIS
+.nf
+.B #include <tdb.h>
+.sp
+.BI "TDB_DATA tdb_fetch(TDB_CONTEXT *" tdb ", TDB_DATA " key ");"
+.sp
+.SH DESCRIPTION
+Fetch the record from the 
+.I tdb
+database whose key matches
+.I key
+, a lump of data that is used as the index into the database. 
+.sp
+The TDB_DATA structure used for both the key and the return value is
+defined as:
+.PP
+.RS
+.nf
+typedef struct {
+	char *dptr;
+	size_t dsize;
+} TDB_DATA;
+.fi
+.RE
+.PP
+.SH "RETURN VALUE"
+If the call succeeds, then a TDB_DATA structure is returned with the
+.I dptr 
+structure filled in. If the call fails then 
+.I dptr 
+will be set to NULL.
+.sp
+.B NOTE:
+The caller is responsible for freeing the data pointed to by
+.I dptr.
+.SH AUTHORS
+Software: Andrew Tridgell <[EMAIL PROTECTED]> and 
+Luke Kenneth Casson Leighton
+Man page: Ben Woodard <[EMAIL PROTECTED]>
+.SH "SEE ALSO"
+.BR gdbm (3),
+.BR tdb(3)
only in patch2:
unchanged:
--- tdb-1.1.1~svn26294.orig/debian/manpages/tdb_chainlock.3
+++ tdb-1.1.1~svn26294/debian/manpages/tdb_chainlock.3
@@ -0,0 +1,31 @@
+.TH TDB_CHAINLOCK 3 "Oct 13, 2000" "Samba" "Linux Programmer's Manual"
+.SH NAME
+tdb_chainlock \- lock a group of keys
+tdb_chainunlock \- unlock a previously locked group of keys
+.SH SYNOPSIS
+.nf
+.B #include <tdb.h>
+.sp
+.BI "int tdb_chainlock(TDB_CONTEXT *" tdb ", TDB_DATA " key ");"
+.BI "void tdb_chainunlock(TDB_CONTEXT *" tdb ", TDB_DATA " key ");"
+.sp
+.SH DESCRIPTION
+.I tdb_chainlock 
+is a low\-level function used to lock a particular key (and a number of
+other keys) without any checking: any other process attempting to
+perform tdb operations on those keys will block until
+.I tdb_chainunlock
+is called.
+.SH NOTES
+It is the user's responsibility to ensure that they do not deadlock
+the database using these functions: something which is impossible
+using the other access functions.
+.SH "RETURN VALUE"
+A return value of 0 indicates success and \-1 indicates failure.
+.SH AUTHORS
+Software: Andrew Tridgell <[EMAIL PROTECTED]>
+Man page: Rusty.
+.SH "SEE ALSO"
+.BR gdbm (3),
+.BR tdb (3),
+.BR tdb_lockall (3).
only in patch2:
unchanged:
--- tdb-1.1.1~svn26294.orig/debian/manpages/tdb_delete.3
+++ tdb-1.1.1~svn26294/debian/manpages/tdb_delete.3
@@ -0,0 +1,35 @@
+.TH TDB_DELETE 3 "Aug 16, 2000" "Samba" "Linux Programmer's Manual"
+.SH NAME
+tdb_delete \- delete a record from a tdb database
+.SH SYNOPSIS
+.nf
+.B #include <tdb.h>
+.sp
+.BI "int tdb_delete(TDB_CONTEXT *" tdb ", TDB_DATA " key ");"
+.sp
+.SH DESCRIPTION
+Delete the record from the 
+.I tdb
+database whose key matches
+.I key
+, a lump of data that is used as the index into the database. The
+TDB_DATA structure is defined as:
+.PP
+.RS
+.nf
+typedef struct {
+	char *dptr;
+	size_t dsize;
+} TDB_DATA;
+.fi
+.RE
+.PP
+.SH "RETURN VALUE"
+A return value of 0 indicates success and \-1 indicates failure.
+.SH AUTHORS
+Software: Andrew Tridgell <[EMAIL PROTECTED]> and 
+Luke Kenneth Casson Leighton
+Man page: Ben Woodard <[EMAIL PROTECTED]>
+.SH "SEE ALSO"
+.BR gdbm (3),
+.BR tdb(3)
only in patch2:
unchanged:
--- tdb-1.1.1~svn26294.orig/debian/manpages/tdb_exists.3
+++ tdb-1.1.1~svn26294/debian/manpages/tdb_exists.3
@@ -0,0 +1,37 @@
+.TH TDB_EXISTS 3 "Aug 17, 2000" "Samba" "Linux Programmer's Manual"
+.SH NAME
+tdb_exists - check for the existence of a record in a tdb database
+.SH SYNOPSIS
+.nf
+.B #include <tdb.h>
+.sp
+.BI "int tdb_exists(TDB_CONTEXT *" tdb ", TDB_DATA " key ");"
+.sp
+.SH DESCRIPTION
+Test to see if a key exists.
+.I tdb 
+is a pointer returned by 
+.B tdb_open
+and 
+.I key 
+is a lump of data that is used as the index into the database. The TDB_DATA
+structure is defined as:
+.PP
+.RS
+.nf
+typedef struct {
+	char *dptr;
+	size_t dsize;
+} TDB_DATA;
+.fi
+.RE
+.PP
+.SH "RETURN VALUE"
+If the key is found, 1 is returned; otherwise 0 is returned.
+.SH AUTHORS
+Software: Andrew Tridgell <[EMAIL PROTECTED]> and 
+Luke Kenneth Casson Leighton
+Man page: Ben Woodard <[EMAIL PROTECTED]>
+.SH "SEE ALSO"
+.BR gdbm (3),
+.BR tdb(3)
only in patch2:
unchanged:
--- tdb-1.1.1~svn26294.orig/debian/patches/series
+++ tdb-1.1.1~svn26294/debian/patches/series
@@ -0,0 +1 @@
+10_include_signalh.diff
only in patch2:
unchanged:
--- tdb-1.1.1~svn26294.orig/debian/patches/10_include_signalh.diff
+++ tdb-1.1.1~svn26294/debian/patches/10_include_signalh.diff
@@ -0,0 +1,11 @@
+diff -urN tdb-1.1.1~svn26294.orig/include/tdb.h tdb-1.1.1~svn26294/include/tdb.h
+--- tdb-1.1.1~svn26294.orig/include/tdb.h	2007-11-07 01:59:02.000000000 -0500
++++ tdb-1.1.1~svn26294/include/tdb.h	2008-03-08 23:21:06.000000000 -0500
+@@ -30,6 +30,7 @@
+ extern "C" {
+ #endif
+ 
++#include <signal.h>
+ 
+ /* flags to tdb_store() */
+ #define TDB_REPLACE 1
only in patch2:
unchanged:
--- tdb-1.1.1~svn26294.orig/debian/tdb-dev.manpages
+++ tdb-1.1.1~svn26294/debian/tdb-dev.manpages
@@ -0,0 +1 @@
+debian/manpages/*

Reply via email to