If it helps, the attached patch contains what I believe are the actual
Debian changes beyond the four Oracle patches to libdb4.7.
The files that were only in Debian's source package and not in the
patched upstream source were
Only in db4.7-4.7.25/clib: ctime.c
Only in db4.7-4.7.25/clib: getaddrinfo.c
Only in db4.7-4.7.25/docs/api_c: set_func_map.html
Only in db4.7-4.7.25/docs/api_c: set_func_sleep.html
Only in db4.7-4.7.25/docs/api_c: set_func_unmap.html
Only in db4.7-4.7.25/docs: .cvsignore
Only in db4.7-4.7.25/docs/ref/build_wince: faq.html
Only in db4.7-4.7.25/docs_src/ref/build_wince: faq.so
Only in db4.7-4.7.25/docs_src/rtc: set_func_map.so
Only in db4.7-4.7.25/docs_src/rtc: set_func_sleep.so
Only in db4.7-4.7.25/docs_src/rtc: set_func_unmap.so
Only in db4.7-4.7.25/os: os_fzero.c
Only in db4.7-4.7.25/os: os_method.c
Only in db4.7-4.7.25/os: os_oflags.c
Only in db4.7-4.7.25/os: os_region.c
Only in db4.7-4.7.25/os: os_sleep.c
Only in db4.7-4.7.25/os: os_spin.c
Only in db4.7-4.7.25/os_brew: os_oflags.c
Only in db4.7-4.7.25/os_brew: os_sleep.c
Only in db4.7-4.7.25/os_brew: time.c
Only in db4.7-4.7.25/os_windows: ce_time.c
Only in db4.7-4.7.25/os_windows: os_sleep.c
Only in db4.7-4.7.25/os_windows: os_spin.c
Only in db4.7-4.7.25: .pc
Only in db4.7-4.7.25/rep: rep_autop.c
Only in db4.7-4.7.25/test: rep059.tcl
Only in db4.7-4.7.25/test: testutils42.tcl
Only in db4.7-4.7.25/test_micro: SOURCE
diff -ru db4.7-4.7.25.orig/dbinc/db_page.h db4.7-4.7.25/dbinc/db_page.h
--- db4.7-4.7.25.orig/dbinc/db_page.h 2008-01-10 12:44:45.000000000 -0500
+++ db4.7-4.7.25/dbinc/db_page.h 2010-08-26 13:24:11.000000000 -0400
@@ -223,6 +223,17 @@
*/
} PG_CRYPTO;
+/*
+ * With most compilers sizeof(PG_CRYPTO) == 38. However some ABIs
+ * require it to be padded to 40 bytes. The padding must be excluded
+ * from our size calculations due to the 16-byte alignment requirement
+ * for crypto.
+ *
+ * A similar problem applies to PG_CHKSUM, but it's too late to change
+ * that.
+ */
+#define SIZEOF_PG_CRYPTO 38
+
typedef struct _db_page {
DB_LSN lsn; /* 00-07: Log sequence number. */
db_pgno_t pgno; /* 08-11: Current page number. */
@@ -258,7 +269,7 @@
*/
#define P_INP(dbp, pg) \
((db_indx_t *)((u_int8_t *)(pg) + SIZEOF_PAGE + \
- (F_ISSET((dbp), DB_AM_ENCRYPT) ? sizeof(PG_CRYPTO) : \
+ (F_ISSET((dbp), DB_AM_ENCRYPT) ? SIZEOF_PG_CRYPTO : \
(F_ISSET((dbp), DB_AM_CHKSUM) ? sizeof(PG_CHKSUM) : 0))))
#define P_IV(dbp, pg) \
diff -ru db4.7-4.7.25.orig/dbinc/mutex_int.h db4.7-4.7.25/dbinc/mutex_int.h
--- db4.7-4.7.25.orig/dbinc/mutex_int.h 2008-01-08 15:58:18.000000000 -0500
+++ db4.7-4.7.25/dbinc/mutex_int.h 2010-08-26 13:24:11.000000000 -0400
@@ -756,7 +756,11 @@
* alignment locally.
*/
#ifndef MUTEX_ALIGN
-#define MUTEX_ALIGN sizeof(unsigned int)
+# if defined(__linux__) && defined(__sparc__)
+# define MUTEX_ALIGN 8
+# else
+# define MUTEX_ALIGN sizeof(unsigned int)
+# endif
#endif
/*
diff -ru db4.7-4.7.25.orig/dist/Makefile.in db4.7-4.7.25/dist/Makefile.in
--- db4.7-4.7.25.orig/dist/Makefile.in 2008-05-05 23:03:36.000000000 -0400
+++ db4.7-4.7.25/dist/Makefile.in 2010-08-26 13:24:11.000000000 -0400
@@ -731,9 +731,15 @@
$(RM) -f $(libdb)
$(LN) -s $(libdb_version) $(libdb)
+Versions: $(C_OBJS)
+ rm -f $@
+ printf "DB4_7 {\n global:\n" > $@
+ nm `sed -n "/^pic_object='\(.*\)'$$/ { s//\1/;p;}" $(C_OBJS)` | grep " [TR] " | cut -d" " -f3 | sed -e 's/$$/;/' >> $@
+ printf "local: *; };\n" >> $@
+
# Shared C library.
-$(libso_target): $(C_OBJS)
- $(SOLINK) $(SOFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) $(LIBCSO_LIBS)
+$(libso_target): $(C_OBJS) Versions
+ $(SOLINK) $(SOFLAGS) -Wl,--version-script=Versions $(LDFLAGS) -o $@ $(C_OBJS) $(LIBCSO_LIBS)
$(RM) -f $(libdb)
$(LN) -s .libs/$(libdb_version) $(libdb)
diff -ru db4.7-4.7.25.orig/test/env012.tcl db4.7-4.7.25/test/env012.tcl
--- db4.7-4.7.25.orig/test/env012.tcl 2008-01-08 15:58:53.000000000 -0500
+++ db4.7-4.7.25/test/env012.tcl 2010-08-26 13:24:11.000000000 -0400
@@ -56,7 +56,7 @@
$testdir $testfile PUT $key $data RECOVER 10 &]
# Wait a while so process 1 has a chance to get going.
- tclsleep 2
+ tclsleep 4
puts "\t\tEnv$tnum.b2: Start process 2."
set p2 [exec $tclsh_path $test_path/wrap.tcl envscript.tcl \