| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
* Makefile.am: Use $(srcdir)/style.dsl instead of style.dsl.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
.. 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
* Makefile.am: Choose better day for ChangeLog begin.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
* Makefile.am (GL_GEN): Test the .git exists and exit if not.
|
|
|
|
|
|
|
| |
.. from targets which are not distributed anyway. Thanks jmlich
to forcing me to catch that mistake.
* Makefile.am: Remove all nodist_ prefixes.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
* Makefile.am: s|init.d|rc.d/init.d|.
|
|
|
|
| |
* Makefile.am: Make the target postgresql, not postgresql.init.
|
|
|
|
| |
* Makefile.am: s|$(prefix)/etc/init.d|$(sysconfdir)/init.d|.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
We need to create both files separately as (a) the
'postgresql.service' can not .include 'postgresql@.service' for
some reason, /usr/lib/ drop-in breaks things (rhbz#1141824) and
we want to have PGDATA unset for postgresql@.service, unlike the
postgresql.service file.
|
|
|
|
|
| |
.. instead of install-exec-hook, which caused race conditions due
to parallelized run of make.
|
|
|
|
|
|
| |
Follow the new processes - different options of postgresql-setup,
instantiable unit files. Simplify the documentation thanks to
the template.
|
|
|
|
|
|
| |
Generate separate log file for each service. Also, don't
configure with INITDB_LOG or UPGRADE_LOG but rather with
POSTGRES_HOME.
|
|
|
|
|
|
|
|
|
| |
.. as a hardlink to postgresql.service. This allows us to
instantiate postgresql@PATTERN units which will be easily
configurable in /etc/postgresql/postgresql@PATTERN conf file.
We may install separate service file with '.include' statement but
that does not seem to be necessary ATM.
|
| |
|
|
|
|
|
| |
Also generate files using sed as is suggested by autoconf manual
(and the autoconf project does so internally).
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|