[pkg-bacula-commits] [SCM] Bacula, a network backup, recovery and verification program branch, master, updated. debian/5.0.3-1-109-ga0cfd0f

Alexander Golovko alexandro at ankalagon.ru
Sun May 27 00:35:21 UTC 2012


The following commit has been merged in the master branch:
commit c84ae7dde7388482e8ccd89b39bdb6693fcc4b62
Merge: 085033851704fca24d9fcb159e7275032c8c9c1c 70da38fbbb3aeeb97563075dcf4692cd69575330
Author: Alexander Golovko <alexandro at ankalagon.ru>
Date:   Sat May 26 15:18:57 2012 +0400

    Merge commit '70da38f' (partially)
    
    565acf7 - applied
    ac74473 - applied
    7799248 - applied + fixed
    8b01282 - rejected
    cb1524e - applied + fixed
    70da38f - applied

diff --combined debian/bacula-sd-mysql.lintian-overrides
index 25d3d4c,25d3d4c..0000000
deleted file mode 100644,100644
--- a/debian/bacula-sd-mysql.lintian-overrides
+++ /dev/null
diff --combined debian/bacula-sd-pgsql.lintian-overrides
index 25d3d4c,25d3d4c..0000000
deleted file mode 100644,100644
--- a/debian/bacula-sd-pgsql.lintian-overrides
+++ /dev/null
diff --combined debian/bacula-sd-sqlite3.lintian-overrides
index 25d3d4c,25d3d4c..0000000
deleted file mode 100644,100644
--- a/debian/bacula-sd-sqlite3.lintian-overrides
+++ /dev/null
diff --combined debian/control
index 227984c,65a2cf8..663dcc0
--- a/debian/control
+++ b/debian/control
@@@ -3,16 -3,16 +3,16 @@@ Section: admi
  Priority: optional
  Maintainer: Debian Bacula packaging Group <pkg-bacula-devel at lists.alioth.debian.org>
  Uploaders: Jan Hauke Rahm <jhr at debian.org>
 -Build-Depends: autotools-dev, debhelper (>= 8.1.3), po-debconf,
 +Build-Depends: autotools-dev, autoconf, debhelper (>= 8.1.3), po-debconf,
   zlib1g-dev, libreadline-dev, libjconv-dev,
 - libsqlite3-dev, libmysqlclient-dev, libpq-dev (>= 8.4),
 - postgresql-server-dev-8.4,
 + libsqlite3-dev, libmysqlclient-dev, libpq-dev (>= 9.1),
 + postgresql-server-dev-all,
   libwrap0-dev, python-dev, libgtk2.0-dev,
   libgnome2-dev, libacl1-dev, libkrb5-dev, libgnomeui-dev,
   libx11-dev, mtx, bc, libxt-dev, libqt4-dev,
 - libssl-dev, procps
 + libssl-dev
- Build-Conflicts: python2.2-dev, python2.3, python2.4, qt3-dev-tools
- Standards-Version: 3.8.3
+ Build-Conflicts: python2.4
+ Standards-Version: 3.9.2
  Vcs-Browser: http://git.debian.org/?p=pkg-bacula/bacula.git;a=summary
  Vcs-Git: git://git.debian.org/pkg-bacula/bacula.git
  Homepage: http://www.bacula.org/
@@@ -164,7 -164,7 +164,7 @@@ Description: backup system - debug symb
  
  Package: bacula-director-sqlite3
  Architecture: any
 -Depends: bacula-director-common (= ${binary:Version}), sqlite3, ${shlibs:Depends}, bacula-common-sqlite3 (>= ${binary:Version}), file, dbconfig-common, ${misc:Depends}
 +Depends: bacula-director-common (= ${binary:Version}), sqlite3, ${shlibs:Depends}, bacula-common-sqlite3 (>= ${binary:Version}), file, dbconfig-common, ucf, ${misc:Depends}
  Conflicts: bacula-director
  Provides: bacula-director
  Replaces: bacula-director
