[Pkg-postgresql-public] Bug#698931: unblock: postgresql-common/134wheezy3

Christoph Berg myon at debian.org
Fri Jan 25 11:59:03 UTC 2013


Package: release.debian.org
Severity: normal
User: release.debian.org at packages.debian.org
Usertags: unblock

Please unblock package postgresql-common. It has been in unstable for
two weeks now, with no regressions reported. It also passes the
/usr/share/postgresql-common/testsuite tests.

Changes explained: (raw diff attached)

> === modified file 'debian/README.Debian'
> --- debian/README.Debian	2010-05-25 15:03:15 +0000
> +++ debian/README.Debian	2013-01-09 16:12:33 +0000
> @@ -91,9 +91,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-8.3" on a clean system, the
> -default 8.3/main cluster will run on port 5432. If you then create
> -another 8.3 cluster, or install the "postgresql-8.4" package, that new
> +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-8.4" package, that new
>  one will run on 5433.
>  
>  Please use "pg_lsclusters" for displaying the cluster <-> port
> @@ -109,18 +109,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-8.3 installed and want to upgrade to 8.4, you first install
> -postgresql-8.4:
> -
> -  apt-get install postgresql-8.4
> -
> -Then drop the default 8.4 cluster:
> -
> -  pg_dropcluster 8.4 main --stop
> -
> -And then upgrade the 8.3 cluster to 8.4:
> -
> -  pg_upgradecluster 8.3 main
> +postgresql-8.4 installed and want to upgrade to 9.1, you first install
> +postgresql-9.1:
> +
> +  apt-get install postgresql-9.1
> +
> +Then drop the default 9.1 cluster:
> +
> +  pg_dropcluster 9.1 main --stop
> +
> +And then upgrade the 8.4 cluster to 9.1:
> +
> +  pg_upgradecluster 8.4 main
>  
>  SSL
>  ---
> @@ -147,9 +147,9 @@
>  case, client certificates need to be signed by the snakeoil
>  certificate, which might be desirable in many cases. See
>  
> -  /usr/share/doc/postgresql-doc-8.4/html/ssl-tcp.html
> +  /usr/share/doc/postgresql-doc-9.1/html/ssl-tcp.html
>  
> -for details (in package postgresql-doc-8.4).
> +for details (in package postgresql-doc).
>  
>  Further documentation
>  ---------------------
> 

Doc fix: #697239.

