[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha2-873-g0d8ddae

Jelmer Vernooij jelmer at samba.org
Mon Feb 18 10:56:23 GMT 2008


The branch, v4-0-test has been updated
       via  0d8ddae4964dc50e981e12b6a93235a50a0607ff (commit)
       via  2fb93e85eb5f415fbcdfb2fc0a1a58fad823138a (commit)
       via  978eb6f1616122e13429b00268d03942afc41425 (commit)
       via  c481d88d37346885f7809f73035a2bc9f2468848 (commit)
       via  949fca9540889bb640466fc21ca36d08f77066a3 (commit)
       via  1cf23c58411a9b8a9bb97016c27c10a218e73146 (commit)
       via  98d6095b9605ff4db61394719f29b3e38349c59f (commit)
       via  8f1270dd5c7688f023cf24215fa229da213e760c (commit)
       via  58c25657bf552a11e7c522602805ba961de94cf2 (commit)
       via  bc0fab89e325ebb6ab870b1c3f4b263c50631b70 (commit)
      from  2a474568c2f85603657a97ad658089122a1f4f19 (commit)

http://gitweb.samba.org/?samba.git;a=shortlog;h=v4-0-test


- Log -----------------------------------------------------------------
commit 0d8ddae4964dc50e981e12b6a93235a50a0607ff
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Mon Feb 18 11:50:07 2008 +0100

    Switch back to using static libraries for subsystems for now, since partial linking is still giving some problems.

commit 2fb93e85eb5f415fbcdfb2fc0a1a58fad823138a
Merge: 978eb6f1616122e13429b00268d03942afc41425 2a474568c2f85603657a97ad658089122a1f4f19
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Mon Feb 18 11:31:40 2008 +0100

    Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-trivial

commit 978eb6f1616122e13429b00268d03942afc41425
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Feb 16 21:16:28 2008 +0100

    Prevent adding libreplace when not necessary.

commit c481d88d37346885f7809f73035a2bc9f2468848
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Feb 16 20:56:46 2008 +0100

    Some more mergedobj fixes.

commit 949fca9540889bb640466fc21ca36d08f77066a3
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Feb 16 20:48:08 2008 +0100

    Use standard variable for partial linking.

commit 1cf23c58411a9b8a9bb97016c27c10a218e73146
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Feb 16 20:38:21 2008 +0100

    Reintroduce mergedobj support.

commit 98d6095b9605ff4db61394719f29b3e38349c59f
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Feb 16 16:33:04 2008 +0100

    Remove unused code.

commit 8f1270dd5c7688f023cf24215fa229da213e760c
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Feb 16 16:22:05 2008 +0100

    Simplify handling of plugin installation.

commit 58c25657bf552a11e7c522602805ba961de94cf2
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Feb 16 15:40:42 2008 +0100

    Add static header for gencache.

commit bc0fab89e325ebb6ab870b1c3f4b263c50631b70
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Feb 16 15:23:26 2008 +0100

    Formatting fixes.

-----------------------------------------------------------------------

Summary of changes:
 .gitignore                                 |    1 -
 source/Makefile                            |   10 ++-
 source/build/smb_build/input.pm            |   21 ++-----
 source/build/smb_build/main.pl             |    2 +
 source/build/smb_build/makefile.pm         |   54 +++++++++++-----
 source/build/smb_build/output.pm           |   12 ++++
 source/lib/basic.mk                        |    6 +--
 source/lib/gencache/gencache.h             |   94 ++++++++++++++++++++++++++++
 source/rules.mk                            |    3 +
 source/scripting/python/samba/provision.py |    5 +-
 10 files changed, 163 insertions(+), 45 deletions(-)
 create mode 100644 source/lib/gencache/gencache.h


Changeset truncated at 500 lines:

diff --git a/.gitignore b/.gitignore
index a8c1f9a..b0786b6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,6 @@
 source/pidl/Makefile
 source/mkconfig.mk
 source/test-results
-source/lib/gencache/gencache.h
 source/lib/ldb/bin
 *.pc
 autom4te.cache
diff --git a/source/Makefile b/source/Makefile
index a99dc82..a2f0afc 100644
--- a/source/Makefile
+++ b/source/Makefile
@@ -27,7 +27,7 @@ include data.mk
 DEFAULT_HEADERS = $(srcdir)/lib/util/dlinklist.h \
 		  $(srcdir)/version.h
 
-binaries:: $(BINARIES)
+binaries::
 libraries:: $(STATIC_LIBS) $(SHARED_LIBS)
 modules:: $(SHARED_MODULES)
 headers:: $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
@@ -122,8 +122,10 @@ installbin:: $(SBIN_PROGS) $(BIN_PROGS) $(TORTURE_PROGS) installdirs
 		$(DESTDIR)$(TORTUREDIR) \
 		$(TORTURE_PROGS)
 
-installlib:: $(INSTALLABLE_SHARED_LIBS) $(STATIC_LIBS) installdirs
-	@$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(SHLIBEXT)" $(INSTALLABLE_SHARED_LIBS) 
+installplugins::
+
+installlib:: $(SHARED_LIBS) $(STATIC_LIBS) installdirs
+	@$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(SHLIBEXT)" $(SHARED_LIBS) 
 	#@$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(libdir) "$(STLIBEXT)" $(STATIC_LIBS)
 
 installheader:: headers installdirs
@@ -165,6 +167,8 @@ uninstallheader::
 uninstallman::
 	@$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(mandir) $(MANPAGES)
 
+uninstallplugins::
+
 config.status:
 	@echo "config.status does not exist. Please run ./configure."
 	@/bin/false
diff --git a/source/build/smb_build/input.pm b/source/build/smb_build/input.pm
index 51c89a8..ed584e1 100644
--- a/source/build/smb_build/input.pm
+++ b/source/build/smb_build/input.pm
@@ -66,8 +66,6 @@ sub check_subsystem($$$)
 
 	unless (defined($subsys->{INIT_FUNCTION_TYPE})) { $subsys->{INIT_FUNCTION_TYPE} = "NTSTATUS (*) (void)"; }
 	unless (defined($subsys->{INIT_FUNCTION_SENTINEL})) { $subsys->{INIT_FUNCTION_SENTINEL} = "NULL"; }
-
-	add_libreplace($subsys);
 }
 
 sub check_module($$$)