@@@ -199,11 -199,11 +199,11 @@@ Description: backup system - debug symb
  
  Package: bacula-director-mysql
  Architecture: any
 -Depends: bacula-director-common (= ${binary:Version}), dbconfig-common, mysql-client, ${shlibs:Depends}, bacula-common-mysql (>= ${binary:Version}), ${misc:Depends}
 +Depends: bacula-director-common (= ${binary:Version}), dbconfig-common, mysql-client, ${shlibs:Depends}, bacula-common-mysql (>= ${binary:Version}), ucf, ${misc:Depends}
  Conflicts: bacula-director
  Provides: bacula-director
  Replaces: bacula-director
- Recommends: mysql-server (>= 4.0)
+ Recommends: mysql-server
  Description: network backup, recovery and verification - MySQL storage for Director
   Bacula is a set of programs to manage backup, recovery and verification of
   data across a network of computers of different kinds.
@@@ -235,11 -235,11 +235,11 @@@ Description: backup system - debug symb
  
  Package: bacula-director-pgsql
  Architecture: any
 -Depends: bacula-director-common (= ${binary:Version}), dbconfig-common, postgresql-client-8.4, ${shlibs:Depends}, bacula-common-pgsql (>= ${binary:Version}), ${misc:Depends}
 +Depends: bacula-director-common (= ${binary:Version}), dbconfig-common, postgresql-client (>= 7.4), ${shlibs:Depends}, bacula-common-pgsql (>= ${binary:Version}), ucf, ${misc:Depends}
  Conflicts: bacula-director
  Provides: bacula-director
  Replaces: bacula-director
 -Recommends: postgresql-8.4
 +Recommends: postgresql (>= 7.4)
  Suggests: postgresql-contrib, postgresql-doc
  Description: network backup, recovery and verification - PostgreSQL storage for Director
   Bacula is a set of programs to manage backup, recovery and verification of
@@@ -287,7 -287,7 +287,7 @@@ Description: network backup, recovery a
  
  Package: bacula-fd
  Architecture: any
 -Depends: bacula-common (= ${binary:Version}), ${shlibs:Depends}, lsb-base, ${misc:Depends}
 +Depends: bacula-common (= ${binary:Version}), ${shlibs:Depends}, ucf, lsb-base, ${misc:Depends}
  Suggests: bacula-traymonitor
  Description: network backup, recovery and verification - file daemon
   Bacula is a set of programs to manage backup, recovery and verification of
@@@ -310,7 -310,7 +310,7 @@@ Description: backup system - debug symb
   responsible for providing the file attributes and data when requested by
   the Director, and also for the file system-dependent part of restoration.
   .
 - This package contains the file director's debugging symbols.
 + This package contains the file daemon's debugging symbols.
  
  Package: bacula-server
  Architecture: all
@@@ -326,7 -326,7 +326,7 @@@ Description: network backup, recovery a
  Package: bacula-sd
  Architecture: any
  Pre-Depends: bacula-common (= ${binary:Version})
 -Depends: ${shlibs:Depends}, mtx, python, lsb-base, ${misc:Depends}
 +Depends: ${shlibs:Depends}, mtx, python, lsb-base, ${misc:Depends}, ucf
  Recommends: mt-st, bacula-sd-sqlite3 (>= ${source:Version})|bacula-sd-tools
  Suggests: dds2tar, scsitools, sg3-utils
  Description: network backup, recovery and verification - storage daemon
@@@ -361,8 -361,8 +361,8 @@@ Description: backup system - debug symb
  Package: bacula-sd-sqlite3
  Architecture: any
  Depends: bacula-sd (= ${binary:Version}), ${shlibs:Depends}, bacula-common-sqlite3 (>= ${binary:Version}), ${misc:Depends}
