<feed xmlns='http://www.w3.org/2005/Atom'>
<title>postgresql-setup.git/etc/postgresql-setup, branch v3.3</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/praiskup/public_git/postgresql-setup.git/'/>
<entry>
<title>sysvinit: transform for SCL &amp; RHEL6 usage</title>
<updated>2015-03-17T12:52:47+00:00</updated>
<author>
<name>Pavel Raiskup</name>
<email>praiskup@redhat.com</email>
</author>
<published>2015-03-17T10:34:21+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/praiskup/public_git/postgresql-setup.git/commit/?id=81e523c0957a9bee557bf2cca25607989209ac2c'/>
<id>81e523c0957a9bee557bf2cca25607989209ac2c</id>
<content type='text'>
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 &amp; 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 &gt;= 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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &amp; 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 &gt;= 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.
</pre>
</div>
</content>
</entry>
<entry>
<title>configuration: SCL hacks</title>
<updated>2015-02-26T16:31:38+00:00</updated>
<author>
<name>Pavel Raiskup</name>
<email>praiskup@redhat.com</email>
</author>
<published>2015-02-26T15:51:45+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/praiskup/public_git/postgresql-setup.git/commit/?id=a8a3f7cbb9e46d946d9c0d7f8e8d547ad35a5a2c'/>
<id>a8a3f7cbb9e46d946d9c0d7f8e8d547ad35a5a2c</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>configuration: define upgrade-config directory</title>
<updated>2015-02-26T15:52:25+00:00</updated>
<author>
<name>Pavel Raiskup</name>
<email>praiskup@redhat.com</email>
</author>
<published>2015-02-26T13:03:22+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/praiskup/public_git/postgresql-setup.git/commit/?id=f7f516372e2218daf18a79241d1fd271faa237cc'/>
<id>f7f516372e2218daf18a79241d1fd271faa237cc</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
</feed>
