summaryrefslogtreecommitdiffstats
path: root/configure.ac
Commit message (Collapse)AuthorAgeFilesLines
* Move the repo to github.HEADmasterPavel Raiskup2016-07-221-186/+0
|
* postgresql-setup: reflect pg_upgrade movementPavel Raiskup2016-01-071-1/+1
| | | | | | | | | | | | | | | The pg_upgrade binary is not in postgresql-upgrade package now. In some upgrade scenarios, postgresql-upgrade is redundant package (SCLs/PGRPMSs). Hack the code so postgresql-setup is able to correctly advice which package should be installed to make the "old" engine available. * postgresql-setup.in (upgrade): Don't check for pg_upgrade binary existence but rather for postgres binary, and warn user with proper package name if missing. * share/postgresql-setup/library.sh.in (parse_upgrade_setup): White-list also 'package' constant name. * configure.ac: Bump version.
* release: 3.5v3.5Pavel Raiskup2015-11-161-1/+1
| | | | | * configure.ac: Version bump. * NEWS: Document.
* release: 3.4v3.4Pavel Raiskup2015-09-251-1/+1
| | | | * configure.ac: Version bump.
* configury: switch to _ax_text_tpl.m4Pavel Raiskup2015-09-251-66/+17
| | | | | | | | | | | | | | The script generation Makefile snippets are now used from _ax_text_tpl.m4, DRY principle (the m4 file is maintained separately for multiple projects). * configure.ac: Remove all the manual work with substitutions, start using _AX_TEXT_* macros. * Makefile.am: Use $(text_tpl_gen*) variables from _ax_text_tpl. * tests/Makefile.am: Likewise. * share/postgresql-setup/Makefile.inc: Likewise. * m4/_ax_text_tpl.m4: New file, TODO: publish somewhere. * m4/packaging.m4: Reuse _ax_text_tpl.
* postgresql-setup: warn for $PGDATA mountpointsPavel Raiskup2015-09-251-0/+3
| | | | | | | | | | Resolves: rhbz#1247477 * configure.ac (MOUNTPOINT): New configure-time variable. * postgresql-setup.in: Warn if $pgdata or `dirname $pgdata` is a mountpoint. * NEWS: Document. * README: Document that its better to have util-linux in BR.
* README.rpm-dist: fix paths descriptionsPavel Raiskup2015-04-221-0/+4
| | | | | | | * configure.ac: Substitute more variables. * README.rpm-dist.template (Filesystem layout): Fix paths to be generated correctly even for non-default builds. (UPGRADING AN INSTALLATION): Fix link to old data directory.
* initscript: don't block system start-up by defaultPavel Raiskup2015-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit should resolve complaints against pg_ctl -w usage from initscript (see rhbz#800534 for more info). The problem is that pg_ctl -w can block whole system startup too long - until the server is fully ready to accept connections. The commit 8c7b2cd5f6d9efb59568382cd8b6e88d9be517bb thus invented basically bad approach for initscript. Now, the "-w" option is used only if the PGSTARTWAIT is explicitly set to 1 by administrator. In this case, the PGSTARTTIMEOUT numeric value (in seconds) is respected (or limit 30 seconds is set by default). Otherwise, if PGSTARTWAIT is unset (default), initscript keeps checking only for the pidfile existence (at most PGSTARTTIMEOUT seconds). The hardwired 'sleep 2' command (activated before 8c7b2cd5f6 commit) is still not used - regular/default system startup should be a bit faster than before. * postgresql.init.in (start): Fix handling of PGDATA, PGPORT, PGOPTS and PGSCLS - to respect special quoting characters inside, we should escape the strings before passing those to command evaluation. Use printf %q as we use bash and we don't care too much about portability. Also, don't call postgresql-ctl with -w option if PGSTARTWAIT is empty or undefined. Implement pidfile polling for the cases PGSTARTWAIT is unset. Return success faster if server is already running. ($PGSTARTWAIT): New env variable. * postgresql-ctl.in: Don't parse $PGPORT into -o option as it is not needed. Unset PGPORT if the variable is empty - postgres server would fail with empty value. * configure.ac: Bump version to 3.3. * NEWS: Document bugfixes.
* setup: don't set default pgdata blindlyPavel Raiskup2015-03-201-1/+1
| | | | | | | * postgresql-setup.in (service_configuration): Move the setting of pgdata into sysvinit-only branch. * NEWS: Document fixed bug. * configure.ac: Bump version to 3.2.
* postgresql-setup: keep old-dir usable with pg_upgradePavel Raiskup2015-03-191-1/+1
| | | | | | | * postgresql-setup.in (upgrade): Don't use --link option if we are not doing in-place upgrade. * NEWS: Document. * configure.ac: Bump minor version.
* release 3.0v3.0Pavel Raiskup2015-03-191-1/+1
| | | | * configure.ac: Bump version to full major version 3.
* sysvinit: transform for SCL & RHEL6 usagePavel Raiskup2015-03-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is mostly about simplification of intiscript and postgresql-setup script reuse. Still WIP, however (some options are not applicable for sysvinit system). * share/postgresql-setup/library.sh.in (parse_upgrade_setup): Parse new variable "pghost_override". (run_cmd_as_dbadmin): New wrapper function to run something under "postgres" user. Cut from postgresql-setup. * postgresql-setup.in: Optionally source software collections. Call new check_daemon_reload instead of in-place checking. (upgrade): Use new library function run_cmd_as_dbadmin. Add new hack for $PGHOST overriding via $pghost_override. Add more verbose output to make clear what tool failed. (check_daemon_reload): New function to make the systemd daemon reload conditionally on one dedicated place. (handle_envfile): New function to abstract environment file parsing, works both for systemd & sysvinit env-files. (handle_service_envfiles): Use handle_envfile instead of in-place parsing. (service_configuration): For sysvinit supported configuration, we support only one env file per service - take this into account and don't try to detect many from systemctl output. * postgresql.init.in: Switch to bash script. Parametrize metadata by configure results. Source software collections when needed. Source project library. Don't set PGDATA if admin uses non-default service naem. Do not define PGPORT as PGPORT should be defined in postgresql.conf. Allow passing parameters into initdb/upgrade targets. ($PREVMAJORVERSION, $PREVPGENGINE): Remove unused variables. ($PGENGINE): This is @bindir@ equivalent. ($PGLOG): Spell it so it will not clash with system default PostgreSQL installation. ($pidfile): Use $NAME instead of $PID to distinguish multiple postmaster scenarios (mainly because we do not know the PGPORT yet). (start): Drop the checking logic and use postgresql-check-db-dir instead. Reuse run_cmd_as_dbadmin instead of $SU_POSTGRES. (stop): Use run_cmd_as_dbadmin instead of $SU_POSTGRES. (reload): Just coding style fix. (perform_initdb): Drop unused function, done in postgresql-setup. (__single_comand): Mostly postgresql-setup wrapper with success/failure sugar around the call itself. (initdb): Substitute the function body with postgresql-setup call. (upgrade): Likewise. * postgresql-check-db-dir.in: Fix the hint for admin about where the service should be initialized. Do not warn about systemd-only unsupported configuration. Add @bindir@ into "you need --initdb" hint. Re-style the warning a bit. * etc/postgresql-setup/upgrade/postgresql.conf: Mention new configuration option pghost_override. * configure.ac (initscriptsconfdir): New configuration directory. (PGMAJORVERSION): Use sed and regexp for MAJOR version mining. It failed for micro versions of length >= 2. (SCL_SOURCE): Define to be empty by default. * README: Document what's needed to bootstrap from git source. WIP. * Makefile.am (initscripts_DATA): Use noinst_DATA. Firstly, having initscripts_DATA installs only non-executable files. So we needed something with _SCRIPTS primary. But initscripts_SCRIPTS would face the automake's limitation that it must be "static" list of files. So make the installation of initscript (of dynamically generated name) via automake's install/uninstall. ($(initscript)): Use $(INSTANTIATE_SCRIPT) instead of $(INSTANTIATE). (install-data-hook): Call 'systemctl daemon-reload' only for non-sysvinit systems. * .gitignore: Ignore 'initscript' filename.
* configury: detect systemd/sysvinit systemsPavel Raiskup2015-03-041-3/+14
| | | | | | | | | | | | | | | Fix the AC_ARG_WITH misuse. If WANT_SYSVINIT is unset, guess correct value. Don't treat intermediate files as those to be checked for correct syntax errors (or unexpanded @variables@). * Makefile.am: Move readme_* intermediate files into separate variable. * configure.ac: If WANT_SYSVINIT is empty (no explicit request), try to detect systemd's presence by checking for systemctl command. Print out after AC_OUTPUT information what init system will be used.
* README.rpm-dist: use docbook2txt for generationPavel Raiskup2015-03-041-1/+4
| | | | | | | | | | | | | | | | | The benefit is that sgml format we write does not need to be kept formated precisely. The output format still needs some "style" fixes, but now docbook2txt is able to generates correct text-file README.rpm-dist without problems on RHEL 5.10+. * .gitignore: Added all intermediate files of README file. * Makefile.am: Generated README file is firstly filtered through $(SED_RULES), then macros are expanded by m4 and then docbook2txt is called. * README: Document subset of dependencies. * README.rpm-dist.in: Move to ... * README.rpm-dist.template: ... here, with docbook transformation. * TODO: Document we should should work docbook docs. * configure.ac: AC_SUBST also WANT_SYSVINIT.
* postgresql-setup: better work with @SCLS@Pavel Raiskup2015-03-021-0/+2
| | | | | | | | | * 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-021-16/+5
| | | | | | | | | | .. 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.
* postgresql-check-db-dir: match configuration approachPavel Raiskup2015-03-021-1/+7
| | | | | | | | | | | | | | | | | | | * 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-271-61/+24
| | | | | | | | | | | | | | | | | | | | | | | * 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-271-0/+4
| | | | | | | | | | 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-271-0/+3
| | | | | | | | | | 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: define upgrade-config directoryPavel Raiskup2015-02-261-11/+2
| | | | | | | | | | | | | | | | | | | | 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-261-7/+43
| | | | | | | | | | | | | | | | | | | | | 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-251-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* configury: use one single variable SU_POSTGRESPavel Raiskup2015-02-101-1/+3
| | | | | | | | | | | | 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.
* configury: fix bad usage of srcdirPavel Raiskup2015-01-071-1/+1
| | | | | | | Note: Revealed thanks to automake 1.5 rebase. * configure.ac ($c_s): Use top_builddir. * tests/Makefile.am (CHECK_DEPS): Use top_builddir.
* configury: typo in PG version comparePavel Raiskup2014-12-181-1/+1
| | | | | * NEWS: Mention previous commit. * configure.ac: s/lt/le/.
* postgresql-setup: use --username for pg_upgrade 9.4+Pavel Raiskup2014-12-181-2/+9
| | | | | | | | | | | | | 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-181-1/+1
| | | | | * NEWS: Mention legacy scripts. * configure.ac (AC_INIT): Remove beta stamp.
* sysvinit: generate init file when neededPavel Raiskup2014-10-021-0/+10
| | | | | | | | | | | | | 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-021-10/+6
| | | | | | | | | | 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.
* tests: add basic bash syntax checkPavel Raiskup2014-09-231-1/+1
| | | | | | * tests/testsuite.at: New test. * configure.ac (AC_INIT): Bump version. Use only major-minor versions.
* release 1.0.0Pavel Raiskup2014-09-221-1/+1
| | | | | * NEWS: Adjust. * configure.ac: Likewise.
* 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.
* 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-181-1/+1
| | | | | | | | | | | | | * 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: some steps making the macros more consistentPavel Raiskup2014-09-181-82/+33
|
* testsuite: configury & and add first test-casePavel Raiskup2014-09-171-0/+51
| | | | | | | 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.
* NEWS: mention move from /etc/postgresql/* configurationPavel Raiskup2014-09-161-1/+1
| | | | (and bump version to 0.9.2~beta)
* README.rpmd-dist: template fixingPavel Raiskup2014-09-161-2/+3
|
* release: 0.9.1Pavel Raiskup2014-07-031-1/+1
| | | | Merge changes with ChangeLog & NEWS files. Bump version.
* upgrade/initdb logs: diverge among service namesPavel Raiskup2014-07-031-8/+5
| | | | | | Generate separate log file for each service. Also, don't configure with INITDB_LOG or UPGRADE_LOG but rather with POSTGRES_HOME.
* configure.ac: fix for PG_CTL_BIN & README_DISTPavel Raiskup2014-07-021-5/+3
|
* postgresql-ctl: use detected PG_CTL_BINPavel Raiskup2014-07-011-3/+30
|
* postgresql-check-db-dir generated alsoPavel Raiskup2014-07-011-1/+5
| | | | | Also generate files using sed as is suggested by autoconf manual (and the autoconf project does so internally).
* generate also README.rpm-distPavel Raiskup2014-07-011-0/+4
|
* Generate postgresql.service and configuration filePavel Raiskup2014-07-011-3/+8
|
* postgresql-ctl, DISTSUFF: introducePavel Raiskup2014-07-011-1/+8
| | | | | | | | | | | | We need postgresql-ctl for to keep backward compatibility with clients setting "PGPORT" directly in service file. DISTSUFF variable (which is read by ./configure) may be used to generated namespaced binary names -- e.g. DISTSUFF=93 results in postgresql93-setup is generated instead of postgresql-setup. This commit also adjusts autotools build system to not generate scripts by ./configure, but rather by make.
* docs: update option documentation and generate manPavel Raiskup2014-07-011-1/+1
|
* configury: make it non-foreignPavel Raiskup2014-07-011-1/+1
| | | | | This makes us to do some additional documentation, but it should not be so hard.