- Conflicts: bacula-sd-tools, bacula-sd (<= 3.0.1-1)
- Replaces: bacula-sd-tools, bacula-sd (<= 3.0.1-1)
+ Conflicts: bacula-sd-tools
+ Replaces: bacula-sd-tools
  Provides: bacula-sd-tools
  Description: network backup, recovery and verification - SQLite 3 SD tools
   Bacula is a set of programs to manage backup, recovery and verification of
@@@ -396,8 -396,8 +396,8 @@@ Description: backup system - debug symb
  Package: bacula-sd-mysql
  Architecture: any
  Depends: bacula-sd (= ${binary:Version}), ${shlibs:Depends}, bacula-common-mysql (>= ${binary:Version}), ${misc:Depends}
- Conflicts: bacula-sd-tools, bacula-sd (<= 3.0.1-1)
- Replaces: bacula-sd-tools, bacula-sd (<= 3.0.1-1)
+ Conflicts: bacula-sd-tools
+ Replaces: bacula-sd-tools
  Provides: bacula-sd-tools
  Description: network backup, recovery and verification - MySQL SD tools
   Bacula is a set of programs to manage backup, recovery and verification of
@@@ -431,8 -431,8 +431,8 @@@ Description: backup system - debug symb
  Package: bacula-sd-pgsql
  Architecture: any
  Depends: bacula-sd (= ${binary:Version}), ${shlibs:Depends}, bacula-common-pgsql (>= ${binary:Version}), ${misc:Depends}
- Conflicts: bacula-sd-tools, bacula-sd (<= 3.0.1-1)
- Replaces: bacula-sd-tools, bacula-sd (<= 3.0.1-1)
+ Conflicts: bacula-sd-tools
+ Replaces: bacula-sd-tools
  Provides: bacula-sd-tools
  Description: network backup, recovery and verification - PostgreSQL SD tools
   Bacula is a set of programs to manage backup, recovery and verification of
