diff -Nru postgresql-common-154/architecture.html postgresql-common-190~ubuntu14.04.1/architecture.html --- postgresql-common-154/architecture.html 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/architecture.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,159 +0,0 @@ - - - - - - - Multiversion/Multicluster PostgreSQL architecture - - - -

Multi-Version/Multi-Cluster PostgreSQL architecture

- - -

Solving a problem

- -

-When a new major version of PostgreSQL is released, it is necessary to -dump and reload the database. The old software must be used for the dump, -and the new software for the reload.

- -

This was a major problem for Red Hat and Debian, because a dump and reload was -not required by every upgrade and by the time the need for a dump is -realised, the old software might have been deleted. Debian had certain rather -unreliable procedures to save the old software and use it to do a dump, but -these procedures often went wrong. Red Hat's installation environment is so -rigid that it is not practicable for the Red Hat packages to attempt an -automatic upgrade. Debian offered a debconf choice for -whether to attempt automatic upgrading; if it failed or was not allowed, a -manual upgrade had to be done, either from a pre-existing dump or by -manual invocation of the postgresql-dump script.

- -

There was once an upstream program called pg_upgrade which could be -used for in-place upgrading. This does not currently work and does not seem to -be a high priority with upstream developers.

- -

It is possible to run different versions of PostgreSQL simultaneously, and -indeed to run the same version on separate database clusters simultaneously. -To do so, each postmaster must listen on a different port, so each client -must specify the correct port. By having two separate -versions of the PostgreSQL packages installed simultaneously, it is -simple to do database upgrades by dumping from the old version and -uploading to the new. The PostgreSQL client wrapper is designed to -permit this.

- -

General Architecture idea

- -

The Debian packaging has been changed to create a new package for each major -version. The criterion for creating a new package is that initdb is required -when upgrading from the previous version. Thus, there are now source packages -postgresql-8.1 and postgresql-8.3 (and similarly for -all the binary packages).

- -

The legacy postgresql and the other existing binary package names have -become dummy packages depending on one of the versioned equivalents. Their only -purpose is now to ensure a smooth upgrade and to register the existing database -cluster to the new architecture. These packages will be removed from the -archive as soon as the next Debian release after Sarge (Etch) is released.

- -

Each versioned package installs into -/usr/lib/postgresql/version. In order to allow users -easily to select the right version and cluster when working, the -postgresql-common package provides the pg_wrapper program, -which reads the per-user and system wide configuration file and forks the -correct executable with the correct library versions according to those -preferences. /usr/bin provides executables soft-linked to -pg_wrapper.

- -

This architecture also allows separate database clusters to be maintained -for the use of different groups of users; these clusters need not all be of the -same major version. This allows much greater flexibility for those people -who need to make application software changes consequent on a PostgreSQL -upgrade.

- -

Detailed structure

- -

Configuration hierarchy

- - - - - - - - - - - -
/etc/postgresql-common/user_clusters maps users -against clusters and default databases
$HOME/.postgresqlrc per-user preferences for -default version/cluster and database; overrides -/etc/postgresql-common/user_clusters
/etc/postgresql/version/clusternameCluster-specific configuration files: -
    -
  • postgresql.conf, pg_hba.conf, pg_ident.conf
  • -
  • optionally start.conf: startup mode of the - cluster: auto (start/stop in init script), - manual (do not start/stop in init script, but manual - control with pg_ctlcluster is possible), disabled - (pg_ctlcluster is not allowed).
  • -
  • optionally pg_ctl.conf: options to be passed to pg_ctl.
  • -
  • optionally a symbolic link log which points to - the postmaster log file. Defaults to - /var/log/postgresql/postgresql-version-cluster.conf. - Explicitly setting log_directory and/or - log_filename in postgresql.conf - overrides this.
  • -
-
- -

Per-version files and programs

- - - - - -
/usr/lib/postgresql/version version specific program and data files
/usr/share/postgresql/version
/usr/share/doc/postgresql/postgresql-doc-version
- -

Common programs

- - - - - - - - -
/usr/share/postgresql-common/pg_wrapper environment chooser and program selector
/usr/bin/program symbolic links to pg_wrapper, for all client programs
/usr/bin/pg_lsclusters list all available clusters with their status and configuration
/usr/bin/pg_createclusterwrapper for initdb, sets up the necessary configuration structure
/usr/bin/pg_ctlclusterwrapper for pg_ctl, control the cluster postmaster server
/usr/bin/pg_upgradeclusterUpgrade a cluster to a newer major version.
/usr/bin/pg_dropclusterremove a cluster and its configuration
- -

psql

- -

We have abandoned the old non-standard error abort if a connection database -is not specified; psql is not expected to be run directly and all -connection parameters should be provided by pg_wrapper as specified above. In -addition, if no explicit default database is specified in -user_clusters, the default database will correspond to the user -name, thus reintroducing the default upstream behaviour.

- -

/etc/init.d/postgresql

- -

This script now handles the postmaster server processes for each version and -all their clusters. However, most of the actual work is done by the new -pg_ctlcluster program.

- -

pg_upgradecluster

- -

This new program replaces postgresql-dump (a Debian specific program).

- -

It is used to migrate a cluster from one major version to another.

- -

Usage: pg_upgradecluster [-v newversion] -version name [data_dir]

- -

-v version specifies the version to upgrade to; defaults -to the newest available version.

- -

The Debian -PostgreSQL developers

