src/findlib/Makefile \
src/tools/Makefile \
src/plugins/fd/Makefile \
+ src/plugins/sd/Makefile \
src/plugins/dir/Makefile \
po/Makefile.in \
updatedb/update_mysql_tables_10_to_11 \
exit 1
fi
-ac_config_files="$ac_config_files autoconf/Make.common Makefile manpages/Makefile scripts/startmysql scripts/stopmysql scripts/btraceback scripts/startit scripts/stopit scripts/bconsole scripts/gconsole scripts/bacula scripts/bacula-ctl-dir scripts/bacula-ctl-fd scripts/bacula-ctl-sd scripts/devel_bacula scripts/Makefile scripts/logrotate scripts/bacula.desktop.gnome1 scripts/bacula.desktop.gnome2 scripts/bacula.desktop.gnome1.consolehelper scripts/bacula.desktop.gnome2.consolehelper scripts/bacula.desktop.gnome1.xsu scripts/bacula.desktop.gnome2.xsu scripts/bgnome-console.console_apps scripts/mtx-changer scripts/disk-changer scripts/dvd-handler scripts/dvd-simulator scripts/bacula-tray-monitor.desktop scripts/logwatch/Makefile scripts/logwatch/logfile.bacula.conf scripts/wxconsole.console_apps scripts/wxconsole.desktop.consolehelper scripts/wxconsole.desktop.xsu scripts/bat.desktop scripts/bat.desktop.xsu scripts/bat.desktop.consolehelper scripts/bat.console_apps src/Makefile src/host.h src/console/Makefile src/console/bconsole.conf src/gnome2-console/Makefile src/gnome2-console/bgnome-console.conf src/qt-console/bat.conf src/qt-console/bat.pro src/qt-console/bat.pro.mingw32 src/qt-console/install_conf_file src/wx-console/Makefile src/wx-console/bwx-console.conf src/tray-monitor/Makefile src/tray-monitor/tray-monitor.conf src/dird/Makefile src/dird/bacula-dir.conf src/lib/Makefile src/stored/Makefile src/stored/bacula-sd.conf src/filed/Makefile src/filed/bacula-fd.conf src/cats/Makefile src/cats/make_catalog_backup src/cats/delete_catalog_backup src/cats/create_postgresql_database src/cats/update_postgresql_tables src/cats/make_postgresql_tables src/cats/grant_postgresql_privileges src/cats/drop_postgresql_tables src/cats/drop_postgresql_database src/cats/create_mysql_database src/cats/update_mysql_tables src/cats/make_mysql_tables src/cats/grant_mysql_privileges src/cats/drop_mysql_tables src/cats/drop_mysql_database src/cats/create_sqlite_database src/cats/update_sqlite_tables src/cats/make_sqlite_tables src/cats/grant_sqlite_privileges src/cats/drop_sqlite_tables src/cats/drop_sqlite_database src/cats/create_sqlite3_database src/cats/update_sqlite3_tables src/cats/make_sqlite3_tables src/cats/grant_sqlite3_privileges src/cats/drop_sqlite3_tables src/cats/drop_sqlite3_database src/cats/sqlite src/cats/mysql src/cats/create_bdb_database src/cats/update_bdb_tables src/cats/make_bdb_tables src/cats/grant_bdb_privileges src/cats/drop_bdb_tables src/cats/drop_bdb_database src/cats/create_bacula_database src/cats/update_bacula_tables src/cats/grant_bacula_privileges src/cats/make_bacula_tables src/cats/drop_bacula_tables src/cats/drop_bacula_database src/findlib/Makefile src/tools/Makefile src/plugins/fd/Makefile po/Makefile.in updatedb/update_mysql_tables_10_to_11 updatedb/update_sqlite3_tables_10_to_11 updatedb/update_postgresql_tables_10_to_11 updatedb/update_sqlite_tables_10_to_11 $PFILES"
+ac_config_files="$ac_config_files autoconf/Make.common Makefile manpages/Makefile scripts/startmysql scripts/stopmysql scripts/btraceback scripts/startit scripts/stopit scripts/bconsole scripts/gconsole scripts/bacula scripts/bacula-ctl-dir scripts/bacula-ctl-fd scripts/bacula-ctl-sd scripts/devel_bacula scripts/Makefile scripts/logrotate scripts/bacula.desktop.gnome1 scripts/bacula.desktop.gnome2 scripts/bacula.desktop.gnome1.consolehelper scripts/bacula.desktop.gnome2.consolehelper scripts/bacula.desktop.gnome1.xsu scripts/bacula.desktop.gnome2.xsu scripts/bgnome-console.console_apps scripts/mtx-changer scripts/disk-changer scripts/dvd-handler scripts/dvd-simulator scripts/bacula-tray-monitor.desktop scripts/logwatch/Makefile scripts/logwatch/logfile.bacula.conf scripts/wxconsole.console_apps scripts/wxconsole.desktop.consolehelper scripts/wxconsole.desktop.xsu scripts/bat.desktop scripts/bat.desktop.xsu scripts/bat.desktop.consolehelper scripts/bat.console_apps src/Makefile src/host.h src/console/Makefile src/console/bconsole.conf src/gnome2-console/Makefile src/gnome2-console/bgnome-console.conf src/qt-console/bat.conf src/qt-console/bat.pro src/qt-console/bat.pro.mingw32 src/qt-console/install_conf_file src/wx-console/Makefile src/wx-console/bwx-console.conf src/tray-monitor/Makefile src/tray-monitor/tray-monitor.conf src/dird/Makefile src/dird/bacula-dir.conf src/lib/Makefile src/stored/Makefile src/stored/bacula-sd.conf src/filed/Makefile src/filed/bacula-fd.conf src/cats/Makefile src/cats/make_catalog_backup src/cats/delete_catalog_backup src/cats/create_postgresql_database src/cats/update_postgresql_tables src/cats/make_postgresql_tables src/cats/grant_postgresql_privileges src/cats/drop_postgresql_tables src/cats/drop_postgresql_database src/cats/create_mysql_database src/cats/update_mysql_tables src/cats/make_mysql_tables src/cats/grant_mysql_privileges src/cats/drop_mysql_tables src/cats/drop_mysql_database src/cats/create_sqlite_database src/cats/update_sqlite_tables src/cats/make_sqlite_tables src/cats/grant_sqlite_privileges src/cats/drop_sqlite_tables src/cats/drop_sqlite_database src/cats/create_sqlite3_database src/cats/update_sqlite3_tables src/cats/make_sqlite3_tables src/cats/grant_sqlite3_privileges src/cats/drop_sqlite3_tables src/cats/drop_sqlite3_database src/cats/sqlite src/cats/mysql src/cats/create_bdb_database src/cats/update_bdb_tables src/cats/make_bdb_tables src/cats/grant_bdb_privileges src/cats/drop_bdb_tables src/cats/drop_bdb_database src/cats/create_bacula_database src/cats/update_bacula_tables src/cats/grant_bacula_privileges src/cats/make_bacula_tables src/cats/drop_bacula_tables src/cats/drop_bacula_database src/findlib/Makefile src/tools/Makefile src/plugins/fd/Makefile src/plugins/sd/Makefile src/plugins/dir/Makefile po/Makefile.in updatedb/update_mysql_tables_10_to_11 updatedb/update_sqlite3_tables_10_to_11 updatedb/update_postgresql_tables_10_to_11 updatedb/update_sqlite_tables_10_to_11 $PFILES"
ac_config_commands="$ac_config_commands default"
"src/findlib/Makefile") CONFIG_FILES="$CONFIG_FILES src/findlib/Makefile" ;;
"src/tools/Makefile") CONFIG_FILES="$CONFIG_FILES src/tools/Makefile" ;;
"src/plugins/fd/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/fd/Makefile" ;;
+ "src/plugins/sd/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/sd/Makefile" ;;
+ "src/plugins/dir/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/dir/Makefile" ;;
"po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
"updatedb/update_mysql_tables_10_to_11") CONFIG_FILES="$CONFIG_FILES updatedb/update_mysql_tables_10_to_11" ;;
"updatedb/update_sqlite3_tables_10_to_11") CONFIG_FILES="$CONFIG_FILES updatedb/update_sqlite3_tables_10_to_11" ;;
+++ /dev/null
-#
-# Simple Makefile for building test SD plugins for Bacula
-#
-
-# No optimization for now for easy debugging
-CC = g++ -g -O0 -Wall
-
-SDDIR=../../stored
-SRCDIR=../..
-LIBDIR=../../lib
-
-.SUFFIXES: .c .o
-.c.o:
- $(CC) -I${SRCDIR} -I${SDDIR} -DTEST_PROGRAM -c $<
-
-test: main example-plugin-sd.so
-
-sd_plugins.o: ${SDDIR}/sd_plugins.h ${SDDIR}/sd_plugins.c
- $(CC) -I${SRCDIR} -I${SDDIR} -DTEST_PROGRAM -c ${SDDIR}/sd_plugins.c
-
-main: sd_plugins.o
- $(CC) -L${LIBDIR} sd_plugins.o -o main -lbac -lpthread -lssl -l crypto -ldl
-
-example-plugin-sd.o: example-plugin-sd.c ${SDDIR}/sd_plugins.h
- $(CC) -fPIC -I../.. -I${SDDIR} -c example-plugin-sd.c
-
-example-plugin-sd.so: example-plugin-sd.o
- $(CC) -shared example-plugin-sd.o -o example-plugin-sd.so
-
-clean:
- rm -f main *.so *.o 1 2 3
--- /dev/null
+#
+# Simple Makefile for building test FD plugins for Bacula
+#
+# Version $Id: Makefile.in 7841 2008-10-19 10:34:03Z kerns $
+#
+@MCOMMON@
+
+
+# No optimization for now for easy debugging
+
+SDDIR=../../stored
+SRCDIR=../..
+LIBDIR=../../lib
+
+.SUFFIXES: .c .o .lo
+
+.c.o:
+ $(CXX) $(DEFS) $(DEBUG) $(CPPFLAGS) -I${SRCDIR} -I${SDDIR} -DTEST_PROGRAM -c $<
+
+.c.lo:
+ $(LIBTOOL_COMPILE) $(CXX) $(DEFS) $(DEBUG) $(CPPFLAGS) -I${SRCDIR} -I${SDDIR} -DTEST_PROGRAM -c $<
+
+all: example-plugin-sd$(DEFAULT_SHARED_OBJECT_TYPE)
+
+test: main example-plugin-sd.so
+
+dir_plugins.o: ${SDDIR}/dir_plugins.h ${SDDIR}/dir_plugins.c
+ $(CXX) -I${SRCDIR} -I${SDDIR} -DTEST_PROGRAM -c ${SDDIR}/dir_plugins.c
+
+main: dir_plugins.o
+ $(CXX) $(LDFLAGS) -L${LIBDIR} dir_plugins.o -o main -lbac -lpthread -lssl -l crypto -ldl
+
+example-plugin-sd.o: example-plugin-sd.c ${SDDIR}/dir_plugins.h
+ $(CXX) $(DEFS) $(DEBUG) $(CPPFLAGS) -fPIC -I../.. -I${SDDIR} -c example-plugin-sd.c
+
+example-plugin-sd.so: example-plugin-sd.o
+ $(CXX) $(LDFLAGS) -shared example-plugin-sd.o -o example-plugin-sd.so
+
+example-plugin-sd.lo: example-plugin-sd.c ${SDDIR}/dir_plugins.h
+ $(LIBTOOL_COMPILE) $(CXX) $(DEFS) $(DEBUG) $(CFLAGS) -I../.. -I${SDDIR} -c example-plugin-sd.c
+
+example-plugin-sd.la: Makefile example-plugin-sd$(DEFAULT_OBJECT_TYPE)
+ $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -shared example-plugin-sd.lo -o $@ -rpath $(plugindir) -module -export-dynamic -avoid-version
+
+install: all
+ $(MKDIR) $(DESTDIR)$(plugindir)
+ $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) example-plugin-sd$(DEFAULT_SHARED_OBJECT_TYPE) $(DESTDIR)$(plugindir)
+ $(RMF) $(DESTDIR)$(plugindir)/example-plugin-sd.la
+
+libtool-clean:
+ find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF)
+ $(RMF) *.la
+ $(RMF) -r .libs _libs
+
+clean: @LIBTOOL_CLEAN_TARGET@
+ rm -f main *.so *.o 1 2 3
+
+distclean: clean
+ rm -f Makefile
+
+uninstall:
+ $(RMF) $(DESTDIR)$(plugindir)/example-plugin-sd.so
+
+depend:
* Kern Sibbald, October 2007
*
*/
-#include <stdio.h>
-#include "dir_plugins.h"
+#include "bacula.h"
+#include "sd_plugins.h"
#ifdef __cplusplus
extern "C" {
#include "bacula.h"
#include "stored.h"
+/* TODO: fix problem with bls, bextract
+ * that use findlib and already declare
+ * filed plugins
+ */
+#include "sd_plugins.h"
+
#ifdef HAVE_PYTHON
#undef _POSIX_C_SOURCE
create_pid_file(me->pid_directory, "bacula-sd", get_first_port_host_order(me->sdaddrs));
read_state_file(me->working_directory, "bacula-sd", get_first_port_host_order(me->sdaddrs));
+ load_dir_plugins(me->plugin_directory);
+
drop(uid, gid);
cleanup_old_files();
Dmsg1(200, "In terminate_stored() sig=%d\n", sig);
+ unload_plugins();
free_volume_lists();
foreach_res(device, R_DEVICE) {
#include "vtape.h"
-
/* Daemon globals from stored.c */
extern STORES *me; /* "Global" daemon resource */
extern bool forge_on; /* proceed inspite of I/O errors */
mixed priorities
General:
+18Nov08
+ebl Make SD plugins working.
14Nov08
ebl Apply Riccardo's patch to compile bacula+mysql on mandriva
13Nov08