> === modified file 'debian/changelog'
> --- debian/changelog	2012-11-05 07:15:45 +0000
> +++ debian/changelog	2013-01-09 16:13:00 +0000
> @@ -1,3 +1,20 @@
> +postgresql-common (134wheezy3) unstable; urgency=low
> +
> +  [ Christoph Berg ]
> +  * pg_wrapper: Document that PGHOST overrides PGCLUSTER. (Closes: #697291)
> +  * pg_wrapper: Skip cluster selection if --host is given on the command line.
> +    (Closes: #637017) While we are at it, improve --port parsing, too.
> +  * t/010_defaultport_cluster.t: Add test cases for the above pg_wrapper
> +    changes.
> +  * postgresql-client-common: Add Depends: netbase for getprotobyname() in
> +    PgCommon.pm. (Closes: #697377)
> +
> +  [ Martin Pitt ]
> +  * debian/README.Debian: Update versions to 8.4/9.1, as current for Squeeze
> +    and Wheezy. (Closes: #697239)
> +
> + -- Christoph Berg <myon at debian.org>  Wed, 09 Jan 2013 17:12:54 +0100
> +
>  postgresql-common (134wheezy2) unstable; urgency=low
>  
>    * debian/supported-versions: Add Debian 7.0 "wheezy" to support 9.1 only.
> 

> === modified file 'debian/control'
> --- debian/control	2012-10-03 20:28:46 +0000
> +++ debian/control	2013-01-04 15:21:57 +0000
> @@ -40,7 +40,8 @@
>  
>  Package: postgresql-client-common
>  Architecture: all
> -Depends: ${misc:Depends}
> +Depends: ${misc:Depends},
> + netbase
>  Recommends: lsb-release, libreadline6
>  Description: manager for multiple PostgreSQL client versions
>   The postgresql-client-common package provides a structure under which
> 

#697377: We need netbase so getprotobyname can read /etc/services.

> === modified file 'pg_wrapper'
> --- pg_wrapper	2012-07-25 11:46:19 +0000
> +++ pg_wrapper	2013-01-04 14:22:52 +0000
> @@ -4,6 +4,7 @@
>  # /etc/postgresql-common/user_clusters.
>  #
>  # (C) 2005-2009 Martin Pitt <mpitt at debian.org>
> +# (C) 2013 Christoph Berg <myon at debian.org>
>  #
>  #  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
> @@ -50,7 +51,8 @@
>          last;
>      }
>  
> -    $port_specified = 1 if $ARGV[$i] eq '--port' || $ARGV[$i] =~ /^-\w*p\w*$/;
> +    $port_specified = 1 if $ARGV[$i] =~ /^--port\b/ || $ARGV[$i] =~ /^-\w*p\w*\d*$/;

#637017: Use a better regexp that also recognizes --port=1234 and -p1234

> +    $host = '.from.commandline' if $ARGV[$i] =~ /^--host\b/ || $ARGV[$i] =~ /^-\w*h\w*$/;

#637017: Skip port detection if psql --host is used.

>  }
>  
>  # Determine $version, $cluster, $db, $port from map files
> @@ -78,7 +80,7 @@
>  $ENV{'PGSYSCONFDIR'} = '/etc/postgresql-common' if !$ENV{'PGSYSCONFDIR'};
>  $ENV{'PGPORT'} = $port if $port && !$ENV{'PGPORT'};
>  $ENV{'PGDATABASE'} = $db if $db && !$ENV{'PGDATABASE'};
> -$ENV{'PGHOST'} = $host if $host;
> +$ENV{'PGHOST'} = $host if $host && $host ne '.from.commandline';
>  
>  # if we only have a port, but no version here, use the latest version
>  # TODO: this could be improved by better argument parsing and mapping back the

#637017: Skip port detection if psql --host is used.

> @@ -161,27 +163,37 @@
>  
>  =item 1.
>  
> +explicit specification with the B<--host> option
> +
> +=item 2.
> +
>  explicit specification with the B<--cluster> option
>  
> -=item 2.
> +=item 3.
> +
> +if the B<PGHOST> environment variable is set, no further cluster selection is
> +performed. The default PostgreSQL version and port number (from the command
> +line, the environment variable B<PGPORT>, or default 5432) will be used.
> +
> +=item 4.
>  
>  explicit specification with the B<PGCLUSTER> environment variable
>  
> -=item 3.
> +=item 5.
>  
>  matching entry in C<~/.postgresqlrc> (see L<postgresqlrc(5)>), if that
>  file exists
>  
> -=item 4.
> +=item 6.
>  
>  matching entry in C</etc/postgresql-common/user_clusters> (see
>  L<user_clusters(5)>), if that file exists
>  
> -=item 5.
> +=item 7.
>  
>  If only one local cluster exists, that one will be selected.
>  
> -=item 6.
> +=item 8.
>  
>  If several local clusters exist, the one listening on the default port 5432
>  will be selected.
> 

#697291: Document behaviour of --cluster and --host.

> === modified file 't/010_defaultport_cluster.t'
> --- t/010_defaultport_cluster.t	2009-04-10 03:03:14 +0000
> +++ t/010_defaultport_cluster.t	2013-01-09 16:12:33 +0000
> @@ -4,7 +4,7 @@
>  # uses the highest available version.
>  
>  use strict;
> -use Test::More tests => 4;
> +use Test::More tests => 14;
>  
>  use lib 't';
>  use TestLib;
> @@ -15,4 +15,19 @@
>  like_program_out 0, 'env LC_MESSAGES=C psql -h 127.0.0.1 -l', 2, qr/could not connect/, 
>      'connecting to localhost fails with no clusters';
>  
> +# We check if PGCLUSTER, --cluster, and native psql options are evaluated with
> +# correct priority. (This is related to the checks in t/090_multicluster.t, but
> +# easier to do here because no clusters are running.)
> +
> +like_program_out 0, "env LC_MESSAGES=C PGCLUSTER=$MAJORS[-1]/127.0.0.2:5431 psql -l",
> +    2, qr/could not connect.*127.0.0.2.*on port 5431/s, 'pg_wrapper uses host and port from PGCLUSTER';
> +like_program_out 0, "env LC_MESSAGES=C PGCLUSTER=$MAJORS[-1]/127.0.0.2:5431 psql --cluster $MAJORS[-1]/127.0.0.3:5430 -l",
> +    2, qr/could not connect.*127.0.0.3.*on port 5430/s, 'pg_wrapper uses --cluster from the command line';
> +like_program_out 0, "env LC_MESSAGES=C PGCLUSTER=$MAJORS[-1]/127.0.0.2:5431 psql -h 127.0.0.3 -l",
> +    2, qr/could not connect.*127.0.0.3.*on port 5432/s, 'pg_wrapper ignores PGCLUSTER with -h on the command line';
> +like_program_out 0, "env LC_MESSAGES=C PGCLUSTER=$MAJORS[-1]/127.0.0.2:5431 psql --host 127.0.0.3 -l",
> +    2, qr/could not connect.*127.0.0.3.*on port 5432/s, 'pg_wrapper ignores PGCLUSTER with --host on the command line';
> +like_program_out 0, "env LC_MESSAGES=C PGCLUSTER=$MAJORS[-1]/127.0.0.2:5431 PGHOST=127.0.0.3 psql -l",
> +    2, qr/could not connect.*127.0.0.3.*on port 5432/s, 'pg_wrapper ignores PGCLUSTER if PGHOST is set';
> +
>  # vim: filetype=perl

New test cases for #637017.

unblock postgresql-common/134wheezy3

Thanks,
Christoph
-- 
cb at df7cb.de | http://www.df7cb.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 134wheezy3.diff
Type: text/x-diff
Size: 7368 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-postgresql-public/attachments/20130125/739ab412/attachment.diff>


More information about the Pkg-postgresql-public mailing list