- - - diff -Nru postgresql-common-154/cleanpg postgresql-common-190~ubuntu14.04.1/cleanpg --- postgresql-common-154/cleanpg 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/cleanpg 2018-01-12 14:08:46.000000000 +0000 @@ -18,5 +18,5 @@ [ `id -u` = 0 ] || SUDO=sudo $SUDO /etc/init.d/postgresql stop -$SUDO killall pg_autovacuum postmaster postgres +$SUDO killall pg_autovacuum postgres $SUDO rm -rf /etc/postgresql /var/lib/postgresql/ /var/log/postgresql/* /tmp/postgresql-testsuite/ /var/run/postgresql/* diff -Nru postgresql-common-154/createcluster.conf postgresql-common-190~ubuntu14.04.1/createcluster.conf --- postgresql-common-154/createcluster.conf 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/createcluster.conf 2018-01-12 14:08:46.000000000 +0000 @@ -1,4 +1,6 @@ # Default values for pg_createcluster(8) +# Occurrences of '%v' are replaced by the major version number, +# and '%c' by the cluster name. Use '%%' for a literal '%'. # Create a "main" cluster when a new postgresql-x.y server package is installed #create_main_cluster = true @@ -7,19 +9,33 @@ # See pg_createcluster(8) for more documentation. #start_conf = 'auto' -# In the following options, occurrences of '%v' are replaced by the major -# version number, and '%c' by the cluster name. Use '%%' for a literal '%'. - # Default data directory. #data_directory = '/var/lib/postgresql/%v/%c' # Default directory for transaction logs -# Unset by default, i.e. pg_xlog remains in the data directory. -#xlogdir = '/var/lib/postgresql/xlog/%v/%c/pg_xlog' +# Unset by default, i.e. transaction logs remain in the data directory. +#waldir = '/var/lib/postgresql/wal/%v/%c/pg_wal' # Options to pass to initdb. #initdb_options = '' -# All other options are copied into the new cluster's postgresql.conf +# The following options are copied into the new cluster's postgresql.conf: + +# Enable SSL by default (using the "snakeoil" certificates installed by the +# ssl-cert package, unless configured otherwise here) +ssl = on + +# Show cluster name in process title +cluster_name = '%v/%c' + +# Put stats_temp_directory on tmpfs +stats_temp_directory = '/var/run/postgresql/%v-%c.pg_stat_tmp' + +# Add prefix to log lines +log_line_prefix = '%%m [%%p] %%q%%u@%%d ' + +# Add "include_dir" in postgresql.conf +add_include_dir = 'conf.d' -log_line_prefix = '%%t ' +# Directory for additional createcluster config +include_dir '/etc/postgresql-common/createcluster.d' diff -Nru postgresql-common-154/debian/backport-ppa postgresql-common-190~ubuntu14.04.1/debian/backport-ppa --- postgresql-common-154/debian/backport-ppa 2013-12-10 18:54:11.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/backport-ppa 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -#!/bin/sh -# Generate and upload backports for Ubuntu PPA -# Author: Martin Pitt - -set -e - -if [ -n "`bzr modified`" ]; then - echo "Modified files, aborting" >&2 - exit 1 -fi - -SRC=`dpkg-parsechangelog | grep ^Source | cut -f2- -d' '` -if [ "$SRC" = postgresql-9.1 ]; then - RELEASES='lucid' -elif [ "$SRC" = postgresql-9.2 ]; then - RELEASES='lucid precise' -else - RELEASES='lucid precise' -fi - -CUR_VERSION=`dpkg-parsechangelog | grep ^Version | cut -f2 -d' '` -SINCE_VERSION=`dpkg-parsechangelog -n2 | grep urgency=| tail -n1 | awk '{print $2}' | tr -d '()'` - - -export DEBEMAIL=martin.pitt@ubuntu.com - -# do first upload with orig tarball, subsequent ones without -ORIG="-sa" -for release in $RELEASES; do - BP_VERSION=`echo "$CUR_VERSION~${release}" | sed 's/-/-0ppa/'` - dch -D$release -v"$BP_VERSION" -b 'Backport' - if [ "$release" = lucid -o "$release" = "natty" -o "$release" = oneiric ]; then - sed -i 's/dpkg-dev.*| hardening-wrapper/hardening-wrapper/' debian/control - fi - if [ "$SRC" = "postgresql-9.1" ]; then - # libraries are built by -9.2 now, and PPAs disallow building older versions - perl -000 -ne 'print $_ unless /^Package: lib/' -i debian/control - sed -i 's/fail-missing/list-missing/' debian/rules - sed -i 's/python-dev,/python-dev, libpq-dev (>= 9.1),/' debian/control - fi - if [ "$release" = "lucid" ]; then - sed -i 's/-Zxz//' debian/rules - fi - bzr bd -S -- --no-lintian "$ORIG" -v$SINCE_VERSION - bzr revert --no-backup - dput ppa:pitti/postgresql ../${SRC}_${BP_VERSION}_source.changes - ORIG="-sd" -done diff -Nru postgresql-common-154/debian/changelog postgresql-common-190~ubuntu14.04.1/debian/changelog --- postgresql-common-154/debian/changelog 2014-02-21 07:18:49.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/changelog 2019-03-14 10:08:53.000000000 +0000 @@ -1,3 +1,684 @@ +postgresql-common (190~ubuntu14.04.1) trusty; urgency=medium + + * Backport to trusty: + - Disable dh-systemd support, as trusty's version is too old. + - Add 10 to 14.04's supported-versions. + + -- Colin Watson Thu, 14 Mar 2019 10:08:53 +0000 + +postgresql-common (190) unstable; urgency=medium + + * Move packaging repository to salsa.debian.org + * pg_lsclusters: Add --help. + * pg_virtualenv: Error out if no server packages are installed. + * postgresql-common recommends e2fsprogs, we are using chattr in + pg_createcluster. (Closes: #887251) + * PgCommon.pm: Fix include directives parser, spotted by ironhalik, thanks! + * postgresql@.service: Set Timeoutstart=0, which is the same as infinity, + but works on older systemd versions as well. + * Rewrite architecture.html as README.md. + * t/006_next_free_port.t: Drop -q argument from netcat, nmap-ncat.rpm + doesn't have it. + * t/032_ssl_key_permissions.t: Adjust for 9.4 in oldstable which still has + the old permissions check. + + -- Christoph Berg Thu, 08 Feb 2018 13:26:44 +0100 + +postgresql-common (189) unstable; urgency=medium + + [ Chris Lamb ] + * Update README.Debian for postgresql-10. (Closes: #876438) + + [ Christoph Berg ] + * dh_make_pgxs: Use PostgreSQL license as default, fix extension name. + * Modernize README.Debian's version numbers and SSL instructions. + * postgresql@.service: Ignore startup failure, recovery might take + arbitrarily long to finish. The actual service status still correctly + reflects if the postmaster process is running. + https://www.postgresql.org/message-id/20171111205316.u56lkmkakdmcx6zm%40msg.df7cb.de + * supported-versions: Version 10 on Ubuntu 18.04 (bionic). (Closes: #881501) + * debian/maintscripts-functions: bump update-alternatives priority of + version 1x to 1x0. + * Unsupport 9.2 on apt.postgresql.org. + * t/140_pg_config.t: Also test /usr/bin/pg_config.libpq-dev, and check + MKDIR_P and abs_top_build/srcdir in Makefile.global. + + -- Christoph Berg Thu, 14 Dec 2017 21:13:24 +0100 + +postgresql-common (188) unstable; urgency=medium + + * pg_ctlcluster, pg_createcluster, pg_upgradecluster: Use lchown instead + of chown to mitigate privilege escalation via symlinks. (CVE-2017-8806. + Related to CVE-2017-12172 in PostgreSQL; extends our earlier fix for + CVE-2016-1255.) + * dh_make_pgxs: Add options to set package name and version. + * pg_lsclusters: Raise error when called on a specific cluster that does not + exist. This was the behavior before the "accept dead postgresql.conf + symlinks" change, but not coded explicitly. + + -- Christoph Berg Wed, 08 Nov 2017 16:03:19 +0100 + +postgresql-common (187) unstable; urgency=medium + + * Consistently call psql -X. (Closes: #877920) + * Update pt translation, thanks Ricardo Silva! (Closes: #872430) + * pg_virtualenv: Drop "BUG" message that really just means that + pg_createcluster threw an error. + * pg_createcluster: Drop new cluster if --start was requested and starting + fails. + * pg_createcluster: If not running as postgres or root, don't attempt to + install config and data parent directories with owner postgres. + * pg_lsclusters, postgresql-generator, get_version_clusters, cluster_info, + read_conf_file: Accept dead postgresql.conf symlinks, filesystem might not + be mounted yet. + * pg_virtualenv: Fix version comparison when determining newest PG major. + * pg_updatedicts, postgresql-common.postinst: Create tsearch dictionaries on + first install and set umask for correct permissions. (Closes: #868232) + Thanks to Christian Ehrhardt for the analysis! + * Demote postgresql-common hunspell/myspell triggers to noawait. + + -- Christoph Berg Sun, 22 Oct 2017 20:44:38 +0200 + +postgresql-common (186) unstable; urgency=medium + + * Team upload. + * Bump default apt.postgresql.org version to 10. + * t/020_create_sql_remove.t: Support 8.x xlog filenames. + * Update ca translation, thanks Innocent De Marchi! (Closes: #876472) + * PgCommon.pm: Use BSD ps syntax in check_pidfile_running. + + -- Christoph Berg Thu, 05 Oct 2017 16:04:18 +0200 + +postgresql-common (185) unstable; urgency=medium + + * Team upload. + + [ Christoph Berg ] + * Revert "Error out if a recovery.conf file is found in /etc/postgresql". + It caused too many false positives for setups where a recovery.conf + template is located in the etc directory. (Closes: #868367) + * Bump default PostgreSQL version to 10. + + [ Marco Nenciarini ] + * supported-versions: correctly detect version 10 when using 'installed'. + + -- Christoph Berg Thu, 21 Sep 2017 12:07:30 +0200 + +postgresql-common (184) unstable; urgency=high + + * debian/maintscripts-functions: Use deb-systemd-invoke instead of + invoke-rc.d to stop "postgresql@$ver-*"; jessie's invoke-rc.d does not + support service patterns. + + -- Christoph Berg Tue, 11 Jul 2017 20:19:21 +0200 + +postgresql-common (183) unstable; urgency=medium + + * Team upload. + + [ Nishanth Aravamudan ] + * debian/supported-versions: add Ubuntu 17.10. (Closes: #862420) + + [ Bernd Helmle ] + * postgresql-common.spec: Fix installation path of manpages. + + [ Alex Badics ] + * pg_ctlcluster: Use pg_ctl.conf during stop too. + + [ Christoph Berg ] + * PgCommon.pm: Sort get_versions and get_version_clusters output. + * PgCommon.pm: Revert to old quote_conf_value behavior, the new regexp was + too liberal. The new input behavior is retained, though. + * pg_ctlcluster: Error out if a recovery.conf file is found in + /etc/postgresql to catch a common mistake. (Closes: #853868) + * pg_upgradecluster: Allow configuring the maintenance database. + (Closes: #851874) + * pg_upgradecluster: Pass config directory to pg_upgrade instead of + symlinking the config files. This breaks using "-m upgrade" for upgrades + *to* versions before 9.2; upgrades from older versions are unaffected. + * pg_upgradecluster, pg_renamecluster: Use default pg_ctl timeout when + stopping cluster. + * pg_dropcluster: Remove custom xlog directory. (Closes: #830789) + * pg_createcluster, pg_ctlcluster: cd / to prevent warnings from PostgreSQL + tools. (Closes: #834264) + * pg_wrapper: Don't fail if no local cluster exists on port 5432. + Code cleanup. (Closes: #777623) + * pg_lsclusters: --start-conf shows start.conf information. + * createcluster.conf: Add add_include_dir='conf.d' for drop-in PostgreSQL + config snippets in /etc/postgresql/version/cluster/conf.d/ and + include_dir='/etc/postgresql-common/createcluster.d' for pg_createcluster + config snippets. + * t/051_inconsistent_encoding_upgrade.t: Remove, only relevant for <= 8.2. + * logrotate config: Ship as static conffile again and remove ucf handling. + * pg_conftool: Fix operation when no cluster exists yet. + * pg_conftool: --boolean normalizes boolean variable in output; use this in + debian/maintscripts-functions. + * debian/maintscripts-functions: Unconditionally call invoke-rc.d, and drop + path names from program invocations (Standards-Version 4.0.0). + * debian/maintscripts-functions: Use 'invoke-rc.d "postgresql@$ver-*" stop' + to prevent upgrading/removing server packages from stopping other major + version clusters when running systemd. (Closes: #809811) + * debian/maintscripts-functions: Avoid update-alternatives failing if the + user removed /usr/share/man. (Closes: #866729) + * t/TestLib.pm: Vacuum tests left behind when postmaster and pg_autovacuum + were removed. Update test counts in *.t. + * B-D on debhelper (>= 10.1) | dh-systemd (>= 1.19) to pick up + dh_systemd_start. + + -- Christoph Berg Wed, 05 Jul 2017 16:15:48 +0200 + +postgresql-common (182) experimental; urgency=medium + + * Team upload. + * pg_buildext: Resurrect the previously deprecated "srcdir" mode to allow + building packages from a subdirectory, and make "loop" support it as well. + * t/001_packages.t: PostgreSQL 10 doesn't have a separate contrib package. + * t/020_create_sql_remove.t: Use CREATE EXTENSION, createlang is being + removed. + * t/120_pg_upgradecluster_scripts.t: Don't try to rename + pg_upgradecluster.d, fails on overlayfs. + * pg_lsclusters, t: pg_log directory name changed in 10. + * pg_lsclusters: Allow listing one version or one cluster only. + * pg_lsclusters: Support JSON output, suggest libjson-perl for that. + * pg_createcluster, createcluster.conf: Update for --waldir rename. + * pg_createcluster: Do not suppress initdb output, and use pg_lsclusters to + show created cluster info. + * pg_ctlcluster: Suppress "Redirecting to systemctl message". + * pg_upgradecluster: Deprecate min_parallel_relation_size and + sql_inheritance in 10. + * Symlink /usr/bin/pg_receivewal to pg_wrapper. + * PgCommon.pm: Include postgresql.conf in cluster_info and remove variables + directly copied from config; adjust callers. + * PgCommon.pm: Allow more characters in unquoted config values. + Spotted by Fabien Coelho, merci! + * postgresql-server-dev-all: dh_make_pgxs: Template mechanism for new + Debian packages based on PGXS Makefiles. + + -- Christoph Berg Thu, 11 May 2017 14:01:59 +0200 + +postgresql-common (181) unstable; urgency=medium + + * debian/postgresql-common.config: Fix deprecation warning debconf message + to use a numerical comparison on the version number. + * pg_buildext: Fix to use a numerical comparison on the version number. + * pg_buildext.pod: Drop outdated PG_VIRTUALENV_UNSHARE=-n documentation. + * pgdg/apt.postgresql.org.sh: Add known distributions. + * Updated Danish debconf translation by Joe Dalton, thanks! + (Closes: #856787) + + -- Christoph Berg Sat, 15 Apr 2017 18:56:38 +0200 + +postgresql-common (180) unstable; urgency=medium + + * supported-versions: Retire 9.1 on apt.postgresql.org. + + -- Christoph Berg Thu, 09 Feb 2017 15:30:23 +0100 + +postgresql-common (179) unstable; urgency=medium + + * Catch all pg_ctl output by redirecting it to /var/log/postgresql. + (Closes: #830485) + * Dump locale environment variables if setlocale fails. + (Closes: #848869) + * Set default log_line_prefix to '%m [%p] %q%u@%d ' to match upstream + moving to '%m [%p] ' in PostgreSQL 10. + * Support include_dir in read_conf_file. Patch by Andreas Dewes, thanks! + * Support adding include directives to the new postgresql.conf from + createcluster.conf; harness directives with an "add_" prefix, e.g. + "add_include_dir". + * Import new apt.postgresql.org key. + * Support 9.6 for jessie-backports. + + -- Christoph Berg Tue, 24 Jan 2017 23:03:12 +0100 + +postgresql-common (178) unstable; urgency=medium + + [ Christoph Berg ] + * pg_buildext: Don't ask pg_virtualenv for a new network namespace by + default. + * postgresql-all: New meta package depending on all server packages in all + supported versions. Intended to be used for installing test dependencies. + * pg_upgradecluster: Properly upgrade databases with non-login role owners. + (Closes: #614374, #838812) + * pg_upgradecluster, pg_renamecluster: Update cluster_name. + * Rebuild upgrades libreadline to 7 in unstable. (Closes: #845356) + * Replace most occurrences of "postmaster" by "postgres". Notable leftover + is the postmaster.1.gz leader of the manpages alternatives group. + * pg_ctlcluster, t/020_create_sql_remove.t: Protect against symlink in + /var/log/postgresql/ allowing the creation of arbitrary files elsewhere. + Discovered by Dawid Golunski, thanks! (CVE-2016-1255) + + [ Martin Pitt ] + * debian/supported-versions: Add Ubuntu 17.04, drop EOLed releases. + * t/TestLib.pm, check_clean(): Quiesce stderr of netstat, which shows a "Not + all processes could be identified" warning in unprivileged containers. + + -- Christoph Berg Tue, 20 Dec 2016 17:11:15 +0100 + +postgresql-common (177) unstable; urgency=medium + + [ Martin Pitt ] + * Replace hardcoded Recommends: libreadline6 with a build-time detection of + the current ABI. + + [ Christoph Berg ] + * Team upload. + * Mark 9.6 as stable for apt.postgresql.org. + + -- Christoph Berg Wed, 28 Sep 2016 11:55:12 +0200 + +postgresql-common (176) unstable; urgency=medium + + * Team upload. + * Bump default PostgreSQL server version to 9.6. + * Use C.UTF-8 instead of C when the initial main cluster is created and no + locale is configured explicitly as system default. (Closes: #790507) + * Support "NN" major version numbers, next version will be PostgreSQL 10. + * debian/postgresql-common.templates: Properly mark not-to-be-translated + shell code-only chunk as such using flag:translate. Thanks to Rhonda for + the pointer! (See: #820756, #832282) + * testsuite: Run with umask 077 only by default. + * t/025_logging.t: Fix tests when grep thinks syslog is a binary file. + * t/031_errors_disk_full.t: Raise tmpfs size to account for larger cluster + footprint observed on ppc64el. + * t/032_ssl_key_permissions.t: Skip tests on 9.0 and earlier. + * pg_createcluster, t/025_logging.t: Skip logging_collector for 8.2. + * Ship /etc/postgresql-common/supported_versions even in non-backport + packages. (Closes: #808353) + * pg_createcluster: Error out if provided log file is a directory. + (Closes: #791556) + * pg_upgradecluster: Set dynamic_shared_memory_type from the new + postgresql.conf instead of defaulting to mmap. (Closes: #823209) + * pg_upgradecluster: Use data checksums in the new cluster if the old uses + them. (Closes: #830228) + + -- Christoph Berg Fri, 23 Sep 2016 12:32:16 +0200 + +postgresql-common (175) unstable; urgency=medium + + * pg_createcluster, createcluster.conf: Set cluster_name on 9.5+. + * pg_buildext: Don't set any CFLAGS by default. + * start.conf: Update documentation/comments to recommend running + systemctl daemon-reload. + + -- Christoph Berg Thu, 23 Jun 2016 12:26:27 +0200 + +postgresql-common (174) unstable; urgency=medium + + [ Christoph Berg ] + * postgresql-common: Enforce strict version dependency on + postgresql-client-common to avoid API mismatch bugs in PgCommon.pm. + * maintscripts-functions: Save pg_dump on catversion bumps as well. + * Updated ja translation by Takuma Yamada, thanks! (Closes: #820756) + * Remove not-to-be-translated shell code-only chunk from + debian/po/templates.pot. (debconf-updatepo --skip-pot to the rescue!) + (Closes: #821445) + + [ Martin Pitt ] + * debian/supported-versions: Add Ubuntu 16.10. + + -- Christoph Berg Wed, 11 May 2016 15:04:25 +0200 + +postgresql-common (173) unstable; urgency=medium + + [ Christoph Berg ] + * README.Debian: Fix a typo. + * Updated nl translation, thanks Frans Spiesschaert! (Closes: #812353) + * Updated ru translation, thanks Sergey Alyoshin! (Closes: #815596) + * Updated ja translation, thanks Takuma Yamada! (Closes: #816069) + * preinst_check_catversion: Handle missing catalog version file. + * pg_renamecluster: Don't try to rename a non-existing stats directory. + * pg_conftool: Refuse operation on non-existing clusters. + * maintscript-functions, templates: Remove '#' characters from upgrade + instructions on catalog version change for easier cut-and-paste. + * t/032_ssl_key_permissions.t: Validate server snakeoil key checks. + * pgdg/apt.postgresql.org.sh: Add xenial and trusty. + + [ Adam Conrad ] + * pgcommon.sh: Adjust for >= xenial using Debian-style locale generation + methods, and allow fallback to the old Ubuntu method for old releases. + + -- Christoph Berg Wed, 30 Mar 2016 15:08:06 +0200 + +postgresql-common (172) unstable; urgency=medium + + [ Christoph Berg ] + * pg_buildext: Mute diff warning about missing debian/tests/control.in. + * pg_ctlcluster: Skip systemctl redirect with --bindir. + * pg_createcluster: Drop warning if /tmp is used as socket directory. + Instead, just print the socket directory on cluster creation. + * Update French debconf translations, thanks Julien Patriarca! + (Closes: #809800) + * 9.5 released! Setting as default. + + [ Martin Pitt ] + * debian/supported-versions: Switch Ubuntu 16.04 to 9.5. + * debian/supported-versions: Drop obsolete Ubuntu versions. + + -- Christoph Berg Thu, 07 Jan 2016 15:13:06 +0100 + +postgresql-common (171) unstable; urgency=medium + + [ Christoph Berg ] + * pgdg: Deprecate 8.4 and 9.0. + * Enable 9.4 for wheezy-backports. + * pg_createcluster: Fix stats_temp_directory handling on 8.3, thanks to + Marco Nenciarini for the inital patch. + * pg_createcluster: Mute verbose chattr output. + * pg_conftool: Don't quote output in '-s'hort mode. + * debian/maintscripts-functions: If the catalog version changes in + devel/alpha versions, save a minimal copy of the old version binaries in + the preinst to enable using pg_upgrade. Use debconf in the postinst to + instruct the user how to proceed with the upgrade. + * pg_buildext: Replace multiple occurrences of PGVERSION on the same line, + and implement replacing for debian/tests/control.in. + * t/015_start_stop.t: Validate pg_ctlcluster/systemctl exit codes. + * pg_ctlcluster: Redirect requests to systemd when invoked as root and no + extra pg_ctl or postgres options are given. + Trying to start already running clusters clusters will return 0 now + (was 2 in the native implementation). (Closes: #784878) + * pg_createcluster, pg_renamecluster: Warn on cluster names with dashes. + * pg_upgradecluster: Deprecate ssl_renegotiation_limit in 9.5. + + [ Martin Pitt ] + * pg_upgradecluster: Fix "ANALZYE" typo. + * debian/supported-versions: Add Ubuntu 16.04. + * Update Turkish debconf translations, thanks Atila KOÇ! + (Closes: #799274) + * t/020_create_sql_remove.t: Skip postmaster OOM killer adjustment when + running in a container, as these often have restricted privileges. + + -- Christoph Berg Fri, 18 Dec 2015 16:22:37 +0100 + +postgresql-common (170) unstable; urgency=medium + + [ Christoph Berg ] + * pg_createcluster, pg_dropcluster: When an auto-started cluster is created/ + dropped by root, notify systemd to update the dependencies of + postgresql.service.wants. + * pg_dropcluster, pg_renamecluster: Handle stats_temp_directory. + * testsuite, pg_virtualenv: Remove the unshare hack, too much trouble. + * pg_buildext, pg_virtualenv: Add PG_VIRTUALENV_NEWPID and + PG_VIRTUALENV_UNSHARE variables; pg_buildext selects unshare -n by default. + * t/025_logging.t: Improve syslog detection in the test environment. + * pg_upgradecluster, t/030_errors.t: Unbreak after we changed the old=new + error message. + * PgCommon.pm: make read_cluster_conf_file read postgresql.auto.conf as well + (Closes: #787154) + * pg_upgradecluster: Support upgrading tablespaces. (Closes: #772202) + * t/TestLib.pm: New function program_ok(). + * t/040_upgrade.t: Skip testing pg_upgrade with datallowconn = f, it does + not support that anymore as of May 2015. + * t/170_extensions.t: Catch warning with chkpass >= 9.5. + * debian/maintscripts-functions: Unset all locale-specific environment + variables when creating the initial database cluster. (Closes: #791526) + * Add /var/log/postgresql to /usr/lib/tmpfiles.d/postgresql.conf. + * Also set OOMScoreAdjust in postgresql@.service. + * pg_ctlcluster: OOM-protect 9.0 as well. + * pg_lsclusters: Color online/down clusters green/red. + * supported-versions: Accept DEB_PG_SUPPORTED_VERSIONS as well. + * Ship /etc/postgresql/ in postgresql-common. (Closes: #801140) + + [ Martin Pitt ] + * pg_createcluster: Show the locale selected with --locale instead of the + current one. (LP: #1467061) + + -- Christoph Berg Thu, 08 Oct 2015 13:48:26 +0200 + +postgresql-common (169) unstable; urgency=medium + + * t/022_recovery.t: New recovery tests to catch regression in 9.4.2 and + 9.1.16. + * pg_upgradecluster: Set default dynamic_shared_memory_type = mmap. + (Closes: #784005) + * pg_upgradecluster: Complain if --link is used without --method=upgrade. + * pg_upgradecluster: Better error message when old and new version are + equal. + + -- Christoph Berg Thu, 04 Jun 2015 12:09:53 +0200 + +postgresql-common (168) unstable; urgency=medium + + [ Martin Pitt ] + * Drop obsolete debian/backport-ppa script. + * debian/tests/default-psql: Skip test if default cluster creation is + disabled in createcluster.conf. + + [ Christoph Berg ] + * t/170_extensions.t: Refactor dependency handling and add new extensions + shipped with 9.5. + + -- Christoph Berg Thu, 21 May 2015 11:28:45 +0200 + +postgresql-common (167) unstable; urgency=medium + + [ Christoph Berg ] + * pg_conftool: Fix 'remove' operation. Spotted by François Henry, merci! + (Closes: #778243) + * t/007_pg_conftool.t: Add pg_conftool tests. + + [ Martin Pitt ] + * debian/maintscripts-functions: Avoid package installation failure of -9.1 + due to the pg_basebackup.1 alternative on systems which have both -9.1 and + a later version installed in parallel. On those, pg_basebackup.1 will + already be in the psql.1.gz group, thus -9.1 must not try to put it back + into the postmaster.1.gz group. (LP: #1357682) + * Add "default-psql" autopkgtest: Smoketest to verify that installing the + "postgresql" metapackage results in a running and working cluster. + * debian/maintscripts-functions, configure_cluster(): When running under + systemd, do a daemon-reload to re-run the generator and thus create a unit + for the newly created cluster. + * Move package maintenance to git, update Vcs-* tags accordingly. + * Bump Standards-Version to 3.9.6 (no changes necessary). + * supported-versions: Add Ubuntu 15.10. + + -- Martin Pitt Wed, 06 May 2015 11:28:26 +0200 + +postgresql-common (166) unstable; urgency=medium + + * postgresql-common: Breaks: systemd (<< 204). postgresql@.service uses + reload-related config options that are incompatible with the systemd + version in wheezy. (Consider upgrading to the wheezy-backports version.) + * pg_renamecluster: New tool to rename clusters. + * pg_upgradecluster: --rename allows renaming the upgraded cluster. + * pg_conftool: Allow to "edit" files. + * PgCommon.pm, pg_lsclusters: Fix thinko which broke logging to + /var/log/postgresql when log_destination was "syslog,stderr". The default + logfile is now always used even if logging_collector is enabled; it + receives the log messages produced before logging_collector is started. + * t/020_create_sql_remove.t: Versions >= 9.0 are OOM-protected. + + -- Christoph Berg Thu, 05 Feb 2015 22:19:07 +0100 + +postgresql-common (165) unstable; urgency=medium + + * Debconf translation updates, thanks! + + es by Manuel Venturi Porras Peralta. (Closes: #773598) + + -- Christoph Berg Sun, 04 Jan 2015 18:51:31 +0100 + +postgresql-common (164) unstable; urgency=medium + + * Init script: Always create /var/run/postgresql on start. + (Closes: #772824) + * Debconf translation updates, thanks! + + pt by Ricardo Silva. (Closes: #767399) + * t/100_upgrade_scripts.t: Incompatible with eatmydata, remove from + LD_PRELOAD when detected. + * t/170_extensions.t: Catch warning with chkpass on 9.5. + * debian/supported-versions: Support jessie in backports and + apt.postgresql.org, with 9.4 as default. + * pgdg/apt.postgresql.org.sh: Support jessie. + + -- Christoph Berg Wed, 17 Dec 2014 20:00:04 +0100 + +postgresql-common (163) unstable; urgency=medium + + [ Martin Pitt ] + * pg_createcluster: Disable copy-on-write semantics for data directory on + btrfs and similar file systems. It eats a lot of performance and isn't + necessary for data integrity. + * debian/supported-versions: Welcome Ubuntu 15.04! + + [ Christoph Berg ] + * Update VCS URLs. + + -- Martin Pitt Sun, 26 Oct 2014 07:04:48 -0400 + +postgresql-common (162) unstable; urgency=medium + + [ Christoph Berg ] + * Move PgCommon.pm to /usr/share/perl5. + * t/020_create_sql_remove.t: Test psql -tx alignment to catch a bug in + 9.4beta2. + * supported-versions: Set 9.4 as pgdg default on Ubuntu 14.10. + * Debconf translation updates, thanks! + + nl by Frans Spiesschaert. (Closes: #762632) + + [ Peter Michael Green ] + * Use ID_LIKE to identify deriviatives of Debian and Ubuntu. + (Closes: #761020) + + [ Richard Hughes ] + * Use Type=forking in postgresql@.service and start before postgresql. + (Closes: #759725) + + -- Christoph Berg Tue, 07 Oct 2014 21:25:25 +0200 + +postgresql-common (161) unstable; urgency=medium + + * pg_ctlcluster: Refuse root operation when config owner does not match + data owner, and config owner is not root. + * Stop automatically updating debian/control from debian/control.in in + pgxs_debian_control.mk. Instead, implement "checkcontrol" and + "updatecontrol" actions in pg_buildext. checkcontrol is run from + pgxs_debian_control.mk and will warn if an update is required. + Backport and pgdg builds will still automatically update. + (Closes: #758570) + * pg_virtualenv, testsuite: Use "ip" to start lo when available. + * Add iproute2 | net-tools to postgresql-server-dev-all dependencies. + * Debconf translation updates, thanks! + + it by Luca Monducci. (Closes: #759808) + + -- Christoph Berg Fri, 15 Aug 2014 10:13:51 +0200 + +postgresql-common (160) unstable; urgency=medium + + [ Martin Pitt ] + * supported-versions: Set 9.4 as default for Ubuntu 14.10. + * debian/maintscripts-functions: Call update-alternatives under C locale to + fix parsing for non-English locales. (LP: #1293596) + * pg_createcluster: Fix test if specified owner/group ID is numeric. Thanks + Sven Berkvens-Matthijsse! (LP: #1329227) + + [ Christoph Berg ] + * Use dh-systemd to enable postgresql.service on install. (Closes: #757612) + * Set Multi-Arch: foreign in postgresql-common, postgresql-client-common, + postgresql-client, and postgresql-doc, and document this in + doc/dependencies.{dia,png}. (Closes: #757520) + * Update examples in README.Debian for 9.4. (Closes: #756007) + * Install README.systemd. + + -- Christoph Berg Mon, 11 Aug 2014 15:39:39 +0200 + +postgresql-common (159) unstable; urgency=low + + * supported-versions: Set 9.4 as default for jessie and unstable. + * systemd unit files are now installed to their proper locations. + * Install /usr/lib/tmpfiles.d/postgresql.conf. + * pgcommon.sh: New shell function module containing get_release and + locale_gen. Used by supported-versions and testsuite; also usable by other + packages. + * pg_ctlcluster, PgCommon.pm: Fix warning on corrupt empty pid files. + * pg_ctlcluster: New --stdlog option to be used with --foreground that + redirects stderr to our standard log files. Used in postgresql@.service. + * pg_ctlcluster: Ignore errors when stat'ing the logfile. + * pg_ctlcluster: use strict. + * Debconf translation updates, thanks! + + da by Joe Dalton. (Closes: #753952) + + -- Christoph Berg Thu, 24 Jul 2014 11:52:57 +0200 + +postgresql-common (158) experimental; urgency=medium + + * supported-versions: Add 9.4 on Debian/unstable and pgapt (9.3 is still + default). + * Set default log_line_prefix = '%t [%p-%l] %q%u@%d '. + * Put stats_temp_directory aka pg_stat_tmp into /var/run/postgresql by + default. (Closes: #739276) + * pg_lsclusters: Print logfile from postgresql.conf when logging_collector + in use instead of "custom". + * Move pg_{create,ctl,upgrade,drop}cluster.8 to section 1, they are in + /usr/bin anyway. + * maintscripts-functions: Configure manpage alternatives in -doc packages + using SPI_connect.3.gz as master. + * pg_upgradecluster: Deprecate krb_srvname in 9.4. Failing upgrade hook + scripts will fail the upgrade. + * pg_ctlcluster: Configure OOM killer using PG_OOM_ADJUST_FILE in 9.5. + * pg_wrapper: Also accept --cluster=ver/name in a single argument. + * testsuite: Also mount /dev/shm; with -s, open shell on failure; -f nnn + starts tests at this sequence number. + * run-upgrade-scripts, t/100_upgrade_scripts.t: Fork and set uid for running + the upgrade scripts; use su -c for testing. + * Start porting the postgresql-common framework to RedHat, backed by the + PGDG PostgreSQL rpm packages. + * Debconf translation updates, thanks! + + fr by Julien Patriarca. (Closes: #751101) + + ja by victory. (Closes: #751131) + * debian/copyright: Update copyright holders. + + -- Christoph Berg Sat, 05 Jul 2014 16:40:16 +0200 + +postgresql-common (157) unstable; urgency=medium + + * Remove createcluster.conf on purge. + * Fix testsuite -i to install packages before invoking unshare so apt still + has network access. + + -- Christoph Berg Fri, 30 May 2014 21:31:36 +0200 + +postgresql-common (156) unstable; urgency=medium + + [ Christoph Berg ] + * pg_upgradecluster: Add missing psql -p argument when determining the + number of tablespaces in the old cluster. + * Link pg_archivecleanup from /usr/bin. (Closes: #740593) + * pg_virtualenv: Use fsync = off for speed. + * pg_buildext: Pass -cios options to pg_virtualenv. + * t/140_pg_config.t: Versions >= 9.3 have multiarch-enabled libpq et al. + * Bump to dh 9. + + [ Martin Pitt ] + * Fix typo in German debconf translations. Thanks Rhonda for pointing out! + + -- Christoph Berg Fri, 30 May 2014 00:00:44 +0200 + +postgresql-common (155) unstable; urgency=medium + + [ Christoph Berg ] + * postgresql-common: Maintain createcluster.conf using ucf, and add a + debconf question about the default use of ssl (default true, priority + medium). (Closes: #743918) + * Use "mount --make-rprivate /" inside our "unshare -m" calls. + (See #739593.) + * pg_ctlcluster: Add status action, add --foreground option, accept dash + (and slash) between version and cluster. + * Add systemd unit files as examples (testers welcome!). + * postgresql-client: Wrap pg_recvlogical, introduced in 9.4. + * t/050_encodings.t: 9.4 emits COPY command tags, suppress with psql -q. + * postgresql: Add Suggests: postgresql-doc. (Closes: #743755) + * pg_conftool: New script to read and edit PostgreSQL configuration files, + based on the existing read/edit functions in PgCommon.pm. + * pg_upgradecluster: Don't abort the upgrade if the config file symlinks are + already there. + * testsuite: Fix testsuite where -v does not include the latest version. + * testsuite -v -i will install packages needed for these versions. + + [ Martin Pitt ] + * supported-versions: Welcome, Ubuntu 14.10! + + -- Christoph Berg Wed, 21 May 2014 17:34:09 +0200 + postgresql-common (154) unstable; urgency=medium [ Martin Pitt ] diff -Nru postgresql-common-154/debian/clean postgresql-common-190~ubuntu14.04.1/debian/clean --- postgresql-common-154/debian/clean 1970-01-01 00:00:00.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/clean 2018-01-12 14:08:46.000000000 +0000 @@ -0,0 +1 @@ +tags diff -Nru postgresql-common-154/debian/compat postgresql-common-190~ubuntu14.04.1/debian/compat --- postgresql-common-154/debian/compat 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/compat 2018-01-12 14:08:46.000000000 +0000 @@ -1 +1 @@ -7 +9 diff -Nru postgresql-common-154/debian/control postgresql-common-190~ubuntu14.04.1/debian/control --- postgresql-common-154/debian/control 2014-02-19 18:22:08.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/control 2019-03-14 10:02:31.000000000 +0000 @@ -2,33 +2,49 @@ Section: database Priority: optional Maintainer: Debian PostgreSQL Maintainers -Uploaders: Martin Pitt , Christoph Berg , Peter Eisentraut -Standards-Version: 3.9.5 -Vcs-Bzr: http://anonscm.debian.org/bzr/pkg-postgresql/postgresql-common/trunk/ -Vcs-Browser: http://anonscm.debian.org/loggerhead/pkg-postgresql/postgresql-common/trunk -Build-Depends: debhelper (>= 7.0.50~), - lsb-release +Uploaders: + Martin Pitt , + Christoph Berg , + Peter Eisentraut , +Standards-Version: 4.1.2 +Vcs-Git: https://salsa.debian.org/postgresql/postgresql-common.git +Vcs-Browser: https://salsa.debian.org/postgresql/postgresql-common +Build-Depends: + debhelper (>= 9), + libreadline-dev, + lsb-release, Package: postgresql-common Architecture: all -Conflicts: postgresql-7.4, postgresql-8.0 -Depends: postgresql-client-common (>= ${source:Version}), - procps, +Multi-Arch: foreign +Conflicts: + postgresql-7.4, + postgresql-8.0, +Depends: adduser, debconf (>= 0.5.00) | debconf-2.0, lsb-base (>= 3.0-3), + postgresql-client-common (= ${source:Version}), + procps, ssl-cert (>= 1.0.11), ucf, - ${misc:Depends} -Recommends: logrotate -Breaks: postgresql-9.1 (<< 9.1.1-3~) + ${misc:Depends}, +Recommends: + e2fsprogs, + logrotate, +Suggests: + libjson-perl, +Breaks: + postgresql-9.1 (<< 9.1.1-3~), + systemd (<< 204), Description: PostgreSQL database-cluster manager The postgresql-common package provides a structure under which multiple versions of PostgreSQL may be installed and/or multiple clusters maintained at one time. . - This package will automatically create a (self-signed) certificate so - that SSL connections are supported. + The commands provided are pg_conftool, pg_createcluster, pg_ctlcluster, + pg_dropcluster, pg_lsclusters, pg_renamecluster, pg_upgradecluster, + pg_virtualenv. . PostgreSQL is a fully featured object-relational database management system. It supports a large part of the SQL standard and is designed @@ -39,9 +55,14 @@ Package: postgresql-client-common Architecture: all -Depends: ${misc:Depends}, ${pgdg:Depends}, - netbase -Recommends: lsb-release, libreadline6 +Multi-Arch: foreign +Depends: + netbase, + ${misc:Depends}, + ${pgdg:Depends}, +Recommends: + lsb-release, + ${readline:Recommends}, Description: manager for multiple PostgreSQL client versions The postgresql-client-common package provides a structure under which multiple versions of PostgreSQL client programs may be installed at @@ -59,12 +80,14 @@ Package: postgresql-server-dev-all Architecture: all -Depends: ${misc:Depends}, - postgresql-common (>= 117~), - lsb-release, +Depends: dctrl-tools, + iproute2 | net-tools, + lsb-release, make, - ${server-dev-all-depends} + postgresql-common (>= 117~), + ${misc:Depends}, + ${server-dev-all-depends}, Description: extension build tool for multiple PostgreSQL versions The postgresql-server-dev-all package provides the pg_buildext script for simplifying packaging of a PostgreSQL extension supporting multiple major @@ -79,7 +102,11 @@ Package: postgresql Architecture: all -Depends: postgresql-${default-version}, ${misc:Depends} +Depends: + postgresql-${default-version}, + ${misc:Depends}, +Suggests: + postgresql-doc, Description: object-relational SQL database (supported version) This metapackage always depends on the currently supported PostgreSQL database server version. @@ -94,7 +121,10 @@ Package: postgresql-client Architecture: all -Depends: postgresql-client-${default-version}, ${misc:Depends} +Multi-Arch: foreign +Depends: + postgresql-client-${default-version}, + ${misc:Depends}, Description: front-end programs for PostgreSQL (supported version) This metapackage always depends on the currently supported database client package for PostgreSQL. @@ -109,8 +139,11 @@ Package: postgresql-doc Architecture: all +Multi-Arch: foreign Section: doc -Depends: postgresql-doc-${default-version}, ${misc:Depends} +Depends: + postgresql-doc-${default-version}, + ${misc:Depends}, Description: documentation for the PostgreSQL database management system This metapackage always depends on the currently supported PostgreSQL database documentation package. @@ -125,13 +158,37 @@ Package: postgresql-contrib Architecture: all -Depends: postgresql-contrib-${default-version}, ${misc:Depends} +Depends: + postgresql-contrib-${default-version}, + ${misc:Depends}, Description: additional facilities for PostgreSQL (supported version) This metapackage always depends on the currently supported PostgreSQL database contrib package. . PostgreSQL is a fully featured object-relational database management system. It supports a large part of the SQL standard and is designed + to be extensible by users in many aspects. Some of the features are: + ACID transactions, foreign keys, views, sequences, subqueries, + triggers, user-defined types and functions, outer joins, multiversion + concurrency control. Graphical user interfaces and bindings for many + programming languages are available as well. + +Package: postgresql-all +Architecture: all +Depends: + libecpg-dev, + libpq-dev, + postgresql-server-dev-all, + ${postgresql-all-depends}, + ${misc:Depends}, +Description: metapackage depending on all PostgreSQL server packages + This metapackage depends on all PostgreSQL server packages, in all + supported versions (excluding documentation and debug symbols). It + exists to facilitate depending on the server packages in test + environments. + . + PostgreSQL is a fully featured object-relational database management + system. It supports a large part of the SQL standard and is designed to be extensible by users in many aspects. Some of the features are: ACID transactions, foreign keys, views, sequences, subqueries, triggers, user-defined types and functions, outer joins, multiversion diff -Nru postgresql-common-154/debian/copyright postgresql-common-190~ubuntu14.04.1/debian/copyright --- postgresql-common-154/debian/copyright 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/copyright 2018-01-12 14:08:46.000000000 +0000 @@ -1,8 +1,12 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Contact: Martin Pitt +Upstream-Contact: Debian PostgreSQL Maintainers Files: * -Copyright: 2005-2012 Martin Pitt +Copyright: 2005-2014 Martin Pitt + 2009 Cyril Bouthors + 2010 Dimitri Fontaine + 2011-2014 Christoph Berg + 2013 Peter Eisentraut License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff -Nru postgresql-common-154/debian/init.d-functions postgresql-common-190~ubuntu14.04.1/debian/init.d-functions --- postgresql-common-154/debian/init.d-functions 2014-02-19 18:22:08.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/init.d-functions 2018-01-12 14:08:46.000000000 +0000 @@ -2,7 +2,12 @@ # package init.d scripts. It is usually included by # /etc/init.d/postgresql -. /lib/lsb/init-functions +init_functions=/lib/lsb/init-functions +#redhat# init_functions=/usr/share/postgresql-common/init-functions-compat +. $init_functions + +PGBINROOT="/usr/lib/postgresql/" +#redhat# PGBINROOT="/usr/pgsql-" # do pg_ctlcluster action $1 to all clusters of version $2 with command # description $3; output according to Debian Policy for init scripts @@ -11,7 +16,7 @@ [ "$2" ] || { echo "Error: invalid version '$2'" >&2; exit 1; } [ -d "/etc/postgresql/$2" ] || return 0 [ "$(ls /etc/postgresql/$2)" ] || return 0 - [ -x "/usr/lib/postgresql/$2/bin/postmaster" ] || return 0 + [ -x "$PGBINROOT$2/bin/postgres" ] || return 0 status=0 log_daemon_msg "$3" @@ -46,17 +51,19 @@ return $status } -# start all clusters of version $1 -# output according to Debian Policy for init scripts -start() { - # create socket directory +# create /var/run/postgresql +create_socket_directory() { if [ -d /var/run/postgresql ]; then chmod 2775 /var/run/postgresql else install -d -m 2775 -o postgres -g postgres /var/run/postgresql [ -x /sbin/restorecon ] && restorecon -R /var/run/postgresql || true fi +} +# start all clusters of version $1 +# output according to Debian Policy for init scripts +start() { do_ctl_all start "$1" "Starting PostgreSQL $1 database server" } @@ -88,9 +95,17 @@ # return all installed versions which do not have their own init script get_versions() { versions='' - local v - for v in `ls /usr/lib/postgresql/ 2>/dev/null`; do - if [ -x /usr/lib/postgresql/$v/bin/pg_ctl ] && [ ! -x /etc/init.d/postgresql-$v ]; then + local v dir skipinit + + skipinit=continue + #redhat# skipinit=true # RedHat systems will have /etc/init.d/postgresql-* provided by the yum.pg.o package + dir=$PGBINROOT + #redhat# dir="-d /usr/pgsql-*" + + for v in `ls $dir 2>/dev/null`; do + #redhat# v=${v#*-} + [ -x /etc/init.d/postgresql-$v ] && $skipinit + if [ -x $PGBINROOT$v/bin/pg_ctl ]; then versions="$versions $v" fi done diff -Nru postgresql-common-154/debian/logrotate.template postgresql-common-190~ubuntu14.04.1/debian/logrotate.template --- postgresql-common-154/debian/logrotate.template 2014-01-10 11:41:23.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/logrotate.template 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -/var/log/postgresql/*.log { - weekly - rotate 10 - copytruncate - delaycompress - compress - notifempty - missingok - su root root -} diff -Nru postgresql-common-154/debian/maintscripts-functions postgresql-common-190~ubuntu14.04.1/debian/maintscripts-functions --- postgresql-common-154/debian/maintscripts-functions 2014-02-21 07:23:12.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/maintscripts-functions 2018-01-12 14:08:46.000000000 +0000 @@ -12,20 +12,40 @@ # reinstalling it to avoid failure. This needs to be kept until we stop # supporting upgrades from -9.1. if [ "$2" = "psql.1.gz" ]; then - OUT=$(update-alternatives --display postmaster.1.gz 2> /dev/null) || true + OUT=$(LC_ALL=C update-alternatives --display postmaster.1.gz 2> /dev/null) || true if [ "${OUT#*auto mode}" != "$OUT" ] && [ "${OUT#*pg_basebackup.1.gz}" != "$OUT" ]; then echo "Adjusting postmaster.1.gz alternatives for pg_basebackup move..." update-alternatives --remove postmaster.1.gz /usr/share/postgresql/9.1/man/man1/postmaster.1.gz fi + # similarly, if we have both 9.1 and e. g. 9.3 installed, pg_basebackup.1 + # will already be in the psql.1.gz alternative group; if we upgrade 9.1, we + # then must not try to put it into postmaster.1.gz again, as that will + # fail + elif [ "$2" = "postmaster.1.gz" ] && [ "$1" = "9.1" ]; then + if update-alternatives --display psql.1.gz 2>/dev/null | grep -q pg_basebackup; then + #echo "Skipping postmaster.1.gz alternatives as pg_basebackup.1 is already in psql.1.gz group" + return + fi fi - update-alternatives --install /usr/share/man/man1/$2 \ - $2 /usr/share/postgresql/$1/man/man1/$2 \ - $(echo "$1" | tr -cd 0-9) $SLAVES + + # user might have removed the directories, allow u-a to succeed + mkdir -p /usr/share/man/man1 /usr/share/man/man3 /usr/share/man/man7 + section=$(echo "$2" | sed -e 's/.*\.\(.*\)\..*/man\1/') + case $1 in + [89]*) priority=$(echo "$1" | tr -cd 0-9) ;; + *) priority="${1}0" ;; + esac + update-alternatives --install /usr/share/man/$section/$2 \ + $2 /usr/share/postgresql/$1/man/$section/$2 \ + $priority $SLAVES } # arguments: version master _unlink_manpages() { - update-alternatives --remove $2 /usr/share/postgresql/$1/man/man1/$2 + # user might have removed the directories, allow u-a to succeed + mkdir -p /usr/share/man/man1 /usr/share/man/man3 /usr/share/man/man7 + section=$(echo "$2" | sed -e 's/.*\.\(.*\)\..*/man\1/') + update-alternatives --remove $2 /usr/share/postgresql/$1/man/$section/$2 } _remove_tsearch() { @@ -40,8 +60,9 @@ # predictable. /etc/default/locale overrides /etc/environment. Note that # /etc/environment is not a shell script, so we must be careful with parsing. set_system_locale() { - loc_vars="LC_COLLATE LC_CTYPE LC_MONETARY LC_MESSAGES LC_NUMERIC LC_TIME LC_ALL LANG LANGUAGE" + loc_vars="LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL" unset $loc_vars + LANG="C.UTF-8" # fallback locale if nothing is configured explicitly for v in $loc_vars; do unset val val=`pam_getenv -l $v` || true @@ -61,11 +82,11 @@ if [ ! -d "/etc/postgresql/$VERSION" ] || [ -z "$(ls /etc/postgresql/$VERSION)" ] || \ [ -z "$(ls /etc/postgresql/$VERSION/*/postgresql.conf 2>/dev/null)" ]; then # skip creating the main cluster when this is not the first install, or - # when explicitely disabled ($create is 1/0/"") - create=$(perl -I/usr/share/postgresql-common -mPgCommon -e 'print PgCommon::config_bool(PgCommon::get_conf_value 0, 0, "createcluster.conf", "create_main_cluster")') - if [ -z "$2" ] && [ "$create" != "0" ]; then + # when explicitly disabled ($create is on/off/"") + create=$(pg_conftool /etc/postgresql-common/createcluster.conf show -bs create_main_cluster || :) + if [ -z "$2" ] && [ "$create" != "off" ]; then set_system_locale - /usr/bin/pg_createcluster -u postgres $VERSION main || + pg_createcluster -u postgres $VERSION main || echo "Error: could not create default cluster. Please create it manually with pg_createcluster $VERSION main --start @@ -76,24 +97,25 @@ _link_manpages "$VERSION" postmaster.1.gz "postgresql-$1" "postgresql-contrib-$1" - if [ -x /etc/init.d/postgresql ] && [ ! -x /etc/init.d/postgresql-$VERSION ]; then - if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then - invoke-rc.d postgresql start $VERSION || exit $? - else - /etc/init.d/postgresql start $VERSION || exit $? - fi + # check if our catalog version changed + postinst_check_catversion "$VERSION" + # done with debconf + db_stop + + # reload systemd to let the generator pick up the new unit + if [ -d /run/systemd/system ]; then + systemctl daemon-reload fi + invoke-rc.d postgresql start $VERSION # systemd: argument ignored, starts all versions } stop_version() { - if [ -x /etc/init.d/postgresql ] && [ ! -x /etc/init.d/postgresql-$1 ]; then - if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then - invoke-rc.d postgresql stop $1 || exit $? - else - /etc/init.d/postgresql stop $1 || exit $? - fi - + if [ -d /run/systemd/system ]; then + # cannot use invoke-rc.d here because jessie's version doesn't like patterns + deb-systemd-invoke stop "postgresql@$1-*" + else + invoke-rc.d postgresql stop $1 fi } @@ -119,3 +141,113 @@ _link_manpages "$1" postmaster.1.gz "postgresql-$1" } +configure_doc_version() { + _link_manpages "$1" SPI_connect.3.gz "postgresql-doc-$1" +} + +remove_doc_version() { + _unlink_manpages "$1" SPI_connect.3.gz +} + +# Compare the catalog version number of the installed package and the new +# package. When differing, check if any clusters present are using the old +# catalog version. If so, copy a minimal set of files from the old package to +# /var/tmp to enable pg_upgrade to upgrade to the new version. + +preinst_check_catversion() +{ + MAJOR_VER="$1" + NEW_CATVERSION="$2" + case $NEW_CATVERSION in + *CATVERSION*) echo "BUG: override_dh_installdeb failed to set CATVERSION" >&2 + return ;; + esac + + CATFILE="/usr/share/postgresql/$MAJOR_VER/catalog_version" + [ -f "$CATFILE" ] || return 0 # file introduced in 9.6 + OLD_CATVERSION="$(cat $CATFILE)" + [ -z "$OLD_CATVERSION" ] && return + + [ "$OLD_CATVERSION" = "$NEW_CATVERSION" ] && return # no change, nothing to do + + PGCONTROLDATA="/usr/lib/postgresql/$MAJOR_VER/bin/pg_controldata" + [ -x "$PGCONTROLDATA" ] || return 0 + + echo "PostgreSQL $MAJOR_VER catalog version number changed from $OLD_CATVERSION to $NEW_CATVERSION, checking for clusters using the old version ..." + + pg_lsclusters -h | \ + while read version cluster port status owner pgdata logfile; do + [ "$version" = "$MAJOR_VER" ] || continue + [ -d "$pgdata" ] || continue + DB_CATVERSION=$(LC_ALL=C $PGCONTROLDATA $pgdata | sed -ne 's/^Catalog version number: *\([0-9]\+\)/\1/p') + + if [ "$DB_CATVERSION" = "$OLD_CATVERSION" ]; then + echo "Cluster $MAJOR_VER/$cluster is using catalog version $DB_CATVERSION" + + VARTMPDIR="/var/tmp/postgresql-$MAJOR_VER-$OLD_CATVERSION" + if [ ! -d "$VARTMPDIR" ]; then + echo "Saving binaries for PostgreSQL $MAJOR_VER catalog version $OLD_CATVERSION in $VARTMPDIR ..." + mkdir "$VARTMPDIR" # will fail&exit if (potentially rogue) file exists + ( + cd "$VARTMPDIR" + mkdir bin lib # lib needs to exists, but we do not copy files there + for f in pg_ctl pg_dump pg_resetwal postgres; do + cp -a /usr/lib/postgresql/$MAJOR_VER/bin/$f bin + done + ) + fi + fi + done +} + +postinst_check_catversion() +{ + MAJOR_VER="$1" + + CATFILE="/usr/share/postgresql/$MAJOR_VER/catalog_version" + [ -f "$CATFILE" ] || return 0 # file introduced in 9.6 + NEW_CATVERSION="$(cat $CATFILE)" + [ -z "$NEW_CATVERSION" ] && return + + PGCONTROLDATA="/usr/lib/postgresql/$MAJOR_VER/bin/pg_controldata" + [ -x "$PGCONTROLDATA" ] || return 0 + + for cluster in $(pg_lsclusters -h | awk "/^$MAJOR_VER / { print \$2 }"); do + pgdata=$(pg_conftool -s $MAJOR_VER $cluster show data_directory) + [ -d "$pgdata" ] || continue + + DB_CATVERSION=$(LC_ALL=C $PGCONTROLDATA $pgdata | sed -ne 's/^Catalog version number: *\([0-9]\+\)/\1/p') + [ -z "$DB_CATVERSION" ] && continue + [ "$DB_CATVERSION" = "$NEW_CATVERSION" ] && continue + + VARTMPDIR="/var/tmp/postgresql-$MAJOR_VER-$DB_CATVERSION" + [ -d "$VARTMPDIR" ] || continue + [ -O "$VARTMPDIR" ] || continue # test if owned by root + + # tell the user about it + cat <<-EOF + Cluster $MAJOR_VER $cluster needs upgrading due to catalog version change: + pg_renamecluster ${MAJOR_VER} ${cluster} ${cluster}.old + pg_upgradecluster ${MAJOR_VER} ${cluster}.old --rename ${cluster} -m upgrade --old-bindir=${VARTMPDIR}/bin + pg_dropcluster ${MAJOR_VER} ${cluster}.old + rm -rf ${VARTMPDIR} + EOF + db_fset postgresql-common/catversion-bump seen false + db_subst postgresql-common/catversion-bump version $MAJOR_VER + db_subst postgresql-common/catversion-bump cluster $cluster + db_subst postgresql-common/catversion-bump db_catversion $DB_CATVERSION + db_subst postgresql-common/catversion-bump new_catversion $NEW_CATVERSION + db_subst postgresql-common/catversion-bump vartmpdir $VARTMPDIR + db_input high postgresql-common/catversion-bump || true + db_go || true + done +} + +# start debconf if we are in the server's postinst (can't run from a function) +if [ "${DPKG_MAINTSCRIPT_NAME:-}" = "postinst" ] && [ "$1" = "configure" ]; then + case $DPKG_MAINTSCRIPT_PACKAGE in + postgresql-[89].?|postgresql-[1-9]?) + . /usr/share/debconf/confmodule + ;; + esac +fi diff -Nru postgresql-common-154/debian/po/ca.po postgresql-common-190~ubuntu14.04.1/debian/po/ca.po --- postgresql-common-154/debian/po/ca.po 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/po/ca.po 2018-01-12 14:08:46.000000000 +0000 @@ -2,49 +2,146 @@ # Copyright (C) 2006 Software in the Public Interest, SPI Inc. # This file is distributed under the same license as the postgresql-common # package. -# Innocent De Marchi , 2011. +# Innocent De Marchi , 2011, 2017. # msgid "" msgstr "" -"Project-Id-Version: postgresql-common 114\n" -"Report-Msgid-Bugs-To: Source: postgresql-common@packages.debian.org\n" -"POT-Creation-Date: 2008-02-03 13:01+0100\n" -"PO-Revision-Date: 2011-06-01 18:32+0100\n" +"Project-Id-Version: postgresql-common 184\n" +"Report-Msgid-Bugs-To: postgresql-common@packages.debian.org\n" +"POT-Creation-Date: 2016-03-05 11:47+0100\n" +"PO-Revision-Date: 2017-09-07 18:59+0200\n" "Last-Translator: Innocent De Marchi \n" "Language-Team: Catalan \n" +"Language: ca\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: Catalan\n" -"X-Poedit-Country: SPAIN\n" +"X-Generator: Poedit 2.0.3\n" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "Obsolete major version ${old}" msgstr "Versió principal ${old} obsoleta" #. Type: error #. Description -#: ../postgresql-common.templates:2001 -msgid "The PostgreSQL version ${old} is obsolete, but the server or client packages are still installed. Please install the latest packages (postgresql-${latest} and postgresql-client-${latest}) and upgrade the existing ${oldversion} clusters with pg_upgradecluster (see manpage)." -msgstr "La versió de «PostgreSQL» ${old} és obsoleta, però el paquet del client o del servidor encara estan instal·lats. Heu d'instal·lar les darreres versions dels paquets (postgresql-${latest} i postgresql-client-${latest}) i actualitzar els clusters de la versió ${oldversion} amb l'ordre «pg_upgradecluster» (consulteu la pàgina del manual)." +#: ../postgresql-common.templates:1001 +msgid "" +"The PostgreSQL version ${old} is obsolete, but the server or client packages " +"are still installed. Please install the latest packages (postgresql-" +"${latest} and postgresql-client-${latest}) and upgrade the existing " +"${oldversion} clusters with pg_upgradecluster (see manpage)." +msgstr "" +"La versió de «PostgreSQL» ${old} és obsoleta, però el paquet del client o " +"del servidor encara estan instal·lats. Heu d'instal·lar les darreres " +"versions dels paquets (postgresql-${latest} i postgresql-client-${latest}) i " +"actualitzar els clústers de la versió ${oldversion} amb l'ordre " +"«pg_upgradecluster» (consulteu la pàgina del manual)." #. Type: error #. Description -#: ../postgresql-common.templates:2001 -msgid "Please be aware that the installation of postgresql-${latest} will automatically create a default cluster ${latest}/main. If you want to upgrade the ${old}/main cluster, you need to remove the already existing ${latest} cluster (pg_dropcluster --stop ${latest} main, see manpage for details)." -msgstr "Tingueu en present que la instal lació de postgresql-${latest} generarà automàticament un «cluster» pre-determinat ${latest}/main. Heu d'eliminar el «cluster» ${latest} existent («pg_dropcluster --stop ${latest}) si desitjau actualitzar el «cluster» ${old}/main, consulteu la pàgina de manual per conèixer els detalls." +#: ../postgresql-common.templates:1001 +msgid "" +"Please be aware that the installation of postgresql-${latest} will " +"automatically create a default cluster ${latest}/main. If you want to " +"upgrade the ${old}/main cluster, you need to remove the already existing " +"${latest} cluster (pg_dropcluster --stop ${latest} main, see manpage for " +"details)." +msgstr "" +"Tingueu en present que la instal lació de postgresql-${latest} generarà " +"automàticament un clúster pre-determinat ${latest}/main. Heu d'eliminar el " +"clúster ${latest} existent («pg_dropcluster --stop ${latest}) si desitjau " +"actualitzar el clúster ${old}/main, consulteu la pàgina de manual per " +"conèixer els detalls." #. Type: error #. Description -#: ../postgresql-common.templates:2001 -msgid "The old server and client packages are no longer supported. After the existing clusters are upgraded, the postgresql-${old} and postgresql-client-${old} packages should be removed." -msgstr "Ja no se dona suport als paquets antics de client i servidor. Haureu d'eliminar els paquets postgresql-${old} i postgresql-client-${old} després d'actualitzar els «clusters» que tingui." +#: ../postgresql-common.templates:1001 +msgid "" +"The old server and client packages are no longer supported. After the " +"existing clusters are upgraded, the postgresql-${old} and postgresql-client-" +"${old} packages should be removed." +msgstr "" +"Ja no se dona suport als paquets antics de client i servidor. Haureu " +"d'eliminar els paquets postgresql-${old} i postgresql-client-${old} després " +"d'actualitzar els clústers que tingui." #. Type: error #. Description +#: ../postgresql-common.templates:1001 +msgid "" +"Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." +msgstr "" +"Consulteu « /usr/share/doc/postgresql-common/README.Debian.gz» pels detalls." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "Enable SSL by default in new PostgreSQL clusters?" +msgstr "Permet SSL de forma predeterminada en clústers PostgreSQL nous?" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"PostgreSQL supports SSL-encrypted connections. This is usually a good thing. " +"However, if the database is solely accessed using TCP connections on " +"localhost, SSL can be turned off without introducing security issues." +msgstr "" +"PostgreSQL admet connexions SSL encriptades. És una opció adequada. " +"Tanmateix, si l'accés a la base de dades es fa només amb connexions TCP amb " +"el servidor local, desactivar SSL no afecta a la seguretat." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"UNIX domain socket connections (called \"local\" in pg_hba.conf) are not " +"affected by this setting. This setting concerns new PostgreSQL clusters " +"created during package install, or by using the pg_createcluster command. It " +"does not reconfigure existing clusters." +msgstr "" +"Les connexions de sòcol de domini UNIX (anomenades «locals» al fitxer " +"«pg_hba.conf») no es veuen afectades per aquesta configuració. Aquesta " +"configuració afecta els clústers PostgreSQL nous generats en al instal·lació " +"del paquet o mitjançant l'ordre «pg_createcluster». No configura els " +"clústers existents." + +#. Type: boolean +#. Description #: ../postgresql-common.templates:2001 -msgid "Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." -msgstr "Consulteu « /usr/share/doc/postgresql-common/README.Debian.gz» pels detalls." +msgid "If unsure, enable SSL." +msgstr "En cas de dubte, activau SSL." +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "PostgreSQL ${version} catalog version changed" +msgstr "S'ha canviat la versió del catàleg de PostgreSQL ${version}" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The PostgreSQL cluster ${version} ${cluster} was created using catalog " +"version ${db_catversion}, but the currently being installed package " +"postgresql-${version} is using catalog version ${new_catversion}. You will " +"not be able to use this cluster until it was upgraded to the new catalog " +"version." +msgstr "" +"El clúster ${cluster} de PostgreSQL ${version} es va generar amb la versió " +"${db_catversion} dels catàleg, però el paquet postgresql-${version} " +"instal·lat actualment fa servir la versió ${new_catversion} del catàleg. No " +"podreu fer servir aquest clúster fins que no s'hagi actualitzat a la nova " +"versió del catàleg." + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The necessary subset of binaries from the old version was saved in " +"${vartmpdir}. To upgrade the cluster, execute these commands:" +msgstr "" +"El subconjunt de binaris necessari de la versió anterior es va desar a " +"${vartmpdir}. Per actualitzar el clúster, executeu aquestes ordres:" diff -Nru postgresql-common-154/debian/po/cs.po postgresql-common-190~ubuntu14.04.1/debian/po/cs.po --- postgresql-common-154/debian/po/cs.po 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/po/cs.po 2018-01-12 14:08:46.000000000 +0000 @@ -6,24 +6,25 @@ msgid "" msgstr "" "Project-Id-Version: postgresql-common\n" -"Report-Msgid-Bugs-To: Source: postgresql-common@packages.debian.org\n" -"POT-Creation-Date: 2008-02-03 13:01+0100\n" +"Report-Msgid-Bugs-To: postgresql-common@packages.debian.org\n" +"POT-Creation-Date: 2016-03-05 11:47+0100\n" "PO-Revision-Date: 2009-06-27 10:34+0200\n" "Last-Translator: Miroslav Kure \n" "Language-Team: Czech \n" +"Language: cs\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "Obsolete major version ${old}" msgstr "Zastaralá hlavní verze ${old}" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The PostgreSQL version ${old} is obsolete, but the server or client packages " "are still installed. Please install the latest packages (postgresql-" @@ -37,7 +38,7 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please be aware that the installation of postgresql-${latest} will " "automatically create a default cluster ${latest}/main. If you want to " @@ -52,7 +53,7 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The old server and client packages are no longer supported. After the " "existing clusters are upgraded, the postgresql-${old} and postgresql-client-" @@ -64,8 +65,64 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." msgstr "" "Podrobnosti naleznete v /usr/share/doc/postgresql-common/README.Debian.gz." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "Enable SSL by default in new PostgreSQL clusters?" +msgstr "" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"PostgreSQL supports SSL-encrypted connections. This is usually a good thing. " +"However, if the database is solely accessed using TCP connections on " +"localhost, SSL can be turned off without introducing security issues." +msgstr "" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"UNIX domain socket connections (called \"local\" in pg_hba.conf) are not " +"affected by this setting. This setting concerns new PostgreSQL clusters " +"created during package install, or by using the pg_createcluster command. It " +"does not reconfigure existing clusters." +msgstr "" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "If unsure, enable SSL." +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "PostgreSQL ${version} catalog version changed" +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The PostgreSQL cluster ${version} ${cluster} was created using catalog " +"version ${db_catversion}, but the currently being installed package " +"postgresql-${version} is using catalog version ${new_catversion}. You will " +"not be able to use this cluster until it was upgraded to the new catalog " +"version." +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The necessary subset of binaries from the old version was saved in " +"${vartmpdir}. To upgrade the cluster, execute these commands:" +msgstr "" diff -Nru postgresql-common-154/debian/po/da.po postgresql-common-190~ubuntu14.04.1/debian/po/da.po --- postgresql-common-154/debian/po/da.po 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/po/da.po 2018-01-12 14:08:46.000000000 +0000 @@ -1,43 +1,44 @@ # Danish translation postgresql-common. -# Copyright (C) 2011 THE PACKAGE'S COPYRIGHT HOLDER. +# Copyright (C) 2017 THE PACKAGE'S COPYRIGHT HOLDER. # This file is distributed under the same license as the postgresql-common package. -# Joe Hansen (joedalton2@yahoo.dk), 2011. +# Joe Hansen (joedalton2@yahoo.dk), 2011, 2014, 2017. # msgid "" msgstr "" "Project-Id-Version: postgresql-common\n" -"Report-Msgid-Bugs-To: Source: postgresql-common@packages.debian.org\n" -"POT-Creation-Date: 2008-02-03 13:01+0100\n" -"PO-Revision-Date: 2011-03-20 19:25+0200\n" +"Report-Msgid-Bugs-To: postgresql-common@packages.debian.org\n" +"POT-Creation-Date: 2016-03-05 11:47+0100\n" +"PO-Revision-Date: 2017-03-04 19:25+0200\n" "Last-Translator: Joe Hansen \n" "Language-Team: Danish \n" +"Language: da\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "Obsolete major version ${old}" msgstr "Forældet hovedversion ${old}" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The PostgreSQL version ${old} is obsolete, but the server or client packages " "are still installed. Please install the latest packages (postgresql-" "${latest} and postgresql-client-${latest}) and upgrade the existing " "${oldversion} clusters with pg_upgradecluster (see manpage)." msgstr "" -"PostgreSQL-versionen ${old} er forældet, men server- eller klientpakkerne " -"er stadig installeret. Installer venligst de seneste pakker (postgresql-" +"PostgreSQL-versionen ${old} er forældet, men server- eller klientpakkerne er " +"stadig installeret. Installer venligst de seneste pakker (postgresql-" "${latest} og postgresql-client-${latest}) og opgrader de eksisterende " "${oldversion}-klynger med pg_upgradecluster (se manpage)." #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please be aware that the installation of postgresql-${latest} will " "automatically create a default cluster ${latest}/main. If you want to " @@ -53,7 +54,7 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The old server and client packages are no longer supported. After the " "existing clusters are upgraded, the postgresql-${old} and postgresql-client-" @@ -65,9 +66,78 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." msgstr "" "Se venligst /usr/share/doc/postgresql-common/README.Debian.gz for detaljer." +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "Enable SSL by default in new PostgreSQL clusters?" +msgstr "Aktiver SSL som standard i nye PostgreSQL-klynger?" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"PostgreSQL supports SSL-encrypted connections. This is usually a good thing. " +"However, if the database is solely accessed using TCP connections on " +"localhost, SSL can be turned off without introducing security issues." +msgstr "" +"PostgreSQL understøtter SSL-krypterede forbindelser. Dette er normalt en god " +"ting. Hvis databasen alene tilgås via TCP-forbindelser på localhost, så kan " +"SSL dog slukkes uden at der bliver introduceret sikkerhedsproblemstillinger." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"UNIX domain socket connections (called \"local\" in pg_hba.conf) are not " +"affected by this setting. This setting concerns new PostgreSQL clusters " +"created during package install, or by using the pg_createcluster command. It " +"does not reconfigure existing clusters." +msgstr "" +"UNIX-domænesokkelforbindelser (kaldt »local« i pg_hba.conf) influeres ikke " +"af denne indstilling. Denne indstilling vedrører nye PostgreSQL-klynger " +"oprettet under pakkeinstallation, eller ved at bruge kommandoen " +"pg_createcluster. Den rekonfigurerer eksisterende klynger." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "If unsure, enable SSL." +msgstr "Hvis usikker, aktiver SSL." + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "PostgreSQL ${version} catalog version changed" +msgstr "PostgreSQL ${version}-katalogversion ændrede sig" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The PostgreSQL cluster ${version} ${cluster} was created using catalog " +"version ${db_catversion}, but the currently being installed package " +"postgresql-${version} is using catalog version ${new_catversion}. You will " +"not be able to use this cluster until it was upgraded to the new catalog " +"version." +msgstr "" +"PostgreSQL-klyngen ${version} ${cluster} blev oprettet med katalogversion " +"${db_catversion}, men den i øjeblikket installeret pakke postgresql-${version} " +"bruger katalogversion ${new_catversion}. Du vil ikke være i stand til " +"at bruge denne klynge indtil den er opgraderet til den nye katalogversion." + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The necessary subset of binaries from the old version was saved in " +"${vartmpdir}. To upgrade the cluster, execute these commands:" +msgstr "" +"Det nødvendige undersæt af binære filer fra den gamle version blev " +"gemt i ${vartmpdir}. For at opgradere klyngen, så kør disse kommandoer:" + diff -Nru postgresql-common-154/debian/po/de.po postgresql-common-190~ubuntu14.04.1/debian/po/de.po --- postgresql-common-154/debian/po/de.po 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/po/de.po 2018-01-12 14:08:46.000000000 +0000 @@ -1,29 +1,30 @@ # postgresql-common debconf templates. # Copyright (C) 2005 Martin Pitt +# Copyright (C) 2014-2015 Christoph Berg # This file is distributed under the same license as the postgresql-common package. -# Martin Pitt , 2005. # msgid "" msgstr "" "Project-Id-Version: postgresql-common\n" -"Report-Msgid-Bugs-To: Source: postgresql-common@packages.debian.org\n" -"POT-Creation-Date: 2008-02-03 13:01+0100\n" -"PO-Revision-Date: 2005-11-06 23:21:34-0500\n" -"Last-Translator: Martin Pitt \n" +"Report-Msgid-Bugs-To: postgresql-common@packages.debian.org\n" +"POT-Creation-Date: 2016-03-05 11:47+0100\n" +"PO-Revision-Date: 2015-12-06 22:54+0100\n" +"Last-Translator: Christoph Berg \n" "Language-Team: German \n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "Obsolete major version ${old}" msgstr "Veraltete Version ${old}" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The PostgreSQL version ${old} is obsolete, but the server or client packages " "are still installed. Please install the latest packages (postgresql-" @@ -37,7 +38,7 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please be aware that the installation of postgresql-${latest} will " "automatically create a default cluster ${latest}/main. If you want to " @@ -53,7 +54,7 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The old server and client packages are no longer supported. After the " "existing clusters are upgraded, the postgresql-${old} and postgresql-client-" @@ -65,9 +66,81 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." msgstr "" -"Bitte lesen Sie /usr/share/doc/postgresql-common/README.Debian.gz " -"für Details." +"Bitte lesen Sie /usr/share/doc/postgresql-common/README.Debian.gz für " +"Details." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "Enable SSL by default in new PostgreSQL clusters?" +msgstr "SSL standardmäßig in neuen PostgreSQL-Clustern aktivieren?" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"PostgreSQL supports SSL-encrypted connections. This is usually a good thing. " +"However, if the database is solely accessed using TCP connections on " +"localhost, SSL can be turned off without introducing security issues." +msgstr "" +"PostgreSQL unterstützt SSL-verschlüsselte Verbindungen, was normalerweise " +"benutzt werden sollte. Wenn die Datenbank jedoch ausschließlich über TCP-" +"Verbindungen über localhost benutzt wird, kann SSL abgeschaltet werden, ohne " +"die Sicherheit zu beeinträchtigen." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"UNIX domain socket connections (called \"local\" in pg_hba.conf) are not " +"affected by this setting. This setting concerns new PostgreSQL clusters " +"created during package install, or by using the pg_createcluster command. It " +"does not reconfigure existing clusters." +msgstr "" +"Verbindungen über UNIX-Sockets (in der pg_hba.conf \"local\" genannt) sind " +"nicht von dieser Einstellung betroffen. Diese Einstellung betrifft nur neue " +"PostgreSQL-Cluster, die während der Paket-Installation oder durch " +"pg_createcluster angelegt werden. Es konfiguriert bestehende Cluster nicht " +"um." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "If unsure, enable SSL." +msgstr "Aktivieren Sie SSL im Zweifelsfall." + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "PostgreSQL ${version} catalog version changed" +msgstr "Geänderte Katalogversion in PostgreSQL ${version}" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The PostgreSQL cluster ${version} ${cluster} was created using catalog " +"version ${db_catversion}, but the currently being installed package " +"postgresql-${version} is using catalog version ${new_catversion}. You will " +"not be able to use this cluster until it was upgraded to the new catalog " +"version." +msgstr "" +"Der PostgreSQL-Cluster ${version} ${cluster} wurde mit der Katalogversion " +"${db_catversion} erstellt, aber das gerade installierte Paket postgresql-" +"${version} benutzt Katalogversion ${new_catversion}. Sie werden diesen " +"Cluster erst wieder benutzen können, wenn er auf die neue Katalogversion " +"aktualisiert wurde." + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The necessary subset of binaries from the old version was saved in " +"${vartmpdir}. To upgrade the cluster, execute these commands:" +msgstr "" +"Die notwendigen Programmdateien der alten Version wurden in ${vartmpdir} " +"gesichert. Benutzen Sie folgende Kommandos um den Cluster zu aktualisieren:" diff -Nru postgresql-common-154/debian/po/es.po postgresql-common-190~ubuntu14.04.1/debian/po/es.po --- postgresql-common-154/debian/po/es.po 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/po/es.po 2018-01-12 14:08:46.000000000 +0000 @@ -5,72 +5,77 @@ # # Changes: # - Initial translation -# Javier Fernndez-Sanguino , 2006 +# Javier Fernández-Sanguino , 2006 # - Updated -# Javier Fernndez-Sanguino , 2007-2008 -# +# Javier Fernández-Sanguino , 2007-2008 +# Manuel "Venturi" Porras Peralta , 2014. # # Traductores, si no conoce el formato PO, merece la pena leer la -# documentacin de gettext, especialmente las secciones dedicadas a este +# documentación de gettext, especialmente las secciones dedicadas a este # formato, por ejemplo ejecutando: # info -n '(gettext)PO Files' # info -n '(gettext)Header Entry' # -# Equipo de traduccin al espaol, por favor lean antes de traducir +# Equipo de traducción al español, por favor lean antes de traducir # los siguientes documentos: # -# - El proyecto de traduccin de Debian al espaol +# - El proyecto de traducción de Debian al español # http://www.debian.org/intl/spanish/ -# especialmente las notas y normas de traduccin en +# especialmente las notas y normas de traducción en # http://www.debian.org/intl/spanish/notas # -# - La gua de traduccin de po's de debconf: +# - La guía de traducción de po's de debconf: # /usr/share/doc/po-debconf/README-trans # o http://www.debian.org/intl/l10n/po-debconf/README-trans # -# Si tiene dudas o consultas sobre esta traduccin consulte con el ltimo +# Si tiene dudas o consultas sobre esta traducción consulte con el último # traductor (campo Last-Translator) y ponga en copia a la lista de -# traduccin de Debian al espaol () +# traducción de Debian al español () +# # msgid "" msgstr "" "Project-Id-Version: postgresql-common 68\n" -"Report-Msgid-Bugs-To: Source: postgresql-common@packages.debian.org\n" -"POT-Creation-Date: 2008-02-03 13:01+0100\n" -"PO-Revision-Date: 2008-03-30 15:44+0200\n" -"Last-Translator: Javier Fernndez-Sanguino \n" -"Language-Team: Debian Spanish \n" +"Report-Msgid-Bugs-To: postgresql-common@packages.debian.org\n" +"POT-Creation-Date: 2016-03-05 11:47+0100\n" +"PO-Revision-Date: 2014-12-21 12:27+0100\n" +"Last-Translator: Manuel \"Venturi\" Porras Peralta \n" +"Language-Team: Español; Castellano \n" +"Language: es\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-15\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-POFile-SpellExtra: PostgreSQL oldversion clster stop pgdropcluster\n" -"X-POFile-SpellExtra: client old main clsters pgupgradecluster latest\n" +"X-POFile-SpellExtra: PostgreSQL oldversion clúster stop pgdropcluster\n" +"X-POFile-SpellExtra: client old main clústers pgupgradecluster latest\n" "X-POFile-SpellExtra: postgresql\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Gtranslator 2.91.6\n" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "Obsolete major version ${old}" -msgstr "Versin principal ${old} obsoleta" +msgstr "Versión principal ${old} obsoleta" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The PostgreSQL version ${old} is obsolete, but the server or client packages " "are still installed. Please install the latest packages (postgresql-" "${latest} and postgresql-client-${latest}) and upgrade the existing " "${oldversion} clusters with pg_upgradecluster (see manpage)." msgstr "" -"La versin de PostgreSQL ${old} est obsoleta, pero el paquete del cliente o " -"del servidor an estn instalados. Debe instalar las ltimas versiones de " +"La versión de PostgreSQL ${old} está obsoleta, pero el paquete del cliente o " +"del servidor aún están instalados. Debe instalar las últimas versiones de " "los paquetes (postgresql-${latest} y postgresql-client-${latest}) y " -"actualizar sus clsters ${oldversion} con la orden " -"pg_upgradecluster (consulte la pgina del manual)." +"actualizar sus clústers ${oldversion} con la orden " +"«pg_upgradecluster» (consulte la página del manual)." #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please be aware that the installation of postgresql-${latest} will " "automatically create a default cluster ${latest}/main. If you want to " @@ -78,27 +83,94 @@ "${latest} cluster (pg_dropcluster --stop ${latest} main, see manpage for " "details)." msgstr "" -"Tenga en cuenta que la instalacin de postgresql-${latest} crear " -"automticamente un clster por omisin ${latest}/main. Tiene que borrar el " -"clster ${latest} existente (pg_dropcluster --stop ${latest}) si desea " -"actualizar el clster ${old}/main, consulte la pgina de manual para conocer " +"Tenga en cuenta que la instalación de postgresql-${latest} creará " +"automáticamente un clúster por omisión ${latest}/main. Tiene que borrar el " +"clúster ${latest} existente («pg_dropcluster --stop ${latest}) si desea " +"actualizar el clúster ${old}/main, consulte la página de manual para conocer " "los detalles." #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The old server and client packages are no longer supported. After the " "existing clusters are upgraded, the postgresql-${old} and postgresql-client-" "${old} packages should be removed." msgstr "" -"Ya no se da soporte a los paquetes antiguos de cliente y servidor. Debera " -"eliminar los paquetes postgresql-${old} y postgresql-client-${old} despus " -"de actualizar los clsters que tenga." +"Ya no se da soporte a los paquetes antiguos de cliente y servidor. Debería " +"eliminar los paquetes postgresql-${old} y postgresql-client-${old} después " +"de actualizar los clústers que tenga." #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." -msgstr "Para ms informacin consulte /usr/share/doc/postgresql-common/README.Debian.gz." +msgstr "" +"Para más información consulte «/usr/share/doc/postgresql-common/README." +"Debian.gz»." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "Enable SSL by default in new PostgreSQL clusters?" +msgstr "" +"¿Desea activar SSL como predeterminado en los nuevos clústers de PostgreSQL?" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"PostgreSQL supports SSL-encrypted connections. This is usually a good thing. " +"However, if the database is solely accessed using TCP connections on " +"localhost, SSL can be turned off without introducing security issues." +msgstr "" +"PostgreSQL admite conexiones cifradas SSL. Esto suele ser una buena idea. " +"Aún así, si se accede a la base de datos exclusivamente usando conexiones " +"TCP en «localhost», se puede desactivar el SSL sin provocar problemas de " +"seguridad." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"UNIX domain socket connections (called \"local\" in pg_hba.conf) are not " +"affected by this setting. This setting concerns new PostgreSQL clusters " +"created during package install, or by using the pg_createcluster command. It " +"does not reconfigure existing clusters." +msgstr "" +"Esta configuración no afecta a las conexiones a «socket» del dominio UNIX, " +"llamados «local» en «pg_hba.conf». La configuración afecta a los clústers de " +"PostgreSQL nuevos creados durante la instalación del paquete o utilizando la " +"orden «pg_createcluster». No reconfigura ningún clúster ya existente." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "If unsure, enable SSL." +msgstr "Si no está seguro, active SSL." + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "PostgreSQL ${version} catalog version changed" +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The PostgreSQL cluster ${version} ${cluster} was created using catalog " +"version ${db_catversion}, but the currently being installed package " +"postgresql-${version} is using catalog version ${new_catversion}. You will " +"not be able to use this cluster until it was upgraded to the new catalog " +"version." +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The necessary subset of binaries from the old version was saved in " +"${vartmpdir}. To upgrade the cluster, execute these commands:" +msgstr "" diff -Nru postgresql-common-154/debian/po/eu.po postgresql-common-190~ubuntu14.04.1/debian/po/eu.po --- postgresql-common-154/debian/po/eu.po 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/po/eu.po 2018-01-12 14:08:46.000000000 +0000 @@ -7,11 +7,12 @@ msgid "" msgstr "" "Project-Id-Version: eu\n" -"Report-Msgid-Bugs-To: Source: postgresql-common@packages.debian.org\n" -"POT-Creation-Date: 2008-02-03 13:01+0100\n" +"Report-Msgid-Bugs-To: postgresql-common@packages.debian.org\n" +"POT-Creation-Date: 2016-03-05 11:47+0100\n" "PO-Revision-Date: 2008-05-27 23:31+0200\n" "Last-Translator: Piarres Beobide \n" "Language-Team: Euskara \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -19,13 +20,13 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "Obsolete major version ${old}" msgstr "Zaharkituriko ${old} bertsio nagusia" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The PostgreSQL version ${old} is obsolete, but the server or client packages " "are still installed. Please install the latest packages (postgresql-" @@ -40,7 +41,7 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please be aware that the installation of postgresql-${latest} will " "automatically create a default cluster ${latest}/main. If you want to " @@ -55,7 +56,7 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The old server and client packages are no longer supported. After the " "existing clusters are upgraded, the postgresql-${old} and postgresql-client-" @@ -67,7 +68,64 @@ #. Type: error #. Description +#: ../postgresql-common.templates:1001 +msgid "" +"Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." +msgstr "" +"Begiratu /usr/share/doc/postgresql-common/README.Debian.gz xehetasunetarako." + +#. Type: boolean +#. Description #: ../postgresql-common.templates:2001 -msgid "Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." -msgstr "Begiratu /usr/share/doc/postgresql-common/README.Debian.gz xehetasunetarako." +msgid "Enable SSL by default in new PostgreSQL clusters?" +msgstr "" +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"PostgreSQL supports SSL-encrypted connections. This is usually a good thing. " +"However, if the database is solely accessed using TCP connections on " +"localhost, SSL can be turned off without introducing security issues." +msgstr "" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"UNIX domain socket connections (called \"local\" in pg_hba.conf) are not " +"affected by this setting. This setting concerns new PostgreSQL clusters " +"created during package install, or by using the pg_createcluster command. It " +"does not reconfigure existing clusters." +msgstr "" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "If unsure, enable SSL." +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "PostgreSQL ${version} catalog version changed" +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The PostgreSQL cluster ${version} ${cluster} was created using catalog " +"version ${db_catversion}, but the currently being installed package " +"postgresql-${version} is using catalog version ${new_catversion}. You will " +"not be able to use this cluster until it was upgraded to the new catalog " +"version." +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The necessary subset of binaries from the old version was saved in " +"${vartmpdir}. To upgrade the cluster, execute these commands:" +msgstr "" diff -Nru postgresql-common-154/debian/po/fi.po postgresql-common-190~ubuntu14.04.1/debian/po/fi.po --- postgresql-common-154/debian/po/fi.po 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/po/fi.po 2018-01-12 14:08:46.000000000 +0000 @@ -1,11 +1,12 @@ msgid "" msgstr "" "Project-Id-Version: postgres-common\n" -"Report-Msgid-Bugs-To: Source: postgresql-common@packages.debian.org\n" -"POT-Creation-Date: 2008-02-03 13:01+0100\n" +"Report-Msgid-Bugs-To: postgresql-common@packages.debian.org\n" +"POT-Creation-Date: 2016-03-05 11:47+0100\n" "PO-Revision-Date: 2008-02-29 15:05+0200\n" "Last-Translator: Esko Arajärvi \n" "Language-Team: Finnish \n" +"Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -14,31 +15,112 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "Obsolete major version ${old}" msgstr "Vanhentunut pääversio ${old}" #. Type: error #. Description -#: ../postgresql-common.templates:2001 -msgid "The PostgreSQL version ${old} is obsolete, but the server or client packages are still installed. Please install the latest packages (postgresql-${latest} and postgresql-client-${latest}) and upgrade the existing ${oldversion} clusters with pg_upgradecluster (see manpage)." -msgstr "Ohjelman PostgreSQL versio ${old} on vanhentunut, mutta palvelin- tai asiakaspaketteja on vielä asennettuna. Asenna uusimmat paketit (postgresql-${latest} ja postgresql-client-${latest}) ja päivitä olemassa olevat version ${oldversion} klusterit ohjelmalla pg_upgradecluster (katso man-ohjesivu)." +#: ../postgresql-common.templates:1001 +msgid "" +"The PostgreSQL version ${old} is obsolete, but the server or client packages " +"are still installed. Please install the latest packages (postgresql-" +"${latest} and postgresql-client-${latest}) and upgrade the existing " +"${oldversion} clusters with pg_upgradecluster (see manpage)." +msgstr "" +"Ohjelman PostgreSQL versio ${old} on vanhentunut, mutta palvelin- tai " +"asiakaspaketteja on vielä asennettuna. Asenna uusimmat paketit (postgresql-" +"${latest} ja postgresql-client-${latest}) ja päivitä olemassa olevat version " +"${oldversion} klusterit ohjelmalla pg_upgradecluster (katso man-ohjesivu)." #. Type: error #. Description -#: ../postgresql-common.templates:2001 -msgid "Please be aware that the installation of postgresql-${latest} will automatically create a default cluster ${latest}/main. If you want to upgrade the ${old}/main cluster, you need to remove the already existing ${latest} cluster (pg_dropcluster --stop ${latest} main, see manpage for details)." -msgstr "Version postgresql-${latest} asennus luo automaattisesti oletusklusterin ${latest}/main. Jos haluat päivittää klusterin ${old}/main, sinun tulee poistaa jo olemassa oleva klusteri ${latest} (komennolla pg_dropcluster --stop ${latest} main, lisätietoja man-ohjesivulta)." +#: ../postgresql-common.templates:1001 +msgid "" +"Please be aware that the installation of postgresql-${latest} will " +"automatically create a default cluster ${latest}/main. If you want to " +"upgrade the ${old}/main cluster, you need to remove the already existing " +"${latest} cluster (pg_dropcluster --stop ${latest} main, see manpage for " +"details)." +msgstr "" +"Version postgresql-${latest} asennus luo automaattisesti oletusklusterin " +"${latest}/main. Jos haluat päivittää klusterin ${old}/main, sinun tulee " +"poistaa jo olemassa oleva klusteri ${latest} (komennolla pg_dropcluster --" +"stop ${latest} main, lisätietoja man-ohjesivulta)." #. Type: error #. Description -#: ../postgresql-common.templates:2001 -msgid "The old server and client packages are no longer supported. After the existing clusters are upgraded, the postgresql-${old} and postgresql-client-${old} packages should be removed." -msgstr "Vanhoja palvelin- ja asiakaspaketteja ei enää tueta. Kun olemassa olevat klusterit on päivitetty, paketit postgresql-${old} ja postgresql-client-${old} tulisi poistaa." +#: ../postgresql-common.templates:1001 +msgid "" +"The old server and client packages are no longer supported. After the " +"existing clusters are upgraded, the postgresql-${old} and postgresql-client-" +"${old} packages should be removed." +msgstr "" +"Vanhoja palvelin- ja asiakaspaketteja ei enää tueta. Kun olemassa olevat " +"klusterit on päivitetty, paketit postgresql-${old} ja postgresql-client-" +"${old} tulisi poistaa." #. Type: error #. Description +#: ../postgresql-common.templates:1001 +msgid "" +"Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." +msgstr "" +"Tiedostosta /usr/share/doc/postgresql-common/README.Debian.gz löytyy " +"lisätietoja (englanniksi)." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "Enable SSL by default in new PostgreSQL clusters?" +msgstr "" + +#. Type: boolean +#. Description #: ../postgresql-common.templates:2001 -msgid "Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." -msgstr "Tiedostosta /usr/share/doc/postgresql-common/README.Debian.gz löytyy lisätietoja (englanniksi)." +msgid "" +"PostgreSQL supports SSL-encrypted connections. This is usually a good thing. " +"However, if the database is solely accessed using TCP connections on " +"localhost, SSL can be turned off without introducing security issues." +msgstr "" +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"UNIX domain socket connections (called \"local\" in pg_hba.conf) are not " +"affected by this setting. This setting concerns new PostgreSQL clusters " +"created during package install, or by using the pg_createcluster command. It " +"does not reconfigure existing clusters." +msgstr "" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "If unsure, enable SSL." +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "PostgreSQL ${version} catalog version changed" +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The PostgreSQL cluster ${version} ${cluster} was created using catalog " +"version ${db_catversion}, but the currently being installed package " +"postgresql-${version} is using catalog version ${new_catversion}. You will " +"not be able to use this cluster until it was upgraded to the new catalog " +"version." +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The necessary subset of binaries from the old version was saved in " +"${vartmpdir}. To upgrade the cluster, execute these commands:" +msgstr "" diff -Nru postgresql-common-154/debian/po/fr.po postgresql-common-190~ubuntu14.04.1/debian/po/fr.po --- postgresql-common-154/debian/po/fr.po 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/po/fr.po 2018-01-12 14:08:46.000000000 +0000 @@ -6,24 +6,26 @@ msgid "" msgstr "" "Project-Id-Version: postgresql-common\n" -"Report-Msgid-Bugs-To: Source: postgresql-common@packages.debian.org\n" -"POT-Creation-Date: 2008-02-03 13:01+0100\n" -"PO-Revision-Date: 2008-02-13 22:32+0100\n" -"Last-Translator: Guilhelm Panaget \n" +"Report-Msgid-Bugs-To: postgresql-common@packages.debian.org\n" +"POT-Creation-Date: 2016-03-05 11:47+0100\n" +"PO-Revision-Date: 2016-01-04 10:35+0100\n" +"Last-Translator: Julien Patriarca \n" "Language-Team: French \n" +"Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.6.10\n" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "Obsolete major version ${old}" msgstr "Version majeure ${old} obsolète" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The PostgreSQL version ${old} is obsolete, but the server or client packages " "are still installed. Please install the latest packages (postgresql-" @@ -39,7 +41,7 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please be aware that the installation of postgresql-${latest} will " "automatically create a default cluster ${latest}/main. If you want to " @@ -48,14 +50,14 @@ "details)." msgstr "" "Veuillez noter que l'installation de postgresql-${latest} créera par défaut " -"une grappe (« cluster ») ${latest}/main. Si vous souhaitez mettre à niveau la " -"grappe ${old}/main, il faudra supprimer la grappe ${latest} en exécutant la " -"commande « pg_dropcluster--stop ${latest} main ». Veuillez consulter la page " -"de manuel pour plus de précisions." +"une grappe (« cluster ») ${latest}/main. Si vous souhaitez mettre à niveau " +"la grappe ${old}/main, il faudra supprimer la grappe ${latest} en exécutant " +"la commande « pg_dropcluster--stop ${latest} main ». Veuillez consulter la " +"page de manuel pour plus de précisions." #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The old server and client packages are no longer supported. After the " "existing clusters are upgraded, the postgresql-${old} and postgresql-client-" @@ -67,9 +69,84 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." msgstr "" "Veuillez consulter /usr/share/doc/postgresql-common/README.Debian.gz pour " "plus de détails." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "Enable SSL by default in new PostgreSQL clusters?" +msgstr "" +"Faut-il activer le protocole SSL par défaut pour les nouvelles grappes " +"PostgreSQL ?" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"PostgreSQL supports SSL-encrypted connections. This is usually a good thing. " +"However, if the database is solely accessed using TCP connections on " +"localhost, SSL can be turned off without introducing security issues." +msgstr "" +"PostgreSQL supporte les connexions chiffrées avec SSL. C'est généralement " +"une bonne chose. Cependant, si la base de données est accédée exclusivement " +"au travers de connexions TCP locales, SSL peut être désactivé sans pour " +"autant introduire des failles de sécurité." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"UNIX domain socket connections (called \"local\" in pg_hba.conf) are not " +"affected by this setting. This setting concerns new PostgreSQL clusters " +"created during package install, or by using the pg_createcluster command. It " +"does not reconfigure existing clusters." +msgstr "" +"Les connexions sur le socket de domaine UNIX (nommées « local » dans pg_hba." +"conf) ne sont pas affectées par ce réglage. Ce paramètre concerne les " +"nouvelles grappes PostgreSQL créées lors de l'installation du paquet ou en " +"utilisant la commande pg_createcluster. Cela ne reconfigure pas les grappes " +"existantes." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "If unsure, enable SSL." +msgstr "Dans le doute, activez SSL." + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "PostgreSQL ${version} catalog version changed" +msgstr "La version du catalogue de PostgreSQL ${version} a changé." + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The PostgreSQL cluster ${version} ${cluster} was created using catalog " +"version ${db_catversion}, but the currently being installed package " +"postgresql-${version} is using catalog version ${new_catversion}. You will " +"not be able to use this cluster until it was upgraded to the new catalog " +"version." +msgstr "" +"La grappe${cluster} PostgreSQL ${version} a été créée en utilisant la " +"version de catalogue ${db_catversion}, mais le paquet postgresql-${version} " +"actuellement installé utilise la version de catalogue ${new_catversion}. " +"Vous ne pourrez pas utiliser cette grappe tant que vous n'aurez pas mis à " +"jour le catalogue vers la nouvelle version." + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The necessary subset of binaries from the old version was saved in " +"${vartmpdir}. To upgrade the cluster, execute these commands:" +msgstr "" +"L'ensemble des exécutables nécessaires de l'ancienne version ont été " +"sauvegardés dans ${vartmpdir}. Pour mettre à jour la grappe, veuillez " +"exécuter ces commandes :" diff -Nru postgresql-common-154/debian/po/gl.po postgresql-common-190~ubuntu14.04.1/debian/po/gl.po --- postgresql-common-154/debian/po/gl.po 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/po/gl.po 2018-01-12 14:08:46.000000000 +0000 @@ -5,24 +5,25 @@ msgid "" msgstr "" "Project-Id-Version: postgresql-common\n" -"Report-Msgid-Bugs-To: Source: postgresql-common@packages.debian.org\n" -"POT-Creation-Date: 2008-02-03 13:01+0100\n" +"Report-Msgid-Bugs-To: postgresql-common@packages.debian.org\n" +"POT-Creation-Date: 2016-03-05 11:47+0100\n" "PO-Revision-Date: 2008-05-13 00:18+0100\n" "Last-Translator: Jacobo Tarrio \n" "Language-Team: Galician \n" +"Language: gl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "Obsolete major version ${old}" msgstr "Versión ${old} obsoleta" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The PostgreSQL version ${old} is obsolete, but the server or client packages " "are still installed. Please install the latest packages (postgresql-" @@ -36,7 +37,7 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please be aware that the installation of postgresql-${latest} will " "automatically create a default cluster ${latest}/main. If you want to " @@ -52,7 +53,7 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The old server and client packages are no longer supported. After the " "existing clusters are upgraded, the postgresql-${old} and postgresql-client-" @@ -64,9 +65,65 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." msgstr "" "Consulte /usr/share/doc/postgresql-common/README.Debian.gz para ter máis " "detalles." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "Enable SSL by default in new PostgreSQL clusters?" +msgstr "" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"PostgreSQL supports SSL-encrypted connections. This is usually a good thing. " +"However, if the database is solely accessed using TCP connections on " +"localhost, SSL can be turned off without introducing security issues." +msgstr "" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"UNIX domain socket connections (called \"local\" in pg_hba.conf) are not " +"affected by this setting. This setting concerns new PostgreSQL clusters " +"created during package install, or by using the pg_createcluster command. It " +"does not reconfigure existing clusters." +msgstr "" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "If unsure, enable SSL." +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "PostgreSQL ${version} catalog version changed" +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The PostgreSQL cluster ${version} ${cluster} was created using catalog " +"version ${db_catversion}, but the currently being installed package " +"postgresql-${version} is using catalog version ${new_catversion}. You will " +"not be able to use this cluster until it was upgraded to the new catalog " +"version." +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The necessary subset of binaries from the old version was saved in " +"${vartmpdir}. To upgrade the cluster, execute these commands:" +msgstr "" diff -Nru postgresql-common-154/debian/po/it.po postgresql-common-190~ubuntu14.04.1/debian/po/it.po --- postgresql-common-154/debian/po/it.po 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/po/it.po 2018-01-12 14:08:46.000000000 +0000 @@ -1,29 +1,29 @@ # Italian (it) translation of debconf templates for postgresql-common -# Copyright (C) 2006 Software in the Public Interest # This file is distributed under the same license as the postgresql-common package. -# Luca Monducci , 2006 - 2008. +# Luca Monducci , 2006-2014. # msgid "" msgstr "" -"Project-Id-Version: postgresql-common 88 italian debconf templates\n" -"Report-Msgid-Bugs-To: Source: postgresql-common@packages.debian.org\n" -"POT-Creation-Date: 2008-02-03 13:01+0100\n" -"PO-Revision-Date: 2008-05-03 20:23+0200\n" +"Project-Id-Version: postgresql-common 160 italian debconf templates\n" +"Report-Msgid-Bugs-To: postgresql-common@packages.debian.org\n" +"POT-Creation-Date: 2016-03-05 11:47+0100\n" +"PO-Revision-Date: 2014-08-30 10:23+0200\n" "Last-Translator: Luca Monducci \n" "Language-Team: Italian \n" +"Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "Obsolete major version ${old}" msgstr "La versione ${old} è obsoleta" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The PostgreSQL version ${old} is obsolete, but the server or client packages " "are still installed. Please install the latest packages (postgresql-" @@ -33,11 +33,11 @@ "La versione ${old} di PostgreSQL è obsoleta, ma alcuni dei pacchetti server " "o client sono ancora installati. Installare i pacchetti più recenti " "(postgresql-${latest} e postgresql-client-${latest}) e aggiornare i cluster " -"${oldversion} esistenti con pg_upgradecluster (si veda la pagina man)." +"${oldversion} esistenti con pg_upgradecluster (consultare la pagina man)." #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please be aware that the installation of postgresql-${latest} will " "automatically create a default cluster ${latest}/main. If you want to " @@ -46,13 +46,13 @@ "details)." msgstr "" "Attenzione: l'installazione di postgresql-${latest} crea automaticamente il " -"cluster predefinito ${latest}/main. Se si vuole aggiornare il cluster ${old}/" -"main è necessario rimuovere cluster ${latest} dopo la sua creazione " -"(pg_dropcluster --stop ${latest} main, si veda la pagina man per i dettagli)." +"cluster predefinito ${latest}/main. Per aggiornare il cluster ${old}/main è " +"necessario rimuovere cluster ${latest} dopo la sua creazione (pg_dropcluster " +"--stop ${latest} main, consultare la pagina man per i dettagli)." #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The old server and client packages are no longer supported. After the " "existing clusters are upgraded, the postgresql-${old} and postgresql-client-" @@ -64,8 +64,73 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." msgstr "" -"Si veda /usr/share/doc/postgresql-common/README.Debian.gz per i dettagli." +"Consultare /usr/share/doc/postgresql-common/README.Debian.gz per i dettagli." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "Enable SSL by default in new PostgreSQL clusters?" +msgstr "Attivare in modo predefinito SSL nei nuovi cluster PostgreSQL?" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"PostgreSQL supports SSL-encrypted connections. This is usually a good thing. " +"However, if the database is solely accessed using TCP connections on " +"localhost, SSL can be turned off without introducing security issues." +msgstr "" +"PostgreSQL supporta connessioni cifrate con SSL e questa è una cosa buona, " +"tuttavia, se l'accesso al database avviene solo con connessioni TCP da " +"localhost allora è possibile disabilitare SSL senza il rischio di esporsi a " +"problemi di sicurezza." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"UNIX domain socket connections (called \"local\" in pg_hba.conf) are not " +"affected by this setting. This setting concerns new PostgreSQL clusters " +"created during package install, or by using the pg_createcluster command. It " +"does not reconfigure existing clusters." +msgstr "" +"Le connessioni tramite socket di dominio locale UNIX (chiamate \"local\" in " +"pg_hba.conf) non sono influenzate da questa impostazione. Questa " +"impostazione riguarda solo i nuovi cluster PostgreSQL creati durante " +"l'installazione del pacchetto oppure utilizzando il comando pg_createcluster " +"e non modifica la configurazione di nessuno dei cluster esistenti." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "If unsure, enable SSL." +msgstr "Se non si è sicuri, attivare SSL." + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "PostgreSQL ${version} catalog version changed" +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The PostgreSQL cluster ${version} ${cluster} was created using catalog " +"version ${db_catversion}, but the currently being installed package " +"postgresql-${version} is using catalog version ${new_catversion}. You will " +"not be able to use this cluster until it was upgraded to the new catalog " +"version." +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The necessary subset of binaries from the old version was saved in " +"${vartmpdir}. To upgrade the cluster, execute these commands:" +msgstr "" diff -Nru postgresql-common-154/debian/po/ja.po postgresql-common-190~ubuntu14.04.1/debian/po/ja.po --- postgresql-common-154/debian/po/ja.po 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/po/ja.po 2018-01-12 14:08:46.000000000 +0000 @@ -1,43 +1,46 @@ # Copyright (C) 2006 Martin Pitt # This file is distributed under the same license as the postgresql-common package. # Hideki Yamane , 2006-2008. +# Takuma Yamada , 2016. # msgid "" msgstr "" -"Project-Id-Version: postgresql-common 85\n" -"Report-Msgid-Bugs-To: Source: postgresql-common@packages.debian.org\n" -"POT-Creation-Date: 2008-02-03 13:01+0100\n" -"PO-Revision-Date: 2008-02-09 06:07+0900\n" -"Last-Translator: Hideki Yamane (Debian-JP) \n" +"Project-Id-Version: postgresql-common 155\n" +"Report-Msgid-Bugs-To: postgresql-common@packages.debian.org\n" +"POT-Creation-Date: 2016-03-05 11:47+0100\n" +"PO-Revision-Date: 2016-04-07 11:35+0900\n" +"Last-Translator: Takuma Yamada \n" "Language-Team: Japanese \n" +"Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Gtranslator 2.91.6\n" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "Obsolete major version ${old}" -msgstr "メジャーバージョン ${old} はもはや使われません" +msgstr "廃止されたメジャーバージョン ${old}" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The PostgreSQL version ${old} is obsolete, but the server or client packages " "are still installed. Please install the latest packages (postgresql-" "${latest} and postgresql-client-${latest}) and upgrade the existing " "${oldversion} clusters with pg_upgradecluster (see manpage)." msgstr "" -"PostgreSQL バージョン ${old} は既に使われなくなっていますが、サーバおよびク" -"ライアント用パッケージがインストールされたままになっています。最新のパッケー" -"ジ (postgresql-${latest} と postgresql-client-${latest}) をインストールして、" -"現在の ${oldversion} クラスタを pg_upgradecluster コマンドを使ってアップグ" -"レードしてください (詳細は man ページを参照)。" +"PostgreSQL バージョン ${old} は廃止されましたが、サーバまたはクライアントパッ" +"ケージがまだインストールされています。最新のパッケージ (postgresql-${latest} " +"および postgresql-client-${latest}) をインストールして、既存の ${oldversion} " +"クラスタを pg_upgradecluster でアップグレードしてください (manpage を参照)。" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please be aware that the installation of postgresql-${latest} will " "automatically create a default cluster ${latest}/main. If you want to " @@ -45,27 +48,98 @@ "${latest} cluster (pg_dropcluster --stop ${latest} main, see manpage for " "details)." msgstr "" -"postgresql-${latest} のインストールでは自動的にデフォルトのクラスタ " -"${latest}/main が作成されることに注意してください。${old}/main クラスタをアッ" -"プグレードしたい場合は、既にある ${latest} クラスタを削除する必要があります " -"(pg_dropcluster --stop ${latest} main 、詳細は manpage を参照してください)。" +"postgresql-${latest} のインストールは自動的にデフォルトのクラスタ ${latest}/" +"main を作成することに注意してください。${old}/main クラスタをアップグレードす" +"る場合は、既存の ${latest} クラスタを削除する必要があります (pg_dropcluster " +"--stop ${latest} main、詳細は manpage を参照)。" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The old server and client packages are no longer supported. After the " "existing clusters are upgraded, the postgresql-${old} and postgresql-client-" "${old} packages should be removed." msgstr "" -"以前のサーバ・クライアントパッケージはもはやサポートされていません。現在のク" -"ラスタをアップグレード後、postgresql-${old} パッケージと postgresql-client-" +"古いサーバおよびクライアントパッケージはサポートされなくなりました。既存のク" +"ラスタがアップグレードされた後に、postgresql-${old} および postgresql-client-" "${old} パッケージを削除する必要があります。" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." msgstr "" "詳細は /usr/share/doc/postgresql-common/README.Debian.gz を参照してください。" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "Enable SSL by default in new PostgreSQL clusters?" +msgstr "新しい PostgreSQL クラスタではデフォルトで SSL を有効にしますか?" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"PostgreSQL supports SSL-encrypted connections. This is usually a good thing. " +"However, if the database is solely accessed using TCP connections on " +"localhost, SSL can be turned off without introducing security issues." +msgstr "" +"PostgreSQL は SSL で暗号化された接続をサポートしています。これは通常は良いこ" +"とです。しかし、データベースが単にローカルホスト上の TCP 接続を使用してアクセ" +"スされる場合は、セキュリティ問題を入れることなく SSL をオフにすることができま" +"す。" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"UNIX domain socket connections (called \"local\" in pg_hba.conf) are not " +"affected by this setting. This setting concerns new PostgreSQL clusters " +"created during package install, or by using the pg_createcluster command. It " +"does not reconfigure existing clusters." +msgstr "" +"UNIX ドメインソケット接続 (pg_hba.conf 中で \"local\" と呼ばれる) は、この設" +"定の影響を受けません。この設定は、パッケージのインストールや " +"pg_createcluster コマンドの使用で作成される新しい PostgreSQL クラスタに関する" +"ものです。これは、既存のクラスタを再設定しません。" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "If unsure, enable SSL." +msgstr "よくわからない場合は、SSL を有効にします。" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "PostgreSQL ${version} catalog version changed" +msgstr "PostgreSQL ${version} カタログバージョンが変更されました" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The PostgreSQL cluster ${version} ${cluster} was created using catalog " +"version ${db_catversion}, but the currently being installed package " +"postgresql-${version} is using catalog version ${new_catversion}. You will " +"not be able to use this cluster until it was upgraded to the new catalog " +"version." +msgstr "" +"PostgreSQL クラスタ ${version} {$cluster} は、カタログバージョン " +"${db_catversioin} を使用して作成されました。しかし、現在インストールされてい" +"るパッケージ postgresql-${version} は、カタログバージョン ${new_catversion} " +"を使用しています。新しいカタログバージョンにアップグレードされるまで、このク" +"ラスタは使用することができません。" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The necessary subset of binaries from the old version was saved in " +"${vartmpdir}. To upgrade the cluster, execute these commands:" +msgstr "" +"古いバージョンからのバイナリの必要なサブセットは、${vartmpdir} に保存されてい" +"ました。クラスタをアップグレードするには、次のコマンドを実行します。" diff -Nru postgresql-common-154/debian/po/nl.po postgresql-common-190~ubuntu14.04.1/debian/po/nl.po --- postgresql-common-154/debian/po/nl.po 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/po/nl.po 2018-01-12 14:08:46.000000000 +0000 @@ -1,44 +1,50 @@ # Dutch postgresql-common po-debconf translation, # Copyright (C) 2011 THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the postgresql-common package. +# # Vincent Zweije , 2006. # Vincent Zweije , 2011. +# Frans Spiesschaert , 2014, 2016. # msgid "" msgstr "" -"Project-Id-Version: postgresql-common 115\n" -"Report-Msgid-Bugs-To: Source: postgresql-common@packages.debian.org\n" -"POT-Creation-Date: 2008-02-03 13:01+0100\n" -"PO-Revision-Date: 2011-05-13 10:55+0000\n" -"Last-Translator: Vincent Zweije \n" -"Language-Team: Debian-Dutch \n" +"Project-Id-Version: postgresql-common 172\n" +"Report-Msgid-Bugs-To: postgresql-common@packages.debian.org\n" +"POT-Creation-Date: 2016-03-05 11:47+0100\n" +"PO-Revision-Date: 2016-01-12 16:00+0100\n" +"Last-Translator: Frans Spiesschaert \n" +"Language-Team: Debian Dutch l10n Team \n" +"Language: nl\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Gtranslator 2.91.6\n" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "Obsolete major version ${old}" msgstr "Verouderde hoofdversie ${old}" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The PostgreSQL version ${old} is obsolete, but the server or client packages " "are still installed. Please install the latest packages (postgresql-" "${latest} and postgresql-client-${latest}) and upgrade the existing " "${oldversion} clusters with pg_upgradecluster (see manpage)." msgstr "" -"De PostgreSQL versie ${old} is verouderd, maar het server- en/of clientpakket " -"zijn nog geïnstalleerd. U dient de nieuwste pakketten (postgresql-${latest} " -"en postgresql-client-${latest}) te installeren en uw bestaande ${oldversion} " -"groepen (clusters) op te waarderen met pg_upgradecluster (zie de man-pagina)." +"De PostgreSQL versie ${old} is verouderd, maar het server- en/of " +"clientpakket zijn nog geïnstalleerd. U dient de nieuwste pakketten " +"(postgresql-${latest} en postgresql-client-${latest}) te installeren en uw " +"bestaande ${oldversion} clusters op te waarderen met pg_upgradecluster (zie " +"de man-pagina)." #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please be aware that the installation of postgresql-${latest} will " "automatically create a default cluster ${latest}/main. If you want to " @@ -47,26 +53,98 @@ "details)." msgstr "" "Let op: de installatie van postgresql-${latest} zal automatisch een " -"standaard groep ${latest}/main aanmaken. Indien u de ${old}/main groep wilt " -"opwaarderen dient u de reeds bestaande ${latest} groep te verwijderen met " -"\"pg_dropcluster --stop ${latest} main\". Zie de man-pagina voor details." +"standaardcluster ${latest}/main aanmaken. Indien u de cluster ${old}/main " +"wilt opwaarderen dient u de reeds bestaande cluster ${latest} te verwijderen " +"met \"pg_dropcluster --stop ${latest} main\". Zie de man-pagina voor details." #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The old server and client packages are no longer supported. After the " "existing clusters are upgraded, the postgresql-${old} and postgresql-client-" "${old} packages should be removed." msgstr "" "De oude server- en clientpakketten worden niet langer ondersteund. Nadat u " -"de bestaande groepen hebt opgewaardeerd, kunt u het beste de postgresql-" -"${old} en postgresql-client-${old} pakketten verwijderen." +"de bestaande clusters hebt opgewaardeerd, kunt u het beste de pakketten " +"postgresql-${old} en postgresql-client-${old} verwijderen." #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." +msgstr "Zie /usr/share/doc/postgresql-common/README.Debian.gz voor details." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "Enable SSL by default in new PostgreSQL clusters?" +msgstr "Standaard SSL activeren voor nieuwe PostgreSQL clusters?" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"PostgreSQL supports SSL-encrypted connections. This is usually a good thing. " +"However, if the database is solely accessed using TCP connections on " +"localhost, SSL can be turned off without introducing security issues." +msgstr "" +"PostgreSQL ondersteunt verbindingen met SSL-encryptie. Meestal is dit een " +"goede zaak. Maar als de database enkel op de lokale computer via een TCP-" +"verbinding benaderd wordt, kan men SSL uitzetten zonder verhoogd " +"veiligheidsrisico." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"UNIX domain socket connections (called \"local\" in pg_hba.conf) are not " +"affected by this setting. This setting concerns new PostgreSQL clusters " +"created during package install, or by using the pg_createcluster command. It " +"does not reconfigure existing clusters." +msgstr "" +"'UNIX domain socket' communicatieverbindingen (aangeduid met \"local\" in " +"pg_hba.conf) worden door deze instelling niet beïnvloed. Deze instelling " +"heeft betrekking op de nieuwe clusters van PostgreSQL die tijdens de " +"installatie van het pakket of via het commando pg_createcluster aangemaakt " +"worden. Bestaande clusters worden niet opnieuw geconfigureerd." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "If unsure, enable SSL." +msgstr "Activeer SSL in geval van twijfel." + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "PostgreSQL ${version} catalog version changed" +msgstr "PostgreSQL ${version}: de catalogusversie werd gewijzigd" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The PostgreSQL cluster ${version} ${cluster} was created using catalog " +"version ${db_catversion}, but the currently being installed package " +"postgresql-${version} is using catalog version ${new_catversion}. You will " +"not be able to use this cluster until it was upgraded to the new catalog " +"version." +msgstr "" +"De PostgreSQL cluster ${version} ${cluster} werd aangemaakt met de " +"catalogusversie ${db_catversion}, maar het pakket postgresql-${version} dat " +"nu geïnstalleerd wordt, gebruikt catalogusversie ${new_catversion}. U zult " +"deze cluster niet kunnen gebruiken totdat hij naar de nieuwe catalogusversie " +"opgewaardeerd werd." + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The necessary subset of binaries from the old version was saved in " +"${vartmpdir}. To upgrade the cluster, execute these commands:" msgstr "" -"Zie /usr/share/doc/postgresql-common/README.Debian.gz voor details." +"Van de oude versie werd een subset binaire bestanden die u daarvoor nog " +"nodig heeft, opgeslagen in ${vartmpdir}. Voer de volgende commando's uit om " +"de cluster op te waarderen:" diff -Nru postgresql-common-154/debian/po/pt_BR.po postgresql-common-190~ubuntu14.04.1/debian/po/pt_BR.po --- postgresql-common-154/debian/po/pt_BR.po 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/po/pt_BR.po 2018-01-12 14:08:46.000000000 +0000 @@ -5,26 +5,29 @@ # Eder L. Marques (frolic) , 2007, 2008. # msgid "" -msgstr "pt_BR utf-8\n" +msgstr "" "Project-Id-Version: postgresql-common 88+nmu1\n" -"Report-Msgid-Bugs-To: Source: postgresql-common@packages.debian.org\n" -"POT-Creation-Date: 2008-02-03 13:01+0100\n" +"Report-Msgid-Bugs-To: postgresql-common@packages.debian.org\n" +"POT-Creation-Date: 2016-03-05 11:47+0100\n" "PO-Revision-Date: 2008-07-17 11:44-0300\n" "Last-Translator: Eder L. Marques (frolic) \n" -"Language-Team: Brazilian Portuguese \n" +"Language-Team: Brazilian Portuguese \n" +"Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"pt_BR utf-8\n" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "Obsolete major version ${old}" msgstr "Versão principal ${old} obsoleta" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The PostgreSQL version ${old} is obsolete, but the server or client packages " "are still installed. Please install the latest packages (postgresql-" @@ -38,7 +41,7 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please be aware that the installation of postgresql-${latest} will " "automatically create a default cluster ${latest}/main. If you want to " @@ -54,7 +57,7 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The old server and client packages are no longer supported. After the " "existing clusters are upgraded, the postgresql-${old} and postgresql-client-" @@ -66,8 +69,65 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 -msgid "Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." +#: ../postgresql-common.templates:1001 +msgid "" +"Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." msgstr "" "Por favor, veja /usr/share/doc/postgresql-common/README.Debian.gz para " "detalhes." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "Enable SSL by default in new PostgreSQL clusters?" +msgstr "" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"PostgreSQL supports SSL-encrypted connections. This is usually a good thing. " +"However, if the database is solely accessed using TCP connections on " +"localhost, SSL can be turned off without introducing security issues." +msgstr "" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"UNIX domain socket connections (called \"local\" in pg_hba.conf) are not " +"affected by this setting. This setting concerns new PostgreSQL clusters " +"created during package install, or by using the pg_createcluster command. It " +"does not reconfigure existing clusters." +msgstr "" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "If unsure, enable SSL." +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "PostgreSQL ${version} catalog version changed" +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The PostgreSQL cluster ${version} ${cluster} was created using catalog " +"version ${db_catversion}, but the currently being installed package " +"postgresql-${version} is using catalog version ${new_catversion}. You will " +"not be able to use this cluster until it was upgraded to the new catalog " +"version." +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The necessary subset of binaries from the old version was saved in " +"${vartmpdir}. To upgrade the cluster, execute these commands:" +msgstr "" diff -Nru postgresql-common-154/debian/po/pt.po postgresql-common-190~ubuntu14.04.1/debian/po/pt.po --- postgresql-common-154/debian/po/pt.po 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/po/pt.po 2018-01-12 14:08:46.000000000 +0000 @@ -1,29 +1,31 @@ # Portuguese translation of postgresql-common debconf messages. # This file is distributed under the same license as the postgresql-common package. -# Ricardo Silva , 2006. +# Ricardo Silva , 2006,2017. # # msgid "" msgstr "" -"Project-Id-Version: postgresql-common 88\n" -"Report-Msgid-Bugs-To: Source: postgresql-common@packages.debian.org\n" -"POT-Creation-Date: 2008-02-03 13:01+0100\n" -"PO-Revision-Date: 2008-07-06 23:35+0100\n" +"Project-Id-Version: postgresql-common 184\n" +"Report-Msgid-Bugs-To: postgresql-common@packages.debian.org\n" +"POT-Creation-Date: 2016-03-05 11:47+0100\n" +"PO-Revision-Date: 2017-08-17 11:35-0000\n" "Last-Translator: Ricardo Silva \n" "Language-Team: Portuguese \n" +"Language: pt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.6.10\n" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "Obsolete major version ${old}" msgstr "Versão maior ${old} obsoleta" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The PostgreSQL version ${old} is obsolete, but the server or client packages " "are still installed. Please install the latest packages (postgresql-" @@ -33,12 +35,12 @@ "A versão ${old} do PostgreSQL está obsoleta, mas ainda tem os pacotes de " "cliente e/ou do servidor instalados. Por favor instale os últimos pacotes " "(postgresql-${latest} e postgresql-client-${latest}) e actualize os seus " -"'clusters' ${oldversion} existentes com o pg_upgradecluster (ver página do " +"clusters ${oldversion} existentes com o pg_upgradecluster (ver página do " "manual)." #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please be aware that the installation of postgresql-${latest} will " "automatically create a default cluster ${latest}/main. If you want to " @@ -47,28 +49,97 @@ "details)." msgstr "" "Por favor tenha consciência que a instalação de postgresql-${latest} irá " -"criar automaticamente o 'cluster' por omissão ${latest}/main. Se deseja " -"actualizar o cluster ${old}/main, precisa de remover o 'cluster' ${latest} " +"criar automaticamente o cluster por omissão ${latest}/main. Se deseja " +"actualizar o cluster ${old}/main, precisa de remover o cluster ${latest} " "existente (pg_dropcluster --stop ${latest} main, ver página do manual para " "detalhes)." #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The old server and client packages are no longer supported. After the " "existing clusters are upgraded, the postgresql-${old} and postgresql-client-" "${old} packages should be removed." msgstr "" "Os pacotes de cliente e servidor antigos já não são suportados. Após " -"actualizar os 'clusters' existentes, deve remover os pacotes postgresql-" -"${old} e postgresql-client-${old}." +"actualizar os clusters existentes, deve remover os pacotes postgresql-${old} " +"e postgresql-client-${old}." #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." msgstr "" -"Por favor consulte o ficheiro /usr/share/doc/postgresql-common/README.Debian.gz " -"para mais detalhes." +"Por favor consulte o ficheiro /usr/share/doc/postgresql-common/README.Debian." +"gz para mais detalhes." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "Enable SSL by default in new PostgreSQL clusters?" +msgstr "Activar SSL por omissão em novos clusters PostgreSQL?" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"PostgreSQL supports SSL-encrypted connections. This is usually a good thing. " +"However, if the database is solely accessed using TCP connections on " +"localhost, SSL can be turned off without introducing security issues." +msgstr "" +"O PostgreSQL suporta ligações cifradas com SSL. Usualmente é boa ideia ter " +"isto. No entanto, se a base de dados só é acedida por ligações TCP da " +"máquina local, é possível desligar SSL sem introduzir problemas de segurança." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"UNIX domain socket connections (called \"local\" in pg_hba.conf) are not " +"affected by this setting. This setting concerns new PostgreSQL clusters " +"created during package install, or by using the pg_createcluster command. It " +"does not reconfigure existing clusters." +msgstr "" +"Ligações por sockets UNIX (do tipo \"local\" no pg_hba.conf) não são " +"afectadas por esta configuração. Esta configuração diz respeito a novos " +"clusters de PostgreSQL criados durante a instalação de pacotes, ou usando o " +"comando pg_createcluster. Clusters existentes não serão reconfigurados." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "If unsure, enable SSL." +msgstr "Se não tiver a certeza, active o SSL." + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "PostgreSQL ${version} catalog version changed" +msgstr "A versão do catálogo mudou no PostgreSQL {version}" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The PostgreSQL cluster ${version} ${cluster} was created using catalog " +"version ${db_catversion}, but the currently being installed package " +"postgresql-${version} is using catalog version ${new_catversion}. You will " +"not be able to use this cluster until it was upgraded to the new catalog " +"version." +msgstr "" +"O cluster PostgreSQL ${version} ${cluster} foi criado usando o catálogo na " +"versão ${db_catversion}, mas o pacote que está a ser instalado postgresql-${version} " +"usa a versão de catálogo ${new_catversion}. Não será possível usar este " +"cluster até que seja actualizado para a nova versão de catálogo." + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The necessary subset of binaries from the old version was saved in " +"${vartmpdir}. To upgrade the cluster, execute these commands:" +msgstr "" +"O subconjunto de binários da versão antiga foi guardado em " +"${vartmpdir}. Para actualizar o cluster, execute os seguintes comandos:" diff -Nru postgresql-common-154/debian/po/ro.po postgresql-common-190~ubuntu14.04.1/debian/po/ro.po --- postgresql-common-154/debian/po/ro.po 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/po/ro.po 2018-01-12 14:08:46.000000000 +0000 @@ -6,57 +6,128 @@ msgid "" msgstr "" "Project-Id-Version: templates\n" -"Report-Msgid-Bugs-To: Source: postgresql-common@packages.debian.org\n" -"POT-Creation-Date: 2008-02-03 13:01+0100\n" +"Report-Msgid-Bugs-To: postgresql-common@packages.debian.org\n" +"POT-Creation-Date: 2016-03-05 11:47+0100\n" "PO-Revision-Date: 2008-07-21 10:32+0300\n" "Last-Translator: Igor Stirbu \n" "Language-Team: Romanian \n" +"Language: ro\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" -"Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < 20)) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < " +"20)) ? 1 : 2;\n" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "Obsolete major version ${old}" msgstr "Versiunea majoră învechită ${old}" +# cluster, manpage #. Type: error #. Description -#: ../postgresql-common.templates:2001 -# cluster, manpage +#: ../postgresql-common.templates:1001 msgid "" "The PostgreSQL version ${old} is obsolete, but the server or client packages " "are still installed. Please install the latest packages (postgresql-" "${latest} and postgresql-client-${latest}) and upgrade the existing " "${oldversion} clusters with pg_upgradecluster (see manpage)." -msgstr "Versiunea PostgreSQL ${old} este învechită, dar pachetele pentru server sau client sunt încă instalate. Instalați cele mai recente pachete (postgresql-${latest} și postgresql-client-${latest}) și actualizați clusterele ${oldversion} existente cu pg_upgradecluster (a se vedea pagina de manual)." +msgstr "" +"Versiunea PostgreSQL ${old} este învechită, dar pachetele pentru server sau " +"client sunt încă instalate. Instalați cele mai recente pachete (postgresql-" +"${latest} și postgresql-client-${latest}) și actualizați clusterele " +"${oldversion} existente cu pg_upgradecluster (a se vedea pagina de manual)." #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please be aware that the installation of postgresql-${latest} will " "automatically create a default cluster ${latest}/main. If you want to " "upgrade the ${old}/main cluster, you need to remove the already existing " "${latest} cluster (pg_dropcluster --stop ${latest} main, see manpage for " "details)." -msgstr "Se atrage atenția că instalarea postgresql-${latest} va crea în mod automat un cluster implicit ${latest}/main. Dacă doriți să actualizați clusterul ${old}/main, este necesar să eliminați clusterul ${latest} care deja există (pg_dropcluster --stop ${latest} main, a se vedea pagina de manual pentru detalii)." +msgstr "" +"Se atrage atenția că instalarea postgresql-${latest} va crea în mod automat " +"un cluster implicit ${latest}/main. Dacă doriți să actualizați clusterul " +"${old}/main, este necesar să eliminați clusterul ${latest} care deja există " +"(pg_dropcluster --stop ${latest} main, a se vedea pagina de manual pentru " +"detalii)." #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The old server and client packages are no longer supported. After the " "existing clusters are upgraded, the postgresql-${old} and postgresql-client-" "${old} packages should be removed." -msgstr "Pachetele vechi pentru server și client nu mai sunt întreținute. După actualizarea clusterelor existente pachetele postgresql-${old} și postgresql-client-${old} ar trebui dezinstalate." +msgstr "" +"Pachetele vechi pentru server și client nu mai sunt întreținute. După " +"actualizarea clusterelor existente pachetele postgresql-${old} și postgresql-" +"client-${old} ar trebui dezinstalate." #. Type: error #. Description +#: ../postgresql-common.templates:1001 +msgid "" +"Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." +msgstr "" +"A se vedea /usr/share/doc/postgresql-common/README.Debian.gz pentru detalii." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "Enable SSL by default in new PostgreSQL clusters?" +msgstr "" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"PostgreSQL supports SSL-encrypted connections. This is usually a good thing. " +"However, if the database is solely accessed using TCP connections on " +"localhost, SSL can be turned off without introducing security issues." +msgstr "" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"UNIX domain socket connections (called \"local\" in pg_hba.conf) are not " +"affected by this setting. This setting concerns new PostgreSQL clusters " +"created during package install, or by using the pg_createcluster command. It " +"does not reconfigure existing clusters." +msgstr "" + +#. Type: boolean +#. Description #: ../postgresql-common.templates:2001 -msgid "Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." -msgstr "A se vedea /usr/share/doc/postgresql-common/README.Debian.gz pentru detalii." +msgid "If unsure, enable SSL." +msgstr "" +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "PostgreSQL ${version} catalog version changed" +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The PostgreSQL cluster ${version} ${cluster} was created using catalog " +"version ${db_catversion}, but the currently being installed package " +"postgresql-${version} is using catalog version ${new_catversion}. You will " +"not be able to use this cluster until it was upgraded to the new catalog " +"version." +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The necessary subset of binaries from the old version was saved in " +"${vartmpdir}. To upgrade the cluster, execute these commands:" +msgstr "" diff -Nru postgresql-common-154/debian/po/ru.po postgresql-common-190~ubuntu14.04.1/debian/po/ru.po --- postgresql-common-154/debian/po/ru.po 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/po/ru.po 2018-01-12 14:08:46.000000000 +0000 @@ -1,34 +1,36 @@ # Translation of postgresql-common.po to Russian -# This file is distributed under the same license as the PACKAGE package. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER. +# This file is distributed under the same license as the postgresql-common +# package. +# # Yuriy Talakan' , 2006. # Yuriy Talakan' , 2007. -# Sergey Alyoshin , 2008. +# Sergey Alyoshin , 2008, 2016. # msgid "" msgstr "" -"Project-Id-Version: postgresql-common_88+nmu1_ru\n" -"Report-Msgid-Bugs-To: Source: postgresql-common@packages.debian.org\n" -"POT-Creation-Date: 2008-02-03 13:01+0100\n" -"PO-Revision-Date: 2008-07-19 13:58+0400\n" +"Project-Id-Version: postgresql-common_178_ru\n" +"Report-Msgid-Bugs-To: postgresql-common@packages.debian.org\n" +"POT-Creation-Date: 2016-03-05 11:47+0100\n" +"PO-Revision-Date: 2016-02-22 22:03+0300\n" "Last-Translator: Sergey Alyoshin \n" "Language-Team: Russian \n" +"Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.9.1\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" -"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "Obsolete major version ${old}" msgstr "Устаревшая версия ${old}" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The PostgreSQL version ${old} is obsolete, but the server or client packages " "are still installed. Please install the latest packages (postgresql-" @@ -38,11 +40,11 @@ "PostgreSQL версии ${old} устарел, но пакет сервера или клиента все ещё " "установлен. Пожалуйста, установите последние пакеты (postgresql-${latest} и " "postgresql-client-${latest}), и обновите ваши существующие кластеры " -"${oldversion} с помощью pg_upgradecluster (смотрите man-страницу)." +"${oldversion} с помощью pg_upgradecluster (см. man-страницу)." #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please be aware that the installation of postgresql-${latest} will " "automatically create a default cluster ${latest}/main. If you want to " @@ -50,27 +52,97 @@ "${latest} cluster (pg_dropcluster --stop ${latest} main, see manpage for " "details)." msgstr "" -"Предупреждаю, что установка postgresql-${latest} автоматически создаст " -"кластер по умолчанию ${latest}/main. Если вы желаете обновить кластер " -"${old}/main, то должны удалить существующий кластер ${latest} " -"(pg_dropcluster --stop ${latest} main, смотрите man-страницу)." +"Учтите, что установка postgresql-${latest} автоматически создаст кластер по " +"умолчанию ${latest}/main. Если вы желаете обновить кластер ${old}/main, то " +"должны удалить существующий кластер ${latest} с помощью pg_dropcluster --" +"stop ${latest} main (см. man-страницу)." #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The old server and client packages are no longer supported. After the " "existing clusters are upgraded, the postgresql-${old} and postgresql-client-" "${old} packages should be removed." msgstr "" -"Старые пакеты сервера и клиента более не поддерживаются. После того как " -"существующие кластеры будут обновлены, пакеты postgresql-${old} и postgresql-" -"client-${old} должны быть удалены." +"Старые пакеты сервера и клиента более не поддерживаются. После обновления " +"существующих кластеров, пакеты postgresql-${old} и postgresql-client-${old} " +"должны быть удалены." #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." msgstr "" -"Смотрите /usr/share/doc/postgresql-common/README.Debian.gz для дальнейшей информации." +"Для дальнейшей информации см. /usr/share/doc/postgresql-common/README.Debian." +"gz" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "Enable SSL by default in new PostgreSQL clusters?" +msgstr "Включить SSL по умолчанию в новых кластерах PostgreSQL?" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"PostgreSQL supports SSL-encrypted connections. This is usually a good thing. " +"However, if the database is solely accessed using TCP connections on " +"localhost, SSL can be turned off without introducing security issues." +msgstr "" +"PostgreSQL поддерживает соединения с SSL-шифрованием. Обычно это хорошо. Но, " +"если база данных адресуется только по TCP-соединению на локальном " +"компьютере, то SSL может быть выключен без повышения угроз безопасности." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"UNIX domain socket connections (called \"local\" in pg_hba.conf) are not " +"affected by this setting. This setting concerns new PostgreSQL clusters " +"created during package install, or by using the pg_createcluster command. It " +"does not reconfigure existing clusters." +msgstr "" +"Соединения сокета домена UNIX (называемые \"local\" в pg_hba.conf) не будут " +"затронуты этой настройкой. Она касается новых кластеров PostgreSQL, " +"созданных при установке пакета или командой pg_createcluster. Существующие " +"кластеры перенастроены не будут." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "If unsure, enable SSL." +msgstr "Если не уверены, включите SSL." + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "PostgreSQL ${version} catalog version changed" +msgstr "Изменена версия каталога PostgreSQL ${version}" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The PostgreSQL cluster ${version} ${cluster} was created using catalog " +"version ${db_catversion}, but the currently being installed package " +"postgresql-${version} is using catalog version ${new_catversion}. You will " +"not be able to use this cluster until it was upgraded to the new catalog " +"version." +msgstr "" +"Был создан кластер ${cluster} PostgreSQL ${version} с использованием " +"каталога версии ${db_catversion}, но устанавливаемый сейчас пакет postgresql-" +"${version} использует каталог версии ${new_catversion}. Вы не сможете " +"использовать данный кластер, пока не обновите его до каталога новой версии." + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The necessary subset of binaries from the old version was saved in " +"${vartmpdir}. To upgrade the cluster, execute these commands:" +msgstr "" +"Необходимый набор двоичных файлов из старой версии был сохранён в " +"${vartmpdir}. Для обновления кластера выполните следующие команды:" diff -Nru postgresql-common-154/debian/po/sv.po postgresql-common-190~ubuntu14.04.1/debian/po/sv.po --- postgresql-common-154/debian/po/sv.po 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/po/sv.po 2018-01-12 14:08:46.000000000 +0000 @@ -6,11 +6,12 @@ msgid "" msgstr "" "Project-Id-Version: postgresql-common\n" -"Report-Msgid-Bugs-To: Source: postgresql-common@packages.debian.org\n" -"POT-Creation-Date: 2008-02-03 13:01+0100\n" +"Report-Msgid-Bugs-To: postgresql-common@packages.debian.org\n" +"POT-Creation-Date: 2016-03-05 11:47+0100\n" "PO-Revision-Date: 2009-07-29 22:47+0100\n" "Last-Translator: Martin Bagge \n" "Language-Team: Swedish \n" +"Language: sv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -19,13 +20,13 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "Obsolete major version ${old}" msgstr "${old} är en utfasad version" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The PostgreSQL version ${old} is obsolete, but the server or client packages " "are still installed. Please install the latest packages (postgresql-" @@ -39,7 +40,7 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please be aware that the installation of postgresql-${latest} will " "automatically create a default cluster ${latest}/main. If you want to " @@ -54,7 +55,7 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The old server and client packages are no longer supported. After the " "existing clusters are upgraded, the postgresql-${old} and postgresql-client-" @@ -66,8 +67,64 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." msgstr "" "För mer information läs /usr/share/doc/postgresql-common/README.Debian.gz" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "Enable SSL by default in new PostgreSQL clusters?" +msgstr "" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"PostgreSQL supports SSL-encrypted connections. This is usually a good thing. " +"However, if the database is solely accessed using TCP connections on " +"localhost, SSL can be turned off without introducing security issues." +msgstr "" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"UNIX domain socket connections (called \"local\" in pg_hba.conf) are not " +"affected by this setting. This setting concerns new PostgreSQL clusters " +"created during package install, or by using the pg_createcluster command. It " +"does not reconfigure existing clusters." +msgstr "" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "If unsure, enable SSL." +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "PostgreSQL ${version} catalog version changed" +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The PostgreSQL cluster ${version} ${cluster} was created using catalog " +"version ${db_catversion}, but the currently being installed package " +"postgresql-${version} is using catalog version ${new_catversion}. You will " +"not be able to use this cluster until it was upgraded to the new catalog " +"version." +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The necessary subset of binaries from the old version was saved in " +"${vartmpdir}. To upgrade the cluster, execute these commands:" +msgstr "" diff -Nru postgresql-common-154/debian/po/templates.pot postgresql-common-190~ubuntu14.04.1/debian/po/templates.pot --- postgresql-common-154/debian/po/templates.pot 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/po/templates.pot 2018-01-12 14:08:46.000000000 +0000 @@ -1,30 +1,31 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. +# This file is distributed under the same license as the postgresql-common package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: Source: postgresql-common@packages.debian.org\n" -"POT-Creation-Date: 2008-02-03 13:01+0100\n" +"Project-Id-Version: postgresql-common\n" +"Report-Msgid-Bugs-To: postgresql-common@packages.debian.org\n" +"POT-Creation-Date: 2016-03-05 11:47+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "Obsolete major version ${old}" msgstr "" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The PostgreSQL version ${old} is obsolete, but the server or client packages " "are still installed. Please install the latest packages (postgresql-" @@ -34,7 +35,7 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please be aware that the installation of postgresql-${latest} will " "automatically create a default cluster ${latest}/main. If you want to " @@ -45,7 +46,7 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The old server and client packages are no longer supported. After the " "existing clusters are upgraded, the postgresql-${old} and postgresql-client-" @@ -54,7 +55,63 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." msgstr "" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "Enable SSL by default in new PostgreSQL clusters?" +msgstr "" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"PostgreSQL supports SSL-encrypted connections. This is usually a good thing. " +"However, if the database is solely accessed using TCP connections on " +"localhost, SSL can be turned off without introducing security issues." +msgstr "" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"UNIX domain socket connections (called \"local\" in pg_hba.conf) are not " +"affected by this setting. This setting concerns new PostgreSQL clusters " +"created during package install, or by using the pg_createcluster command. It " +"does not reconfigure existing clusters." +msgstr "" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "If unsure, enable SSL." +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "PostgreSQL ${version} catalog version changed" +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The PostgreSQL cluster ${version} ${cluster} was created using catalog " +"version ${db_catversion}, but the currently being installed package " +"postgresql-${version} is using catalog version ${new_catversion}. You will " +"not be able to use this cluster until it was upgraded to the new catalog " +"version." +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The necessary subset of binaries from the old version was saved in " +"${vartmpdir}. To upgrade the cluster, execute these commands:" +msgstr "" diff -Nru postgresql-common-154/debian/po/tr.po postgresql-common-190~ubuntu14.04.1/debian/po/tr.po --- postgresql-common-154/debian/po/tr.po 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/po/tr.po 2018-01-12 14:08:46.000000000 +0000 @@ -2,48 +2,141 @@ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # Mert Dirik , 2008. +# Atila KOÇ , 2015. # msgid "" msgstr "" "Project-Id-Version: postgresql-common\n" -"Report-Msgid-Bugs-To: Source: postgresql-common@packages.debian.org\n" -"POT-Creation-Date: 2008-02-03 13:01+0100\n" -"PO-Revision-Date: 2008-07-16 01:00+0200\n" -"Last-Translator: Mert Dirik \n" +"Report-Msgid-Bugs-To: postgresql-common@packages.debian.org\n" +"POT-Creation-Date: 2016-03-05 11:47+0100\n" +"PO-Revision-Date: 2015-09-08 10:08+0200\n" +"Last-Translator: Atila KOÇ \n" "Language-Team: Debian L10n Turkish \n" +"Language: tr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Poedit-Language: Turkish\n" +"X-Generator: Poedit 1.6.10\n" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "Obsolete major version ${old}" -msgstr "Eskimiş ana sürüm ${old}" +msgstr "${old} eskimiş ana sürümü" #. Type: error #. Description -#: ../postgresql-common.templates:2001 -msgid "The PostgreSQL version ${old} is obsolete, but the server or client packages are still installed. Please install the latest packages (postgresql-${latest} and postgresql-client-${latest}) and upgrade the existing ${oldversion} clusters with pg_upgradecluster (see manpage)." -msgstr "PostgreSQL'in ${old}. sürümü artık eskimiş ve kullanılmayan bir sürümdür, ama sisteminizde hâlâ bu sürümdeki istemci ya da sunucu paketleri kurulu. Lütfen en yeni paketleri (postgresql-${latest} ve postgresql-client-${latest}) kurun ve mevcut ${oldversion}. sürüm kümelerini pg_upgradecluster ile yükseltin (ayrıntılar için kılavuz sayfasına bakın)." +#: ../postgresql-common.templates:1001 +msgid "" +"The PostgreSQL version ${old} is obsolete, but the server or client packages " +"are still installed. Please install the latest packages (postgresql-" +"${latest} and postgresql-client-${latest}) and upgrade the existing " +"${oldversion} clusters with pg_upgradecluster (see manpage)." +msgstr "" +"PostgreSQL'in ${old} sürümü artık eskimiş olduğu halde sisteminizde hâlâ bu " +"sürümdeki istemci ya da sunucu paketleri kuruludur. Lütfen en yeni paketleri " +"(postgresql-${latest} ve postgresql-client-${latest}) kurun ve mevcut " +"${oldversion} sürüm kümelerini pg_upgradecluster komutunu kullanarak " +"yükseltin (ayrıntılar için kılavuz sayfasına bakın)." #. Type: error #. Description -#: ../postgresql-common.templates:2001 -msgid "Please be aware that the installation of postgresql-${latest} will automatically create a default cluster ${latest}/main. If you want to upgrade the ${old}/main cluster, you need to remove the already existing ${latest} cluster (pg_dropcluster --stop ${latest} main, see manpage for details)." -msgstr "postgresql-${latest} paketinin kurulumunun öntanımlı ${latest}/main kümesini oluşturacağını unutmayın. Eğer ${old}/main kümesini yükseltmek istiyorsanız mevcut ${latest}. sürüm kümesini kaldırmalısınız. Bu işi pg_dropcluster --stop ${latest} main komutuyla yapabilirsiniz, ayrıntılar için kılavuz sayfasına bakın." +#: ../postgresql-common.templates:1001 +msgid "" +"Please be aware that the installation of postgresql-${latest} will " +"automatically create a default cluster ${latest}/main. If you want to " +"upgrade the ${old}/main cluster, you need to remove the already existing " +"${latest} cluster (pg_dropcluster --stop ${latest} main, see manpage for " +"details)." +msgstr "" +"postgresql-${latest} kurulumunun öntanımlı ${latest}/main kümesini " +"oluşturacağını unutmayın. Eğer ${old}/main kümesini yükseltmek istiyorsanız " +"mevcut ${latest} sürüm kümesini kaldırmalısınız. Bu işi pg_dropcluster --" +"stop ${latest} main komutuyla yapabilirsiniz. Ayrıntılar için kılavuz " +"sayfasına bakın." #. Type: error #. Description -#: ../postgresql-common.templates:2001 -msgid "The old server and client packages are no longer supported. After the existing clusters are upgraded, the postgresql-${old} and postgresql-client-${old} packages should be removed." -msgstr "Eski sunucu ve istemci paketleri artık desteklenmiyor. Var olan kümeler yükseltildikten sonra postgresql-${old} ve postgresql-client-${old} paketlerinin kaldırılması tavsiye edilir." +#: ../postgresql-common.templates:1001 +msgid "" +"The old server and client packages are no longer supported. After the " +"existing clusters are upgraded, the postgresql-${old} and postgresql-client-" +"${old} packages should be removed." +msgstr "" +"Eski sunucu ve istemci paketleri artık desteklenmiyor. Var olan kümeler " +"yükseltildikten sonra postgresql-${old} ve postgresql-client-${old} " +"paketlerinin kaldırılması önerilir." #. Type: error #. Description +#: ../postgresql-common.templates:1001 +msgid "" +"Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." +msgstr "" +"Ayrıntılar için lütfen /usr/share/doc/postgresql-common/README.Debian.gz " +"belgesine bakın." + +#. Type: boolean +#. Description #: ../postgresql-common.templates:2001 -msgid "Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." -msgstr "Ayrıntılar için lütfen /usr/share/doc/postgresql-common/README.Debian.gz belgesine bakın." +msgid "Enable SSL by default in new PostgreSQL clusters?" +msgstr "Yeni PostgreSQL kümelerinde, SSL öntanımlı olarak etkinleştirilsin mi?" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"PostgreSQL supports SSL-encrypted connections. This is usually a good thing. " +"However, if the database is solely accessed using TCP connections on " +"localhost, SSL can be turned off without introducing security issues." +msgstr "" +"PostgreSQL SSL ile şifrelenmiş bağlantıları destekler. SSL kullanmak " +"genellikle iyidir. Bununla beraber, veritabanına yalnızca yerel makineden ve " +"TCP bağlantıları kullanılarak erişiliyorsa, SSL'in devre dışı bırakılması " +"güvenlik açığına neden olmaz." +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"UNIX domain socket connections (called \"local\" in pg_hba.conf) are not " +"affected by this setting. This setting concerns new PostgreSQL clusters " +"created during package install, or by using the pg_createcluster command. It " +"does not reconfigure existing clusters." +msgstr "" +"UNIX bazlı soket bağlantıları (ph_hba.conf dosyasında \"local\" tipi ile " +"listelenenler) bu ayardan etkilenmezler. Bu ayar paketin kurulumu sırasında " +"ya da pg_createcluster komutu kullanılarak oluşturulan yeni PostgreSQL " +"kümelerini ilgilendirir; varolan kümeleri etkilemez." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "If unsure, enable SSL." +msgstr "Emin değilseniz, SSL'i etkinleştirin." + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "PostgreSQL ${version} catalog version changed" +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The PostgreSQL cluster ${version} ${cluster} was created using catalog " +"version ${db_catversion}, but the currently being installed package " +"postgresql-${version} is using catalog version ${new_catversion}. You will " +"not be able to use this cluster until it was upgraded to the new catalog " +"version." +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The necessary subset of binaries from the old version was saved in " +"${vartmpdir}. To upgrade the cluster, execute these commands:" +msgstr "" diff -Nru postgresql-common-154/debian/po/vi.po postgresql-common-190~ubuntu14.04.1/debian/po/vi.po --- postgresql-common-154/debian/po/vi.po 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/po/vi.po 2018-01-12 14:08:46.000000000 +0000 @@ -5,11 +5,12 @@ msgid "" msgstr "" "Project-Id-Version: postgresql-common 88+nmu1\n" -"Report-Msgid-Bugs-To: Source: postgresql-common@packages.debian.org\n" -"POT-Creation-Date: 2008-02-03 13:01+0100\n" +"Report-Msgid-Bugs-To: postgresql-common@packages.debian.org\n" +"POT-Creation-Date: 2016-03-05 11:47+0100\n" "PO-Revision-Date: 2008-07-16 17:00+0930\n" "Last-Translator: Clytie Siddall \n" "Language-Team: Vietnamese \n" +"Language: vi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -18,13 +19,13 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "Obsolete major version ${old}" msgstr "Phiên bản chính cũ ${old}" #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The PostgreSQL version ${old} is obsolete, but the server or client packages " "are still installed. Please install the latest packages (postgresql-" @@ -39,7 +40,7 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please be aware that the installation of postgresql-${latest} will " "automatically create a default cluster ${latest}/main. If you want to " @@ -54,7 +55,7 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "The old server and client packages are no longer supported. After the " "existing clusters are upgraded, the postgresql-${old} and postgresql-client-" @@ -66,9 +67,65 @@ #. Type: error #. Description -#: ../postgresql-common.templates:2001 +#: ../postgresql-common.templates:1001 msgid "" "Please see /usr/share/doc/postgresql-common/README.Debian.gz for details." msgstr "" "Xem tài liệu Đọc Đi « /usr/share/doc/postgresql-common/README.Debian.gz » để " "tìm chi tiết." + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "Enable SSL by default in new PostgreSQL clusters?" +msgstr "" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"PostgreSQL supports SSL-encrypted connections. This is usually a good thing. " +"However, if the database is solely accessed using TCP connections on " +"localhost, SSL can be turned off without introducing security issues." +msgstr "" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "" +"UNIX domain socket connections (called \"local\" in pg_hba.conf) are not " +"affected by this setting. This setting concerns new PostgreSQL clusters " +"created during package install, or by using the pg_createcluster command. It " +"does not reconfigure existing clusters." +msgstr "" + +#. Type: boolean +#. Description +#: ../postgresql-common.templates:2001 +msgid "If unsure, enable SSL." +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "PostgreSQL ${version} catalog version changed" +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The PostgreSQL cluster ${version} ${cluster} was created using catalog " +"version ${db_catversion}, but the currently being installed package " +"postgresql-${version} is using catalog version ${new_catversion}. You will " +"not be able to use this cluster until it was upgraded to the new catalog " +"version." +msgstr "" + +#. Type: note +#. Description +#: ../postgresql-common.templates:3001 +msgid "" +"The necessary subset of binaries from the old version was saved in " +"${vartmpdir}. To upgrade the cluster, execute these commands:" +msgstr "" diff -Nru postgresql-common-154/debian/postgresql-client-common.install postgresql-common-190~ubuntu14.04.1/debian/postgresql-client-common.install --- postgresql-common-154/debian/postgresql-client-common.install 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/postgresql-client-common.install 2018-01-12 14:08:46.000000000 +0000 @@ -1,5 +1,6 @@ -user_clusters etc/postgresql-common -debian/supported-versions usr/share/postgresql-common +PgCommon.pm usr/share/perl5 debian/maintscripts-functions usr/share/postgresql-common -PgCommon.pm usr/share/postgresql-common +debian/supported-versions usr/share/postgresql-common pg_wrapper usr/share/postgresql-common +pgcommon.sh usr/share/postgresql-common +user_clusters etc/postgresql-common diff -Nru postgresql-common-154/debian/postgresql-client-common.links postgresql-common-190~ubuntu14.04.1/debian/postgresql-client-common.links --- postgresql-common-154/debian/postgresql-client-common.links 2013-09-29 10:19:21.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/postgresql-client-common.links 2018-01-12 14:08:46.000000000 +0000 @@ -1,3 +1,4 @@ +usr/share/man/man1/pg_wrapper.1.gz usr/share/man/man7/postgresql-common.7.gz usr/share/postgresql-common/pg_wrapper usr/bin/clusterdb usr/share/postgresql-common/pg_wrapper usr/bin/createdb usr/share/postgresql-common/pg_wrapper usr/bin/createlang @@ -5,15 +6,16 @@ usr/share/postgresql-common/pg_wrapper usr/bin/dropdb usr/share/postgresql-common/pg_wrapper usr/bin/droplang usr/share/postgresql-common/pg_wrapper usr/bin/dropuser +usr/share/postgresql-common/pg_wrapper usr/bin/pg_basebackup usr/share/postgresql-common/pg_wrapper usr/bin/pg_dump usr/share/postgresql-common/pg_wrapper usr/bin/pg_dumpall -usr/share/postgresql-common/pg_wrapper usr/bin/pg_basebackup usr/share/postgresql-common/pg_wrapper usr/bin/pg_isready -usr/share/postgresql-common/pg_wrapper usr/bin/pg_restore +usr/share/postgresql-common/pg_wrapper usr/bin/pg_receivewal usr/share/postgresql-common/pg_wrapper usr/bin/pg_receivexlog +usr/share/postgresql-common/pg_wrapper usr/bin/pg_recvlogical +usr/share/postgresql-common/pg_wrapper usr/bin/pg_restore +usr/share/postgresql-common/pg_wrapper usr/bin/pgbench usr/share/postgresql-common/pg_wrapper usr/bin/psql usr/share/postgresql-common/pg_wrapper usr/bin/reindexdb usr/share/postgresql-common/pg_wrapper usr/bin/vacuumdb usr/share/postgresql-common/pg_wrapper usr/bin/vacuumlo -usr/share/postgresql-common/pg_wrapper usr/bin/pgbench -/usr/share/man/man1/pg_wrapper.1.gz /usr/share/man/man7/postgresql-common.7.gz diff -Nru postgresql-common-154/debian/postgresql-client-common.lintian-overrides postgresql-common-190~ubuntu14.04.1/debian/postgresql-client-common.lintian-overrides --- postgresql-common-154/debian/postgresql-client-common.lintian-overrides 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/postgresql-client-common.lintian-overrides 2018-01-12 14:08:46.000000000 +0000 @@ -1 +1,21 @@ -postgresql-client-common: binary-without-manpage +# the manpages for those are in the PostgreSQL packages +postgresql-client-common: binary-without-manpage usr/bin/clusterdb +postgresql-client-common: binary-without-manpage usr/bin/createdb +postgresql-client-common: binary-without-manpage usr/bin/createlang +postgresql-client-common: binary-without-manpage usr/bin/createuser +postgresql-client-common: binary-without-manpage usr/bin/dropdb +postgresql-client-common: binary-without-manpage usr/bin/droplang +postgresql-client-common: binary-without-manpage usr/bin/dropuser +postgresql-client-common: binary-without-manpage usr/bin/pg_basebackup +postgresql-client-common: binary-without-manpage usr/bin/pg_dump +postgresql-client-common: binary-without-manpage usr/bin/pg_dumpall +postgresql-client-common: binary-without-manpage usr/bin/pg_isready +postgresql-client-common: binary-without-manpage usr/bin/pg_receivewal +postgresql-client-common: binary-without-manpage usr/bin/pg_receivexlog +postgresql-client-common: binary-without-manpage usr/bin/pg_recvlogical +postgresql-client-common: binary-without-manpage usr/bin/pg_restore +postgresql-client-common: binary-without-manpage usr/bin/pgbench +postgresql-client-common: binary-without-manpage usr/bin/psql +postgresql-client-common: binary-without-manpage usr/bin/reindexdb +postgresql-client-common: binary-without-manpage usr/bin/vacuumdb +postgresql-client-common: binary-without-manpage usr/bin/vacuumlo diff -Nru postgresql-common-154/debian/postgresql-client-common.manpages postgresql-common-190~ubuntu14.04.1/debian/postgresql-client-common.manpages --- postgresql-common-154/debian/postgresql-client-common.manpages 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/postgresql-client-common.manpages 2018-01-12 14:08:46.000000000 +0000 @@ -1,2 +1,2 @@ -pg_wrapper.1 *.5 +pg_wrapper.1 diff -Nru postgresql-common-154/debian/postgresql-common.config postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.config --- postgresql-common-154/debian/postgresql-common.config 2013-09-04 12:34:31.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.config 2018-01-12 14:08:46.000000000 +0000 @@ -33,8 +33,8 @@ if [ "$RET" != "true" ]; then for v in $AVAILABLE; do unset sup - for s in $SUPPORTED; do - if [ "$v" = "$s" ] || [[ "$v" > "$LATEST" ]]; then + for s in $SUPPORTED; do + if dpkg --compare-versions "$v" ge "$s"; then sup=1 break fi @@ -53,4 +53,8 @@ done fi +# createcluster.conf +db_input medium postgresql-common/ssl || true +db_go || true + db_stop diff -Nru postgresql-common-154/debian/postgresql-common.dirs postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.dirs --- postgresql-common-154/debian/postgresql-common.dirs 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.dirs 2018-01-12 14:08:46.000000000 +0000 @@ -1,3 +1,4 @@ -/var/log/postgresql -/var/lib/postgresql +/etc/postgresql /etc/postgresql-common/pg_upgradecluster.d +/var/lib/postgresql +/var/log/postgresql diff -Nru postgresql-common-154/debian/postgresql-common.docs postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.docs --- postgresql-common-154/debian/postgresql-common.docs 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.docs 2018-01-29 14:14:22.000000000 +0000 @@ -1,2 +1,4 @@ -architecture.html +README.md debian/README.Devel +doc/dependencies.png +systemd/README.systemd diff -Nru postgresql-common-154/debian/postgresql-common.install postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.install --- postgresql-common-154/debian/postgresql-common.install 2014-01-29 14:47:13.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.install 2018-01-12 14:08:46.000000000 +0000 @@ -1,18 +1,19 @@ +createcluster.conf usr/share/postgresql-common debian/01autoremove-postgresql etc/apt/apt.conf.d debian/init.d-functions usr/share/postgresql-common -debian/logrotate.template usr/share/postgresql-common -pg_lsclusters usr/bin +pg_checksystem usr/share/postgresql-common +pg_config usr/bin +pg_conftool usr/bin pg_createcluster usr/bin -pg_dropcluster usr/bin pg_ctlcluster usr/bin -pg_upgradecluster usr/bin +pg_dropcluster usr/bin +pg_lsclusters usr/bin +pg_renamecluster usr/bin pg_updatedicts usr/sbin -pg_config usr/bin +pg_upgradecluster usr/bin pg_virtualenv usr/bin -upgrade-scripts/* usr/share/postgresql-common/upgrade-scripts -run-upgrade-scripts usr/share/postgresql-common -pg_checksystem usr/share/postgresql-common pgdg usr/share/postgresql-common -testsuite usr/share/postgresql-common +run-upgrade-scripts usr/share/postgresql-common t/* usr/share/postgresql-common/t -createcluster.conf etc/postgresql-common +testsuite usr/share/postgresql-common +upgrade-scripts/* usr/share/postgresql-common/upgrade-scripts diff -Nru postgresql-common-154/debian/postgresql-common.links postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.links --- postgresql-common-154/debian/postgresql-common.links 1970-01-01 00:00:00.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.links 2018-01-12 14:08:46.000000000 +0000 @@ -0,0 +1 @@ +usr/share/postgresql-common/pg_wrapper usr/bin/pg_archivecleanup diff -Nru postgresql-common-154/debian/postgresql-common.lintian-overrides postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.lintian-overrides --- postgresql-common-154/debian/postgresql-common.lintian-overrides 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.lintian-overrides 2018-01-12 14:08:46.000000000 +0000 @@ -1 +1,5 @@ +# the manpages for those are in the PostgreSQL packages +postgresql-common: binary-without-manpage usr/bin/pg_archivecleanup postgresql-common: binary-without-manpage usr/bin/pg_config +# the init-functions are sourced via /usr/share/postgresql-common/init.d-functions +postgresql-common: init.d-script-does-not-source-init-functions etc/init.d/postgresql diff -Nru postgresql-common-154/debian/postgresql-common.logrotate postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.logrotate --- postgresql-common-154/debian/postgresql-common.logrotate 1970-01-01 00:00:00.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.logrotate 2018-01-12 14:08:46.000000000 +0000 @@ -0,0 +1,10 @@ +/var/log/postgresql/*.log { + weekly + rotate 10 + copytruncate + delaycompress + compress + notifempty + missingok + su root root +} diff -Nru postgresql-common-154/debian/postgresql-common.manpages postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.manpages --- postgresql-common-154/debian/postgresql-common.manpages 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.manpages 2018-01-12 14:08:46.000000000 +0000 @@ -1,3 +1,9 @@ +pg_conftool.1 +pg_createcluster.1 +pg_ctlcluster.1 +pg_dropcluster.1 pg_lsclusters.1 +pg_renamecluster.1 +pg_updatedicts.8 +pg_upgradecluster.1 pg_virtualenv.1 -*.8 diff -Nru postgresql-common-154/debian/postgresql-common.NEWS postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.NEWS --- postgresql-common-154/debian/postgresql-common.NEWS 1970-01-01 00:00:00.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.NEWS 2018-01-12 14:08:46.000000000 +0000 @@ -0,0 +1,47 @@ +postgresql-common (161) unstable; urgency=medium + + pg_ctlcluster is now enforcing stricter file ownership on the cluster config + when invoked as root, including operation via the init.d script or the + systemd unit: + + The postgresql.conf owner needs match the data directory owner, or the + postgresql.conf file needs to be owned by root. + + Default setups are not affected by this change. + + -- Christoph Berg Fri, 05 Sep 2014 15:48:13 +0200 + +postgresql-common (159) unstable; urgency=low + + PostgreSQL clusters managed by postgresql-common are now systemd enabled. For + each cluster, a service "postgresql@-" is created that can be + started/stopped/restarted/reloaded. A parent service "postgresql" acts on + all installed (start.conf has "auto") clusters in parallel like the init.d + script used to do. /etc/init.d/postgresql can still be used, though the mode + of starting individual versions ("/e/i/p start 9.3") no longer works. + + pg_ctlcluster can be used to control clusters, but for start and restart the + operation via systemd (using systemctl or the init.d script) is preferred, or + else the clusters will not run in cgroups. (Unfortunately this requires + root.) + + If the system is not running systemd, nothing changes. + + -- Christoph Berg Fri, 18 Jul 2014 23:52:09 +0300 + +postgresql-common (158) experimental; urgency=medium + + This postgresql-common release introduces several changes in the defaults + used for newly created database clusters, all configurable in + /etc/postgresql-common/createcluster.conf: + + * The default log_line_prefix is now '%t [%p-%l] %q%u@%d ' instead of '%t '. + * stats_temp_directory aka pg_stat_tmp is set to a subdirectory of + /var/run/postgresql by default. + * The use of SSL by default is (pre-)configurable via debconf and + createcluster.conf. + + If the logging_collector or syslog is being used, pg_lsclusters will show + the filename (or "syslog") instead of just "custom" in the Log file column. + + -- Christoph Berg Sat, 05 Jul 2014 16:40:16 +0200 diff -Nru postgresql-common-154/debian/postgresql-common.postgresql.init postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.postgresql.init --- postgresql-common-154/debian/postgresql-common.postgresql.init 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.postgresql.init 2018-01-12 14:08:46.000000000 +0000 @@ -28,6 +28,9 @@ case "$1" in start|stop|restart|reload) + if [ "$1" = "start" ]; then + create_socket_directory + fi if [ -z "`pg_lsclusters -h`" ]; then log_warning_msg 'No PostgreSQL clusters exist; see "man pg_createcluster"' exit 0 diff -Nru postgresql-common-154/debian/postgresql-common.postgresql.tmpfile postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.postgresql.tmpfile --- postgresql-common-154/debian/postgresql-common.postgresql.tmpfile 1970-01-01 00:00:00.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.postgresql.tmpfile 2018-01-12 14:08:46.000000000 +0000 @@ -0,0 +1,4 @@ +# Directory for PostgreSQL sockets, lockfiles and stats tempfiles +d /var/run/postgresql 2775 postgres postgres - - +# Log directory +d /var/log/postgresql 1775 root postgres - - diff -Nru postgresql-common-154/debian/postgresql-common.postinst postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.postinst --- postgresql-common-154/debian/postgresql-common.postinst 2014-01-10 13:35:10.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.postinst 2018-01-12 14:08:46.000000000 +0000 @@ -1,41 +1,45 @@ #!/bin/sh set -e -. /usr/share/debconf/confmodule +[ "$DPKG_MAINTSCRIPT_PACKAGE" ] && . /usr/share/debconf/confmodule SSL_ROOT=/etc/postgresql-common/root.crt -setup_logrotate () +setup_createclusterconf () { - LRVERSION=$(dpkg-query -f '${Version}' --show logrotate 2> /dev/null) || return - [ "$LRVERSION" ] || return 0 - LRTEMPLATE="/usr/share/postgresql-common/logrotate.template" - LRCONFIG="/etc/logrotate.d/postgresql-common" - if dpkg --compare-versions "$LRVERSION" ge 3.8; then - LRCONFSRC=$LRTEMPLATE - else - LRCONFSRC=`mktemp --tmpdir postgresql-common.XXXXXX` - trap "rm -f $LRCONFSRC" 0 2 3 15 - sed -e '/ su /d' $LRTEMPLATE > $LRCONFSRC - chmod 644 $LRCONFSRC - fi - ucf --debconf-ok $LRCONFSRC $LRCONFIG - ucfr postgresql-common $LRCONFIG + [ "$DPKG_MAINTSCRIPT_PACKAGE" ] || return 0 + db_get postgresql-common/ssl + case $RET in + true) SSL=on ;; + false) SSL=off ;; + *) return ;; + esac + + CCTEMPLATE="/usr/share/postgresql-common/createcluster.conf" + CCTMP=`mktemp --tmpdir postgresql-common.XXXXXX` + trap "rm -f $CCTMP" 0 2 3 15 + sed -e "s/^ssl =.*/ssl = $SSL/" $CCTEMPLATE > $CCTMP + chmod 644 $CCTMP + CCCONFIG="/etc/postgresql-common/createcluster.conf" + ucf --debconf-ok $CCTMP $CCCONFIG + ucfr postgresql-common $CCCONFIG + rm -f $CCTMP } if [ "$1" = configure ]; then + [ "$DPKG_MAINTSCRIPT_PACKAGE" ] && quiet="--quiet" # RedHat doesn't have this # Make sure the administrative user exists if ! getent passwd postgres > /dev/null; then - adduser --system --quiet --home /var/lib/postgresql --no-create-home \ + adduser --system $quiet --home /var/lib/postgresql --no-create-home \ --shell /bin/bash --group --gecos "PostgreSQL administrator" postgres fi # if the user was created manually, make sure the group is there as well if ! getent group postgres > /dev/null; then - addgroup --system --quiet postgres + addgroup --system $quiet postgres fi # make sure postgres is in the postgres group if ! id -Gn postgres | grep -qw postgres; then - adduser --quiet postgres postgres + adduser $quiet postgres postgres fi # check validity of postgres user and group @@ -85,37 +89,40 @@ # Add postgres user to the ssl-cert group on fresh installs if [ -z "$2" ]; then if getent group ssl-cert >/dev/null; then - adduser --quiet postgres ssl-cert + adduser $quiet postgres ssl-cert fi fi - # clean /usr/share/postgresql/*/tsearch_data/system_* stuff - if dpkg --compare-versions "$2" lt-nl 105; then - find /usr/share/postgresql/*/tsearch_data -type l \( -name 'system_*.dict' -o -name 'system_*.affix' \) -exec rm '{}' \; && pg_updatedicts || true - fi - if [ "$2" ]; then /usr/share/postgresql-common/run-upgrade-scripts "$2" || true fi /usr/share/postgresql-common/pg_checksystem || true - # Create logrotate config - setup_logrotate + # Create createcluster.conf from debconf + setup_createclusterconf - if dpkg --compare-versions "$2" lt 94; then - pg_updatedicts || true + # Forget about ucf logrotate config handling + if dpkg --compare-versions "$2" lt 183~; then + LRCONFIG="/etc/logrotate.d/postgresql-common" + ucf --purge $LRCONFIG + ucfr --purge postgresql-common $LRCONFIG + fi + + # Create tsearch dictionaries on first install + if [ -z "$2" ]; then + pg_updatedicts fi fi if [ "$1" = triggered ]; then - setup_logrotate pg_updatedicts || true db_stop exit 0 # skip daemon restart below fi -db_stop +[ "$DPKG_MAINTSCRIPT_PACKAGE" ] && db_stop #DEBHELPER# +exit 0 diff -Nru postgresql-common-154/debian/postgresql-common.postrm postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.postrm --- postgresql-common-154/debian/postgresql-common.postrm 2014-01-10 13:30:49.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.postrm 2018-01-12 14:08:46.000000000 +0000 @@ -17,14 +17,15 @@ rm -rf /var/cache/postgresql - LRCONFIG="/etc/logrotate.d/postgresql-common" + # unregister and remove files maintained by ucf + CCCONFIG="/etc/postgresql-common/createcluster.conf" if which ucf >/dev/null; then - ucf --purge $LRCONFIG + ucf --purge $CCCONFIG fi if which ucfr >/dev/null; then - ucfr --purge postgresql-common $LRCONFIG + ucfr --purge postgresql-common $CCCONFIG fi - rm -f $LRCONFIG $LRCONFIG.ucf-* + rm -f $CCCONFIG $CCCONFIG.ucf-* fi #DEBHELPER# diff -Nru postgresql-common-154/debian/postgresql-common.templates postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.templates --- postgresql-common-154/debian/postgresql-common.templates 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.templates 2018-01-12 14:08:46.000000000 +0000 @@ -1,12 +1,3 @@ -# These templates have been reviewed by the debian-l10n-english -# team -# -# If modifications/additions/rewording are needed, please ask -# debian-l10n-english@lists.debian.org for advice. -# -# Even minor modifications require translation updates and such -# changes should be coordinated with translators and reviewers. - Template: postgresql-common/obsolete-major Type: error _Description: Obsolete major version ${old} @@ -26,3 +17,38 @@ postgresql-client-${old} packages should be removed. . Please see /usr/share/doc/postgresql-common/README.Debian.gz for details. + +Template: postgresql-common/ssl +Type: boolean +Default: true +_Description: Enable SSL by default in new PostgreSQL clusters? + PostgreSQL supports SSL-encrypted connections. This is usually a good thing. + However, if the database is solely accessed using TCP connections on + localhost, SSL can be turned off without introducing security issues. + . + UNIX domain socket connections (called "local" in pg_hba.conf) are not + affected by this setting. This setting concerns new PostgreSQL clusters + created during package install, or by using the pg_createcluster command. It + does not reconfigure existing clusters. + . + If unsure, enable SSL. + +# The last paragraph of this note does not appear in PO files. +# It contains shell commands and should not be translated. +Template: postgresql-common/catversion-bump +Type: note +#flag:translate:1,2,3 +_Description: PostgreSQL ${version} catalog version changed + The PostgreSQL cluster ${version} ${cluster} was created using catalog + version ${db_catversion}, but the currently being installed package + postgresql-${version} is using catalog version ${new_catversion}. You will not + be able to use this cluster until it was upgraded to the new catalog version. + . + The necessary subset of binaries from the old version was saved in + ${vartmpdir}. To upgrade the cluster, execute these commands: + . + pg_renamecluster ${version} ${cluster} ${cluster}.old + pg_upgradecluster ${version} ${cluster}.old --rename ${cluster} \ + -m upgrade --old-bindir=${vartmpdir}/bin + pg_dropcluster ${version} ${cluster}.old + rm -rf ${vartmpdir} diff -Nru postgresql-common-154/debian/postgresql-common.triggers postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.triggers --- postgresql-common-154/debian/postgresql-common.triggers 2014-01-29 15:08:41.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/postgresql-common.triggers 2018-01-12 14:08:46.000000000 +0000 @@ -1,4 +1,5 @@ -interest /usr/share/myspell/dicts -interest /usr/share/hunspell -interest /usr/share/postgresql -interest /usr/sbin/logrotate +# trigger pg_updatedicts on installation of new myspell/hunspell dictionaries +interest-noawait /usr/share/myspell/dicts +interest-noawait /usr/share/hunspell +# also trigger on installation of new server versions so pg_updatedicts can update the symlinks +interest-noawait /usr/share/postgresql diff -Nru postgresql-common-154/debian/postgresql-server-dev-all.install postgresql-common-190~ubuntu14.04.1/debian/postgresql-server-dev-all.install --- postgresql-common-154/debian/postgresql-server-dev-all.install 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/postgresql-server-dev-all.install 2018-01-12 14:08:46.000000000 +0000 @@ -1,2 +1,4 @@ +pg_buildext /usr/bin pgxs_debian_control.mk /usr/share/postgresql-common/ -pg_buildext /usr/bin \ No newline at end of file +dh_make_pgxs/dh_make_pgxs /usr/bin +dh_make_pgxs/debian /usr/share/postgresql-common/dh_make_pgxs diff -Nru postgresql-common-154/debian/postgresql-server-dev-all.manpages postgresql-common-190~ubuntu14.04.1/debian/postgresql-server-dev-all.manpages --- postgresql-common-154/debian/postgresql-server-dev-all.manpages 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/postgresql-server-dev-all.manpages 2018-01-12 14:08:46.000000000 +0000 @@ -1 +1,2 @@ +dh_make_pgxs/dh_make_pgxs.1 pg_buildext.1 diff -Nru postgresql-common-154/debian/README.Debian postgresql-common-190~ubuntu14.04.1/debian/README.Debian --- postgresql-common-154/debian/README.Debian 2014-01-10 11:08:31.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/README.Debian 2018-01-12 14:08:46.000000000 +0000 @@ -1,13 +1,14 @@ PostgreSQL for Debian ===================== -PostgreSQL is the successor to Postgres95, which in turn succeeded POSTGRES. -PostgreSQL is a relational database with object-oriented extensions. It -implements the greater part of SQL-92 and is intended to implement it in full; -in addition it supports its own extended facilities. +PostgreSQL is a fully featured object-relational database management system. It +supports a large part of the SQL standard and is designed to be extensible by +users in many aspects. Its features include ACID transactions, foreign keys, +views, sequences, subqueries, triggers, outer joins, multiversion concurrency +control, and user-defined types and functions. -Since the on-disk data format of all major PostgreSQL versions (like 9.1, -9.3, etc.) is incompatible to each other, Debian's PostgreSQL packaging +Since the on-disk data format of all major PostgreSQL versions (like 9.6, +10, etc.) is incompatible to each other, Debian's PostgreSQL packaging architecture is designed to maintain clusters of different major versions in parallel. @@ -26,7 +27,7 @@ a database user and a database for the Unix user 'joe': 1. Install a database server with the major version of your choice - ('postgresql-X.Y', e. g. 'postgresql-9.1'). Preferrably the latest + ('postgresql-XY', e. g. 'postgresql-10'). Preferably the latest version, which you can get by installing the metapackage 'postgresql'. This will automatically create a default cluster 'main' with the database superuser 'postgres'. @@ -44,7 +45,7 @@ Unix login: $ createuser -DRS joe - + For details about the options, see createuser(1). 4. Create a database "joework" which is owned by "joe": @@ -59,7 +60,6 @@ $ psql joework - Cluster management ------------------ For managing clusters, the following commands are provided (each with its own @@ -72,13 +72,14 @@ restart). pg_lsclusters - Show a list of all existing clusters and their status. pg_upgradecluster - Migrate a cluster from one major version to another one. + pg_renamecluster - Rename a cluster. Please note that you can of course also use the upstream tools for creating clusters, such as initdb(1). However, please note that in this case you cannot expect *any* of above pg_* tools to work, since they use different configuration settings (SSL, data directories, etc.) and file locations (e. g. -/etc/postgresql/9.1/main/postgresql.conf). If in doubt, then do *not* +/etc/postgresql/10/main/postgresql.conf). If in doubt, then do *not* use initdb, but only pg_createcluster. Since merely installing postgresql-X.Y will already set up a default cluster which is ready to work, most people do not need to bother about initdb or @@ -91,9 +92,9 @@ created (by any major version) will run on the default port 5432, and each new cluster will use the next higher free one. -E. g. if you first install "postgresql-9.1" on a clean system, the -default 9.1/main cluster will run on port 5432. If you then create -another 9.1 cluster, or install the "postgresql-9.3" package, that new +E. g. if you first install "postgresql-10" on a clean system, the +default 10/main cluster will run on port 5432. If you then create +another 10 cluster, or install the "postgresql-11" package, that new one will run on 5433. Please use "pg_lsclusters" for displaying the cluster <-> port @@ -109,18 +110,18 @@ Due to this default cluster, an immediate attempt to upgrade an earlier 'main' cluster to a new version will fail and you need to remove the newer default cluster first. E. g., if you have -postgresql-9.1 installed and want to upgrade to 9.3, you first install -postgresql-9.3: +postgresql-9.6 installed and want to upgrade to 10, you first install +postgresql-10: - apt-get install postgresql-9.3 + apt-get install postgresql-10 -Then drop the default 9.3 cluster: +Then drop the default 10 cluster that was just created: - pg_dropcluster 9.3 main --stop + pg_dropcluster 10 main --stop -And then upgrade the 9.1 cluster to the latest installed version (e. g. 9.3): +And then upgrade the 9.6 cluster to the latest installed version (e. g. 10): - pg_upgradecluster 9.1 main + pg_upgradecluster 9.6 main SSL --- @@ -129,17 +130,12 @@ untrusted network between a database server and a client and these exchange security sensitive data like passwords or confidential database contents. -postgresql-common makes use of the 'snakeoil' SSL certificate that is -generated by the ssl-cert package, so that SSL works out of the box. -When a cluster is created with pg_createcluster, SSL support will -automatically be enabled in that cluster, and symlinks "server.key" -and "server.crt" are created in the data directory which point to the -snakeoil certificate in /etc/ssl; therefore all clusters use the same -certificate by default. Of course you can replace these symlinks by -cluster-specific certificates. +When a cluster is created with pg_createcluster, SSL support will automatically +be enabled. postgresql-common makes use of the 'snakeoil' SSL certificate that +is generated by the ssl-cert package, so that SSL works out of the box +(ssl_cert_file, ssl_key_file). In addition, if /etc/postgresql-common/root.crt +exists, it will be used as CA certificate file (ssl_ca_file). -In addition, if /etc/postgresql-common/root.crt exists, a symbolic -link "root.crt" will be created in the data directory. /etc/postgresql-common/root.crt is a dummy file by default, so that client-side authentication is not performed. To enable it, you should add some root certificates to it. A reasonable choice is to just @@ -147,7 +143,7 @@ case, client certificates need to be signed by the snakeoil certificate, which might be desirable in many cases. See - /usr/share/doc/postgresql-doc-9.1/html/ssl-tcp.html + /usr/share/doc/postgresql-doc-10/html/ssl-tcp.html for details (in package postgresql-doc). diff -Nru postgresql-common-154/debian/rules postgresql-common-190~ubuntu14.04.1/debian/rules --- postgresql-common-154/debian/rules 2014-01-10 11:53:29.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/rules 2019-03-14 09:41:22.000000000 +0000 @@ -1,38 +1,36 @@ #!/usr/bin/make -f -POD2MAN=pod2man --center "Debian PostgreSQL infrastructure" -r "Debian" -POD1PROGS=pg_wrapper pg_lsclusters -POD1PROGS_POD=pg_buildext pg_virtualenv -POD8PROGS=pg_ctlcluster pg_createcluster pg_dropcluster pg_upgradecluster pg_updatedicts - VERSION := $(shell dpkg-parsechangelog | awk '/^Version:/ { print $$2 }') ifneq ($(findstring bpo,$(VERSION)),) FLAVOR := debian-backports else ifneq ($(findstring pgdg,$(VERSION)),) FLAVOR := pgdg + # for apt.postgresql.org builds, pull in the repository key package + PGDG_DEPENDS := pgdg-keyring else FLAVOR := default endif SUPPORTED_VERSIONS := $(shell PG_SUPPORTED_VERSIONS="$(FLAVOR)" debian/supported-versions) DEFAULT_VER := $(lastword $(SUPPORTED_VERSIONS)) +LIBREADLINE := $(shell dpkg-query -W --showformat '$${Status} $${Package}\n' 'libreadline[0-9]'| sed -n '/ installed / {s/^.* //; p}'|sort -ru | head -n1) + +# use dh_systemd_* only on recent dists that have dh-systemd (>= 1.19) +ifneq ($(wildcard /usr/bin/dh_systemd_start),) +WITH_SYSTEMD=--with systemd +endif %: - dh "$@" + dh $@ $(WITH_SYSTEMD) -version_info: +override_dh_auto_configure: @echo "### Building postgresql-common flavor $(FLAVOR)" @echo "### Supported PostgreSQL versions: $(SUPPORTED_VERSIONS) (default version: $(DEFAULT_VER))" -build build-arch build-indep: version_info override_dh_install: dh_install + $(MAKE) -C systemd install DESTDIR=$(CURDIR)/debian/postgresql-common install -m 644 -D debian/postgresql-common.sysctl debian/postgresql-common/etc/sysctl.d/30-postgresql-shm.conf - for p in $(POD1PROGS); do $(POD2MAN) --quotes=none --section 1 $$p > $$p.1 || exit 1; done - for p in $(POD1PROGS_POD); do $(POD2MAN) --quotes=none --section 1 $$p.pod > $$p.1 || exit 1; done - for p in $(POD8PROGS); do $(POD2MAN) --quotes=none --section 8 $$p > $$p.8 || exit 1; done -ifneq ($(FLAVOR),default) /bin/echo -e "# See /usr/share/postgresql-common/supported-versions for documentation of this file\n$(FLAVOR)" > debian/postgresql-client-common/etc/postgresql-common/supported_versions -endif override_dh_installinit: dh_installinit --name=postgresql -u'defaults 19 21' -r @@ -42,17 +40,10 @@ # the versionless metapackages need to have version numbers which match # the server version, not the p-common version - dh_gencontrol -ppostgresql -ppostgresql-client -ppostgresql-doc -ppostgresql-contrib -- \ - -Vdefault-version="$(DEFAULT_VER)" -v'$(DEFAULT_VER)+$${source:Version}' + dh_gencontrol -ppostgresql -ppostgresql-client -ppostgresql-doc -ppostgresql-contrib -ppostgresql-all -- \ + -Vdefault-version="$(DEFAULT_VER)" -v'$(DEFAULT_VER)+$${source:Version}' \ + -Vpostgresql-all-depends="$(foreach v,$(SUPPORTED_VERSIONS),postgresql-contrib-$v,postgresql-plperl-$v,postgresql-plpython-$v,postgresql-plpython3-$v,postgresql-pltcl-$v,)" -ifeq ($(FLAVOR),pgdg) - # for apt.postgresql.org builds, pull in the repository key package - dh_gencontrol -ppostgresql-client-common -- -Vpgdg:Depends="pgdg-keyring" -endif + dh_gencontrol -ppostgresql-client-common -- -Vpgdg:Depends="$(PGDG_DEPENDS)" -Vreadline:Recommends=$(LIBREADLINE) dh_gencontrol --remaining-packages - -override_dh_clean: - dh_clean - for p in $(POD1PROGS) $(POD1PROGS_POD); do rm -f $$p.1 || exit 1; done - for p in $(POD8PROGS); do rm -f $$p.8 || exit 1; done diff -Nru postgresql-common-154/debian/source/lintian-overrides postgresql-common-190~ubuntu14.04.1/debian/source/lintian-overrides --- postgresql-common-154/debian/source/lintian-overrides 1970-01-01 00:00:00.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/source/lintian-overrides 2018-02-08 12:26:44.000000000 +0000 @@ -0,0 +1,3 @@ +# don't bug people uploading from @work +source: changelog-should-mention-nmu +source: source-nmu-has-incorrect-version-number diff -Nru postgresql-common-154/debian/supported-versions postgresql-common-190~ubuntu14.04.1/debian/supported-versions --- postgresql-common-154/debian/supported-versions 2013-10-21 21:13:52.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/supported-versions 2019-03-14 09:55:45.000000000 +0000 @@ -18,9 +18,11 @@ # The *last* version returned here will be considered the default version, the # remaining lines list other supported versions in an undefined order. # -# The environment variable PG_SUPPORTED_VERSIONS, and the files -# ~/.pg_supported_versions and /etc/postgresql-common/supported_versions (in -# that order) can be used to override the defaults. (Tokens separated by +# * PG_SUPPORTED_VERSIONS +# * DEB_PG_SUPPORTED_VERSIONS +# * ~/.pg_supported_versions +# * /etc/postgresql-common/supported_versions +# (in that order) can be used to override the defaults. (Tokens separated by # newlines.) # # Recognized tokens: @@ -31,33 +33,25 @@ # ubuntu [release]: use Ubuntu defaults # pgdg [release]: use defaults for apt.postgresql.org # installed: consider all installed versions supported (determined by -# postgresql-server-dev-X.Y packages) -# X.Y: consider this version supported +# postgresql-server-dev-X packages) +# X: consider this version supported # -# (C) 2005-2013 Martin Pitt -# (C) 2012-2013 Christoph Berg +# (C) 2005-2016 Martin Pitt +# (C) 2012-2017 Christoph Berg set -eu -DEFAULT="9.3" +# at build time, use our pgcommon.sh, not the system one (this assumes +# debian/supported-versions is one directory deeper than ./pgcommon.sh) +if [ -e "${0%/supported-versions}/../pgcommon.sh" ]; then + . "${0%/supported-versions}/../pgcommon.sh" +else + . /usr/share/postgresql-common/pgcommon.sh +fi -# functions +DEFAULT="10" -get_release() { - # If we have /etc/os-release, use it - if [ -r /etc/os-release ]; then - . /etc/os-release - DISTRO="${ID:-unknown}" # "unknown" will throw an error in default() - RELEASE="${VERSION_ID:-unstable}" # this field is not necessarily always there, assume testing/unstable - # fall back to lsb_release - elif type lsb_release >/dev/null 2>/dev/null; then - DISTRO="`lsb_release -is`" - RELEASE="`lsb_release -rs`" - else - echo "supported_versions: WARNING: /etc/os-release and lsb_release not present, unknown distribution" >&2 - /bin/echo -e "$DEFAULT" - fi -} +# functions default() { case "$DISTRO" in @@ -68,101 +62,82 @@ debian "$RELEASE" ;; *) - echo "supported_versions: WARNING! Unknown distribution: $DISTRO" >&2 - echo "Please submit this as a bug report to your distribution." >&2 - /bin/echo -e "$DEFAULT" + echo "supported-versions: WARNING! Unknown distribution: $DISTRO" >&2 + if echo $ID_LIKE | egrep '(^| )ubuntu($| )' > /dev/null; then + echo "ubuntu found in ID_LIKE, treating as Ubuntu" >&2 + ubuntu "$RELEASE" + elif echo $ID_LIKE | egrep '(^| )debian($| )' > /dev/null; then + echo "debian found in ID_LIKE, treating as Debian" >&2 + debian "$RELEASE" + else + echo "Please submit this as a bug report to your distribution." >&2 + /bin/echo -e "$DEFAULT" + fi ;; esac } ubuntu() { case "$1" in - 8.04 | 8.10 | 9.04) - /bin/echo -e "8.3\n8.4" - ;; - 9.10|10.04|10.10|11.04) - /bin/echo -e "8.4" - ;; - 11.10|12.04|12.10|13.04|13.10) - /bin/echo -e "9.1" - ;; - 14.04) - /bin/echo -e "9.3" - ;; + 12.04) /bin/echo -e "9.1" ;; + 14.04) /bin/echo -e "9.3\n10" ;; + 16.04|16.10) /bin/echo -e "9.5" ;; + 17.04|17.10) /bin/echo -e "9.6" ;; + 18.04) /bin/echo -e "10" ;; *) - echo "supported_versions: WARNING: Unknown Ubuntu release: $1" >&2 - /bin/echo -e "$DEFAULT" - ;; + echo "supported-versions: WARNING: Unknown Ubuntu release: $1" >&2 + /bin/echo -e "$DEFAULT" ;; esac } debian() { case "$1" in - 5.0*) # Lenny - /bin/echo -e "8.3" - ;; - 6.0*) # Squeeze - /bin/echo -e "8.4" - ;; - 7|7.*) # Wheezy - /bin/echo -e "9.1" - ;; - 8|8.*) # Jessie - /bin/echo -e "9.3" - ;; + 5.0*) /bin/echo -e "8.3" ;; # Lenny + 6.0*) /bin/echo -e "8.4" ;; # Squeeze + 7|7.*) /bin/echo -e "9.1" ;; # Wheezy + 8|8.*) /bin/echo -e "9.4" ;; # Jessie + 9|9.*) /bin/echo -e "9.6" ;; # Stretch + 10|10.*) /bin/echo -e "10" ;; # Buster testing | unstable) - /bin/echo -e "9.3" - ;; + /bin/echo -e "$DEFAULT" ;; *) - echo "supported_versions: WARNING: Unknown Debian release: $1" >&2 - /bin/echo -e "$DEFAULT" - ;; + echo "supported-versions: WARNING: Unknown Debian release: $1" >&2 + /bin/echo -e "$DEFAULT" ;; esac } debian_backports() { case "$1" in - 5.0*) # Lenny - /bin/echo -e "8.3" - ;; - 6.0*) # Squeeze - /bin/echo -e "8.4\n9.1" - ;; - 7|7.*) # Wheezy - /bin/echo -e "9.1" - ;; + 5.0*) /bin/echo -e "8.3" ;; # Lenny + 6.0*) /bin/echo -e "8.4\n9.1" ;; # Squeeze + 7|7.*) /bin/echo -e "9.1\n9.4" ;; # Wheezy + 8|8.*) /bin/echo -e "9.4\n9.6" ;; # Jessie + 9|9.*) /bin/echo -e "9.6" ;; # Stretch + 10|10.*) /bin/echo -e "10" ;; # Buster testing | unstable) - /bin/echo -e "9.3" - ;; + /bin/echo -e "$DEFAULT" ;; *) - echo "supported_versions: WARNING: Unknown Debian release: $1" >&2 - /bin/echo -e "$DEFAULT" - ;; + echo "supported-versions: WARNING: Unknown Debian release: $1" >&2 + /bin/echo -e "$DEFAULT" ;; esac } pgdg() { - case "$1" in - testing | unstable) - # including beta versions - /bin/echo -e "8.4\n9.0\n9.1\n9.2\n9.3" - ;; - *) - # usually no beta versions here - /bin/echo -e "8.4\n9.0\n9.1\n9.2\n9.3" - ;; - esac + /bin/echo -e "9.3\n9.4\n9.5\n9.6\n10" } installed() { - dpkg -l 'postgresql-server-dev-[1-9].*' | \ - sed -ne 's/^ii *postgresql-server-dev-\([^ ]*\).*/\1/p' + dpkg -l 'postgresql-server-dev-[1-9]*' | \ + sed -ne 's/^ii *postgresql-server-dev-\([^ ]*\).*/\1/p' | \ + sort -V } # main if [ "${PG_SUPPORTED_VERSIONS:-}" ] ; then - SUPPORTED_VERSIONS="$PG_SUPPORTED_VERSIONS" + SUPPORTED_VERSIONS=$(echo "$PG_SUPPORTED_VERSIONS" | xargs -n1) +elif [ "${DEB_PG_SUPPORTED_VERSIONS:-}" ] ; then + SUPPORTED_VERSIONS=$(echo "$DEB_PG_SUPPORTED_VERSIONS" | xargs -n1) elif [ -f ${HOME:-}/.pg_supported_versions ] ; then SUPPORTED_VERSIONS="$(cat ${HOME:-}/.pg_supported_versions)" elif [ -f ${PGSYSCONFDIR:-/etc/postgresql-common}/supported_versions ] ; then diff -Nru postgresql-common-154/debian/tests/control postgresql-common-190~ubuntu14.04.1/debian/tests/control --- postgresql-common-154/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/tests/control 2018-01-12 14:08:46.000000000 +0000 @@ -0,0 +1,3 @@ +Tests: default-psql +Depends: postgresql +Restrictions: needs-root diff -Nru postgresql-common-154/debian/tests/default-psql postgresql-common-190~ubuntu14.04.1/debian/tests/default-psql --- postgresql-common-154/debian/tests/default-psql 1970-01-01 00:00:00.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/debian/tests/default-psql 2018-01-12 14:08:46.000000000 +0000 @@ -0,0 +1,19 @@ +#!/bin/sh +# autopkgtest to check that installing the "postgresql" metapackage results in +# a working cluster +set -e + +# disabled default cluster creation? +if grep -q '\bcreate_main_cluster\b.*\bfalse\b' /etc/postgresql-common/createcluster.conf; then + echo "SKIP: default cluster creation disabled in createcluster.conf" + exit 0 +fi + +if ! pg_lsclusters | grep -q 'main .* online'; then + echo "No running cluster!" >&2 + pg_lsclusters >&2 +fi + +# check that we can connect to template1 on the default cluster +OUT=$(su - -c 'psql -Atc "select 21*2" template1' postgres) +[ "$OUT" = "42" ] || { echo "$OUT"; exit 1; } diff -Nru postgresql-common-154/dh_make_pgxs/debian/compat postgresql-common-190~ubuntu14.04.1/dh_make_pgxs/debian/compat --- postgresql-common-154/dh_make_pgxs/debian/compat 1970-01-01 00:00:00.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/dh_make_pgxs/debian/compat 2018-01-12 14:08:46.000000000 +0000 @@ -0,0 +1 @@ +@COMPAT@ diff -Nru postgresql-common-154/dh_make_pgxs/debian/control.in postgresql-common-190~ubuntu14.04.1/dh_make_pgxs/debian/control.in --- postgresql-common-154/dh_make_pgxs/debian/control.in 1970-01-01 00:00:00.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/dh_make_pgxs/debian/control.in 2018-01-12 14:08:46.000000000 +0000 @@ -0,0 +1,15 @@ +Source: @SOURCE@ +Section: database +Priority: optional +Maintainer: Debian PostgreSQL Maintainers +Uploaders: @MAINTAINER_NAME@ <@DEBEMAIL@> +Build-Depends: debhelper (>= @COMPAT@), postgresql-server-dev-all (>= 153~) +Standards-Version: @STANDARDS_VERSION@ +Vcs-Browser: https://anonscm.debian.org/cgit/pkg-postgresql/@SOURCE@.git/ +Vcs-Git: https://anonscm.debian.org/git/pkg-postgresql/@SOURCE@.git + +Package: postgresql-PGVERSION-@EXTNAME@ +Architecture: any +Depends: postgresql-PGVERSION, ${misc:Depends}, ${shlibs:Depends} +Description: FIXME PostgreSQL extension @SOURCE@ + FIXME long description here diff -Nru postgresql-common-154/dh_make_pgxs/debian/copyright postgresql-common-190~ubuntu14.04.1/dh_make_pgxs/debian/copyright --- postgresql-common-154/dh_make_pgxs/debian/copyright 1970-01-01 00:00:00.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/dh_make_pgxs/debian/copyright 2018-01-12 14:08:46.000000000 +0000 @@ -0,0 +1,24 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: @NAME@ +#Source: @URL@ + +Files: * +Copyright: Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group + Portions Copyright (c) 1994, The Regents of the University of California +License: PostgreSQL + Permission to use, copy, modify, and distribute this software and its + documentation for any purpose, without fee, and without a written agreement + is hereby granted, provided that the above copyright notice and this + paragraph and the following two paragraphs appear in all copies. + . + IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR + DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING + LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS + DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + . + THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO + PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. diff -Nru postgresql-common-154/dh_make_pgxs/debian/pgversions postgresql-common-190~ubuntu14.04.1/dh_make_pgxs/debian/pgversions --- postgresql-common-154/dh_make_pgxs/debian/pgversions 1970-01-01 00:00:00.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/dh_make_pgxs/debian/pgversions 2018-01-12 14:08:46.000000000 +0000 @@ -0,0 +1 @@ +all diff -Nru postgresql-common-154/dh_make_pgxs/debian/rules postgresql-common-190~ubuntu14.04.1/dh_make_pgxs/debian/rules --- postgresql-common-154/dh_make_pgxs/debian/rules 1970-01-01 00:00:00.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/dh_make_pgxs/debian/rules 2018-01-12 14:08:46.000000000 +0000 @@ -0,0 +1,21 @@ +#!/usr/bin/make -f + +include /usr/share/postgresql-common/pgxs_debian_control.mk + +override_dh_auto_build: + +pg_buildext build build-%v + +override_dh_auto_test: + # nothing to do here, see debian/tests/* instead + +override_dh_auto_install: + +pg_buildext install build-%v postgresql-%v-@EXTNAME@ + +override_dh_installdocs: + dh_installdocs --all README.* + +override_dh_auto_clean: + +pg_buildext clean build-%v + +%: + dh $@ diff -Nru postgresql-common-154/dh_make_pgxs/debian/source/format postgresql-common-190~ubuntu14.04.1/dh_make_pgxs/debian/source/format --- postgresql-common-154/dh_make_pgxs/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/dh_make_pgxs/debian/source/format 2018-01-12 14:08:46.000000000 +0000 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru postgresql-common-154/dh_make_pgxs/debian/tests/control postgresql-common-190~ubuntu14.04.1/dh_make_pgxs/debian/tests/control --- postgresql-common-154/dh_make_pgxs/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/dh_make_pgxs/debian/tests/control 2018-01-12 14:08:46.000000000 +0000 @@ -0,0 +1,3 @@ +Depends: @, postgresql-server-dev-all +Tests: installcheck +Restrictions: allow-stderr diff -Nru postgresql-common-154/dh_make_pgxs/debian/tests/installcheck postgresql-common-190~ubuntu14.04.1/dh_make_pgxs/debian/tests/installcheck --- postgresql-common-154/dh_make_pgxs/debian/tests/installcheck 1970-01-01 00:00:00.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/dh_make_pgxs/debian/tests/installcheck 2018-01-12 14:08:46.000000000 +0000 @@ -0,0 +1,2 @@ +#!/bin/sh +pg_buildext installcheck diff -Nru postgresql-common-154/dh_make_pgxs/dh_make_pgxs postgresql-common-190~ubuntu14.04.1/dh_make_pgxs/dh_make_pgxs --- postgresql-common-154/dh_make_pgxs/dh_make_pgxs 1970-01-01 00:00:00.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/dh_make_pgxs/dh_make_pgxs 2018-01-12 14:08:46.000000000 +0000 @@ -0,0 +1,112 @@ +#!/bin/bash + +# (C) 2015-2017 Christoph Berg +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +set -eu + +# basic variables + +template_dir="/usr/share/postgresql-common/dh_make_pgxs/debian" +DIRECTORY="$(basename $PWD)" +NAME="${DIRECTORY%-*}" # Upstream name +VERSION="${DIRECTORY##*-}" + +# options + +while getopts "fn:v:" opt ; do + case $opt in + f) FORCE=yes ;; + n) NAME="$OPTARG" ;; + v) VERSION="$OPTARG" ;; + *) exit 5 ;; + esac +done +shift $((OPTIND - 1)) # shift away args + +# more variables + +SOURCE="${NAME//_/-}" # Debian name +EXTNAME="$(echo $SOURCE | sed -e 's/^\(postgresql\|pgsql\|pg\)-//')" # binary package name suffix +COMPAT="$(apt-cache show debhelper | sed -n 's/Version: \([0-9]*\)\..*/\1/p' | head -n1)" +STANDARDS_VERSION="$(apt-cache show debian-policy | sed -n 's/Version: \(.*\)\..*/\1/p' | head -n1)" +USERNAME=${LOGNAME:-${USER:-root}} +MAINTAINER_NAME=$(getent passwd $USERNAME | cut -d : -f 5 | sed -e 's/,.*//') +: ${DEBEMAIL:=$USERNAME@localhost} + +echo "Upstream: $NAME ($VERSION)" +echo "Debian: $SOURCE ($VERSION-1)" +echo "Binaries: postgresql-PGVERSION-$EXTNAME ($VERSION-1)" +echo "Uploader: $MAINTAINER_NAME <$DEBEMAIL>" +echo +if [ -t 0 ]; then + echo -n "Press Enter to continue, ^C to abort " + read +fi + +# install files + +install_dir () +{ + local directory="debian/$1" + #[ -z "$directory" ] && return + [ -d "$directory" ] && return + echo "Creating $directory/" + mkdir "$directory" +} + +install_template () +{ + local template="$1" + + if [ "${FORCE:-}" ] || ! [ -e debian/$template ]; then + echo "Installing debian/$template" + sed -e "s/@COMPAT@/$COMPAT/g" \ + -e "s/@EXTNAME@/$EXTNAME/g" \ + -e "s/@NAME@/$NAME/g" \ + -e "s/@STANDARDS_VERSION@/$STANDARDS_VERSION/g" \ + -e "s/@SOURCE@/$SOURCE/g" \ + -e "s/@MAINTAINER_NAME@/$MAINTAINER_NAME/g" \ + -e "s/@DEBEMAIL@/$DEBEMAIL/g" \ + "$template_dir/$template" > "debian/$template" + if [ -x $template_dir/$template ]; then + chmod +x "debian/$template" + fi + else + echo "Keeping existing debian/$template" + fi +} + +mkdir -p debian + +for template in $(find $template_dir -mindepth 1 | sort); do + case $template in + *.swp|*~) continue ;; # skip vim stuff + esac + basename=${template##$template_dir/} + if [ -d $template ]; then + install_dir "$basename" + else + install_template "$basename" + fi +done + +echo "Updating debian/control from debian/control.in" +pg_buildext updatecontrol + +if [ "${FORCE:-}" ] || ! [ -e debian/changelog ]; then + rm -f debian/changelog + echo "Creating debian/changelog" + dch --create --package "$SOURCE" --newversion "$VERSION-1" +else + echo "Keeping existing debian/changelog" +fi diff -Nru postgresql-common-154/dh_make_pgxs/dh_make_pgxs.pod postgresql-common-190~ubuntu14.04.1/dh_make_pgxs/dh_make_pgxs.pod --- postgresql-common-154/dh_make_pgxs/dh_make_pgxs.pod 1970-01-01 00:00:00.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/dh_make_pgxs/dh_make_pgxs.pod 2018-01-12 14:08:46.000000000 +0000 @@ -0,0 +1,39 @@ +=head1 NAME + +dh_make_pgxs - Create a new Debian source package for a PGXS PostgreSQL extension + +=head1 SYNOPSIS + +B [B<-f>] [B<-n> I] [B<-v> I] + +=head1 DESCRIPTION + +B creates a F directory tree for PostgreSQL extension +packages using the PGXS build system. The B tool is used for the +build process. + +=head1 OPTIONS + +=over 4 + +=item B<-f> + +Overwrite existing files. + +=item B<-n> I + +Package name to use. Default is to extract it from the current directory's name. + +=item B<-v> I + +Package version to use. Default is to extract it from the current directory's name. + +=back + +=head1 SEE ALSO + +dh_make(1), pg_buildext(1). + +=head1 AUTHOR + +Christoph Berg Lmyon@debian.orgE> Binary files /tmp/tmpF1P4to/sEDPr38x6e/postgresql-common-154/doc/dependencies.dia and /tmp/tmpF1P4to/L0lWVy5zv_/postgresql-common-190~ubuntu14.04.1/doc/dependencies.dia differ Binary files /tmp/tmpF1P4to/sEDPr38x6e/postgresql-common-154/doc/dependencies.png and /tmp/tmpF1P4to/L0lWVy5zv_/postgresql-common-190~ubuntu14.04.1/doc/dependencies.png differ diff -Nru postgresql-common-154/.gitlab-ci.yml postgresql-common-190~ubuntu14.04.1/.gitlab-ci.yml --- postgresql-common-154/.gitlab-ci.yml 1970-01-01 00:00:00.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/.gitlab-ci.yml 2018-01-31 12:29:59.000000000 +0000 @@ -0,0 +1,39 @@ +unstable: + image: debian:unstable + script: + - apt-get update + - apt-get install -y build-essential fakeroot + - apt-get build-dep -y . + - dpkg-buildpackage -uc -us -rfakeroot + - ( set -x; for deb in ../*.deb; do dpkg-deb --info $deb; dpkg-deb --contents $deb; done ) + - ( set -x; dpkg --force-confmiss --force-confnew -i ../*.deb || { apt-get install -fy; dpkg --force-confmiss --force-confnew -i ../*.deb; } ) + - ./cleanpg + - dpkg -l postgresql\* | cat + - pg_lsclusters + - SKIP_IPV6=1 ./testsuite -v "$(debian/supported-versions)" -i -M + +jessie: + tags: + - jessie + script: + - sudo apt-get update + - sudo apt-get install -y build-essential fakeroot debhelper libreadline-dev lsb-release dh-systemd + - dpkg-buildpackage -uc -us -rfakeroot + - ( set -x; for deb in ../*.deb; do dpkg-deb --info $deb; dpkg-deb --contents $deb; done ) + - ( set -x; sudo dpkg --force-confmiss --force-confnew -i ../*.deb || { sudo apt-get install -fy; sudo dpkg --force-confmiss --force-confnew -i ../*.deb; } ) + - dpkg -l postgresql\* | cat + - pg_lsclusters + - sudo ./testsuite -v "$(debian/supported-versions)" -i + +centos7: + tags: + - centos7 + script: + - sudo yum install -y rpm-build + - rm -rf $HOME/rpmbuild + - make rpmremove + - make rpmbuild + - rpm -ql pgdg-centos10 > /dev/null || sudo yum install -y https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm + - make rpminstall + - pg_lsclusters + - sudo ./testsuite -v "$(debian/supported-versions)" -i diff -Nru postgresql-common-154/Makefile postgresql-common-190~ubuntu14.04.1/Makefile --- postgresql-common-154/Makefile 1970-01-01 00:00:00.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/Makefile 2018-01-31 12:29:59.000000000 +0000 @@ -0,0 +1,51 @@ +POD2MAN=pod2man --center "Debian PostgreSQL infrastructure" -r "Debian" +POD1PROGS = pg_conftool.1 \ + pg_createcluster.1 \ + pg_ctlcluster.1 \ + pg_dropcluster.1 \ + pg_lsclusters.1 \ + pg_renamecluster.1 \ + pg_upgradecluster.1 \ + pg_wrapper.1 +POD1PROGS_POD = pg_buildext.1 \ + pg_virtualenv.1 \ + dh_make_pgxs/dh_make_pgxs.1 +POD8PROGS = pg_updatedicts.8 + +all: man + +man: $(POD1PROGS) $(POD1PROGS_POD) $(POD8PROGS) + +%.1: %.pod + $(POD2MAN) --quotes=none --section 1 $< $@ + +%.1: % + $(POD2MAN) --quotes=none --section 1 $< $@ + +%.8: % + $(POD2MAN) --quotes=none --section 8 $< $@ + +clean: + rm -f *.1 *.8 dh_make_pgxs/*.1 + +# rpm + +DPKG_VERSION=$(shell sed -ne '1s/.*(//; 1s/).*//p' debian/changelog) +RPMDIR=$(HOME)/rpmbuild +TARBALL=$(RPMDIR)/SOURCES/postgresql-common_$(DPKG_VERSION).tar.xz + +rpmbuild: $(TARBALL) + rpmbuild --define='version $(DPKG_VERSION)' -ba rpm/postgresql-common.spec + +$(TARBALL): + mkdir -p $(dir $(TARBALL)) + git archive --prefix=postgresql-common-$(DPKG_VERSION)/ HEAD | xz > $(TARBALL) + +rpminstall: + sudo rpm --upgrade --replacefiles --replacepkgs -v $(RPMDIR)/RPMS/noarch/*-$(DPKG_VERSION)-*.rpm + +rpmremove: + -sudo rpm -e postgresql-common postgresql-client-common postgresql-server-dev-all + +rpmclean: + rm -rf $(TARBALL) $(RPMDIR)/BUILD diff -Nru postgresql-common-154/pg_buildext postgresql-common-190~ubuntu14.04.1/pg_buildext --- postgresql-common-154/pg_buildext 2014-02-19 18:22:08.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/pg_buildext 2018-01-12 14:08:46.000000000 +0000 @@ -4,7 +4,7 @@ # versions # # (C) 2010 Dimitri Fontaine -# (C) 2011-2014 Christoph Berg +# (C) 2011-2017 Christoph Berg # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,25 +16,37 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -set -e +set -eu +die() { + echo "$(basename $0): error: $*" >&2 + exit 1 +} + +VENVARGS="" +while getopts "c:i:o:s" opt ; do + case $opt in + c|i|o) VENVARGS="$VENVARGS -$opt $OPTARG" ;; + s) VENVARGS="$VENVARGS -$opt" ;; + *) exit 1 ;; + esac +done +# shift away args +shift $(($OPTIND - 1)) + +[ "${1:-}" ] || die "no action given" action="$1" -if [ -d "$2" ] && [ "$3" ]; then # compat mode: $2 is source directory - srcdir="$2" +if [ -d "${2:-}" ] && [ "${3:-}" ]; then # optional: $2 is source directory + srcdir="${2:-}" shift else srcdir="$PWD" fi -target="$2" -opt="$3" - -die() { - echo "`basename $0`: error: $*" >&2 - exit 1 -} +target="${2:-}" +opt="${3:-}" prepare_env() { - version=$1 + local version=$1 vtarget=`echo $target | sed -e "s:%v:$version:g"` pgc="/usr/lib/postgresql/$version/bin/pg_config" [ -e "$pgc" ] || die "$pgc does not exist" @@ -42,31 +54,33 @@ configure() { prepare_env $1 - confopts=`echo $opt | sed -e "s:%v:$version:g"` + confopts=`echo $opt | sed -e "s:%v:$1:g"` mkdir -p $vtarget ( echo "calling configure in $vtarget" && - cd $vtarget && $srcdir/configure $confopts DESTDIR="$srcdir/debian/$package" PG_CONFIG="$pgc" VPATH="$srcdir" ) + cd $vtarget && $srcdir/configure $confopts PG_CONFIG="$pgc" VPATH="$srcdir" ) } build() { prepare_env $1 - cflags="`$pgc --cflags` `echo $opt | sed -e "s:%v:$version:g"`" + if [ "$opt" ]; then + cflags="$(echo $opt | sed -e "s:%v:$1:g")" + fi mkdir -p $vtarget # if a Makefile was created by configure, use it, else the top level Makefile [ -f $vtarget/Makefile ] || makefile="-f $srcdir/Makefile" - make -C $vtarget $makefile CFLAGS="$cflags" DESTDIR="$srcdir/debian/$package" PG_CONFIG="$pgc" VPATH="$srcdir" srcdir="$srcdir" USE_PGXS=1 + make -C $vtarget ${makefile:-} ${cflags:+CFLAGS="$cflags"} PG_CONFIG="$pgc" VPATH="$srcdir" srcdir="$srcdir" USE_PGXS=1 } install() { prepare_env $1 - package=`echo $opt | sed -e "s:%v:$version:g"` + package=`echo $opt | sed -e "s:%v:$1:g"` mkdir -p $vtarget # if a Makefile was created by configure, use it, else the top level Makefile [ -f $vtarget/Makefile ] || makefile="-f $srcdir/Makefile" - make -C $vtarget $makefile install DESTDIR="$srcdir/debian/$package" PG_CONFIG="$pgc" VPATH="$srcdir" srcdir="$srcdir" USE_PGXS=1 + make -C $vtarget ${makefile:-} install DESTDIR="$PWD/debian/$package" PG_CONFIG="$pgc" VPATH="$srcdir" srcdir="$srcdir" USE_PGXS=1 } clean() { @@ -74,32 +88,37 @@ # if a Makefile was created by configure, use it, else the top level Makefile [ -f $vtarget/Makefile ] || makefile="-f $srcdir/Makefile" - [ -d $vtarget ] && make -C $vtarget clean $makefile DESTDIR="$srcdir/debian/$package" PG_CONFIG="$pgc" VPATH="$srcdir" srcdir="$srcdir" USE_PGXS=1 + [ -d $vtarget ] && make -C $vtarget clean ${makefile:-} PG_CONFIG="$pgc" VPATH="$srcdir" srcdir="$srcdir" USE_PGXS=1 rm -rf $vtarget } loop() { echo "### $1 ###" prepare_env $1 - package=$(echo $target | sed -e "s:%v:$version:g") + package=$(echo $target | sed -e "s:%v:$1:g") echo "# $1: make clean" - make clean DESTDIR="$PWD/debian/$package" PG_CONFIG="$pgc" USE_PGXS=1 + make -C "$srcdir" clean PG_CONFIG="$pgc" USE_PGXS=1 echo "# $1: make" - make CFLAGS="$cflags" DESTDIR="$PWD/debian/$package" PG_CONFIG="$pgc" USE_PGXS=1 + make -C "$srcdir" PG_CONFIG="$pgc" USE_PGXS=1 echo "# $1: make install" - make install DESTDIR="$PWD/debian/$package" PG_CONFIG="$pgc" USE_PGXS=1 + make -C "$srcdir" install DESTDIR="$PWD/debian/$package" PG_CONFIG="$pgc" USE_PGXS=1 echo "### done $1 ###" } installcheck() { prepare_env $1 + # ask pg_virtualenv to create a non-system cluster + if [ "${NONROOT-unset}" = "unset" ]; then + export NONROOT=1 + fi + if [ "$target" ]; then # if target is given, use it, else stay in the top source dir # if a Makefile was created by configure, use it, else the top level Makefile [ -f $vtarget/Makefile ] || makefile="-f $srcdir/Makefile" - if ! pg_virtualenv -v $1 \ - make -C $vtarget $makefile installcheck \ + if ! pg_virtualenv $VENVARGS -v $1 \ + make -C $vtarget ${makefile:-} installcheck \ PG_CONFIG="$pgc" VPATH="$srcdir" srcdir="$srcdir" USE_PGXS=1; then if [ -r $vtarget/regression.diffs ]; then echo "**** $vtarget/regression.diffs ****" @@ -108,7 +127,7 @@ exit 1 fi else - if ! pg_virtualenv -v $1 \ + if ! pg_virtualenv $VENVARGS -v $1 \ make installcheck PG_CONFIG="$pgc" srcdir="$srcdir" USE_PGXS=1; then if [ -r regression.diffs ]; then echo "**** regression.diffs ****" @@ -124,12 +143,13 @@ die "/usr/share/postgresql-common/supported-versions not found" [ -e debian/pgversions ] || die "debian/pgversions not found" supported_versions=$(/usr/share/postgresql-common/supported-versions) + local version while read version; do case $version in all) echo "$supported_versions" ;; [1-9]*+) for sup_version in $supported_versions; do - if expr $(echo "$version" | tr -d +) '<=' $sup_version > /dev/null; then echo "$sup_version"; fi + if dpkg --compare-versions "${version%+}" le "$sup_version"; then echo "$sup_version"; fi done ;; [1-9]*) for sup_version in $supported_versions; do @@ -142,6 +162,42 @@ done < debian/pgversions } +gencontrol() { + tmpcontrol=$(mktemp debian/control.XXXXXX) + if [ -f debian/tests/control.in ]; then + tmptestscontrol=$(mktemp debian/tests/control.XXXXXX) + fi + trap "rm -f $tmpcontrol ${tmptestscontrol:-}" 0 2 3 15 + + grep-dctrl -vP PGVERSION debian/control.in > $tmpcontrol + for v in $(versions); do + grep-dctrl -P PGVERSION debian/control.in | sed -e "s:PGVERSION:$v:g" >> $tmpcontrol + done + + if [ -f debian/tests/control.in ]; then + cp debian/tests/control.in $tmptestscontrol + # find words (package names) containing PGVERSION + REGEXP='[[:alnum:]-]*PGVERSION[[:alnum:]-]*' + for pkgpattern in $(egrep -wo "$REGEXP" debian/tests/control.in); do + repl="" + # build an array of replacements separated by , + for v in $(versions); do + repl="${repl:+$repl, }$(echo $pkgpattern | sed -e "s/PGVERSION/$v/g")" + done + # put array into control file + sed -i -e "s/$pkgpattern/$repl/g" $tmptestscontrol + done + fi +} + +updatecontrol() { + cat $tmpcontrol > debian/control + + if [ -f debian/tests/control.in ]; then + cat $tmptestscontrol > debian/tests/control + fi +} + # when a version is included in the action, just act on this one (this is # useful if some extra work needs to be done per version, so the loop over # supported-versions needs to be in the script calling pg_buildext) @@ -154,13 +210,38 @@ $a $v exit ;; + + checkcontrol) + gencontrol + need_update= + if ! diff -u debian/control $tmpcontrol; then + if [ "${PG_UPDATECONTROL:-no}" != "no" ] || head -1 debian/changelog | egrep -q -- '-backports|-pgdg|-pgapt'; then + echo "Notice: Updating debian/control from debian/control.in." + need_update=1 + else + echo "Error: debian/control needs updating from debian/control.in. Run 'pg_buildext updatecontrol'." + echo "If you are seeing this message in a buildd log, a sourceful upload is required." + exit 1 + fi + fi + if [ -f debian/tests/control.in ] && ! diff -u debian/tests/control $tmptestscontrol; then + echo "Notice: Updating debian/tests/control from debian/tests/control.in." + need_update=1 + fi + [ "$need_update" ] && updatecontrol + exit 0 + ;; + + updatecontrol) + gencontrol + updatecontrol + exit + ;; esac # loop over versions -VERSIONS=`versions` - -for v in $VERSIONS +for v in $(versions) do case "$action" in "supported-versions") @@ -168,7 +249,7 @@ ;; configure|build|install|clean|loop) - [ "$target" ] || die "syntax: pg_buildext $action [...]" + [ "$target" ] || die "syntax: pg_buildext $action [] []" echo "### $action $v ###" $action $v ;; @@ -179,7 +260,7 @@ ;; *) - die "unsupported $action" + die "unsupported action '$action'" ;; esac done diff -Nru postgresql-common-154/pg_buildext.pod postgresql-common-190~ubuntu14.04.1/pg_buildext.pod --- postgresql-common-154/pg_buildext.pod 2014-02-19 18:22:08.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/pg_buildext.pod 2018-01-12 14:08:46.000000000 +0000 @@ -4,7 +4,7 @@ =head1 SYNOPSIS -B I [I] +B [I] I [I] [I] =head1 DESCRIPTION @@ -24,11 +24,11 @@ the package is built for B. As the set of binary packages depends on the target PostgreSQL versions, -C is auto-generated. Include +C is generated from a template in C when +B is run. Occurrences of B in package +sections are replaced by the target PostgreSQL version. Include C in C to -regenerate the control file from C at "clean" time. -Occurrences of B in package sections are replaced by the target -PostgreSQL version. +run a check at build time if updating debian/control is required. As B invokes B for the B, B, and B actions, invocations from C (which is a makefile) should be prefixed @@ -38,6 +38,23 @@ this needs the package to be installed, it cannot be run at build time. Instead, the tests should be run using B from C. +If C exists, occurrences of package names containing +B are replaced by lists of package names with the target PostgreSQL +versions filled in. (If no replacing is needed in C, it +is fine to provide the tests control file directly.) + +=head1 OPTIONS + +=over 4 + +=item B<-cio> I + +=item B<-s> + +Passed to B when running B. + +=back + =head1 ACTIONS Most actions expect a directory name where to build the sources. It will get @@ -52,27 +69,40 @@ Print effective list of supported versions, i.e. the intersection of the sets of versions supported by the system and the package. -=item B I [I] +=item B + +Check if C needs updating from C. This is +invoked from C. When +building for a B or B suite as determined by +C, this action also updates the control file. Otherwise, +B needs to be run manually. + +=item B + +Update C from C, and C +from C if the latter exists. + +=item B [I] I [I] For every supported version, call B<../configure> from the I directory. (Most PostgreSQL extensions do not have a configure script.) -=item B I [I] +=item B [I] I [I] Build the extension in the I directory. -=item B I I +=item B [I] I I Invoke B from the I directory. The third parameter specifies the package name to use. Most packages use B. Make will be called with DESTDIR="$(CURDIR)/debian/I". -=item B I +=item B [I] I Clean the build directory. -=item B I +=item B [I] I As a variant to calling B and B separately for VPATH builds, loop over the supported PostgreSQL versions in the top source directory. This @@ -80,7 +110,7 @@ B, it should be placed were installation happens in debian/rules, rather than where build would normally be called. -=item B [I] +=item B [I] [I] Use B to run the extension regression tests. This is meant to be run from C using B. If @@ -142,6 +172,8 @@ =item B + #!/usr/bin/make -f + include /usr/share/postgresql-common/pgxs_debian_control.mk # omit this if the package does not use autoconf @@ -172,6 +204,12 @@ Tests: installcheck Restrictions: allow-stderr +=item B (optional) + + Depends: @, postgresql-contrib-PGVERSION, postgresql-PGVERSION-bar + Tests: installcheck + Restrictions: allow-stderr + =item B #!/bin/sh @@ -188,10 +226,15 @@ =back -=head1 COMPATIBILITY +=head1 SOURCE DIRECTORY -Earlier B versions required a "source dir" argument after the -action. This is now deprecated, but still accepted (and ignored). +If the package source code is not in the top level directory (i.e. the directory +which has C as subdirectory), use the I argument. Example: + + override_dh_auto_build: + +pg_buildext build $(CURDIR)/postgresql-module build-%v + +=head1 COMPATIBILITY B was introduced in postgresql-server-dev-all (>= 141~). @@ -201,6 +244,11 @@ B was introduced in postgresql-server-dev-all (>= 153~). +B was introduced in postgresql-common (>= 170~). + +Handling of C with B replacement was +introduced in postgresql-common (>= 171~). + =head1 SEE ALSO C, autopkgtest(1), diff -Nru postgresql-common-154/pg_checksystem postgresql-common-190~ubuntu14.04.1/pg_checksystem --- postgresql-common-154/pg_checksystem 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/pg_checksystem 2018-01-12 14:08:46.000000000 +0000 @@ -16,7 +16,6 @@ use strict; -use lib '/usr/share/postgresql-common'; use PgCommon; # Check write cache setting for given drive. diff -Nru postgresql-common-154/PgCommon.pm postgresql-common-190~ubuntu14.04.1/PgCommon.pm --- postgresql-common-154/PgCommon.pm 2013-07-18 07:10:54.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/PgCommon.pm 2018-02-02 08:51:46.000000000 +0000 @@ -1,7 +1,7 @@ # Common functions for the postgresql-common framework # # (C) 2008-2009 Martin Pitt -# (C) 2012-2013 Christoph Berg +# (C) 2012-2017 Christoph Berg # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -27,11 +27,12 @@ get_cluster_start_conf set_cluster_start_conf set_cluster_pg_ctl_conf get_program_path cluster_info get_versions get_newest_version version_exists get_version_clusters next_free_port cluster_exists install_file - change_ugid config_bool get_db_encoding get_db_locales get_cluster_locales - get_cluster_databases read_cluster_conf_file read_pg_hba/; -our @EXPORT_OK = qw/$confroot read_conf_file get_conf_value set_conf_value - disable_conf_value replace_conf_value cluster_data_directory - get_file_device read_pidfile check_pidfile_running/; + change_ugid config_bool get_db_encoding get_db_locales get_cluster_locales get_cluster_controldata + get_cluster_databases read_cluster_conf_file read_pg_hba read_pidfile valid_hba_method/; +our @EXPORT_OK = qw/$confroot $binroot $rpm quote_conf_value read_conf_file get_conf_value + set_conf_value set_conffile_value disable_conffile_value disable_conf_value + replace_conf_value cluster_data_directory get_file_device + check_pidfile_running/; # Print an error message to stderr and exit with status 1 sub error { @@ -49,7 +50,10 @@ ($common_confdir) = $ENV{'PGSYSCONFDIR'} =~ /(.*)/; # untaint } my $mapfile = "$common_confdir/user_clusters"; -my $binroot = "/usr/lib/postgresql"; +our $binroot = "/usr/lib/postgresql/"; +#redhat# $binroot = "/usr/pgsql-"; +our $rpm = 0; +#redhat# $rpm = 1; my $defaultport = 5432; { @@ -92,6 +96,17 @@ return undef; } +# Quotes a value with single quotes +# Arguments: +# Returns: quoted string +sub quote_conf_value ($) { + my $value = shift; + return $value if ($value =~ /^-?[\d.]+$/); # integer or float + return $value if ($value =~ /^\w+$/); # plain word + $value =~ s/'/''/g; # else quote it + return "'$value'"; +} + # Read a 'var = value' style configuration file and return a hash with the # values. Error out if the file cannot be read. # If the file name ends with '.conf', the keys will be normalized to lower case @@ -100,50 +115,66 @@ # Arguments: # Returns: hash (empty if file does not exist) sub read_conf_file { + my ($config_path) = @_; my %conf; local (*F); - return %conf unless -e $_[0]; + sub get_absolute_path { + my ($path, $parent_path) = @_; + return $path if ($path =~ m!^/!); # path is absolute + # else strip filename component from parent path + $parent_path =~ s!/[^/]*$!!; + return "$parent_path/$path"; + } - if (open F, $_[0]) { + if (open F, $config_path) { while () { if (/^\s*(?:#.*)?$/) { next; - } elsif (/^\s*include(?:_if_exists)?\s+'([^']+)'\s*$/i) { - my ($k, $v, $path, %include_conf); - $path = $1; - unless (substr($path, 0, 1) eq '/') { - my @p = split '/', $_[0]; - my $dirname = join '/', @p[0..($#p-1)]; - $path = "$dirname/$path"; - } - - # read included file and merge into %conf - %include_conf = read_conf_file($path); - while ( ($k, $v) = each(%include_conf) ) { - $conf{$k} = $v; - } - - } elsif (/^\s*([a-zA-Z0-9_.-]+)\s*(?:=|\s)\s*'((?:[^']|(?:(?<=\\)'))*)'\s*(?:#.*)?$/i) { + } elsif(/^\s*include_dir\s*=?\s*'([^']+)'\s*(?:#.*)?$/i) { + # read included configuration directory and merge into %conf + # files in the directory will be read in ascending order + my $path = $1; + my $absolute_path = get_absolute_path($path, $config_path); + next unless -e $absolute_path && -d $absolute_path; + my $dir; + opendir($dir, $absolute_path) or next; + foreach my $filename (sort readdir($dir) ) { + next if ($filename =~ m/^\./ or not $filename =~/\.conf$/ ); + my %include_conf = read_conf_file("$absolute_path/$filename"); + while ( my ($k, $v) = each(%include_conf) ) { + $conf{$k} = $v; + } + } + closedir($dir); + } elsif (/^\s*include(?:_if_exists)?\s*=?\s*'([^']+)'\s*(?:#.*)?$/i) { + # read included file and merge into %conf + my $path = $1; + my $absolute_path = get_absolute_path($path, $config_path); + my %include_conf = read_conf_file($absolute_path); + while ( my ($k, $v) = each(%include_conf) ) { + $conf{$k} = $v; + } + } elsif (/^\s*([a-zA-Z0-9_.-]+)\s*(?:=|\s)\s*'((?:[^']|''|(?:(?<=\\)'))*)'\s*(?:#.*)?$/i) { # string value my $v = $2; my $k = $1; - $k = lc $k if $_[0] =~ /\.conf$/; + $k = lc $k if $config_path =~ /\.conf$/; $v =~ s/\\(.)/$1/g; + $v =~ s/''/'/g; $conf{$k} = $v; - } elsif (/^\s*([a-zA-Z0-9_.-]+)\s*(?:=|\s)\s*(-?[\w.]+)\s*(?:#.*)?$/i) { + } elsif (m{^\s*([a-zA-Z0-9_.-]+)\s*(?:=|\s)\s*(-?[[:alnum:]][[:alnum:]._:/-]*)\s*(?:\#.*)?$}i) { # simple value my $v = $2; - my $k = $1; - $k = lc $k if $_[0] =~ /\.conf$/; + my $k = $1; + $k = lc $k if $config_path =~ /\.conf$/; $conf{$k} = $v; } else { - error "Invalid line $. in $_[0]: »$_«"; + chomp; + error "invalid line $. in $config_path: $_"; } } close F; - } else { - error "could not read $_[0]: $!"; } return %conf; @@ -155,9 +186,20 @@ # Arguments: # Returns: hash (empty if the file does not exist) sub read_cluster_conf_file { - my $fname = "$confroot/$_[0]/$_[1]/$_[2]"; - -e $fname or $fname = "$common_confdir/$_[2]"; - return read_conf_file $fname; + my $fname = "$confroot/$_[0]/$_[1]/$_[2]"; + -e $fname or $fname = "$common_confdir/$_[2]"; + my %conf = read_conf_file $fname; + + if ($_[0] >= 9.4 and $_[2] eq 'postgresql.conf') { # merge settings changed by ALTER SYSTEM + # data_directory cannot be changed by ALTER SYSTEM + my $data_directory = $conf{data_directory} || "/var/lib/postgresql/$_[0]/$_[1]"; + my %auto_conf = read_conf_file "$data_directory/postgresql.auto.conf"; + foreach my $guc (keys %auto_conf) { + $conf{$guc} = $auto_conf{$guc}; + } + } + + return %conf; } # Return parameter from a PostgreSQL configuration file, or undef if the parameter @@ -169,18 +211,11 @@ } # Set parameter of a PostgreSQL configuration file. -# Arguments: -sub set_conf_value { - my $fname = "$confroot/$_[0]/$_[1]/$_[2]"; - my $value; +# Arguments: +sub set_conffile_value { + my ($fname, $key, $value) = ($_[0], $_[1], quote_conf_value($_[2])); my @lines; - if ($_[4] =~ /^-?[\w.]+$/) { - $value = $_[4]; - } else { - $value = "'$_[4]'"; - } - # read configuration file lines open (F, $fname) or die "Error: could not open $fname for reading"; push @lines, $_ while (); @@ -189,8 +224,8 @@ my $found = 0; # first, search for an uncommented setting for (my $i=0; $i <= $#lines; ++$i) { - if ($lines[$i] =~ /^\s*($_[3])(\s*(?:=|\s)\s*)\w+\b((?:\s*#.*)?)/i or - $lines[$i] =~ /^\s*($_[3])(\s*(?:=|\s)\s*)'[^']*'((?:\s*#.*)?)/i) { + if ($lines[$i] =~ /^\s*($key)(\s*(?:=|\s)\s*)\w+\b((?:\s*#.*)?)/i or + $lines[$i] =~ /^\s*($key)(\s*(?:=|\s)\s*)'[^']*'((?:\s*#.*)?)/i) { $lines[$i] = "$1$2$value$3\n"; $found = 1; last; @@ -201,8 +236,8 @@ # of appending if (!$found) { for (my $i=0; $i <= $#lines; ++$i) { - if ($lines[$i] =~ /^\s*#\s*($_[3])(\s*(?:=|\s)\s*)\w+\b((?:\s*#.*)?)/i or - $lines[$i] =~ /^\s*#\s*($_[3])(\s*(?:=|\s)\s*)'[^']*'((?:\s*#.*)?)/i) { + if ($lines[$i] =~ /^\s*#\s*($key)(\s*(?:=|\s)\s*)\w+\b((?:\s*#.*)?)/i or + $lines[$i] =~ /^\s*#\s*($key)(\s*(?:=|\s)\s*)'[^']*'((?:\s*#.*)?)/i) { $lines[$i] = "$1$2$value$3\n"; $found = 1; last; @@ -211,7 +246,7 @@ } # not found anywhere, append it - push (@lines, "$_[3] = $value\n") unless $found; + push (@lines, "$key = $value\n") unless $found; # write configuration file lines open (F, ">$fname.new") or die "Error: could not open $fname.new for writing"; @@ -223,17 +258,22 @@ # copy permissions my @st = stat $fname or die "stat: $!"; chown $st[4], $st[5], "$fname.new"; # might fail as non-root - chmod $st[2], "$fname.new" or die "chmod: $1"; + chmod $st[2], "$fname.new" or die "chmod: $!"; - rename "$fname.new", "$fname"; + rename "$fname.new", "$fname" or die "rename $fname.new $fname: $!"; +} + +# Set parameter of a PostgreSQL cluster configuration file. +# Arguments: +sub set_conf_value { + return set_conffile_value "$confroot/$_[0]/$_[1]/$_[2]", $_[3], $_[4]; } # Disable a parameter in a PostgreSQL configuration file by prepending it with # a '#'. Appends an optional explanatory comment if given. -# Arguments: -sub disable_conf_value { - my $fname = "$confroot/$_[0]/$_[1]/$_[2]"; - my $value; +# Arguments: +sub disable_conffile_value { + my ($fname, $key, $reason) = @_; my @lines; # read configuration file lines @@ -243,10 +283,9 @@ my $changed = 0; for (my $i=0; $i <= $#lines; ++$i) { - if ($lines[$i] =~ /^\s*$_[3]\s*(?:=|\s)/i) { - $lines[$i] = '#'.$lines[$i]; - chomp $lines[$i]; - $lines[$i] .= ' #'.$_[4]."\n" if $_[4]; + if ($lines[$i] =~ /^\s*$key\s*(?:=|\s)/i) { + $lines[$i] =~ s/^/#/; + $lines[$i] =~ s/$/ #$reason/ if $reason; $changed = 1; last; } @@ -269,6 +308,13 @@ } } +# Disable a parameter in a PostgreSQL cluster configuration file by prepending +# it with a '#'. Appends an optional explanatory comment if given. +# Arguments: +sub disable_conf_value { + return disable_conffile_value "$confroot/$_[0]/$_[1]/$_[2]", $_[3], $_[4]; +} + # Replace a parameter in a PostgreSQL configuration file. The old parameter is # prepended with a '#' and gets an optional explanatory comment # appended, if given. The new parameter is inserted directly after the old one. @@ -329,7 +375,7 @@ return get_conf_value($_[0], $_[1], 'postgresql.conf', 'port'); } -# Set the port of a particular cluster. +# Set the port of a particular cluster. # Arguments: sub set_cluster_port { set_conf_value $_[0], $_[1], 'postgresql.conf', 'port', $_[2]; @@ -362,6 +408,7 @@ $socketdir =~ s/\s*,.*// if ($socketdir); # ignore additional directories for now return $socketdir if $socketdir; + #redhat# return '/tmp'; # RedHat PGDG packages default to /tmp # try to determine whether this is a postgres owned cluster and we default # to /var/run/postgresql $socketdir = '/var/run/postgresql'; @@ -385,7 +432,7 @@ return $socketdir; } -# Set the socket directory of a particular cluster. +# Set the socket directory of a particular cluster. # Arguments: sub set_cluster_socketdir { set_conf_value $_[0], $_[1], 'postgresql.conf', @@ -397,13 +444,13 @@ # Arguments: sub get_program_path { return '' unless defined($_[0]) && defined($_[1]); - my $path = "$binroot/$_[1]/bin/$_[0]"; + my $path = "$binroot$_[1]/bin/$_[0]"; ($path) = $path =~ /(.*)/; #untaint return $path if -x $path; return ''; } -# Check whether a postmaster server is running at the specified port. +# Check whether a postgres server is running at the specified port. # Arguments: sub cluster_port_running { die "port_running: invalid port $_[2]" if $_[2] !~ /\d+/; @@ -421,8 +468,6 @@ # Arguments: # Returns: auto | manual | disabled sub get_cluster_start_conf { - # start.conf setting - my $start = 'auto'; my $start_conf = "$confroot/$_[0]/$_[1]/start.conf"; if (-e $start_conf) { open F, $start_conf or error "Could not open $start_conf: $!"; @@ -431,16 +476,13 @@ s/^\s*//; s/\s*$//; next unless $_; - $start = $_; - last; + close F; + return $1 if (/^(auto|manual|disabled)/); + error "Invalid mode in $start_conf, must be one of auto, manual, disabled"; } close F; - - error 'Invalid mode in start.conf' unless $start eq 'auto' || - $start eq 'manual' || $start eq 'disabled'; } - - return $start; + return 'auto'; # default } # Change start.conf setting. @@ -449,7 +491,7 @@ sub set_cluster_start_conf { my ($v, $c, $val) = @_; - error "Invalid mode: '$val'" unless $val eq 'auto' || + error "Invalid mode: '$val'" unless $val eq 'auto' || $val eq 'manual' || $val eq 'disabled'; my $perms = 0644; @@ -473,12 +515,11 @@ close F; } else { $text = "# Automatic startup configuration -# auto: automatically start/stop the cluster in the init script -# manual: do not start/stop in init scripts, but allow manual startup with -# pg_ctlcluster -# disabled: do not allow manual startup with pg_ctlcluster (this can be easily -# circumvented and is only meant to be a small protection for -# accidents). +# auto: automatically start the cluster +# manual: manual startup with pg_ctlcluster/postgresql@.service only +# disabled: refuse to start cluster +# See pg_createcluster(1) for details. When running from systemd, +# invoke 'systemctl daemon-reload' after editing this file. $val "; @@ -520,6 +561,7 @@ if (open PIDFILE, $_[0]) { my $pid = ; close PIDFILE; + return undef unless ($pid); chomp $pid; ($pid) = $pid =~ /^(\d+)\s*$/; # untaint return $pid; @@ -528,11 +570,11 @@ } } -# Check whether a pid file is present and belongs to a running postmaster. +# Check whether a pid file is present and belongs to a running postgres. # Returns undef if it cannot be determined # Arguments: sub check_pidfile_running { - # postmaster does not clean up the PID file when it stops, and it is + # postgres does not clean up the PID file when it stops, and it is # not world readable, so only its absence is a definitive result; if it # is present, we need to read it and check the PID, which will only # work as root @@ -541,13 +583,13 @@ my $pid = read_pidfile $_[0]; if (defined $pid) { prepare_exec; - my $res = open PS, '-|', '/bin/ps', '-o', 'comm', 'h', 'p', $pid; + my $res = open PS, '-|', '/bin/ps', '-o', 'comm=', '-p', $pid; restore_exec; if ($res) { my $process = ; chomp $process if defined $process; close PS; - if (defined $process and ($process eq 'postmaster' or $process eq 'postgres')) { + if (defined $process and ($process eq 'postgres')) { return 1; } else { return 0; @@ -559,21 +601,25 @@ return undef; } -# Return a hash with information about a specific cluster. +# Return a hash with information about a specific cluster (which needs to exist). # Arguments: # Returns: information hash (keys: pgdata, port, running, logfile [unless it -# has a custom one], configdir, owneruid, ownergid, socketdir, -# statstempdir) +# has a custom one], configdir, owneruid, ownergid, waldir, socketdir, +# config->postgresql.conf) sub cluster_info { - error 'cluster_info must be called with arguments' unless $_[0] && $_[1]; + my ($v, $c) = @_; + error 'cluster_info must be called with arguments' unless ($v and $c); my %result; - $result{'configdir'} = "$confroot/$_[0]/$_[1]"; - my %postgresql_conf = read_cluster_conf_file $_[0], $_[1], 'postgresql.conf'; - $result{'pgdata'} = cluster_data_directory $_[0], $_[1], \%postgresql_conf; + $result{'configdir'} = "$confroot/$v/$c"; + $result{'configuid'} = (stat "$result{configdir}/postgresql.conf")[4]; + + my %postgresql_conf = read_cluster_conf_file $v, $c, 'postgresql.conf'; + $result{'config'} = \%postgresql_conf; + $result{'pgdata'} = cluster_data_directory $v, $c, \%postgresql_conf; + return %result unless (keys %postgresql_conf); $result{'port'} = $postgresql_conf{'port'} || $defaultport; - $result{'socketdir'} = get_cluster_socketdir $_[0], $_[1]; - $result{'statstempdir'} = $postgresql_conf{'stats_temp_directory'}; + $result{'socketdir'} = get_cluster_socketdir $v, $c; # if we can determine the running status with the pid file, prefer that if ($postgresql_conf{'external_pid_file'} && @@ -584,55 +630,55 @@ # otherwise fall back to probing the port; this is unreliable if the port # was changed in the configuration file in the meantime if (!defined ($result{'running'})) { - $result{'running'} = cluster_port_running ($_[0], $_[1], $result{'port'}); + $result{'running'} = cluster_port_running ($v, $c, $result{'port'}); } if ($result{'pgdata'}) { - ($result{'owneruid'}, $result{'ownergid'}) = + ($result{'owneruid'}, $result{'ownergid'}) = (stat $result{'pgdata'})[4,5]; - $result{'recovery'} = -e "$result{'pgdata'}/recovery.conf"; + $result{'recovery'} = 1 if (-e "$result{'pgdata'}/recovery.conf"); + my $waldirname = $v >= 10 ? 'pg_wal' : 'pg_xlog'; + if (-l "$result{pgdata}/$waldirname") { # custom wal directory + ($result{waldir}) = readlink("$result{pgdata}/$waldirname") =~ /(.*)/; # untaint + } } - $result{'start'} = get_cluster_start_conf $_[0], $_[1]; + $result{'start'} = get_cluster_start_conf $v, $c; - # default log file (only if not expliticly configured in postgresql.conf) - unless (exists $postgresql_conf{'log_filename'} || - exists $postgresql_conf{'log_directory'} || - (defined $postgresql_conf{'log_destination'} && - $postgresql_conf{'log_destination'} eq 'syslog')) { - my $log_symlink = $result{'configdir'} . "/log"; - if (-l $log_symlink) { - ($result{'logfile'}) = readlink ($log_symlink) =~ /(.*)/; # untaint - } else { - $result{'logfile'} = "/var/log/postgresql/postgresql-$_[0]-$_[1].log"; - } + # default log file (possibly used only for early startup messages) + my $log_symlink = $result{'configdir'} . "/log"; + if (-l $log_symlink) { + ($result{'logfile'}) = readlink ($log_symlink) =~ /(.*)/; # untaint + } else { + $result{'logfile'} = "/var/log/postgresql/postgresql-$v-$c.log"; } - # autovacuum defaults to on since 8.3 - $result{'avac_enable'} = config_bool $postgresql_conf{'autovacuum'} || ($_[0] >= '8.3'); - return %result; } -# Return an array of all available PostgreSQL versions +# Return an array of all available psql versions sub get_versions { my @versions = (); - if (opendir (D, $binroot)) { + my $dir = $binroot; + #redhat# $dir = '/usr'; + if (opendir (D, $dir)) { my $entry; while (defined ($entry = readdir D)) { next if $entry eq '.' || $entry eq '..'; - ($entry) = $entry =~ /^(\d+\.\d+)$/; # untaint + my $pfx = ''; + #redhat# $pfx = "pgsql-"; + ($entry) = $entry =~ /^$pfx(\d+\.?\d+)$/; # untaint push @versions, $entry if get_program_path ('psql', $entry); } closedir D; } - return @versions; + return sort { $a <=> $b } @versions; } # Return the newest available version sub get_newest_version { - my $newest = 0; - map { $newest = $_ if $newest < $_ } get_versions; - return $newest; + my @versions = get_versions; + return undef unless (@versions); + return $versions[-1]; } # Check whether a version exists @@ -650,13 +696,14 @@ while (defined ($entry = readdir D)) { next if $entry eq '.' || $entry eq '..'; ($entry) = $entry =~ /^(.*)$/; # untaint - if (-r $vdir.$entry.'/postgresql.conf') { + my $conf = "$vdir$entry/postgresql.conf"; + if (-e $conf or -l $conf) { # existing file, or dead symlink push @clusters, $entry; } } closedir D; } - return @clusters; + return sort @clusters; } # Check if a cluster exists. @@ -726,14 +773,16 @@ my $homemapfile = $home . '/.postgresqlrc'; if (open MAP, $homemapfile) { while () { - s/(.*?)#.*/$1/; + s/#.*//; next if /^\s*$/; my ($v,$c,$db) = split; if (!version_exists $v) { - error "$homemapfile line $.: version $v does not exist"; + print "Warning: $homemapfile line $.: version $v does not exist\n"; + next; } if (!cluster_exists $v, $c and $c !~ /^(\S+):(\d*)$/) { - error "$homemapfile line $.: cluster $v/$c does not exist"; + print "Warning: $homemapfile line $.: cluster $v/$c does not exist\n"; + next; } if ($db) { close MAP; @@ -749,7 +798,7 @@ # check global map file if (open MAP, $mapfile) { while () { - s/(.*?)#.*/$1/; + s/#.*//; next if /^\s*$/; my ($u,$g,$v,$c,$db) = split; if (!$db) { @@ -757,10 +806,12 @@ next; } if (!version_exists $v) { - error "$mapfile line $.: version $v does not exist"; + print "Warning: $mapfile line $.: version $v does not exist\n"; + next; } if (!cluster_exists $v, $c and $c !~ /^(\S+):(\d*)$/) { - error "$mapfile line $.: cluster $v/$c does not exist"; + print "Warning: $mapfile line $.: cluster $v/$c does not exist\n"; + next; } if (($u eq "*" || $u eq $user) && ($g eq "*" || $g eq $group)) { close MAP; @@ -801,7 +852,7 @@ # Arguments: sub install_file { my ($source, $dest, $uid, $gid, $perm) = @_; - + if (system 'install', '-o', $uid, '-g', $gid, '-m', $perm, $source, $dest) { error "install_file: could not install $source to $dest"; } @@ -844,8 +895,8 @@ $ENV{'LC_ALL'} = 'C'; my $orig_euid = $>; $> = (stat (cluster_data_directory $version, $cluster))[4]; - open PSQL, '-|', $psql, '-h', $socketdir, '-p', $port, '-Atc', - 'select getdatabaseencoding()', $db or + open PSQL, '-|', $psql, '-h', $socketdir, '-p', $port, '-AXtc', + 'select getdatabaseencoding()', $db or die "Internal error: could not call $psql to determine db encoding: $!"; my $out = ; close PSQL; @@ -870,21 +921,21 @@ return undef unless ($port && $socketdir && $psql); my ($ctype, $collate); - # try to swich to cluster owner + # try to switch to cluster owner prepare_exec 'LC_ALL'; $ENV{'LC_ALL'} = 'C'; my $orig_euid = $>; $> = (stat (cluster_data_directory $version, $cluster))[4]; - open PSQL, '-|', $psql, '-h', $socketdir, '-p', $port, '-Atc', - 'SHOW lc_ctype', $db or + open PSQL, '-|', $psql, '-h', $socketdir, '-p', $port, '-AXtc', + 'SHOW lc_ctype', $db or die "Internal error: could not call $psql to determine db lc_ctype: $!"; - my $out = ; + my $out = // error 'could not determine db lc_ctype'; close PSQL; ($ctype) = $out =~ /^([\w.\@-]+)$/; # untaint - open PSQL, '-|', $psql, '-h', $socketdir, '-p', $port, '-Atc', - 'SHOW lc_collate', $db or + open PSQL, '-|', $psql, '-h', $socketdir, '-p', $port, '-AXtc', + 'SHOW lc_collate', $db or die "Internal error: could not call $psql to determine db lc_collate: $!"; - $out = ; + $out = // error 'could not determine db lc_collate'; close PSQL; ($collate) = $out =~ /^([\w.\@-]+)$/; # untaint $> = $orig_euid; @@ -898,7 +949,7 @@ # Return the CTYPE and COLLATE locales of a cluster. This needs to be called # as root or as the cluster owner. (For versions <= 8.3; for >= 8.4, use # get_db_locales()). -# Arguments: +# Arguments: # Returns: (LC_CTYPE, LC_COLLATE) or (undef,undef) if it cannot be determined. sub get_cluster_locales { my ($version, $cluster) = @_; @@ -930,10 +981,38 @@ return ($lc_ctype, $lc_collate); } +# Return the pg_control data for a cluster +# Arguments: +# Returns: hashref +sub get_cluster_controldata { + my ($version, $cluster) = @_; + + my $pg_controldata = get_program_path 'pg_controldata', $version; + if (! -e $pg_controldata) { + print STDERR "Error: pg_controldata not found, please install postgresql-$version\n"; + exit 1; + } + prepare_exec ('LC_ALL', 'LANG', 'LANGUAGE'); + $ENV{'LC_ALL'} = 'C'; + my $result = open (CTRL, '-|', $pg_controldata, (cluster_data_directory $version, $cluster)); + restore_exec; + return undef unless defined $result; + my $data = {}; + while () { + if (/^(.+?):\s*(.*)/) { + $data->{$1} = $2; + } else { + error "Invalid pg_controldata output: $_"; + } + } + close CTRL; + return $data; +} + # Return an array with all databases of a cluster. This requires connection # privileges to template1, so this function should be called as the # cluster owner. -# Arguments: +# Arguments: # Returns: array of database names or undef on error. sub get_cluster_databases { my ($version, $cluster) = @_; @@ -950,7 +1029,7 @@ my @dbs; my @fields; - if (open PSQL, '-|', $psql, '-h', $socketdir, '-p', $port, '-Atl') { + if (open PSQL, '-|', $psql, '-h', $socketdir, '-p', $port, '-AXtl') { while () { chomp; @fields = split '\|'; @@ -997,7 +1076,6 @@ # method -> trust, reject, md5, crypt, password, krb5, ident, pam # ip -> ip address # mask -> network mask (either a single number as number of bits, or bit mask) -my %valid_methods = qw/trust 1 reject 1 md5 1 crypt 1 password 1 krb5 1 ident 1 pam 1/; sub parse_hba_line { my $l = $_[0]; chomp $l; @@ -1016,10 +1094,10 @@ # local connection? if ($$res{'type'} eq 'local') { goto error if $#tok > 1; - goto error unless $valid_methods{$tok[0]}; + goto error unless valid_hba_method($tok[0]); $$res{'method'} = join (' ', @tok); return $res; - } + } # host connection? if ($$res{'type'} =~ /^host((no)?ssl)?$/) { @@ -1036,7 +1114,7 @@ } goto error if $#tok > 1; - goto error unless $valid_methods{$tok[0]}; + goto error unless valid_hba_method($tok[0]); $$res{'method'} = join (' ', @tok); return $res; } @@ -1060,4 +1138,15 @@ return @hba; } +# Check if hba method is known +# Argument: hba method +# Returns: True if method is valid +sub valid_hba_method { + my $method = $_[0]; + + my %valid_methods = qw/trust 1 reject 1 md5 1 crypt 1 password 1 krb5 1 ident 1 pam 1/; + + return exists($valid_methods{$method}); +} + 1; diff -Nru postgresql-common-154/pgcommon.sh postgresql-common-190~ubuntu14.04.1/pgcommon.sh --- postgresql-common-154/pgcommon.sh 1970-01-01 00:00:00.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/pgcommon.sh 2018-01-12 14:08:46.000000000 +0000 @@ -0,0 +1,89 @@ +# shell functions used in postgresql-common +# +# (C) 2014 Martin Pitt +# (C) 2014 Christoph Berg +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# set DISTRO and RELEASE +get_release() { + # return if we were already called + [ "${DISTRO:-}" ] && [ "${RELEASE:-}" ] && return + + # we have /etc/os-release, use it + if [ -r /etc/os-release ]; then + . /etc/os-release + DISTRO="${ID:-unknown}" + RELEASE="${VERSION_ID:-unstable}" # unstable doesn't have this field + + # fall back to lsb_release + elif type lsb_release >/dev/null 2>/dev/null; then + DISTRO="`lsb_release -is | tr [:upper:] [:lower:]`" + RELEASE="`lsb_release -rs`" + + else + echo "get_release: WARNING: /etc/os-release and lsb_release not present, unknown distribution" >&2 + fi +} + +# install locales; this happens differently on Debian and Ubuntu +# Arguments: locale charset [...] +locale_gen () +{ + get_release + + case $DISTRO in + debian) + METHOD=debian + ;; + ubuntu) + case $RELEASE in + 12.*|13.*|14.*|15.*) + METHOD=ubuntu + ;; + *) + METHOD=debian + ;; + esac + ;; + redhat|centos) + return 0 # not yet implemented + ;; + esac + + case $METHOD in + debian) + local run + while [ "${2:-}" ]; do + if ! grep -q "^$1 $2\$" /etc/locale.gen; then + echo "$1 $2" >> /etc/locale.gen + run=1 + fi + shift 2 + done + [ "${run:-}" ] && locale-gen + ;; + + ubuntu) + # locale-gen will skip existing locales, so just call it + # unconditionally for all here + local locales + while [ "${2:-}" ]; do + locales="${locales:-} $1" + shift 2 + done + locale-gen $locales + ;; + esac + + return 0 +} + diff -Nru postgresql-common-154/pg_config postgresql-common-190~ubuntu14.04.1/pg_config --- postgresql-common-154/pg_config 2013-05-11 01:52:30.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/pg_config 2018-01-12 14:08:46.000000000 +0000 @@ -4,6 +4,7 @@ # available one. Otherwise fall back to libpq-dev's version. # # (C) 2011 Martin Pitt +# (C) 2014-2016 Christoph Berg # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,8 +17,9 @@ # GNU General Public License for more details. set -e - -LATEST_SERVER_DEV=`ls /usr/lib/postgresql/*/bin/pg_config 2>/dev/null|tail -n1` +PGBINROOT="/usr/lib/postgresql/" +#redhat# PGBINROOT="/usr/pgsql-" +LATEST_SERVER_DEV=`ls -v $PGBINROOT*/bin/pg_config 2>/dev/null|tail -n1` if [ -n "$LATEST_SERVER_DEV" ]; then exec "$LATEST_SERVER_DEV" "$@" diff -Nru postgresql-common-154/pg_conftool postgresql-common-190~ubuntu14.04.1/pg_conftool --- postgresql-common-154/pg_conftool 1970-01-01 00:00:00.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/pg_conftool 2018-01-12 14:08:46.000000000 +0000 @@ -0,0 +1,233 @@ +#!/usr/bin/perl +# Read and edit PostgreSQL config files +# vim:sw=4:et: +# +# (C) 2014-2017 Christoph Berg +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +use strict; +use warnings; +use Getopt::Long; +use PgCommon qw(quote_conf_value user_cluster_map read_cluster_conf_file + read_conf_file set_conffile_value set_conf_value disable_conffile_value + disable_conf_value cluster_exists error config_bool); + +## option parsing + +sub help ($;$) +{ + my ($exit, $error) = @_; + print STDERR "Error: $error\n" if ($error); + print "Usage: + $0 [options] [ ] [] + +Options: + -b --boolean Format output as boolean + -s --short Print only value + -v --verbose Verbose output + --help This help + +Commands: + show |all + set + remove + edit +"; + exit $exit; +} + +my $boolean = 0; +my $short = 0; +my $verbose = 0; + +Getopt::Long::Configure ("bundling"); +help(1) unless GetOptions ( + 'help' => sub { help(0); }, + 'b|boolean' => \$boolean, + 's|short' => \$short, + 'v|verbose' => \$verbose, +); + +# find command in argument array +my $cmdidx; +for (my $i = 0; $i < @ARGV; $i++) { + if ($ARGV[$i] =~ /^(show|get|set|remove|delete|disable|edit)$/) { + $cmdidx = $i; + last; + } +} +help(1, 'No command given') unless (defined $cmdidx); + +my ($version, $cluster, $conffile); +if ($cmdidx == 0) { # operate on postgresql.conf in default cluster + ($version, $cluster) = user_cluster_map(); + error "No default cluster found" unless ($cluster); + $conffile = 'postgresql.conf'; +} elsif ($cmdidx == 1) { # operate on given file; default cluster must exist if file is relative + $conffile = $ARGV[0]; + unless ($conffile =~ m!^/!) { + ($version, $cluster) = user_cluster_map(); + error "No default cluster found" unless ($cluster); + } +} elsif ($cmdidx == 2) { # version cluster, postgresql.conf + ($version, $cluster, $conffile) = ($ARGV[0], $ARGV[1], 'postgresql.conf'); +} elsif ($cmdidx == 3) { # version cluster conffile + ($version, $cluster, $conffile) = ($ARGV[0], $ARGV[1], $ARGV[2]); +} else { + help(1, 'Too many arguments before command'); +} + +if ($cluster) { # the cluster needs to exist unless an absolute conffile was given + error "Cluster $version $cluster does not exist" + unless (cluster_exists $version, $cluster); +} + +splice @ARGV, 0, $cmdidx; # remove everything before the command +$ARGV[0] = 'show' if ($ARGV[0] eq 'get'); # accept alternative variants of some commands +$ARGV[0] = 'remove' if ($ARGV[0] =~ /delete|disable/); + +my ($cmd, $key, $value); +if ($ARGV[0] =~ /^(edit)$/) { + help(1, "$ARGV[0] takes no argument") unless (@ARGV == 1); + ($cmd) = @ARGV; +} elsif ($ARGV[0] =~ /^(show|remove)$/) { + help(1, "$ARGV[0] needs exactly one argument") unless (@ARGV == 2); + ($cmd, $key) = @ARGV; +} else { + help(1, "$ARGV[0] needs exactly two arguments") unless (@ARGV == 3); + ($cmd, $key, $value) = @ARGV; +} +#print "$version $cluster $conffile $cmd $key $value\n"; + +## main + +if ($cmd eq 'show') { + my %conf; + if ($conffile =~ m!^/!) { + %conf = read_conf_file ($conffile); + } else { + %conf = read_cluster_conf_file ($version, $cluster, $conffile); + } + + if ($key eq 'all') { + foreach my $k (sort keys %conf) { + printf "%s = %s\n", $k, quote_conf_value($conf{$k}); + } + } elsif (exists $conf{$key}) { + $conf{$key} = config_bool($conf{$key}) ? 'on' : 'off' if ($boolean); # normalize boolean output on request + if ($short) { + printf "%s\n", $conf{$key}; + } else { + printf "%s = %s\n", $key, quote_conf_value($conf{$key}); + } + } else { + print "# $key not found in $conffile\n" if ($verbose); + exit 1; + } + +} elsif ($cmd eq 'set') { + if ($conffile =~ m!^/!) { + set_conffile_value ($conffile, $key, $value); + } else { + set_conf_value ($version, $cluster, $conffile, $key, $value); + } + +} elsif ($cmd eq 'remove') { + if ($conffile =~ m!^/!) { + disable_conffile_value ($conffile, $key); + } else { + disable_conf_value ($version, $cluster, $conffile, $key); + } + +} elsif ($cmd eq 'edit') { + my $editor = 'vi'; + if ($ENV{EDITOR}) { + ($editor) = $ENV{EDITOR} =~ /(.*)/; # untaint + } + if ($conffile =~ m!^/!) { + system $editor, $conffile; + } else { + system $editor, "$PgCommon::confroot/$version/$cluster/$conffile"; + } +} + +__END__ + +=head1 NAME + +pg_conftool - read and edit PostgreSQL cluster configuration files + +=head1 SYNOPSIS + +B [I] [I I] [I] B + +=head1 DESCRIPTION + +B allows to show and set parameters in PostgreSQL configuration +files. + +If I I is omitted, it defaults to the default cluster (see +user_clusters(5) and postgresqlrc(5)). If I is omitted, it defaults +to B. I can also be a path, in which case +I I is ignored. + +=head1 OPTIONS + +=over 4 + +=item B<-b>, B<--boolean> + +Format boolean value as B or B (not for "show all"). + +=item B<-s>, B<--short> + +Show only the value (instead of key = value pair). + +=item B<-v>, B<--verbose> + +Verbose output. + +=item B<--help> + +Print help. + +=back + +=head1 COMMANDS + +=over 4 + +=item B I|B + +Show a parameter, or all present in this config file. + +=item B I I + +Set or update a parameter. + +=item B I + +Remove (comment out) a parameter from a config file. + +=item B + +Open the config file in an editor. Unless B<$EDITOR> is set, B is used. + +=back + +=head1 SEE ALSO + +user_clusters(5), postgresqlrc(5) + +=head1 AUTHOR + +Christoph Berg Lmyon@debian.orgE> diff -Nru postgresql-common-154/pg_createcluster postgresql-common-190~ubuntu14.04.1/pg_createcluster --- postgresql-common-154/pg_createcluster 2014-02-03 21:59:47.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/pg_createcluster 2018-02-08 12:21:10.000000000 +0000 @@ -4,7 +4,7 @@ # the postgresql-common infrastructure. # # (C) 2005-2013 Martin Pitt -# (C) 2012-2014 Christoph Berg +# (C) 2012-2017 Christoph Berg # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,10 +16,9 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -use lib '/usr/share/postgresql-common'; use PgCommon; use Getopt::Long; -use POSIX qw/setlocale LC_ALL LC_CTYPE/; +use POSIX qw/lchown setlocale LC_ALL LC_CTYPE/; $ENV{'PATH'} = '/bin:/usr/bin'; # untaint @@ -27,6 +26,8 @@ my %defaultconf; my $explicit_auth_config = 0; +chdir '/'; + # replace placeholders # Arguments: sub replace_v_c ($$$) { @@ -56,14 +57,19 @@ error 'could not create data directory; you might need to run this program with root privileges'; } + # disable copy-on-write semantics for PostgreSQL data on btrfs and similar; + # this fails on file systems which don't support it, so ignore errors + system "chattr +C '$datadir' 2>/dev/null"; + my @initdb = (get_program_path 'initdb', $version); die 'Internal error: could not determine initdb path' unless $initdb[0]; if (my $options = $defaultconf{'initdb_options'}) { push @initdb, split (/\s+/, replace_v_c ($options, $version, $cluster)); } push @initdb, ('-D', $datadir); - if (my $xlogdir = $defaultconf{'xlogdir'}) { - push @initdb, ('--xlogdir', replace_v_c ($xlogdir, $version, $cluster)); + if (my $waldir = $defaultconf{'waldir'} || $defaultconf{'xlogdir'}) { + my $wal = $version >= 10 ? 'wal' : 'xlog'; # renamed in PG 10 + push @initdb, ("--${wal}dir", replace_v_c ($waldir, $version, $cluster)); } if ($explicit_auth_config) { # do nothing @@ -83,19 +89,12 @@ push @initdb, ('--lc-time', $lc_time) if $lc_time; push @initdb, @$initdb_opts_from_cli; - # pre-8.2 servers do not ignore LANG when LC_ALL is set; work around this - # bug - if ($version <= '8.2' && $ENV{'LC_ALL'}) { - $ENV{'LANG'} = $ENV{'LC_ALL'}; - } - if (fork) { wait; error 'initdb failed' if $?; } else{ - close STDOUT; change_ugid $owneruid, $ownergid; - open STDOUT, ">/dev/null"; + print "@initdb\n"; exec @initdb; } } @@ -121,21 +120,6 @@ } } -# -# Version specific default configuration -# - -sub configure_8_1 { - PgCommon::set_conf_value $version, $cluster, 'postgresql.conf', 'stats_row_level', 'on'; - PgCommon::set_conf_value $version, $cluster, 'postgresql.conf', 'autovacuum', 'on'; -} - -sub configure_8_2 { - PgCommon::set_conf_value $version, $cluster, 'postgresql.conf', 'stats_row_level', 'on'; - PgCommon::set_conf_value $version, $cluster, 'postgresql.conf', 'autovacuum', 'on'; -} -# >= 8.3 enables autovacuum by default - # Set up the default pg_hba.conf file: # - Add a "local all" entry to pg_hba.conf for the db superuser before all # other entries. @@ -226,7 +210,10 @@ # check validity of locale unless (setlocale (LC_ALL, "")) { - error ('The locale requested by the environment is invalid.') + my $env = join "\n", + map { " $_: $ENV{$_}" } + grep { /^(LC_|LANG)/ } sort keys %ENV; + error ("The locale requested by the environment is invalid:\n$env") } if (@ARGV < 2) { @@ -262,27 +249,30 @@ $startconf ne 'manual' && $startconf ne 'disabled'; if ($owneruid) { - $owneruid = (getpwnam $owneruid)[2] unless $owneruid =~ /\d+/; + $owneruid = (getpwnam $owneruid)[2] unless $owneruid =~ /^\d+$/; } elsif ($> == 0) { $owneruid = getpwnam 'postgres'; - error 'User postgresql does not exist' unless $owneruid; + error 'User postgres does not exist' unless $owneruid; } else { $owneruid = $>; } if ($ownergid) { - $ownergid = (getgrnam $ownergid)[2] unless $ownergid =~ /\d+/; + $ownergid = (getgrnam $ownergid)[2] unless $ownergid =~ /^\d+$/; } else { $ownergid = (getpwuid $owneruid)[3]; } error 'clusters must not be owned by root' unless $owneruid && $ownergid; -($version) = $ARGV[0] =~ /^(\d+\.\d+)$/; +($version) = $ARGV[0] =~ /^(\d+\.?\d+)$/; error "invalid version '$ARGV[0]'" unless defined $version; ($cluster) = $ARGV[1] =~ /^([-.\w]+)$/; error "invalid cluster name '$ARGV[1]'" unless defined $cluster; +if ($cluster =~ /-/ and -t 1) { + print "Warning: cluster names containing dashes (-) will cause problems when running from systemd. Continuing anyway\n"; +} splice @ARGV, 0, 2; # initdb options passed after -- @@ -295,6 +285,7 @@ push @initdb_opts_from_cli, $argv =~ /(.*)/; # untaint } +my $datadirp_created; if (!defined $datadir) { $datadir = replace_v_c ($defaultconf{'data_directory'} || "/var/lib/postgresql/%v/%c", $version, $cluster); $datadir =~ s!/+$!!; @@ -304,9 +295,11 @@ # ensure that the version data dir is owned by postgres as well, so that # it can be administrated without root permissions if (!stat $pd) { - system 'install', '-d', '-o', $postgres_user[2], '-g', $postgres_user[3], $pd; + my @install = qw(install -d); + push @install, '-o', $postgres_user[2], '-g', $postgres_user[3] if ($> == 0); + system @install, $pd; + $datadirp_created = $pd; # clean up in case of error } - } $confdirp = "$PgCommon::confroot/$version"; $confdir = "$confdirp/$cluster"; @@ -332,15 +325,17 @@ # create configuration directory if (!stat $confdirp) { - system 'install', '-d', '-o', $postgres_user[2], '-g', $postgres_user[3], $confdirp; + my @install = qw(install -d); + push @install, '-o', $postgres_user[2], '-g', $postgres_user[3] if ($> == 0); + system @install, $confdirp; } -error 'could not create configuration directory; you might ' . - 'need to run this program with root privileges' if system ('install', '-d', $confdir); - # now we created the first new directory for this cluster and start to rollback # on error $cleanup_cruft = 1; +error 'could not create configuration directory; you might ' . + 'need to run this program with root privileges' if system ('install', '-d', $confdir); + # check whether we have an already existing cluster; check version and # determine owner in this case $newcluster = 0; @@ -359,9 +354,7 @@ error "$datadir already contains a version $existingver cluster"; } } else { - my $loc = setlocale (LC_CTYPE); - print "Creating new cluster $version/$cluster ...\n"; - print " config $confdir\n data $datadir\n locale $loc\n"; + print "Creating new PostgreSQL cluster $version/$cluster ...\n"; init_db $version, $datadir, $owneruid, $ownergid, \@initdb_opts_from_cli; $newcluster = 1; } @@ -376,8 +369,9 @@ move_conffile "$datadir/postgresql.conf", $confdir, $owneruid, $ownergid, '644'; move_conffile "$datadir/pg_hba.conf", $confdir, $owneruid, $ownergid, '640', 'hba_file'; move_conffile "$datadir/pg_ident.conf", $confdir, $owneruid, $ownergid, '640', 'ident_file'; -chown $owneruid, $ownergid, $datadir, $confdir, "$confdir/start.conf" or die "chown: $!"; -chown $owneruid, $ownergid, $datadir, $confdir, "$confdir/pg_ctl.conf" or die "chown: $!"; +foreach my $f ($datadir, $confdir, "$confdir/start.conf", "$confdir/pg_ctl.conf") { + lchown $owneruid, $ownergid, $f or error "lchown $f: $!"; +} PgCommon::set_conf_value $version, $cluster, 'postgresql.conf', 'data_directory', $datadir; @@ -398,22 +392,18 @@ $) = $ownergid; $> = $owneruid; unless ($socketdir) { - if (-w '/var/run/postgresql') { + if ($version < 9.4 and $PgCommon::rpm) { + $socketdir = '/tmp'; # PGDG 9.3 and earlier defaults to /tmp in libpq et al. + } elsif (-w '/var/run/postgresql') { $socketdir = '/var/run/postgresql'; } else { $socketdir='/tmp'; - my $usd = $version >= 9.3 ? 'unix_socket_directories' : 'unix_socket_directory'; - print "Warning: The socket directory for owners other than 'postgres' -defaults to /tmp. You might want to change the $usd parameter -in postgresql.conf to a more secure directory. -" } } -set_cluster_socketdir $version, $cluster, $socketdir if $socketdir; +set_cluster_socketdir $version, $cluster, $socketdir; $> = $orig_euid; $) = $orig_egid; -print " port $port\n"; set_cluster_port $version, $cluster, $port; # create log file @@ -421,9 +411,10 @@ mkdir '/var/log/postgresql' or error "could not create log directory; you might need to run this program with root privileges"; chmod 01775, '/var/log/postgresql'; - chown 0, $postgres_user[3], '/var/log/postgresql'; + lchown 0, $postgres_user[3], '/var/log/postgresql'; } $real_logfile = $custom_logfile || "/var/log/postgresql/postgresql-$version-$cluster.log"; +error "logfile $real_logfile is a directory, not a file" if (-d $real_logfile); if (! -e $real_logfile) { open L, ">>$real_logfile" or error "could not create log file $real_logfile"; close L; @@ -435,25 +426,52 @@ } else { $g = $ownergid; } -chown $owneruid, $g, $real_logfile; +lchown $owneruid, $g, $real_logfile; # if we are using a non-default log file, create a log symlink if ($custom_logfile) { symlink $real_logfile, "$confdir/log"; - chown $owneruid, $ownergid, "$confdir/log"; + lchown $owneruid, $ownergid, "$confdir/log"; } -# version specific default configuration tweaking -$conf_fn = "configure_$version"; -$conf_fn =~tr/./_/; -&$conf_fn if defined &$conf_fn and $newcluster; +# SSL configuration +my $want_ssl = PgCommon::config_bool($defaultconf{ssl} || 'on'); # Check whether we can access the SSL private key as the cluster owner -my $key_file = '/etc/ssl/private/ssl-cert-snakeoil.key'; -my $pem_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem'; +my $ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key'; +my $ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem'; +my $ssl_ca_file = "$PgCommon::common_confdir/root.crt"; my $ssl_key_access; my ($uid, $euid, $gid, $egid) = ($<, $>, $(, $)); change_ugid $owneruid, $ownergid; -$ssl_key_access = -r $key_file; +$ssl_key_access = -r $ssl_key_file; + +# check for stats_temp_directory access +delete $defaultconf{stats_temp_directory} if ($version < 8.4); +if ($defaultconf{stats_temp_directory}) { + my $stats_temp_directory = replace_v_c ($defaultconf{stats_temp_directory}, $version, $cluster); + $stats_temp_directory =~ s!/$!!; # strip trailing slash + my $stats_temp_parent = $stats_temp_directory; + $stats_temp_parent =~ s!/[^/]+$!!; + if (-d $stats_temp_directory) { + if (! -w $stats_temp_directory) { + print "Warning: The selected stats_temp_directory $stats_temp_directory +is not writable for the cluster owner. Not adding this setting in +postgresql.conf.\n"; + delete $defaultconf{stats_temp_directory}; + } + } elsif (! -d $stats_temp_parent) { + print "Warning: The parent $stats_temp_parent of the selected +stats_temp_directory does not exist. Not adding this setting in +postgresql.conf.\n"; + delete $defaultconf{stats_temp_directory}; + } elsif (! -w $stats_temp_parent) { + print "Warning: The parent $stats_temp_parent of the selected +stats_temp_directory is not writable for the cluster owner. Not adding this +setting in postgresql.conf.\n"; + delete $defaultconf{stats_temp_directory}; + } +} + $> = $euid; $< = $uid; $( = $gid; @@ -462,38 +480,38 @@ die "changing egid back: $!" if $) != $egid; # enable SSL if we have the snakeoil default certificate -if ($newcluster && -e $pem_file && $ssl_key_access) { +if ($want_ssl && $newcluster && -e $ssl_cert_file && $ssl_key_access) { if ($version >= '9.2') { PgCommon::set_conf_value $version, $cluster, 'postgresql.conf', - 'ssl_cert_file', $pem_file; + 'ssl_cert_file', $ssl_cert_file; PgCommon::set_conf_value $version, $cluster, 'postgresql.conf', - 'ssl_key_file', $key_file; + 'ssl_key_file', $ssl_key_file; } else { - symlink $pem_file, "$datadir/server.crt"; - symlink $key_file, "$datadir/server.key"; + symlink $ssl_cert_file, "$datadir/server.crt"; + symlink $ssl_key_file, "$datadir/server.key"; } - PgCommon::set_conf_value $version, $cluster, 'postgresql.conf', 'ssl', 'true'; + PgCommon::set_conf_value $version, $cluster, 'postgresql.conf', 'ssl', 'on'; } # SSL client certificate CA -if ($newcluster && -e "$PgCommon::common_confdir/root.crt") { +if ($want_ssl && $newcluster && -e $ssl_ca_file) { # check if we have a cert in there or just the boilerplate installed by our postinst - open F, "$PgCommon::common_confdir/root.crt"; + open F, $ssl_ca_file; my $val; read F, $val, 4096; if ($val =~ /^-----BEGIN CERTIFICATE-----/m) { if ($version >= '9.2') { PgCommon::set_conf_value $version, $cluster, 'postgresql.conf', - 'ssl_ca_file', "$PgCommon::common_confdir/root.crt"; + 'ssl_ca_file', $ssl_ca_file; } else { - symlink "$PgCommon::common_confdir/root.crt", $datadir.'/root.crt'; + symlink $ssl_ca_file, $datadir.'/root.crt'; } } } # SSL client certificate revocation list -if ($newcluster && -e "$PgCommon::common_confdir/root.crl") { +if ($want_ssl && $newcluster && -e "$PgCommon::common_confdir/root.crl") { if ($version >= '9.2') { PgCommon::set_conf_value $version, $cluster, 'postgresql.conf', 'ssl_crl_file', "$PgCommon::common_confdir/root.crl"; @@ -503,7 +521,7 @@ } # create default (empty) environment file -my $defaultenv = "# environment variables for postmaster process +my $defaultenv = "# environment variables for postgres processes # This file has the same syntax as postgresql.conf: # VARIABLE = simple_value # VARIABLE2 = 'any value!' @@ -522,7 +540,7 @@ print ENV $defaultenv; close ENV; chmod 0644, "$confdir/environment"; -chown $owneruid, $ownergid, "$confdir/environment"; +lchown $owneruid, $ownergid, "$confdir/environment"; $cleanup_cruft = 0; @@ -533,9 +551,19 @@ # handle other createcluster.conf parameters foreach my $guc (sort keys %defaultconf) { - next if $guc =~ /^(create_main_cluster|start_conf|data_directory|xlogdir|initdb_options)$/; - PgCommon::set_conf_value $version, $cluster, 'postgresql.conf', - $guc, replace_v_c ($defaultconf{$guc}, $version, $cluster); + next if $guc =~ /^(create_main_cluster|start_conf|data_directory|waldir|xlogdir|initdb_options|ssl)$/; + next if $guc eq 'logging_collector' and $version < 8.3; + next if $guc eq 'cluster_name' and $version < 9.5; + my $val = replace_v_c ($defaultconf{$guc}, $version, $cluster); + $guc =~ s/^add_include/include/; # remove harness from include directives in createcluster.conf + if ($guc eq 'include_dir') { + next if ($version < 9.3); + if ($val =~ /^[\w.]+$/ and not -e "$confdir/$val") { # create directory relative to new config directory + mkdir "$confdir/$val", 0755; + lchown $owneruid, $ownergid, "$confdir/$val"; + } + } + PgCommon::set_conf_value $version, $cluster, 'postgresql.conf', $guc, $val; } # process --pgoption parameters @@ -543,15 +571,30 @@ PgCommon::set_conf_value $version, $cluster, 'postgresql.conf', $guc->[0], $guc->[1]; } +# notify systemd about the new cluster +if (not exists $ENV{'PG_CLUSTER_CONF_ROOT'} and $startconf eq 'auto' and -d '/run/systemd/system') { + if ($> == 0) { + system 'systemctl daemon-reload'; + } elsif (-t 1) { + print "Warning: systemd does not know about the new cluster yet. Operations like \"service postgresql start\" will not handle it. To fix, run:\n"; + print " sudo systemctl daemon-reload\n"; + } +} + # start it if requested if ($start) { system 'pg_ctlcluster', $version, $cluster, 'start'; + die "Could not start cluster\n" if ($?); } +# finally, show the cluster we created +system 'pg_lsclusters', $version, $cluster; + END { # clean up cruft if something went wrong if ($cleanup_cruft && defined $version && defined $cluster) { system "pg_dropcluster $version $cluster 2>/dev/null"; + rmdir $datadirp_created if ($datadirp_created); # clean up after early errors which pg_dropcluster doesn't handle exit 1; } } @@ -569,7 +612,7 @@ =head1 DESCRIPTION B creates a new PostgreSQL server cluster (i. e. a -collection of databases served by a L instance) and +collection of databases served by a L instance) and integrates it into the multi-version/multi-cluster architecture of the B package. @@ -580,6 +623,10 @@ etc. C will abort with an error if you try to create a cluster with a name that already exists for that version. +For compatibility with B service units, the cluster name should not +contain any dashes (B<->). B will warn about the problem, but +succeed with the operation. + Given a major PostgreSQL I (like "8.2" or "8.3") and a cluster I, it creates the necessary configuration files in CICIC; in particular these are @@ -617,7 +664,7 @@ will be created (C and C); for 9.2 and later, the appropriate C options will be set (C and C). Of course you can replace this with a cluster specific -certificate. Similary for C and +certificate. Similarly for C and C, these files will be configured as client certificate CA and revocation list, when present. (C is initially a placeholder that will only be used if real certificates are added to the file.) @@ -646,7 +693,7 @@ =item B<-s> I, B<--socketdir=>I -Explicitly set the directory where the L server stores the Unix +Explicitly set the directory where the L server stores the Unix socket for local connections. Defaults to C for clusters owned by the user B, and C for clusters owned by other users. Please be aware that C is an unsafe directory since everybody can create @@ -655,7 +702,7 @@ =item B<-l> I, B<--logfile=>I -Explicitly set the path for the L server log file. Defaults to +Explicitly set the path for the L server log file. Defaults to CIC<->IC<.log>. =item B<--locale=>I @@ -741,7 +788,7 @@ =head1 STARTUP CONTROL The C file in the cluster configuration directory controls the -start/stop behavior of that cluster's postmaster process. The file can contain +start/stop behavior of that cluster's postgres process. The file can contain comment lines (started with '#'), empty lines, and must have exactly one line with one of the following keywords: @@ -749,30 +796,43 @@ =item B -The postmaster process is started/stopped automatically in the init script. +The postgres process is started/stopped automatically in the init script. + +When running from B, the cluster is started/stopped when +B is started/stopped. This is also the default if the file is missing. =item B -The postmaster process is not handled by the init script, but manually +The postgres process is not handled by the init script, but manually controlling the cluster with L is permitted. +When running from B, the cluster is not started automatically when +B is started. However, stopping/restarting +B will stop/restart the cluster. The cluster can be started +using BIB<->I. + =item B -Neither the init script nor L are permitted to start/stop the +Neither the init script, L, nor B are permitted to start/stop the cluster. Please be aware that this will not stop the cluster owner from calling -lower level tools to control the postmaster process; this option is only meant +lower level tools to control the postgres process; this option is only meant to prevent accidents during maintenance, not more. =back +When running from B, invoke B after editing +C. + The C file in the cluster configuration directory can contain -additional options passed to pg_ctl of that cluster. +additional options passed to B of that cluster. =head1 DEFAULT VALUES Some default values used by B can be modified in -C: +C. Occurrences of B<%v> are replaced +by the major version number, and B<%c> by the cluster name. Use B<%%> for a +literal B<%>. =over 4 @@ -786,32 +846,71 @@ =back -In the following options, occurrences of B<%v> are replaced by the major -version number, and B<%c> by the cluster name. Use B<%%> for a literal B<%>. - =over 4 =item B (Default: B) Default data directory. -=item B (Default: unset) +=item B (Default: unset) Default directory for transaction logs. When used, B will create a -symlink from C in the data directory to this location. Unset by -default, i.e. pg_xlog is remains in the data directory. +symlink from C (PostgreSQL 9.6 and earlier: C) in the data +directory to this location. Unset by default, i.e. transaction logs remain in +the data directory. Both spellings of this option are accepted, and translated +to the correct initdb invocation depending on the cluster version. =item B (Default: unset) Other options to pass to B. -=item I (Default: none) +=item Other options All other options listed are copied into the new cluster's postgresql.conf, e.g.: listen_addresses = '*' log_line_prefix = '%%t ' +Some postgresql.conf options are treated specially: + +=over 4 + +=item B + +Only added to postgresql.conf if the default snakeoil certificates exist and +are readable for the cluster owner as detailed above. + +=item B + +Only added to postgresql.conf if existing, and writable for the cluster owner, +or else if the parent directory is writable. + +=back + +=item Include files + +=over 4 + +=item B + +=item B + +=item B + +B supports the same include directives as +B. + +=item B + +=item B + +=item B + +To add include directives to the new postgresql.conf file, use the B +directives. The B prefix is removed. + +=back + =back =head1 SEE ALSO diff -Nru postgresql-common-154/pg_ctlcluster postgresql-common-190~ubuntu14.04.1/pg_ctlcluster --- postgresql-common-154/pg_ctlcluster 2014-01-08 22:02:50.000000000 +0000 +++ postgresql-common-190~ubuntu14.04.1/pg_ctlcluster 2018-01-12 14:08:46.000000000 +0000 @@ -1,12 +1,12 @@ #!/usr/bin/perl -wT # multiversion/cluster aware pg_ctl wrapper; this also supplies the correct -# configuration parameters to 'start', and makes sure that a postmaster really +# configuration parameters to 'start', and makes sure that postgres really # stops on 'stop'. # # (C) 2005-2009 Martin Pitt # (C) 2009 Cyril Bouthors -# (C) 2013 Christoph Berg +# (C) 2013-2017 Christoph Berg # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,48 +18,28 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -use lib '/usr/share/postgresql-common'; +use strict; +use warnings; use Getopt::Long; -use POSIX qw/setsid dup2 setlocale LC_ALL :sys_wait_h/; +use POSIX qw/setsid dup2 :sys_wait_h/; use PgCommon; -use Fcntl 'SEEK_SET'; +use Fcntl qw(SEEK_SET O_RDWR O_CREAT O_EXCL); +use POSIX qw(lchown); +my ($version, $cluster, $pg_ctl, $force); +my (@postgres_auxoptions, @pg_ctl_opts_from_cli); +my (%postgresql_conf, %info); my $mode = 'smart'; # default shutdown mode +my $foreground = 0; # don't daemonize, use postgres instead of pg_ctl +my $stdlog = 0; # when run in foreground, still log to the default logfile -# Check for known broken configurations of this cluster -sub check_valid_config { - my %postgresql_conf = read_cluster_conf_file $version, $cluster, - 'postgresql.conf'; - my $log_statement_stats = config_bool $postgresql_conf{'log_statement_stats'}; - my $log_parser_stats = config_bool $postgresql_conf{'log_parser_stats'}; - my $log_planner_stats = config_bool $postgresql_conf{'log_planner_stats'}; - my $log_executor_stats = config_bool $postgresql_conf{'log_executor_stats'}; - - # statement and other statistics are mutually exclusive - if ($log_statement_stats && ($log_parser_stats || $log_planner_stats || - $log_executor_stats)) { - error 'invalid postgresql.conf: log_statement_stats and the other log_*_stats options are mutually exclusive'; - } -} - -# Return the PID from an existing PID file or undef if it does not exist. -# Arguments: -sub get_running_pid { - return undef unless -e $_[0]; - - if (open PIDFILE, $_[0]) { - my $pid = ; - close PIDFILE; - chomp $pid; - ($pid) = $pid =~ /^(\d+)\s*$/; # untaint - return $pid; - } else { - return undef; - } -} +# untaint environment +$ENV{'PATH'} = '/sbin:/bin:/usr/sbin:/usr/bin'; +delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; +chdir '/'; # If a pid file is already present, delete it if it is stale/invalid, or exit -# with a notice if it belongs to an already running postmaster. +# with a notice if it belongs to an already running postgres. sub start_check_pid_file { my $pidfile = $info{'pgdata'}.'/postmaster.pid'; if (PgCommon::check_pidfile_running $pidfile) { @@ -77,7 +57,7 @@ # Check if a pid file is not present or it is invalid. If so, clean up/abort. sub stop_check_pid_file { my $pidfile = $info{'pgdata'}.'/postmaster.pid'; - my $pid = get_running_pid $pidfile; + my $pid = read_pidfile $pidfile; return if (defined $pid && PgCommon::check_pidfile_running $pidfile); if ($info{'running'}) { error 'pid file is invalid, please manually kill the stale server process.'; @@ -107,7 +87,7 @@ my $out; while ($n < ($result ? 10 : 3)) { select undef, undef, undef, 0.5; - $out = `$psql -h '$sd' --port $p -l 2>&1 >/dev/null`; + $out = `$psql -h '$sd' --port $p -Xl 2>&1 >/dev/null`; if ($? == $result) { $n++; @@ -118,17 +98,13 @@ } if ($out =~ 'FATAL:') { - print STDERR "WARNING: connection to the database failed, disabling startup checks:\n$out\n"; + print STDERR "Warning: connection to the database failed, disabling startup checks:\n$out\n"; return cluster_port_running $v, $c, $p; } return !$result; } sub start { - my $cdir = $info{'configdir'}; - - check_valid_config; - start_check_pid_file; # check conflicting port @@ -144,19 +120,25 @@ my $lc_messages = PgCommon::get_conf_value $version, $cluster, 'postgresql.conf', 'lc_messages'; $ENV{LANG} = $lc_messages if $lc_messages; } + # 9.5 configures OOM killer using env vars + if ($version >= 9.5) { + $ENV{PG_OOM_ADJUST_FILE} = "/proc/self/oom_score_adj" unless (exists $ENV{PG_OOM_ADJUST_FILE}); + # PG_OOM_ADJUST_VALUE defaults to 0, but can be overridden here + } - my $postmaster_opts = ''; + my $postgres_opts = ''; my $usd = $version >= 9.3 ? 'unix_socket_directories' : 'unix_socket_directory'; if (!(PgCommon::get_conf_value $version, $cluster, 'postgresql.conf', $usd)) { - $postmaster_opts .= "-c $usd=\"$info{'socketdir'}\""; + $postgres_opts .= "-c $usd=\"$info{'socketdir'}\""; } - $postmaster_opts .= " -c config_file=\"$cdir/postgresql.conf\""; + my $cdir = $info{'configdir'}; + $postgres_opts .= " -c config_file=\"$cdir/postgresql.conf\""; if (!(PgCommon::get_conf_value $version, $cluster, 'postgresql.conf', 'hba_file')) { - $postmaster_opts .= " -c hba_file=\"$cdir/pg_hba.conf\""; + $postgres_opts .= " -c hba_file=\"$cdir/pg_hba.conf\""; } if (!(PgCommon::get_conf_value $version, $cluster, 'postgresql.conf', 'ident_file')) { - $postmaster_opts .= " -c ident_file=\"$cdir/pg_ident.conf\""; + $postgres_opts .= " -c ident_file=\"$cdir/pg_ident.conf\""; } if ((-d '/var/run/postgresql') && !defined (PgCommon::get_conf_value $version, $cluster, 'postgresql.conf', 'external_pid_file')) { @@ -171,21 +153,31 @@ $vrp_writable = -w '/var/run/postgresql'; } if ($vrp_writable) { - $postmaster_opts .= " -c external_pid_file=\"/var/run/postgresql/$version-$cluster.pid\""; + $postgres_opts .= " -c external_pid_file=\"/var/run/postgresql/$version-$cluster.pid\""; } } - $postmaster_opts .= ' ' . (join ' ', @postmaster_auxoptions); - ($postmaster_opts) = $postmaster_opts =~ /(.*)/; # untaint + $postgres_opts .= ' ' . (join ' ', @postgres_auxoptions); + ($postgres_opts) = $postgres_opts =~ /(.*)/; # untaint + + if ($foreground) { + if ($stdlog and $info{'logfile'}) { + dup2(POSIX::open($info{logfile}, POSIX::O_WRONLY|POSIX::O_APPEND), 1); + dup2(POSIX::open($info{logfile}, POSIX::O_WRONLY|POSIX::O_APPEND), 2); + } + my $postgres = get_program_path 'postgres', $version; + exec '/bin/sh', '-c', "exec $postgres $postgres_opts" or + error "Executing $postgres failed: $!" + } # only supply or default logfile path when none is given explicitly in # postgresql.conf - @options = ($pg_ctl, 'start', '-D', $info{'pgdata'}); - $logsize = 0; + my @options = ($pg_ctl, 'start', '-D', $info{'pgdata'}); + my $logsize = 0; if ($info{'logfile'}) { push @options, ('-l', $info{'logfile'}); # remember current size of the log - $logsize = (stat $info{'logfile'})[7]; + $logsize = (stat $info{'logfile'})[7] || 0; # ignore stat errors } push @options, @pg_ctl_opts_from_cli if @pg_ctl_opts_from_cli; @@ -194,22 +186,34 @@ push @options, split(' ', $pg_ctl_opts_from_file{'pg_ctl_options'}) if defined $pg_ctl_opts_from_file{'pg_ctl_options'} and $pg_ctl_opts_from_file{'pg_ctl_options'} ne ''; - push @options, ('-s', '-o', $postmaster_opts); + push @options, ('-s', '-o', $postgres_opts); if (fork) { wait; - error "could not exec $pg_ctl @options: $!" if $?; + if ($?) { + my $exit = $? >> 8; + print STDERR "Error: $pg_ctl @options exited with status $exit: $!\n"; + my $currlogsize = (stat $info{'logfile'})[7] if $info{'logfile'} && -r $info{'logfile'}; + if ($currlogsize) { + open LOG, $info{'logfile'} or + error "Could not open log file " . $info{'logfile'}; + seek LOG, $logsize, SEEK_SET; + print STDERR $_ while ; + } + exit $exit; + } } else { setsid or error "could not start session: $!"; - # without this, you'll get zombies on startup - dup2(POSIX::open('/dev/null', POSIX::O_WRONLY), 1); - dup2(POSIX::open('/dev/null', POSIX::O_WRONLY), 2); + # without dup2, you'll get zombies on startup + my $output = $info{'logfile'} && -r $info{'logfile'} ? $info{'logfile'} : '/dev/null'; + dup2(POSIX::open($output, POSIX::O_WRONLY | POSIX::O_APPEND | POSIX::O_CREAT), 1); + dup2(POSIX::open($output, POSIX::O_WRONLY | POSIX::O_APPEND | POSIX::O_CREAT), 2); exec $pg_ctl @options or error "could not exec $pg_ctl @options: $!"; } # wait a bit until the socket exists - $success = 0; - $currlogsize = 0; + my $success = 0; + my $currlogsize = 0; my $pidfile = $info{'pgdata'}.'/postmaster.pid'; for (my $attempt = 0; $attempt < 60; $attempt++) { select (undef, undef, undef, 0.5); @@ -219,7 +223,7 @@ last; } - # if the postmaster wrote something, but the process does not exist any + # if postgres wrote something, but the process does not exist any # more, there must be a problem and we can stop immediately last if ($currlogsize > $logsize && !PgCommon::check_pidfile_running $pidfile); } @@ -249,10 +253,18 @@ stop_check_pid_file; my $result = 1; + my @options = ('stop', '-s', '-w', '-D', $info{'pgdata'}); + + push @options, @pg_ctl_opts_from_cli if @pg_ctl_opts_from_cli; + + my %pg_ctl_opts_from_file = read_cluster_conf_file $version, $cluster, 'pg_ctl.conf'; + push @options, split(' ', $pg_ctl_opts_from_file{'pg_ctl_options'}) + if defined $pg_ctl_opts_from_file{'pg_ctl_options'} and $pg_ctl_opts_from_file{'pg_ctl_options'} ne ''; + if ($force) { if (!fork()) { close STDOUT; - exec $pg_ctl, '-D', $info{'pgdata'}, '-s', '-w', '-m', 'fast', @pg_ctl_opts_from_cli, 'stop'; + exec $pg_ctl, @options, '-m', 'fast'; } else { wait; $result = $? >> 8; @@ -261,27 +273,27 @@ # try harder if "fast" mode does not work if (-f $info{'pgdata'}.'/postmaster.pid') { print "(does not shutdown gracefully, now stopping immediately)\n"; - $result = system $pg_ctl, '-D', $info{'pgdata'}, '-s', '-w', '-m', 'immediate', @pg_ctl_opts_from_cli, 'stop'; + $result = system $pg_ctl, @options, '-m', 'immediate'; } # if that still not helps, use the big hammer if (-f $info{'pgdata'}.'/postmaster.pid') { print "(does not shutdown, killing the process)"; - $pid = get_running_pid $info{'pgdata'}.'/postmaster.pid'; + my $pid = read_pidfile ($info{'pgdata'}.'/postmaster.pid'); kill (9, $pid) if $pid; $result = 0; } } else { if (!fork()) { close STDOUT; - exec $pg_ctl, '-D', $info{'pgdata'}, '-s', '-w', '-m', $mode, @pg_ctl_opts_from_cli, 'stop'; + exec $pg_ctl, @options, '-m', $mode; } else { wait; $result = $? >> 8; } } - # external_pid_file files are currently not removed by postmaster itself + # external_pid_file files are currently not removed by postgres itself if ($result == 0) { unlink "/var/run/postgresql/$version-$cluster.pid"; } @@ -303,6 +315,10 @@ exec $pg_ctl, '-D', $info{'pgdata'}, '-s', @pg_ctl_opts_from_cli, 'reload'; } +sub status { + exec $pg_ctl, '-D', $info{'pgdata'}, 'status'; +} + sub promote { exec $pg_ctl, '-D', $info{'pgdata'}, '-s', @pg_ctl_opts_from_cli, 'promote'; } @@ -311,9 +327,15 @@ # main # -exit 1 unless GetOptions ('o|options=s' => \@postmaster_auxoptions, +my ($skip_systemctl_redirect, $bindir); + +exit 1 unless GetOptions ('o|options=s' => \@postgres_auxoptions, 'f|force' => \$force, 'm|mode=s' => \$mode, + 'foreground' => \$foreground, + 'skip-systemctl-redirect' => \$skip_systemctl_redirect, + 'stdlog' => \$stdlog, + 'bindir=s' => \$bindir, ); if ($mode =~ /^(s(mart)?|f(ast)?|i(mmediate)?)$/) { @@ -323,21 +345,28 @@ exit 1; } -if ($#ARGV < 2) { +($bindir) = $bindir =~ /^(\/.*)$/ if $bindir; # untaint + +# accept both "version cluster action" and "version[-/]cluster action" +if (@ARGV < 2 or (@ARGV < 3 and $ARGV[0] !~ m![-/]!)) { print "Usage: $0 \n"; exit 1; } $version = shift @ARGV; -$cluster = shift @ARGV; -$action = shift @ARGV; +if ($version =~ m!^(\d+\.?\d)[-/](.+)!) { + ($version, $cluster) = ($1, $2); +} else { + $cluster = shift @ARGV; +} +my $action = shift @ARGV; @pg_ctl_opts_from_cli=(); foreach my $argv (@ARGV) { push @pg_ctl_opts_from_cli, $argv =~ /(.*)/; # untaint } -($version) = $version =~ /^(\d+\.\d+)$/; # untaint +($version) = $version =~ /^(\d+\.?\d+)$/; # untaint ($cluster) = $cluster =~ /^([^'"\s]+)$/; # untaint error 'specified cluster does not exist' unless $version && $cluster && cluster_exists $version, $cluster; %info = cluster_info ($version, $cluster); @@ -347,20 +376,61 @@ error 'Cluster is disabled' if $info{'start'} eq 'disabled'; } -# untaint environment -$ENV{'PATH'} = '/sbin:/bin:/usr/sbin:/usr/bin'; -delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; - unless (-d $info{'pgdata'} && defined $info{'owneruid'}) { error $info{'pgdata'} . ' is not accessible or does not exist'; } -# check that owner uig/gid is valid +# check that owner uid/gid is valid unless (getpwuid $info{'owneruid'}) { - error 'The cluster is owned by user id '.$info{'owneruid'}.' which does not exist any more' + error 'The cluster is owned by user id '.$info{'owneruid'}.' which does not exist' } unless (getgrgid $info{'ownergid'}) { - error 'The cluster is owned by group id '.$info{'ownergid'}.' which does not exist any more' + error 'The cluster is owned by group id '.$info{'ownergid'}.' which does not exist' +} +# owneruid and configuid need to match, unless configuid is root +if (($< == 0 or $> == 0) and $info{'configuid'} != 0 and + $info{'configuid'} != $info{'owneruid'}) { + my $configowner = (getpwuid $info{'configuid'})[0] || "(unknown)"; + my $dataowner = (getpwuid $info{'owneruid'})[0]; + error "Config owner ($configowner:$info{configuid}) and data owner ($dataowner:$info{owneruid}) do not match, and config owner is not root"; +} + +# redirect the request through systemd +if (not $skip_systemctl_redirect and getppid() != 1 and # not run from init + -d '/run/systemd/system' and not exists $ENV{_SYSTEMCTL_SKIP_REDIRECT} and # systemd is running + not exists $ENV{'PG_CLUSTER_CONF_ROOT'} and # not handling user clusters + $action =~ /^(start|stop|restart)$/ # redirect only these actions +) { + $action = $1; # untaint + system 'systemctl', 'is-active', '-q', "postgresql\@$version-$cluster"; + my $unit_active = $? == 0; + + # if extra options are given, proceed with pg_ctlcluster with a warning + if (@postgres_auxoptions != 0 or @pg_ctl_opts_from_cli != 0 or $bindir) { # extra options given + print "Notice: extra pg_ctl/postgres options given, bypassing systemctl for $action operation\n" if (-t 1); + # if we are root, redirect to systemctl unless stopping a cluster running outside systemd + } elsif ($> == 0) { + if ($action eq 'stop' and not $unit_active) { + # proceed with pg_ctlcluster + } else { + #print "Redirecting $action request to systemctl\n" if (-t 1); + system 'systemctl', $action, "postgresql\@$version-$cluster"; + exit $? >> 8; + # program end + } + # as non-root, raise an error on restarting a cluster running from systemd + } elsif ($action eq 'restart' and $unit_active) { + error "cluster is running from systemd, can only restart it as root. Try instead:\n sudo systemctl $action postgresql\@$version-$cluster"; + # program end + # otherwise just raise a warning on start and restart as non-root + } elsif (-t 1) { + if ($action =~ /start/) { + print "Warning: the cluster will not be running as a systemd service. Consider using systemctl:\n"; + } elsif ($unit_active) { # on stop, warn when running from systemd + print "Warning: stopping the cluster using pg_ctlcluster will mark the systemd unit as failed. Consider using systemctl:\n"; + } + print " sudo systemctl $action postgresql\@$version-$cluster\n"; + } } # recreate missing standard log dir @@ -371,17 +441,20 @@ # recreate missing log file if ($action ne 'stop' && $info{'logfile'} && ! -e $info{'logfile'}) { - open L, '>', $info{'logfile'} or + if ($> == 0) { # drop privileges; this is important if logfile + # was determined via an /etc/postgresql/.../log symlink + change_ugid $info{'owneruid'}, $info{'ownergid'}; + } + sysopen (L, $info{'logfile'}, O_RDWR|O_CREAT|O_EXCL) or error 'Could not create log file ' . $info{'logfile'}; + close L; chmod 0640, $info{'logfile'}; - my $g; + $< = $> = 0; # will silently fail if we were not root before, that's intended + $( = $) = 0; if ($info{'owneruid'} < 500) { - $g = (getgrnam 'adm')[2]; - } else { - $g = $info{'ownergid'}; + my $g = (getgrnam 'adm')[2]; + lchown $info{'owneruid'}, $g, $info{'logfile'} if (defined $g); } - chown $info{'owneruid'}, $g, $info{'logfile'}; - close L; } # recreate /var/run/postgresql @@ -391,15 +464,15 @@ } # recreate stats_temp_directory -if ($action ne 'stop' && $info{'statstempdir'} && ! -d $info{'statstempdir'}) { +if ($action ne 'stop' && $info{config}->{stats_temp_directory} && ! -d $info{config}->{stats_temp_directory}) { system 'install', '-d', '-m', 750, - '-o', $info{'owneruid'}, '-g', $info{'ownergid'}, $info{'statstempdir'}; + '-o', $info{'owneruid'}, '-g', $info{'ownergid'}, $info{config}->{stats_temp_directory}; } if ($> == 0) { - # have the postmaster start with increased OOM killer protection; 9.1 and + # have postgres start with increased OOM killer protection; 9.0 and # later has builtin support for resetting the adjustment of child processes - if ($action eq 'start' && $version >= '9.1') { + if ($action eq 'start' and $version >= '9.0' and not $PgCommon::rpm) { if (-w '/proc/self/oom_score_adj') { open F, '>/proc/self/oom_score_adj'; print F "-900\n"; @@ -407,7 +480,6 @@ } } - chdir ('/var/lib/postgresql'); change_ugid $info{'owneruid'}, $info{'ownergid'}; } @@ -418,16 +490,13 @@ (getpwuid $info{'owneruid'})[0].') or root'; } -$pg_ctl = get_program_path 'pg_ctl', $version; +$pg_ctl = $bindir ? "$bindir/pg_ctl" : get_program_path ('pg_ctl', $version); -%actions = ('start' => \&start, 'stop' => \&stop, 'reload' => \&reload, - 'restart' => \&restart, 'promote' => \&promote); - -if ($actions{$action}) { - exit $actions{$action}->(); +if ($action =~ /^(start|stop|restart|reload|status|promote)$/) { + no strict 'refs'; + exit &$action; } else { - error 'Error: invalid action (must be one of: '. - (join ', ', sort keys %actions) . ')'; + error 'Invalid action (must be one of: start stop restart reload status promote)'; } __END__ @@ -438,13 +507,13 @@ =head1 SYNOPSIS -B [I] I I I B<--> [I] +B [I] I I I [B<--> I] -where I = B|B|B|B|B +where I = B|B|B|B|B|B =head1 DESCRIPTION -This program controls the B server for a particular cluster. It +This program controls the B server for a particular cluster. It essentially wraps the L command. It determines the cluster version and data path and calls the right version of B with appropriate configuration parameters and paths. @@ -452,6 +521,9 @@ You have to start this program as the user who owns the database cluster or as root. +To ease integration with B operation, the alternative syntax +"B IB<->I I" is also supported. + =head1 ACTIONS =over 4 @@ -461,13 +533,13 @@ A log file for this specific cluster is created if it does not exist yet (by default, CIC<->IC<.log>), -and a PostreSQL server process (L) is started on it. Exits with +and a PostgreSQL server process (L) is started on it. Exits with 0 on success, with 2 if the server is already running, and with 1 on other failure conditions. =item B -Stops the L server of the given cluster. By default, "smart" +Stops the L server of the given cluster. By default, "smart" shutdown mode is used, which waits until all clients disconnected. =item B @@ -479,6 +551,11 @@ Causes the configuration files to be re-read without a full shutdown of the server. +=item B + +Checks whether a server is running. If it is, the PID and the command line +options that were used to invoke it are displayed. + =item B Commands a running standby server to exit recovery and begin read-write @@ -496,7 +573,7 @@ transactions, disconnects clients immediately and thus shuts down cleanly. If that does not work, shutdown is attempted again in "immediate" mode, which can leave the cluster in an inconsistent state and thus will lead to a recovery run -at the next start. If this still does not help, the B process is +at the next start. If this still does not help, the B process is killed. Exits with 0 on success, with 2 if the server is not running, and with 1 on other failure conditions. This mode should only be used when the machine is about to be shut down. @@ -506,15 +583,28 @@ Shutdown mode to use for B and B actions, default is B. See pg_ctl(1) for documentation. +=item B<--foreground> + +Start B in foreground, without daemonizing via B. + +=item B<--stdlog> + +When B<--foreground> is in use, redirect stderr to the standard logfile in +C. (Default when not run in foreground.) + +=item B<--bindir> I + +Path to B. (Default is CIC.) + =item B<-o>|B<--options> I