@@ -76,8 +74,6 @@ sub check_module($$$)
 
 	die("Module $mod->{NAME} does not have a SUBSYSTEM set") if not defined($mod->{SUBSYSTEM});
 
-	my $use_default = 0;
-	
 	if (not exists($INPUT->{$mod->{SUBSYSTEM}}{INIT_FUNCTIONS})) {
 		$INPUT->{$mod->{SUBSYSTEM}}{INIT_FUNCTIONS} = [];
 	}
@@ -113,11 +109,11 @@ sub check_module($$$)
 		$sane_subsystem =~ s/^lib//;
 		$mod->{INSTALLDIR} = "MODULESDIR/$sane_subsystem";
 		push (@{$mod->{PUBLIC_DEPENDENCIES}}, $mod->{SUBSYSTEM});
+		add_libreplace($mod);
 	} 
 	if (grep(/INTEGRATED/, @{$mod->{OUTPUT_TYPE}})) {
 		push (@{$INPUT->{$mod->{SUBSYSTEM}}{INIT_FUNCTIONS}}, $mod->{INIT_FUNCTION}) if defined($mod->{INIT_FUNCTION});
 	}
-	add_libreplace($mod);
 }
 
 sub check_library($$$)
@@ -126,9 +122,7 @@ sub check_library($$$)
 
 	return if ($lib->{ENABLE} ne "YES");
 
-	unless (defined($lib->{OUTPUT_TYPE})) {
-		$lib->{OUTPUT_TYPE} = $default_ot;
-	}
+	unless (defined($lib->{OUTPUT_TYPE})) { $lib->{OUTPUT_TYPE} = $default_ot; }
 
 	if (defined($lib->{VERSION}) and not defined($lib->{SO_VERSION})) {
 		print "$lib->{NAME}: Please specify SO_VERSION when specifying VERSION\n";
@@ -141,12 +135,8 @@ sub check_library($$$)
 	}
 
 	unless (defined($lib->{INIT_FUNCTION_TYPE})) { $lib->{INIT_FUNCTION_TYPE} = "NTSTATUS (*) (void)"; }
-
 	unless (defined($lib->{INIT_FUNCTION_SENTINEL})) { $lib->{INIT_FUNCTION_SENTINEL} = "NULL"; }
