diff options
author | Russ Allbery <rra@stanford.edu> | 2013-02-13 18:25:53 -0800 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2013-02-13 18:28:37 -0800 |
commit | dc5d5b7d4a10cf44c356e8f920d852ef26601e1b (patch) | |
tree | 036fce0d7c1608af8892f5540c2f5e45226a45f9 | |
parent | b750e56ea3f93fbc09917cacfc6b2737ef9671a7 (diff) |
Install the wallet schema during make install
Install the wallet schema files generated by DBIx::Class for the
various supported database engines into /usr/local/share/wallet
(by default, using pkgdatadir) on make install. Set the default
$DB_DDL_DIRECTORY value in Wallet::Config accordingly.
Change-Id: I7ec52b171bc6aca2c3e1040c037e7cf24553231f
Reviewed-on: https://gerrit.stanford.edu/794
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
-rw-r--r-- | Makefile.am | 13 | ||||
-rw-r--r-- | TODO | 6 | ||||
-rw-r--r-- | perl/Wallet/Config.pm | 21 |
3 files changed, 22 insertions, 18 deletions
diff --git a/Makefile.am b/Makefile.am index 1c42b2d..0e1d99c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,8 +1,8 @@ # Automake makefile for wallet. # # Written by Russ Allbery <rra@stanford.edu> -# Copyright 2006, 2007, 2008, 2010 -# Board of Trustees, Leland Stanford Jr. University +# Copyright 2006, 2007, 2008, 2010, 2013 +# The Board of Trustees of the Leland Stanford Junior University # # See LICENSE for licensing terms. @@ -82,6 +82,15 @@ client_wallet_rekey_LDADD = client/libwallet.a util/libutil.a \ dist_man_MANS = client/wallet.1 client/wallet-rekey.1 server/keytab-backend.8 \ server/wallet-admin.8 server/wallet-backend.8 server/wallet-report.8 +# Install the SQL files that are used by the server code to do upgrades. +dist_pkgdata_DATA = perl/sql/Wallet-Schema-0.07-0.08-MySQL.sql \ + perl/sql/Wallet-Schema-0.07-0.08-SQLite.sql \ + perl/sql/Wallet-Schema-0.07-MySQL.sql \ + perl/sql/Wallet-Schema-0.07-SQLite.sql \ + perl/sql/Wallet-Schema-0.08-MySQL.sql \ + perl/sql/Wallet-Schema-0.08-PostgreSQL.sql \ + perl/sql/Wallet-Schema-0.08-SQLite.sql + # A set of flags for warnings. Add -O because gcc won't find some warnings # without optimization turned on. Desirable warnings that can't be turned # on due to other problems: @@ -183,12 +183,6 @@ Administrative Interface: but it's supposed to work directly from the classes. Double-check this. -Installation: - - * WALLET-65: Install the SQL files and set a default value for - $DB_DDL_DIRECTORY. Document this in the installation instructions. - Test for the validity of that variable before doing upgrades? - Documentation: * WALLET-43: Write a conventions document for ACL naming, object naming, diff --git a/perl/Wallet/Config.pm b/perl/Wallet/Config.pm index 98dae03..9649c6c 100644 --- a/perl/Wallet/Config.pm +++ b/perl/Wallet/Config.pm @@ -84,6 +84,17 @@ file. =over 4 +=item DB_DDL_DIRECTORY + +Specifies the directory used to dump the database schema in formats for +each possible database server. This also includes diffs between schema +versions, for upgrades. The default value is F</usr/local/share/wallet>, +which matches the default installation location. + +=cut + +our $DB_DDL_DIRECTORY = '/usr/local/share/wallet'; + =item DB_DRIVER Sets the Perl database driver to use for the wallet database. Common @@ -167,16 +178,6 @@ backends, particularly SQLite, do not need this. our $DB_PASSWORD; -=item DB_DDL_DIRECTORY - -Specifies the directory used to dump the database schema in formats for -each possible database server. This also includes diffs between schema -versions, for upgrades. - -=cut - -our $DB_DDL_DIRECTORY; - =back =head1 FILE OBJECT CONFIGURATION |