diff --combined debian/rules
index 3b6eb28,b92e6f3..ffd4f98
--- a/debian/rules
+++ b/debian/rules
@@@ -7,10 -7,10 +7,6 @@@ DBGPKGS := $(shell sed -n -e 's/Package
  
  VARIANTS := pgsql mysql sqlite3
  
--# auto-generated files in debian/
- FILETYPES := install manpages config postinst postrm preinst prerm bacula-director.init
- PACKAGES  := director sd
- 
 -FILETYPES := install manpages config postinst postrm preinst prerm bacula-director.init templates lintian-overrides
 -PACKAGES  := director sd
 -
  ######################################################################
  
  DBC := usr/share/dbconfig-common/data/
@@@ -27,15 -27,6 +23,15 @@@ CONF_ALL	= --enable-smartalloc 
  	--enable-batch-insert \
  	--without-qwt \
  	--enable-ipv6 \
 +	--with-dir-password=XXX_DIRPASSWORD_XXX \
 +	--with-fd-password=XXX_FDPASSWORD_XXX \
 +	--with-sd-password=XXX_SDPASSWORD_XXX \
 +	--with-mon-dir-password=XXX_MONDIRPASSWORD_XXX \
 +	--with-mon-fd-password=XXX_MONFDPASSWORD_XXX \
 +	--with-mon-sd-password=XXX_MONSDPASSWORD_XXX \
 +	--with-db-name=XXX_DBNAME_XXX \
 +	--with-db-user=XXX_DBUSER_XXX \
 +	--with-db-password=XXX_DBPASSWORD_XXX \
  	--config-cache \
  	--with-archivedir=/nonexistant/path/to/file/archive/dir \
  	--sysconfdir=/etc/bacula --with-scriptdir=/etc/bacula/scripts \
@@@ -64,59 -55,6 +60,32 @@@ LONGNAME_sqlite3	= sqlite
  
  ###########################################################################
  
- # Macro to extract a here document and put it in place
- # args: 1 -- db name, 2 -- file to extract, 3 -- version
- define ext-upgrade
- mkdir -p debian/bacula-director-$(1)/$(DBC)/bacula-director-$(1)/upgrade/$(1) && debian/scripts/extract_here < $(2) > debian/bacula-director-$(1)/$(DBC)/bacula-director-$(1)/upgrade/$(1)/$(3)
- endef
- 
- # Macro to upgrade db
- # args: 1 -- db type
- #       2 -- db version path (e.g. 10_to_11)
- #       3 -- package version
- define ext-upgrade-db
- $(call ext-upgrade,$(1),$(CURDIR)/updatedb/update_$(LONGNAME_$(1))_tables_$(2).in,$(3))
- endef
- 
- # Macro to process latest version upgrades for db
- # args: 1 -- db type
- #       2 -- package version
- define ext-upgrade-latest-db
- $(call ext-upgrade,$(1),$(CURDIR)/src/cats/update_$(LONGNAME_$(1))_tables.in,$(2))
- endef
- 
- # Macro to extract a here document for install and put it in place
- # args: 1 -- db name
- define ext-install-db
- mkdir -p debian/bacula-director-$(1)/$(DBC)/bacula-director-$(1)/install && debian/scripts/extract_here < $(CURDIR)/src/cats/make_$(LONGNAME_$(1))_tables.in > debian/bacula-director-$(1)/$(DBC)/bacula-director-$(1)/install/$(1)
- endef
- 
 +# Macro for generate file for specified database from specified template
 +# args: 1 -- template file
 +#       2 -- db type
 +define template-subst
 +sed -e 's/XX_DB_XX/$(2)/' '$(1)' > '$(patsubst %.in,%,$(subst -db.,-$(2).,$(1)))';
 +endef
 +
 +# Macro for cleanup file generated for specified database from specified template
 +# args: 1 -- template file
 +#       2 -- db type
 +define template-cleanup
 +rm -f '$(patsubst %.in,%,$(subst -db.,-$(2).,$(1)))';
 +endef
 +
 +# Macro for generate from all templates files for specified database
 +# args: 1 -- db type
 +define db-templates-subst
 +$(foreach template,$(wildcard debian/*-db.*.in),$(call template-subst,$(template),$(1)))
 +endef
 +
 +# Macro for cleanup all files generated for specified database from templates
 +# args: 1 -- db type
 +define db-templates-cleanup
 +$(foreach template,$(wildcard debian/*-db.*.in),$(call template-cleanup,$(template),$(1)))
 +endef
 +
  %:
  	dh $@ --with autotools_dev
  
@@@ -137,27 -75,22 +106,26 @@@ override_dh_shlibdeps
  override_dh_installinit:
  	dh_installinit -pbacula-sd -- defaults 90 10
  	dh_installinit -pbacula-fd -- defaults 91 9
 -	dh_installinit --name=bacula-director -pbacula-director-pgsql --no-start -- defaults 92 8
 -	dh_installinit --name=bacula-director -pbacula-director-mysql --no-start -- defaults 92 8
 -	dh_installinit --name=bacula-director -pbacula-director-sqlite3 --no-start -- defaults 92 8
 +	dh_installinit -pbacula-director-pgsql --name=bacula-director -- defaults 92 8
 +	dh_installinit -pbacula-director-mysql --name=bacula-director -- defaults 92 8
 +	dh_installinit -pbacula-director-sqlite3 --name=bacula-director -- defaults 92 8
  
  override_dh_install:
 +	chmod 755 debian/additions/postinst-common
- 	chmod 755 debian/scripts/extract_here
+ 	chmod 755 debian/scripts/install-dbconfig
 -	dh_install
 +	dh_install \
 +		-Nbacula-director-pgsql -Nbacula-sd-pgsql -Nbacula-common-pgsql \
 +		-Nbacula-director-mysql -Nbacula-sd-mysql -Nbacula-common-mysql \
 +		-Nbacula-director-sqlite3 -Nbacula-sd-sqlite3 -Nbacula-common-sqlite3
  	chmod 755 debian/bacula-common/usr/lib/bacula/btraceback
  	######### dbconfig-common stuff
  	# Sometimes the latest release doesn't have a copy of the data in updatedb.
- 	# Manually install those.  CHECK THIS FOR EACH NEW RELEASE, and move older
- 	# versions to an ext-upgrade-db line.
+ 	# Manually install those. CHECK THIS FOR EACH NEW RELEASE!
  	#
  	# lenny -> squeeze is 10 -> 12
- 	$(foreach db,$(VARIANTS),$(call ext-upgrade-db,$(db),10_to_11,3.0.0);)
- 	$(foreach db,$(VARIANTS),$(call ext-upgrade-latest-db,$(db),5.0.0);)   # 5.0.0 upgrade 11 to 12
- 	$(foreach db,$(VARIANTS),$(call ext-install-db,$(db));)
+ 	$(foreach db,$(VARIANTS),$(shell debian/scripts/install-dbconfig $(db) 3.0.0 11)) # 3.0.0 upgrade 10 to 11
+ 	$(foreach db,$(VARIANTS),$(shell debian/scripts/install-dbconfig $(db) 5.0.0))    # 5.0.0 upgrade 11 to 12
+ 	$(foreach db,$(VARIANTS),$(shell debian/scripts/install-dbconfig $(db)))
  
  override_dh_installdocs:
  	dh_installdocs -pbacula --link-doc=bacula-common
@@@ -167,7 -100,6 +135,7 @@@
  	dh_installdocs -Nbacula
  
  override_dh_auto_build: maintfiles
 +	autoconf -I autoconf/ -o configure autoconf/configure.in
  	dh_prep
  	dh_installdirs
  	dh_auto_configure -- $(CONF_ALL) $(CONF_pgsql)
@@@ -175,13 -107,11 +143,13 @@@
  	dh_auto_install
  	dh_install -pbacula-director-pgsql -pbacula-sd-pgsql -pbacula-common-pgsql
  	dh_auto_clean
 +	rm -rf debian/tmp
  	dh_auto_configure -- $(CONF_ALL) $(CONF_mysql)
  	dh_auto_build --parallel
  	dh_auto_install
  	dh_install -pbacula-director-mysql -pbacula-sd-mysql -pbacula-common-mysql
  	dh_auto_clean
 +	rm -rf debian/tmp
  	dh_auto_configure -- $(CONF_ALL) $(CONF_sqlite3)
  	dh_auto_build --parallel
  	dh_auto_install
@@@ -196,14 -126,18 +164,14 @@@ override_dh_strip
  override_dh_makeshlibs:
  	dh_makeshlibs -n
  
 +override_dh_clean:
 +	$(foreach db,$(VARIANTS),$(call db-templates-cleanup,$(db)))
 +	dh_clean
 +
 +override_dh_prep:
  override_dh_auto_configure:
  override_dh_auto_test:
  override_dh_auto_install:
  
  maintfiles:
 -	for pkg in $(PACKAGES); do \
 -		for ft in $(FILETYPES); do \
 -			for var in $(VARIANTS); do \
 -				[ ! -f debian/bacula-$$pkg-db.$$ft.in ] || \
 -					sed -e "s/XX_DB_XX/$$var/g" debian/bacula-$$pkg-db.$$ft.in > debian/bacula-$$pkg-$$var.$$ft; \
 -				[ ! -f debian/bacula-$$pkg-$$var.$$ft.in ] || \
 -					cat debian/bacula-$$pkg-$$var.$$ft.in >> debian/bacula-$$pkg-$$var.$$ft; \
 -			done; \
 -		done; \
 -	done
 +	$(foreach db,$(VARIANTS),$(call db-templates-subst,$(db)))
diff --combined debian/scripts/install-dbconfig
index 0000000,44743d3..0f7907d
mode 000000,100755..100755
--- a/debian/scripts/install-dbconfig
+++ b/debian/scripts/install-dbconfig
@@@ -1,0 -1,86 +1,86 @@@
+ #!/usr/bin/perl
+ 
+ # Script to install files used by dbconfig-common to install and upgrade
+ # databases
+ # (c) 2011 Debian project, Jan Hauke Rahm <jhr at debian.org>
+ # Based on make macros written by John Goerzen
+ 
+ # Arguments needed:
+ # 1: database type (sqlite3, mysql, pgsql)
+ # 2: package version
+ # 3: bacula database version to support
+ #
+ # There are three ways to call this script:
+ # 1) ./script db-type
+ # 2) ./script db-type version
+ # 3) ./script db-type version bacula-db
+ #
+ # The first will install the SQL stuff needed to create the database during
+ # package installations. The second will install the SQL stuff needed to
+ # upgrade to the latest version of the bacula-db. The third will install
+ # additional SQL upgrade stuff if we skipped a bacula db version in Debian.
+ #
+ # Example: lenny had package version 2.4.4 with bacula db version 10, squeeze has
+ #          package version 5.0.0 with bacula db version 12.
+ #          Always needed is the installation stuff:
+ #    ./script db-type
+ #          Then we need to migrate the db from 10 (2.4.4) to 11 (3.0.0)
+ #    ./script db-type 3.0.0 11
+ #          Finally we need to migrate from 11 to 12 (3.0.0 to 5.0.0) which
+ #          upstream ships as "latest upgrade"
+ #    ./script db-type 5.0.0
+ 
+ use strict;
+ use File::Path "make_path";
+ 
+ my $DBC = "usr/share/dbconfig-common/data";
+ 
+ my $db		= $ARGV[0];
+ my $pkgver	= $ARGV[1];
+ my $dbver	= $ARGV[2];
+ 
+ my $longdb	= $db;
 -$longdb = ($db == "pgsql") ? "postgresql" : $db;
++$longdb = ($db eq "pgsql") ? "postgresql" : $db;
+ 
+ if (@ARGV == 1) {
+ 	install($db);
+ } elsif (@ARGV == 2) {
+ 	latest($db, $pkgver);
+ } elsif (@ARGV == 3) {
+ 	update($db, $pkgver, $dbver);
+ } else {
+ 	exit 1;
+ }
+ 
+ sub install {
+ 	make_path("debian/bacula-director-$db/$DBC/bacula-director-$db/install");
+ 	extract_here("src/cats/make_".$longdb."_tables.in", "debian/bacula-director-$db/$DBC/bacula-director-$db/install/$db");
+ }
+ 
+ sub latest {
+ 	make_path("debian/bacula-director-$db/$DBC/bacula-director-$db/upgrade/$db");
+ 	extract_here("src/cats/update_".$longdb."_tables.in", "debian/bacula-director-$db/$DBC/bacula-director-$db/upgrade/$db/$pkgver");
+ }
+ 
+ sub update {
+ 	my $path = ($dbver - 1) . "_to_" . $dbver;
+ 
+ 	make_path("debian/bacula-director-$db/$DBC/bacula-director-$db/upgrade/$db");
+ 	extract_here("updatedb/update_".$longdb."_tables_$path.in", "debian/bacula-director-$db/$DBC/bacula-director-$db/upgrade/$db/$pkgver");
+ }
+ 
+ sub extract_here {
+ 	my $input = shift;
+ 	my $output = shift;
+ 
+ 	my $found = 0;
+ 
+ 	open (INPUT, '<', $input);
+ 	open (OUTPUT, '>', $output);
+ 	while (<INPUT>) {
+ 		if (m/END.OF.DATA/ && !$found) {$found = 1; next;};
+ 		last if (m/END.OF.DATA/);
+ 		print OUTPUT $_ if $found;
+ 	}
+ 	close (INPUT);
+ }

-- 
Bacula, a network backup, recovery and verification program



More information about the pkg-bacula-commits mailing list