summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* postgresql-setup: better work with @SCLS@Pavel Raiskup2015-03-022-9/+4
| | | | | | | | | * configure.ac (SCL_SOURCE): New variable sourcing needed scls. * postgresql-setup.in (initdb): Use @SCL_SOURCE@ instead of runtime generated $scls_initdb_hacks. (upgrade): Use @SCL_SOURCE@. For this we don't need to specify default "current" SCL when upgrading from other SCL in upgrade-configuration 'scls' option.
* configury: better handle pathsPavel Raiskup2015-03-022-20/+7
| | | | | | | | | | .. to avoid FTBFS with SCLs. Use pgdocdir rather then docdir because the 'docdir' is not set by %configure by default. * Makefile.am (pkgname): Drop, not needed. (pgdoc_DATA): Use this rather than doc_DATA. * configure.ac: Fix pgdocdir. (PGDATADIR): Define as subdirectory of localstatedir.
* move library functions into library.shPavel Raiskup2015-03-022-22/+22
| | | | | | * postgresql-setup.in (die, error, error_q, warn, warn_q, info) (info_q, debug, set_var, root_prereq): Move to .. * share/postgresql-setup/library.sh.in: .. here.
* postgresql-check-db-dir: match configuration approachPavel Raiskup2015-03-027-113/+165
| | | | | | | | | | | | | | | | | | | * configure.ac (PGDATADIR): Use /var/lib/pgsql/data when prefix is set to /usr. (rawpkgdatadir): New directory. Its different from pkgdatadir, because thats often set to /usr/share/postgresql. * Makefile.am: Include new rawpkgdatadir Makefile.inc. Fix distcheck by mentioning legacyscripts_SCRIPTS in GENERATED_FILES. * postgresql-check-db-dir.in: Use library.sh to give user better advice. Use @NAME_BINARYBASE@ prefix. (bad_version): New function. (PREVMAJORVERSION): Removed unused variable. * postgresql-setup.in: Cut out the config-parsing routines into library.sh. * share/postgresql-setup/library.sh.in: New library file. Added new option 'list' for parse_upgrade_setup. * share/postgresql-setup/Makefile.inc: New file. * share/postgresql-setup/.gitignore: Ignore library.sh.
* configury: another scl-izing commitPavel Raiskup2015-02-276-76/+36
| | | | | | | | | | | | | | | | | | | | | | | * Makefile.am: Move systemd directory definitions into configure.ac. This is then easily configurable via config.site. * configure.ac (PGENGINE, PG_CTL_BIN): Remove, bindir is sufficient. (PREVMAJORVERSION, PREVPGENGINE): Removed. It si configurable now. (INIDB_SCLS): Generalize into SCLS variable. (SCLS): Moved from INIDB_SCLS. (PGDATADIR): Default changed to have ${prefix} inside. (SED_RULES): Remove unused variables (or to not be used, TODO for next commit). (conf_dir): New macro to define config.site friendly directory variable. (SCL_SHELL_WRAPPER): Convenient macro to generate appropriate call to scl binary (only when building for software collections). * postgresql-check-db-dir.in: Use new variable layout. * postgresql-ctl.in: Likewise. * postgresql-setup.in: Likewise. * postgresql.service.in: Likewise. This fixes regression of not using ${bindir} properly.
* configury: add INITDB_SCLS variablePavel Raiskup2015-02-272-1/+14
| | | | | | | | | | This brings space separated list of Software Collections to be enabled with call to 'initdb' binary. * configure.ac (INITDB_SCLS): New variable. * postgresql-setup.in ($initdb_scls): New global. (perform_initdb): Source appropriate environment based on $initdb_scls content.
* configury: add NAME_DEFAULT_PREV_SERVICE variablePavel Raiskup2015-02-272-1/+4
| | | | | | | | | | We may want to configure postgresql-setup to upgrade from SCL version of PostgreSQL, which needs to read 'postgresql92-postgresq' service files. Defaults to 'postgresql'. * configure.ac (NAME_DEFAULT_PREV_SERVICE): New configure var. * postgresql-setup.in ($option_upgradefrom): Default to NAME_DEFAULT_PREV_SERVICE contents.
* configuration: SCL hacksPavel Raiskup2015-02-263-2/+49
| | | | | | | | | | | | | | | Its now configurable what software collections will be enabled for pg_upgrade run, in case it is needed (new 'scls' option). Similarly, pg_upgrade needs to be told to send unix_socket_directories instead of unix_socket_directory to PostgreSQL server built for RHEL. * etc/postgresql-setup/upgrade/postgresql.conf: Add configuration examples for new options. * postgresql-setup.in (parse_upgrade_setup): Parse 'scls' and 'redhat_sockets_hack' options. (upgrade): Adjust the environment of 'su - postgres' call to pg_upgrade, optionally.
* configuration: define upgrade-config directoryPavel Raiskup2015-02-268-110/+94
| | | | | | | | | | | | | | | | | | | | Currently under /etc/postgresql-setup/upgrade. All '*.conf' files are going to be loaded run-time by postgresql-setup. * postgresql-setup.in (read_config_file): New helper to safely read configuration files. (set_var): Remove comment. (parse_upgrade_setup): Use new read_config_file(). (parse_configuration): Rename to service_configuration(). * Makefile.am: Don't include share/Makefile.inc. Indent fixes. Add install-data-hook helper to install config directory. * build-helpers/Makefile.inc: Removed. * build-helpers/build-config: Likewise. * upgrade_config.template: Removed. * etc/postgresql-setup/upgrade/postgresql.conf: New template. * configure.ac: Remove --with-upgrade-config. Package maintainers are supposed to provide those for now. * share/postgresql-setup/Makefile.inc: Removed.
* configury: remove DISTSUFF variable completelyPavel Raiskup2015-02-269-82/+144
| | | | | | | | | | | | | | | | | | | | | And add NAME_SERVICE, NAME_PACKAGE and NAME_BINARYBASE on its place. This allows packager fine-tune how the files are going to be generated. * Makefile.am: Better work with variables. * .gitignore: Ignore any (generated) service file. * configure.ac (DISTSUFF): Remove. (NAME_BIN_PFX, NAME_BIN_SFX, NAME_PKG_PFX, NAME_PKG_SFX) (NAME_SRV_PFX, NAME_SRV_SFX, NAME_SERVICE, NAME_PACKAGE) (NAME_BINARYBASE): New variables * doc/.gitignore: Ignore any man(1) page. * doc/Makefile.am (HELP2MAN_RUN): Fix the call to work also with various prefixes/suffixes. * README.rpm-dist.in: Use new variables. * legacy-sysv-script.in: Likewise. * postgresql-setup.in: Likewise. * m4/packaging.m4 (PGSETUP_SUBST_OPT): New macro, defines, substitutes and also fixes sed-rules.
* postgresql-setup: multi-upgrade configurationPavel Raiskup2015-02-2511-58/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* postgresql-setup: fix version in --version outputPavel Raiskup2015-02-101-7/+4
| | | | | | | | | | | And better spell errors (to let user know that the initdb_log may not exist). * postgresql-setup.in (print_version): Use "full" @PGVERSION@ and @PREVMAJORVERSION@.X to better describe what the package is configured for. (initdb): Spell better the failure message. * postgresql-setup.in: Use $* instead of $@.
* legacy-scripts: generate them from single templatePavel Raiskup2015-02-105-39/+12
| | | | | | | | | | | | | | | | | | | As we do not consider the postgresql@ unit variants (that would require libexec/initscripts/legacy-actions/postgresql@CONCRETE symlink to the default legacy-scripts directory), there is no need to do run-time checks. * Makefile.am (upgrade): Create from legacy-sysv-script.in template. (initdb): Likewise. (systemdlegacyscripts_DATA): Substitute with .. (systemdlegacyscripts_SCRIPTS): .. this to have execute bit after installation. (GENERATED_FILES): Add _SCRIPTS variant for systemdlegacyscripts. * legacy-sysv-script.in: New unified template for legacy scripts. * initdb.in: Remove. * upgrade.in: Likewise. * NEWS: Document.
* configury: ChangeLog relevant to postgresql-setup onlyPavel Raiskup2015-02-101-1/+1
| | | | * Makefile.am: Choose better day for ChangeLog begin.
* postgresql.init: use $README_DIST alsoPavel Raiskup2015-02-102-3/+6
| | | | | | | | Issue detected by './configure --with-sysvinit && make check'. * postgresql.init.in ($PGDOCDIR): Wipe it out. ($README_DIST): Use on appropriate places. * Makefile.am: Add TODO relevant to this commit.
* configury: use one single variable SU_POSTGRESPavel Raiskup2015-02-104-21/+14
| | | | | | | | | | | | We use 'su' only for 'postgres' user purposes. So have one, configure-time-proven command. Also, in the previous commit I forgot to fix sysvinit file. * configure.ac (SU_POSTGRES): New variable. * postgresql-setup.in ($SU_POSTGRES): Use detected @SU_POSTGRES@. ($SU, $SU_L_POSTGRES): Avoid usage of those. * postgresql.init.in: Likewise. * .gitignore: Remove typoed ignore.
* postgresql-setup: mention login shell explicitlyPavel Raiskup2015-02-102-2/+6
| | | | | | | | | | | | | | The setup script was reported to not work if user 'postgres' has /sbin/nologin in /etc/passwd (explicitly set by administrator). This configuration does not seem to be terribly useful but there is no need to fail at all. Resolves: rhbz#1122143 * postgresql-setup.in ($SU_L_POSTGRES): New wrapping variable, using '-s /bin/sh' to bypass /sbin/nologin. This option should be supported both by 'su' and 'runuser'. * NEWS: Document.
* configury: fix bad usage of srcdirPavel Raiskup2015-01-072-2/+2
| | | | | | | Note: Revealed thanks to automake 1.5 rebase. * configure.ac ($c_s): Use top_builddir. * tests/Makefile.am (CHECK_DEPS): Use top_builddir.
* configury: don't build ChangeLog outside gitPavel Raiskup2015-01-071-10/+12
| | | | * Makefile.am (GL_GEN): Test the .git exists and exit if not.
* configury: typo in PG version comparePavel Raiskup2014-12-182-1/+8
| | | | | * NEWS: Mention previous commit. * configure.ac: s/lt/le/.
* postgresql-setup: use --username for pg_upgrade 9.4+Pavel Raiskup2014-12-182-3/+10
| | | | | | | | | | | | | The --user option still works but we should be rather careful for the future. Master only. References: http://www.postgresql.org/docs/9.4/static/release-9-4.html * configure.ac (AC_INIT): Bump to 3.0~dev version. (PG_UPGRADE_BIN_USER_OPT): New variable carrying the right format of pg_upgrade's username option. * postgresql-setup.in (upgrade): Use @PG_UPGRADE_BIN_USER_OPT@.
* Release 1.0v2.0Pavel Raiskup2014-12-182-1/+4
| | | | | * NEWS: Mention legacy scripts. * configure.ac (AC_INIT): Remove beta stamp.
* configury: remove redundant nodist_* prefixPavel Raiskup2014-12-011-8/+8
| | | | | | | .. from targets which are not distributed anyway. Thanks jmlich to forcing me to catch that mistake. * Makefile.am: Remove all nodist_ prefixes.
* systemd: added systemd's legacy scriptsJozef Mlich2014-12-014-1/+46
| | | | | | | | | * Makefile.am: (systemdlegacyscriptsdir) (nodist_systemdlegacyscrupts_DATA): New variables. (initdb, upgrade): New targets. * initdb.in: New legacy script template. * upgrade.in: Likewise. * .gitignore: Ignore newly generated scripts.
* sysvinit: rhel6 /etc/init.d to /etc/rc.d/init.dJozef Mlich2014-11-151-1/+1
| | | | * Makefile.am: s|init.d|rc.d/init.d|.
* sysvinit: install init script without '.init' suffixPavel Raiskup2014-11-141-2/+2
| | | | * Makefile.am: Make the target postgresql, not postgresql.init.
* init.d: move init script to sysconfdirJozef Mlích2014-11-131-1/+1
| | | | * Makefile.am: s|$(prefix)/etc/init.d|$(sysconfdir)/init.d|.
* sysvinit: generate init file when neededPavel Raiskup2014-10-025-2/+366
| | | | | | | | | | | | | From now, if ./configure --with-sysvinit is done, we install init script and do not install systemd files. Original patch written by Jozef Mlích (jmlich@redhat.com). * Makefile.am (initscriptsdir, nodist_initscripts_DATA): New variables. New postgresql.init target. * configure.ac: Add --with-sysvinit option. * postgresql.init.in: New sysvinit template. * .gitignore: Mention postgresql.init. * NEWS: Document.
* buildsystem: better handle distro-READMEPavel Raiskup2014-10-023-18/+14
| | | | | | | | | | Avoid detecting README.rpm-dist as we generate this file and we know the best where the file is. * configure.ac: Avoid detecting README path. Also substitute new variable README_DIST_BASENAME. * Makefile.am: Use the new $(README_DIST_BASENAME). * postgres-check-db-dir.in: Use README_DIST instead of PGDOCDIR.
* postgresql-check-db-dir: fix drop-in directory detectionPavel Raiskup2014-09-231-1/+1
| | | | | | | Backpatch to REL_001. * postgresql-check-db-dir.in: Fix drop-in directory to contain the 'service' string.
* tests: add basic bash syntax checkPavel Raiskup2014-09-232-5/+24
| | | | | | * tests/testsuite.at: New test. * configure.ac (AC_INIT): Bump version. Use only major-minor versions.
* release 1.0.0Pavel Raiskup2014-09-222-2/+2
| | | | | * NEWS: Adjust. * configure.ac: Likewise.
* docs: fix typo in postgresql-setup --helpPavel Raiskup2014-09-221-1/+1
| | | | | * postgresql-setup.in (USAGE_STRING): Remove brackets around mandatory option argument.
* configury: PREV_POSTGRES_BIN may be unsetPavel Raiskup2014-09-221-4/+4
| | | | | * configure.ac: Postpone PREV_POSTGRES_BIN check after the PREVPGENGINE check.
* release 0.9.2release-0.9.2Pavel Raiskup2014-09-191-1/+1
| | | | * configure.ac: Bump version.
* README.rpm-dist: document multiple-postmaster howtoPavel Raiskup2014-09-191-16/+20
| | | | * README.rpm-dist.in: Adjust according to latest changes.
* docs: adjust --help output and warning hintsPavel Raiskup2014-09-193-26/+45
| | | | | | * postgresql-check-db-dir.in: Just fix typos. * postgresql-setup.in: Reorganize --help. * TODO: Adjust after some time.
* postgresql-setup: opt --new-systemd-unit, --datadirPavel Raiskup2014-09-192-13/+96
| | | | | | | | | | | | | From now, admin may run single command to instantiate secondary PostgreSQL server. * postgresql-setup.in: Reorganize a little to avoid processing of port, datadir, etc. on different places. Process new options. Also make some warnings more clear. * postgresql-setup.in (warn_q, info_q): New echo wrappers. (generate_systemd_dropin): New function. (USAGE_STRING): Document new options. * NEWS: Document changes.
* postgresql-setup: detect systemd's NeedDaemonReloadprep-1Pavel Raiskup2014-09-182-0/+13
| | | | | | | | | | | Because we rely on parsing of `systemctl show -p` outuput heavily, we need to detect whether the service file or some dropin did not change (or was not added). So from now we rather instruct admin to do daemon-reload when something changed.. * postgresql-setup.in: Detect the NeedDaemonReload and warn if yes. * NEWS: Document.
* postgresql-setup: leftovers, user feelingPavel Raiskup2014-09-182-7/+14
| | | | | | | | * postgresql-setup.in (USAGE_STRING): Mention --port option. (initdb): Mention in info output the non-standard port, when used. * postgresql-setup.in: Do not throw the default-port message always, remved remaining sysconfig leftover. * NEWS: Mention that env files are now supported.
* configure: show the configuration results once donePavel Raiskup2014-09-181-1/+14
| | | | | * configure.ac: Print the basic info about configured postgresql-setup project.
* configury: fix make distcheck errorsPavel Raiskup2014-09-184-6/+9
| | | | | | | | | | | | | * Makefile.am (EXTRA_DIST): Always use $(srcdir) when referencing wildcards. (install-data-hook): Return true even for non-root make install. (DISTCLEANFILES): Mention ChangeLog. * configure.ac (TEST_GEN_FILES_LIST): Only use the basename. * tests/Makefile.am (CHECK_DEPS): Fix reference to TEST_GEN_FILES_LIST. (DISTCLEANFILES): Mention also atconfig and atlocal. * tests/testsuite.at: Fix reference to $TEST_GEN_FILES_LIST, use always $abs_top_builddir when referencing built files.
* configury: generated ChangeLog by make distPavel Raiskup2014-09-183-55/+20
| | | | | | | | Use the gitlog-to-changelog binary, if exists on the system. * Makefile.am (dist-hook): Add rules for ChangeLog. * ChangeLog: Remove file. * .gitignore: Ignore .gitignore.
* configury: some steps making the macros more consistentPavel Raiskup2014-09-182-82/+68
|
* man: generate manual page more carefullyPavel Raiskup2014-09-171-5/+24
| | | | | | | In general, we do not want to distribute help2man binary (to avoid license confusions, etc.). So if the manual needs to be re-generated, try to use help2man on system or keep warning about its non-existence.
* testsuite: configury & and add first test-casePavel Raiskup2014-09-176-54/+145
| | | | | | | This required little bit of generalization so I moved the SED_CALL into configure.ac to have it available for tests/Makefile.am also. The first testsuite just checks that no un-expanded @pattern@ exists in generated files.
* sysconfig: remove remaining filesPavel Raiskup2014-09-162-14/+1
|
* NEWS: mention move from /etc/postgresql/* configurationPavel Raiskup2014-09-162-2/+8
| | | | (and bump version to 0.9.2~beta)
* postgresql-check-db-dir: migrate from /etc/postgresql/*Pavel Raiskup2014-09-162-9/+13
|
* README.rpmd-dist: template fixingPavel Raiskup2014-09-164-72/+86
|