From 243dcab83ed93c3afd9867b3e5d014efdd0f840f Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Tue, 24 Feb 2015 13:37:52 +0100 Subject: postgresql-setup: multi-upgrade configuration Turns out we need to support upgrade from more than one previous database versions. The plan is to make this as general as easily possible, "run-time" configurable without need to recompile. * postgresql-setup.in: Add options --upgrade-from and --upgrade-ids. Require root access (as late as possible). ($USAGE_STRING): Adjust help output accordingly. ($PGMAJORVERSION, $PREVMAJORVERSION) ($PREVPGENGINE): Remove newly useless globals. ($option_upgradefrom): New option default. (set_var, root_prereq): New helper functions. (parse_upgrade_setup): Helper function to parse upgrade configuration. (print_version): Don't print PREVMAJORVERSION as it is (with configuration) useless. (upgrade): Create new $inplace local to handle in-place and copy-like migrations differently. Use the variable set generated by parse_upgrade_setup() function. Small err message fixes. (handle_service_env, handle_pgconf): Remove the MODE argument. (parse_configuration): Generalize operations which needed to be done on two places. * upgrade_config.template: Example of ./configure time config file. Based on files like this the run-time is generated. * share/postgresql-setup/.gitignore: New file. * share/postgresql-setup/Makefile.inc: New file. * build-helpers/build-config: New file, generator of configuration files. * build-helpers/Makefile.inc: New file. * Makefile.am: Distribute upgrade_config.template. Start the conversion to flat Makefile and include two new Makefile.inc snippets. * configure.ac: New --with-upgrade-config option. Propagate the rawpkgdatadir and UPGRADE_CONFIG_LIST variables into Makefile. (INSTANTIATE): Enhance to create the leading path also. (INSTANTIATE_CONV): Convenience helper for leading path of target creation. * auxdir/install_local: New (just-for-git) installation helper. * .gitignore: Don't hide share/postgresql-setup. * TODO: Mention that KDE folks would like to migrate somehow. --- share/postgresql-setup/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 share/postgresql-setup/.gitignore (limited to 'share/postgresql-setup/.gitignore') diff --git a/share/postgresql-setup/.gitignore b/share/postgresql-setup/.gitignore new file mode 100644 index 0000000..d9c09a5 --- /dev/null +++ b/share/postgresql-setup/.gitignore @@ -0,0 +1 @@ +upgrade.conf -- cgit