Hi Mark, could you please try (or at least proof read) attached patch?
Cheers, Ondrej On Wed, Oct 8, 2014, at 05:58, Mark Goldfinch wrote: > Package: opendnssec-enforcer Version: 1.4.6-2 > > This bug likely should be lodged against opendnssec-enforcer-mysql and > opendnssec-enforcer-sqlite3 packages, please let me know if I should > re-file it.. > > The convert_database.pl utility program always fails to run as > packaged within Debian because of the following check: > > unless (-r $schema_path.'/database_create.sqlite3' and -r > $schema_path.'/database_create.mysql') { print STDERR $0, ': Can > not find database creation schemas, please set or correct --schema- > path.', "\n"; exit(-1); } > > However the -mysql and -sqlite3 subpackages only include schema for > their respective backends. > > Either the script should be amended for each database backend, or both > schemas should be included in both sub-packages. > > To work-around the problem one can touch the non-existent file into > existence, this shouldn't be required however.. > > Thanks, Mark. -- Ondřej Surý <ond...@sury.org> Knot DNS (https://www.knot-dns.cz/) – a high-performance DNS server
--- opendnssec.orig/enforcer/utils/convert_database.pl +++ opendnssec/enforcer/utils/convert_database.pl @@ -62,19 +62,6 @@ Getopt::Long::GetOptions( Pod::Usage::pod2usage(-verbose => 99, -exitval => 1) if $help; # -# Check schema path and existence of database creation scripts -# - -unless (defined $schema_path) { - $schema_path = File::Basename::dirname($0); -} - -unless (-r $schema_path.'/database_create.sqlite3' and -r $schema_path.'/database_create.mysql') { - print STDERR $0, ': Can not find database creation schemas, please set or correct --schema-path.', "\n"; - exit(-1); -} - -# # Check --from, let DBI parse it and check that the correct data sources are used # @@ -90,6 +77,19 @@ unless (defined $from_data_source and ($ exit(-1); } +# +# Check schema path and existence of database creation scripts +# + +unless (defined $schema_path) { + $schema_path = File::Basename::dirname($0); +} + +unless (($from_data_source eq 'SQLite' and -r $schema_path.'/database_create.sqlite3') or ($from_data_source eq 'mysql' and -r $schema_path.'/database_create.mysql')) { + print STDERR $0, ': Can not find database creation schemas, please set or correct --schema-path.', "\n"; + exit(-1); +} + # # Check --to, let DBI parse it and check that the correct data sources are used #