-
-	unless(defined($lib->{INSTALLDIR})) {
-		$lib->{INSTALLDIR} = "LIBDIR";
-	}
+	unless (defined($lib->{INSTALLDIR})) { $lib->{INSTALLDIR} = "LIBDIR"; }
 
 	add_libreplace($lib);
 }
@@ -234,6 +224,7 @@ sub calc_unique_deps($$$$$$$$)
  		if (defined ($dep->{OUTPUT_TYPE}) && 
 			($withlibs or 
 			(@{$dep->{OUTPUT_TYPE}}[0] eq "INTEGRATED") or 
+			(@{$dep->{OUTPUT_TYPE}}[0] eq "MERGED_OBJ") or 
 			(@{$dep->{OUTPUT_TYPE}}[0] eq "STATIC_LIBRARY"))) {
 				push (@$busy, $dep->{NAME});
 			        calc_unique_deps($dep->{NAME}, $INPUT, $dep->{PUBLIC_DEPENDENCIES}, $udeps, $withlibs, $forward, $pubonly, $busy);
@@ -280,9 +271,7 @@ sub check($$$$$)
 		}
 	}
 
-	foreach my $k (keys %$INPUT) {
-		my $part = $INPUT->{$k};
-
+	foreach my $part (values %$INPUT) {
 		$part->{LINK_FLAGS} = [];
 		$part->{FULL_OBJ_LIST} = ["\$($part->{NAME}_OBJ_LIST)"];
 
diff --git a/source/build/smb_build/main.pl b/source/build/smb_build/main.pl
index a85eab3..46a092d 100644
--- a/source/build/smb_build/main.pl
+++ b/source/build/smb_build/main.pl
@@ -20,6 +20,7 @@ my $INPUT = {};
 my $mkfile = smb_build::config_mk::run_config_mk($INPUT, $config::config{srcdir}, $config::config{builddir}, "main.mk");
 
 my $subsys_output_type;
+#$subsys_output_type = ["MERGED_OBJ"];
 $subsys_output_type = ["STATIC_LIBRARY"];
 
 my $library_output_type;
@@ -59,6 +60,7 @@ my $shared_libs_used = 0;
 foreach my $key (values %$OUTPUT) {
 	next unless defined $key->{OUTPUT_TYPE};
 
+	$mkenv->MergedObj($key) if grep(/MERGED_OBJ/, @{$key->{OUTPUT_TYPE}});
 	$mkenv->StaticLibrary($key) if grep(/STATIC_LIBRARY/, @{$key->{OUTPUT_TYPE}});
 	if (defined($key->{PC_FILE})) {
 		push(@{$mkenv->{pc_files}}, "$key->{BASEDIR}/$key->{PC_FILE}");
diff --git a/source/build/smb_build/makefile.pm b/source/build/smb_build/makefile.pm
index 7fd31a5..16b46ed 100644
--- a/source/build/smb_build/makefile.pm
+++ b/source/build/smb_build/makefile.pm
@@ -28,12 +28,9 @@ sub new($$$)
 	$self->{python_dsos} = [];
 	$self->{python_pys} = [];
 	$self->{shared_libs} = [];
-	$self->{installable_shared_libs} = [];
 	$self->{headers} = [];
 	$self->{shared_modules} = [];
 	$self->{plugins} = [];
-	$self->{install_plugins} = "";
-	$self->{uninstall_plugins} = "";
 	$self->{pc_files} = [];
 	$self->{proto_headers} = [];
 	$self->{output} = "";
@@ -154,16 +151,24 @@ sub SharedModule($$)
 	} else {
 		push (@{$self->{shared_modules}}, "$ctx->{TARGET_SHARED_LIBRARY}");
 		push (@{$self->{plugins}}, "$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}");
-		$self->{install_plugins} .= "\t\@echo Installing $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME} as \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n";
-		$self->{install_plugins} .= "\t\@mkdir -p \$(DESTDIR)\$(modulesdir)/$sane_subsystem/\n";
-		$self->{install_plugins} .= "\t\@cp $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n";
-		$self->{uninstall_plugins} .= "\t\@echo Uninstalling \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n";
-		$self->{uninstall_plugins} .= "\t\@-rm \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n";
+		$self->output("installplugins:: $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}\n");
+		$self->output("\t\@echo Installing $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME} as \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n");
+		$self->output("\t\@mkdir -p \$(DESTDIR)\$(modulesdir)/$sane_subsystem/\n");
+		$self->output("\t\@cp $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n");
 		if (defined($ctx->{ALIASES})) {
 			foreach (@{$ctx->{ALIASES}}) {
-				$self->{install_plugins} .= "\t\@rm -f \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$_.\$(SHLIBEXT)\n";
-				$self->{install_plugins} .= "\t\@ln -fs $ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$_.\$(SHLIBEXT)\n";
-				$self->{uninstall_plugins} .= "\t\@-rm \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$_.\$(SHLIBEXT)\n";
+				$self->output("\t\@rm -f \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$_.\$(SHLIBEXT)\n");
+				$self->output("\t\@ln -fs $ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$_.\$(SHLIBEXT)\n");
+			}
+		}
+
+		$self->output("uninstallplugins::\n");
+		$self->output("\t\@echo Uninstalling \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n");
+		$self->output("\t\@-rm \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n");
+
+		if (defined($ctx->{ALIASES})) {
+			foreach (@{$ctx->{ALIASES}}) {
+				$self->output("\t\@-rm \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$_.\$(SHLIBEXT)\n");
 			}
 		}
 	}
@@ -237,7 +242,6 @@ sub SharedLibrary($$)
 	my ($self,$ctx) = @_;
 
 	push (@{$self->{shared_libs}}, "$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}") if (defined($ctx->{SO_VERSION}));
-	push (@{$self->{installable_shared_libs}}, "$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}") if (defined($ctx->{SO_VERSION}));
 
 	$self->_prepare_list($ctx, "DEPEND_LIST");
 	$self->_prepare_list($ctx, "LINK_FLAGS");
@@ -273,6 +277,25 @@ __EOD__
 	$self->output("\n");
 }
 
+sub MergedObj($$)
+{
+	my ($self, $ctx) = @_;
+
+	$self->output("$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n");
+	$self->_prepare_list($ctx, "OBJ_LIST");
+	$self->_prepare_list($ctx, "FULL_OBJ_LIST");
+	push(@{$self->{all_objs}}, "\$($ctx->{NAME}_FULL_OBJ_LIST)");
+	$self->output(<< "__EOD__"
+#
+$ctx->{TARGET_MERGED_OBJ}: \$($ctx->{NAME}_FULL_OBJ_LIST)
+	\@echo Partially linking \$@
+	\@mkdir -p bin/mergedobj
+	\$(PARTLINK) -o \$@ \$($ctx->{NAME}_FULL_OBJ_LIST)
+
+__EOD__
+);
+}
+
 sub StaticLibrary($$)
 {
 	my ($self,$ctx) = @_;
@@ -328,7 +351,7 @@ sub Binary($$)
 		push (@{$self->{bin_progs}}, "$installdir/$ctx->{BINARY}");
 	}
 
-	push (@{$self->{binaries}}, "$localdir/$ctx->{BINARY}");
+	$self->output("binaries:: $localdir/$ctx->{BINARY}\n");
 
 	$self->_prepare_list($ctx, "OBJ_LIST");
 	$self->_prepare_list($ctx, "FULL_OBJ_LIST");
@@ -425,12 +448,10 @@ sub write($$)
 	$self->output("MANPAGES = " . array2oneperline($self->{manpages})."\n");
 	$self->output("BIN_PROGS = " . array2oneperline($self->{bin_progs}) . "\n");
 	$self->output("SBIN_PROGS = " . array2oneperline($self->{sbin_progs}) . "\n");
-	$self->output("BINARIES = " . array2oneperline($self->{binaries}) . "\n");
 	$self->output("STATIC_LIBS = " . array2oneperline($self->{static_libs}) . "\n");
 	$self->output("SHARED_LIBS = " . array2oneperline($self->{shared_libs}) . "\n");
 	$self->output("PYTHON_DSOS = " . array2oneperline($self->{python_dsos}) . "\n");
 	$self->output("PYTHON_PYS = " . array2oneperline($self->{python_pys}) . "\n");
-	$self->output("INSTALLABLE_SHARED_LIBS = " . array2oneperline($self->{installable_shared_libs}) . "\n");
 	$self->output("PUBLIC_HEADERS = " . array2oneperline($self->{headers}) . "\n");
 	$self->output("PC_FILES = " . array2oneperline($self->{pc_files}) . "\n");
 	$self->output("ALL_OBJS = " . array2oneperline($self->{all_objs}) . "\n");
@@ -438,9 +459,6 @@ sub write($$)
 	$self->output("SHARED_MODULES = " . array2oneperline($self->{shared_modules}) . "\n");
 	$self->output("PLUGINS = " . array2oneperline($self->{plugins}) . "\n");
 
-	$self->output("\ninstallplugins: \$(PLUGINS)\n".$self->{install_plugins}."\n");
-	$self->output("\nuninstallplugins:\n".$self->{uninstall_plugins}."\n");
-
 	$self->_prepare_mk_files();
 
 	$self->output($self->{mkfile});
diff --git a/source/build/smb_build/output.pm b/source/build/smb_build/output.pm
index 4350370..0ddb9e4 100644
--- a/source/build/smb_build/output.pm
+++ b/source/build/smb_build/output.pm
@@ -89,6 +89,17 @@ sub generate_shared_library($)
 	$lib->{OUTPUT_SHARED_LIBRARY} = $lib->{TARGET_SHARED_LIBRARY};
 }
 
+sub generate_merged_obj($)
+{
+	my $lib = shift;
+
+	my $link_name = $lib->{NAME};
+	$link_name =~ s/^LIB//;
+
+	$lib->{MERGED_OBJNAME} = lc($link_name).".o";
+	$lib->{TARGET_MERGED_OBJ} = $lib->{OUTPUT_MERGED_OBJ} = "bin/mergedobj/$lib->{MERGED_OBJNAME}";
+}
+
 sub generate_static_library($)
 {
 	my $lib = shift;
@@ -153,6 +164,7 @@ sub create_output($$)
 		generate_binary($part) if grep(/BINARY/, @{$part->{OUTPUT_TYPE}});
 		generate_shared_library($part) if grep(/SHARED_LIBRARY/, @{$part->{OUTPUT_TYPE}});
 		generate_static_library($part) if grep(/STATIC_LIBRARY/, @{$part->{OUTPUT_TYPE}});
+		generate_merged_obj($part) if grep(/MERGED_OBJ/, @{$part->{OUTPUT_TYPE}});
 		$part->{OUTPUT} = $part->{"OUTPUT_" . @{$part->{OUTPUT_TYPE}}[0]};
 		$part->{TARGET} = $part->{"TARGET_" . @{$part->{OUTPUT_TYPE}}[0]};
 	}
diff --git a/source/lib/basic.mk b/source/lib/basic.mk
index 8653779..53eb0d0 100644
--- a/source/lib/basic.mk
+++ b/source/lib/basic.mk
@@ -18,15 +18,11 @@ include tdr/config.mk
 include dbwrap/config.mk
 include crypto/config.mk
 
-################################################
-# Start SUBSYSTEM LIBCOMPRESSION
 [SUBSYSTEM::LIBCOMPRESSION]
 OBJ_FILES = compression/mszip.o
-# End SUBSYSTEM LIBCOMPRESION
-################################################
 
 [SUBSYSTEM::GENCACHE]
-PRIVATE_PROTO_HEADER = gencache/gencache.h
+PUBLIC_HEADERS = gencache/gencache.h
 OBJ_FILES = gencache/gencache.o
 PRIVATE_DEPENDENCIES = TDB_WRAP
 
diff --git a/source/lib/gencache/gencache.h b/source/lib/gencache/gencache.h
new file mode 100644
index 0000000..1481676
--- /dev/null
+++ b/source/lib/gencache/gencache.h
@@ -0,0 +1,94 @@
+#ifndef __LIB_GENCACHE_GENCACHE_H__
+#define __LIB_GENCACHE_GENCACHE_H__
+
+/**
+ * Cache initialisation function. Opens cache tdb file or creates
+ * it if does not exist.
+ *
+ * @return true on successful initialisation of the cache or
+ *         false on failure
+ **/
+bool gencache_init(struct loadparm_context *lp_ctx);
+
+/**
+ * Cache shutdown function. Closes opened cache tdb file.
+ *
+ * @return true on successful closing the cache or
+ *         false on failure during cache shutdown
+ **/
+bool gencache_shutdown(void);
+
+/**
+ * Set an entry in the cache file. If there's no such
+ * one, then add it.
+ *
+ * @param keystr string that represents a key of this entry
+ * @param value text representation value being cached
+ * @param timeout time when the value is expired
+ *
+ * @retval true when entry is successfuly stored
+ * @retval false on failure
+ **/
+bool gencache_set(const char *keystr, const char *value, time_t timeout);
+
+/**
+ * Set existing entry to the cache file.
+ *
+ * @param keystr string that represents a key of this entry
+ * @param valstr text representation value being cached
+ * @param timeout time when the value is expired
+ *
+ * @retval true when entry is successfuly set
+ * @retval false on failure
+ **/
+bool gencache_set_only(const char *keystr, const char *valstr, time_t timeout);
+
+/**
+ * Delete one entry from the cache file.
+ *
+ * @param keystr string that represents a key of this entry
+ *
+ * @retval true upon successful deletion
+ * @retval false in case of failure
+ **/
+bool gencache_del(const char *keystr);
+
+/**
+ * Get existing entry from the cache file.
+ *
+ * @param keystr string that represents a key of this entry
+ * @param valstr buffer that is allocated and filled with the entry value
+ *        buffer's disposing must be done outside
+ * @param timeout pointer to a time_t that is filled with entry's
+ *        timeout
+ *
+ * @retval true when entry is successfuly fetched
+ * @retval false for failure
+ **/
+bool gencache_get(const char *keystr, char **valstr, time_t *timeout);
+
+/**
+ * Iterate through all entries which key matches to specified pattern
+ *
+ * @param fn pointer to the function that will be supplied with each single
+ *        matching cache entry (key, value and timeout) as an arguments
+ * @param data void pointer to an arbitrary data that is passed directly to the fn
+ *        function on each call
+ * @param keystr_pattern pattern the existing entries' keys are matched to
+ *
+ **/
+void gencache_iterate(void (*fn)(const char* key, const char *value, time_t timeout, void* dptr),
+                      void* data, const char* keystr_pattern);
+
+/********************************************************************
+ lock a key
+********************************************************************/
+int gencache_lock_entry( const char *key );
+
+/********************************************************************
+ unlock a key
+********************************************************************/
+void gencache_unlock_entry( const char *key );
+
+#endif /* __LIB_GENCACHE_GENCACHE_H__ */
+
diff --git a/source/rules.mk b/source/rules.mk
index 1ef751b..4e7841f 100644
--- a/source/rules.mk
+++ b/source/rules.mk
@@ -37,6 +37,9 @@ PCHCOMPILE = @$(CC) -Ilib/replace \
     $(CFLAGS) `$(PERL) $(srcdir)/script/cflags.pl $@` \
     $(PICFLAG) $(CPPFLAGS) -c $(FIRST_PREREQ) -o $@
 
+# Partial linking
+PARTLINK = @$(PROG_LD) -r
+
 include/config.h:
 	@echo "include/config.h not present"
 	@echo "You need to rerun ./autogen.sh and ./configure"
diff --git a/source/scripting/python/samba/provision.py b/source/scripting/python/samba/provision.py
index d30eaf3..3e88b68 100644
--- a/source/scripting/python/samba/provision.py
+++ b/source/scripting/python/samba/provision.py
@@ -335,9 +335,9 @@ def setup_samdb_partitions(samdb_path, setup_path, message, lp, session_info,
     	schemadn_ldb = ldap_backend
     	
     if ldap_backend_type == "fedora-ds":
-        backend_modules = ["nsuniqueid","paged_searches"]
+        backend_modules = ["nsuniqueid", "paged_searches"]
     elif ldap_backend_type == "openldap":
-        backend_modules = ["normalise","entryuuid","paged_searches"]
+        backend_modules = ["normalise", "entryuuid", "paged_searches"]
     elif serverrole == "domain controller":
         backend_modules = ["repl_meta_data"]
     else:
@@ -695,6 +695,7 @@ def setup_samdb(path, setup_path, session_info, credentials, lp,
     samdb.transaction_commit()
     return samdb
 
+
 FILL_FULL = "FULL"
 FILL_NT4SYNC = "NT4SYNC"
 FILL_DRS = "DRS"


-- 
Samba Shared Repository


More information about the samba-cvs mailing list