From: Marco van Wieringen Date: Mon, 7 Nov 2011 19:01:49 +0000 (+0100) Subject: Remove last traces of @SQL_BINDIR@ and @DB_TYPE@ X-Git-Tag: Release-5.2.2~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6962738f30690d4114a39d23346b3b6a048c24cf;p=thirdparty%2Fbacula.git Remove last traces of @SQL_BINDIR@ and @DB_TYPE@ During the backend refactoring SQL_BINDIR and DB_TYPE were replaced with backend specific variables as multiple backends can be configured in one configure run. This should remove the last traces of these variables from the active source. The only pieces left with the old SQL_BINDIR are the unsupported Windows director database creation scripts. --- diff --git a/bacula/autoconf/bacula-macros/db.m4 b/bacula/autoconf/bacula-macros/db.m4 index 2678af593..8ef51bbbc 100644 --- a/bacula/autoconf/bacula-macros/db.m4 +++ b/bacula/autoconf/bacula-macros/db.m4 @@ -166,7 +166,7 @@ AC_HELP_STRING([--with-dbi-driver@<:@=DRIVER@:>@], [Suport for DBI driver. DRIVE "mysql") db_prog="mysql" if test -f /usr/local/mysql/bin/mysql; then - SQL_BINDIR=/usr/local/mysql/bin + MYSQL_BINDIR=/usr/local/mysql/bin if test -f /usr/local/mysql/lib64/mysql/libmysqlclient_r.a \ -o -f /usr/local/mysql/lib64/mysql/libmysqlclient_r.so; then MYSQL_LIBDIR=/usr/local/mysql/lib64/mysql @@ -174,7 +174,7 @@ AC_HELP_STRING([--with-dbi-driver@<:@=DRIVER@:>@], [Suport for DBI driver. DRIVE MYSQL_LIBDIR=/usr/local/mysql/lib/mysql fi elif test -f /usr/bin/mysql; then - SQL_BINDIR=/usr/bin + MYSQL_BINDIR=/usr/bin if test -f /usr/lib64/mysql/libmysqlclient_r.a \ -o -f /usr/lib64/mysql/libmysqlclient_r.so; then MYSQL_LIBDIR=/usr/lib64/mysql @@ -185,7 +185,7 @@ AC_HELP_STRING([--with-dbi-driver@<:@=DRIVER@:>@], [Suport for DBI driver. DRIVE MYSQL_LIBDIR=/usr/lib fi elif test -f /usr/local/bin/mysql; then - SQL_BINDIR=/usr/local/bin + MYSQL_BINDIR=/usr/local/bin if test -f /usr/local/lib64/mysql/libmysqlclient_r.a \ -o -f /usr/local/lib64/mysql/libmysqlclient_r.so; then MYSQL_LIBDIR=/usr/local/lib64/mysql @@ -196,7 +196,7 @@ AC_HELP_STRING([--with-dbi-driver@<:@=DRIVER@:>@], [Suport for DBI driver. DRIVE MYSQL_LIBDIR=/usr/local/lib fi elif test -f $withval/bin/mysql; then - SQL_BINDIR=$withval/bin + MYSQL_BINDIR=$withval/bin if test -f $withval/lib64/mysql/libmysqlclient_r.a \ -o -f $withval/lib64/mysql/libmysqlclient_r.so; then MYSQL_LIBDIR=$withval/lib64/mysql diff --git a/bacula/platforms/gentoo/bacula-init.in b/bacula/platforms/gentoo/bacula-init.in index b3ddaa1a8..0c78153f5 100755 --- a/bacula/platforms/gentoo/bacula-init.in +++ b/bacula/platforms/gentoo/bacula-init.in @@ -6,7 +6,7 @@ depend() { need net - use @DB_TYPE@ + use @DEFAULT_DB_TYPE@ } opts="test" diff --git a/bacula/platforms/suse/bacula-dir-suse-sqlite.patch b/bacula/platforms/suse/bacula-dir-suse-sqlite.patch index 8f5ce1f1c..f5b008602 100644 --- a/bacula/platforms/suse/bacula-dir-suse-sqlite.patch +++ b/bacula/platforms/suse/bacula-dir-suse-sqlite.patch @@ -4,8 +4,8 @@ # ### BEGIN INIT INFO # Provides: bacula-dir --# Required-Start: $local_fs $network @DB_TYPE@ --# Required-Stop: $local_fs $network @DB_TYPE@ +-# Required-Start: $local_fs $network @DEFAULT_DB_TYPE@ +-# Required-Stop: $local_fs $network @DEFAULT_DB_TYPE@ +# Required-Start: $local_fs $network +# Required-Stop: $local_fs $network # Default-Start: 3 5 diff --git a/bacula/platforms/suse/bacula-dir.in b/bacula/platforms/suse/bacula-dir.in index 5402a0de1..550b9ceff 100755 --- a/bacula/platforms/suse/bacula-dir.in +++ b/bacula/platforms/suse/bacula-dir.in @@ -13,8 +13,8 @@ # ### BEGIN INIT INFO # Provides: bacula-dir -# Required-Start: $local_fs $network @DB_TYPE@ -# Required-Stop: $local_fs $network @DB_TYPE@ +# Required-Start: $local_fs $network @DEFAULT_DB_TYPE@ +# Required-Stop: $local_fs $network @DEFAULT_DB_TYPE@ # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: bacula director diff --git a/bacula/src/cats/create_sqlite3_database.in.patch b/bacula/src/cats/create_sqlite3_database.in.patch index faa83e640..c82adc4a2 100644 --- a/bacula/src/cats/create_sqlite3_database.in.patch +++ b/bacula/src/cats/create_sqlite3_database.in.patch @@ -4,8 +4,8 @@ # # shell script to create Bacula SQLite tables --bindir=@SQL_BINDIR@ +-bindir=@SQLITE_BINDIR@ +bindir=/usr/lib/bacula/sqlite cd @working_dir@ - sqlite=@DB_TYPE@ db_name=@db_name@ + diff --git a/bacula/src/cats/make_catalog_backup.in.patch b/bacula/src/cats/make_catalog_backup.in.patch index 7279dc005..08988b26a 100644 --- a/bacula/src/cats/make_catalog_backup.in.patch +++ b/bacula/src/cats/make_catalog_backup.in.patch @@ -1,20 +1,12 @@ --- make_catalog_backup.in 2006-12-09 10:17:05.000000000 -0500 -+++ make_catalog_backup.in.fixed 2006-12-09 10:24:40.000000000 -0500 -@@ -16,7 +16,7 @@ - cd @working_dir@ - rm -f bacula.sql - if test xsqlite = x@DB_TYPE@ ; then -- echo ".dump" | ${BINDIR}/sqlite $1.db >$1.sql -+ echo ".dump" | /usr/lib/bacula/sqlite/sqlite $1.db >$1.sql - else - if test xmysql = x@DB_TYPE@ ; then - if test $# -gt 2; then -@@ -33,7 +33,7 @@ - fi - exec ${BINDIR}/pg_dump -c -U $2 $1 >$1.sql - else -- echo ".dump" | ${BINDIR}/sqlite3 $1.db >$1.sql -+ echo ".dump" | /usr/lib/bacula/sqlite/sqlite3 $1.db >$1.sql - fi - fi - fi +++ make_catalog_backup.in.fixed 2006-12-09 10:24:40.000000000 -0500 +@@ -56,8 +56,7 @@ rm -f $1.sql + + case ${db_type} in + sqlite3) +- BINDIR=@SQLITE_BINDIR@ +- echo ".dump" | ${BINDIR}/sqlite3 $1.db >$1.sql ++ echo ".dump" | /opt/bacula/sqlite/sqlite3 $1.db >$1.sql + ;; + mysql) + BINDIR=@MYSQL_BINDIR@ diff --git a/bacula/src/cats/make_ingres_catalog_backup.in b/bacula/src/cats/make_ingres_catalog_backup.in index 6bf784dca..bcd0ce10e 100755 --- a/bacula/src/cats/make_ingres_catalog_backup.in +++ b/bacula/src/cats/make_ingres_catalog_backup.in @@ -4,7 +4,7 @@ # a base64 encoded tar of the content. # -bindir=@SQL_BINDIR@ +bindir=@INGRES_BINDIR@ PATH="$bindir:$PATH" db_name=${db_name:-@db_name@} db_user=${db_user:-@db_user@} diff --git a/bacula/src/cats/make_sqlite3_tables.in.patch b/bacula/src/cats/make_sqlite3_tables.in.patch index 06b577b2b..f9a95082a 100644 --- a/bacula/src/cats/make_sqlite3_tables.in.patch +++ b/bacula/src/cats/make_sqlite3_tables.in.patch @@ -4,8 +4,9 @@ # # shell script to create Bacula SQLite tables --bindir=@SQL_BINDIR@ +-bindir=@SQLITE_BINDIR@ +bindir=/usr/lib/bacula/sqlite PATH="$bindir:$PATH" cd @working_dir@ - sqlite=@DB_TYPE@ + db_name=@db_name@ + diff --git a/bacula/src/cats/restore_ingres_catalog_backup.in b/bacula/src/cats/restore_ingres_catalog_backup.in index a12e101fd..cc07732a0 100755 --- a/bacula/src/cats/restore_ingres_catalog_backup.in +++ b/bacula/src/cats/restore_ingres_catalog_backup.in @@ -4,7 +4,7 @@ # a base64 encoded tar of the content. # -bindir=@SQL_BINDIR@ +bindir=@INGRES_BINDIR@ PATH="$bindir:$PATH" db_name=${db_name:-@db_name@} db_user=${db_user:-@db_user@} diff --git a/bacula/src/cats/update_sqlite3_tables.in.patch b/bacula/src/cats/update_sqlite3_tables.in.patch index 5b2a36b8d..252a0f3e6 100644 --- a/bacula/src/cats/update_sqlite3_tables.in.patch +++ b/bacula/src/cats/update_sqlite3_tables.in.patch @@ -1,11 +1,11 @@ --- ./update_sqlite3_tables.in 2010-01-25 02:56:28.000000000 -0500 +++ ../../../bacula-5.0.0-fixed/src/cats/update_sqlite3_tables.in 2010-01-31 10:22:52.000000000 -0500 -@@ -11,7 +11,7 @@ - echo "this script may take several minutes to run." +@@ -7,7 +7,7 @@ echo "This script will update a Bacula MySQL database from version 12 to 14" + echo " which is needed to convert from Bacula Community version 5.0.x to 5.2.x" echo " " --bindir=@SQL_BINDIR@ +-bindir=@SQLITE_BINDIR@ +bindir=/usr/lib/bacula/sqlite PATH="$bindir:$PATH" cd @working_dir@ - sqlite=@DB_TYPE@ + db_name=@db_name@ diff --git a/bacula/src/dird/bacula-dir.conf.in b/bacula/src/dird/bacula-dir.conf.in index 080d59a08..5793ea1ff 100644 --- a/bacula/src/dird/bacula-dir.conf.in +++ b/bacula/src/dird/bacula-dir.conf.in @@ -231,7 +231,7 @@ Storage { Catalog { Name = MyCatalog # Uncomment the following line if you want the dbi driver -@uncomment_dbi@ dbdriver = "dbi:@DB_TYPE@"; dbaddress = 127.0.0.1; dbport = @db_port@ +@uncomment_dbi@ dbdriver = "dbi:@DEFAULT_DB_TYPE@"; dbaddress = 127.0.0.1; dbport = @db_port@ dbname = "@db_name@"; dbuser = "@db_user@"; dbpassword = "@db_password@" } diff --git a/bacula/updatedb/update_mysql_tables_10_to_11.in b/bacula/updatedb/update_mysql_tables_10_to_11.in index e78a13592..ea4a85cad 100644 --- a/bacula/updatedb/update_mysql_tables_10_to_11.in +++ b/bacula/updatedb/update_mysql_tables_10_to_11.in @@ -6,10 +6,11 @@ echo " " echo "This script will update a Bacula MySQL database from version 10 to 11" echo " which is needed to convert from Bacula version 2.0.x to 3.0.x or higher" echo " " -bindir=@SQL_BINDIR@ -db_name=@db_name@ +bindir=@MYSQL_BINDIR@ +PATH="$bindir:$PATH" +db_name=${db_name:-@db_name@} -if $bindir/mysql $* -f </tmp/$$ DBVERSION=`sed -n -e 's/^VersionId: \(.*\)$/\1/p' /tmp/$$` diff --git a/bacula/updatedb/update_mysql_tables_9_to_10.in b/bacula/updatedb/update_mysql_tables_9_to_10.in index ce2fd2a62..37228199b 100644 --- a/bacula/updatedb/update_mysql_tables_9_to_10.in +++ b/bacula/updatedb/update_mysql_tables_9_to_10.in @@ -8,10 +8,11 @@ echo " which is needed to convert from Bacula version 1.38.x to 2.0.x or higher" echo "Depending on the size of your database," echo "this script may take several minutes to run." echo " " -bindir=@SQL_BINDIR@ -db_name=@db_name@ +bindir=@MYSQL_BINDIR@ +PATH="$bindir:$PATH" +db_name=${db_name:-@db_name@} -if $bindir/mysql $* -f <