[Bucardo-general] suggestions docs / correction for running bucardo 4.x tests on Debian 5.x Lenny

Andre Felipe Machado andremachado at techforce.com.br
Fri Sep 18 20:07:29 UTC 2009


Hello,
I am newbie to Bucardo and it seems very nice idea.
I found some solutions to help newbies running tests. You may include some hints
at docs/wiki for helping newbies.
Running Debian 5.x GNU/Linux Lenny, brazilian portuguese (it is important info,
as you will realize soon).
Leveraging the excellent debian packaging efforts of Nicholas Jefferson and
adding some more info, here are some hints.

Build dependencies: cdbs, debhelper (>= 5), perl (>= 5.10.0), dh-make-perl
Dependencies: adduser, perl (>= 5.10.0), libdbix-safe-perl, libdbd-pg-perl,
libmail-sendmail-perl, libmoose-perl, libtest-dynamic-perl (>= 1.3.3),
postgresql-plperl-8.3

libdbix-safe-perl should be downloaded and built (as of today) from 
http://mentors.debian.net/cgi-bin/sponsor-pkglist?action=details;package=libdbix-safe-perl

libtest-dynamic-perl (as of today) should be downloaded from cpan.org
(Test-Dynamic) and debianized using dh-make-perl (same name package).
http://search.cpan.org/~turnstep/Test-Dynamic-1.3.3/Dynamic.pm

Then, postgresql authentication should be configured for 'trust' in order to run
the tests as regular user (is there a better option?)

plpgsql and plperlu should be installed at template1 (convenience) as postgres
user. 

createlang plperlu template1
createlang plpgsql template1

As bucardo tests were developed for English language, they will fail if system
and postgresql are installed/configured for other language.
One have to edit t/BucardoTesting.pm around line 350 for this code snippet:

	## Wait for "ready to accept connections"
	my $logfile = "$dirname/pg.log";
	open my $fh, '<', $logfile or die qq{Could not open "$logfile": $!\n};
	seek $fh, -100, 2;
	LOOP: {
		  while (<$fh>) {
#AFM 18set2009 it seeks for english language string only. 
#Customize for your pgsql configured language			  
			  #last LOOP if /system is ready/;
			  last LOOP if /sistema de banco de dados está pronto para aceitar conexões/;
		  }
		  sleep 0.1;
		  seek $fh, 0, 1;
		  redo;
	  }
	close $fh or die qq{Could not close "$logfile": $!\n};

	return;



Then, run at your user sandbox

andremachado at debian:~$ export PATH="$PATH:/usr/sbin"
andremachado at debian:~$ export TEST_AUTHOR='Andre Felipe Machado'
andremachado at debian:~$ export PGBINDIR="/usr/lib/postgresql/8.3/bin"
andremachado at debian:~$ export RELEASE_TESTING="1"
andremachado at debian:~$ cd /home/andremachado/projects/bucardo/Bucardo-4.0.1/
andremachado at debian:~/projects/bucardo/Bucardo-4.0.1$  nice time make test
TEST_VERBOSE=1


Maybe forgot to list some dependency, but these steps allowed to run the bucardo
4.x tests mostly successfully.
I hope these help to improve bucardo documentation.
Regards.

Andre Felipe Machado
http://www.techforce.com.br



More information about the Bucardo-general mailing list