[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#683082: marked as done (unblock: postgresql-common/134)



Your message dated Sat, 28 Jul 2012 15:31:10 +0100
with message-id <1343485870.18013.61.camel@jacala.jungle.funky-badger.org>
and subject line Re: Bug#683082: unblock: postgresql-common/134
has caused the Debian Bug report #683082,
regarding unblock: postgresql-common/134
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
683082: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683082
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

unblock postgresql-common/134

Hello release team,

I have uploaded version 133 and 134 of postgresql-common which fixes
two really important bugs which should go into Wheezy, as well as some
rather harmless cleanup which I consider appropriate for Wheezy as
well. Can this please considered to get an unblock request?

I ran this against postgresql-9.1 and -9.2 in sid (automatic and
manual tests).

Debdiff attached, some notes about the individual changes:

| postgresql-common (133) unstable; urgency=low
| 
|   [ Christoph Berg ]
|   * Add .bzrignore file.

No runtime impact at all, just VCS cleanup.

|   * PgCommon.pm: Check IPv4 and IPv6 in next_free_port(). (Closes: #678858)

This is one of the two fixes. It prevented proper working for the case
that you only have IPv6 on your system. It does not change behaviour
on an IPv4 system, but of course this is still a relatively intrusive
change.

|   [ Peter Eisentraut ]
|   * debian/control: Add myself to Uploaders.
|   * debian/postgresql-common.lintian-overrides: Remove unused
|     binary-without-manpage overrides (files were moved to
|     postgresql-client-common package).

Trivial.

|   * debian/rules: Catch errors in for loops.

This causes an FTBFS on any error, which improves robustness and error
detection. Package still builds fine in pbuilder as well as the Ubuntu
buildds.

|   * pg_wrapper: Avoid Perl warnings if psql is linked against libreadline
|     instead of libedit, even though that is not standard anymore.

This is a corner case when people build their own postgresql-9.1
package from the source with libreadline enabled, and avoids a nasty
error message in that case. It does not change behaviour when using
the Debian postgresql-9.1 packages.

|   * testsuite: Reset core limit for pg_ctl tests.
|   * testsuite: Allow running individual tests by passing them on the
|     command line.

No runtime impact at all, just test suite improvements.

|   [ Martin Pitt ]
|   * pg_ctlcluster: Do not remove the PID file after SIGKILLing the
|     postmaster in the "last-ditch effort to shut down" in --force mode. This
|     is a potentially dangerous thing to do when trying to start a second
|     postmaster in parallel while the first one is still being shut down.
|     (see http://archives.postgresql.org/pgsql-general/2012-07/msg00475.php)

This is a rather serious potential data loss bugs (happens very
seldomly, but if it does it thoroughly messes up your data), the
second bug which really ought to go into Wheezy. The fix is trivial
(one-line patch which just drops the unlink()).

|  -- Martin Pitt <mpitt@debian.org>  Thu, 26 Jul 2012 13:20:10 +0200

| postgresql-common (134) unstable; urgency=low
| 
|   * debian/backport-ppa: Fix syntax error.

No build/runtime impact at all, I just use this to generate uploads to
https://launchpad.net/~pitti/+archive/postgresql .

|   * PgCommon.pm: Drop unconditional import of Socket::IN6ADDR_ANY and only do
|     the IPv6 check if it is available. This keeps this version backwards
|     compatible with Debian/Ubuntu releases with older Perl versions.

This makes the fix for #678858 compatible with Perl 5.12, so that the
package stays backportable to Squeeze.

Thank you for considering, and let me know if you have any question or
doubts.

Martin

-- System Information:
Debian Release: wheezy/sid
  APT prefers quantal
  APT policy: (500, 'quantal')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.5.0-6-generic (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
diff -Nru postgresql-common-132/debian/backport-ppa postgresql-common-134/debian/backport-ppa
--- postgresql-common-132/debian/backport-ppa	2012-06-06 19:55:54.000000000 +0200
+++ postgresql-common-134/debian/backport-ppa	2012-07-26 13:42:12.000000000 +0200
@@ -26,7 +26,7 @@
 
 for release in $RELEASES; do
     dch -D$release -v"$CUR_VERSION~${release}" -b 'Backport'
-    if [ "$release" = lucid -o -o "$release" = "natty" -o "$release" = oneiric ]; then
+    if [ "$release" = lucid -o "$release" = "natty" -o "$release" = oneiric ]; then
         sed -i 's/dpkg-dev.*| hardening-wrapper/hardening-wrapper/' debian/control
     fi
     bzr bd -S -- -sd -v$SINCE_VERSION
diff -Nru postgresql-common-132/debian/changelog postgresql-common-134/debian/changelog
--- postgresql-common-132/debian/changelog	2012-06-30 21:31:56.000000000 +0200
+++ postgresql-common-134/debian/changelog	2012-07-26 21:29:48.000000000 +0200
@@ -1,3 +1,39 @@
+postgresql-common (134) unstable; urgency=low
+
+  * debian/backport-ppa: Fix syntax error.
+  * PgCommon.pm: Drop unconditional import of Socket::IN6ADDR_ANY and only do
+    the IPv6 check if it is available. This keeps this version backwards
+    compatible with Debian/Ubuntu releases with older Perl versions.
+
+ -- Martin Pitt <mpitt@debian.org>  Thu, 26 Jul 2012 21:29:48 +0200
+
+postgresql-common (133) unstable; urgency=low
+
+  [ Christoph Berg ]
+  * Add .bzrignore file.
+  * PgCommon.pm: Check IPv4 and IPv6 in next_free_port(). (Closes: #678858)
+
+  [ Peter Eisentraut ]
+  * debian/control: Add myself to Uploaders.
+  * debian/postgresql-common.lintian-overrides: Remove unused
+    binary-without-manpage overrides (files were moved to
+    postgresql-client-common package).
+  * debian/rules: Catch errors in for loops.
+  * pg_wrapper: Avoid Perl warnings if psql is linked against libreadline
+    instead of libedit, even though that is not standard anymore.
+  * testsuite: Reset core limit for pg_ctl tests.
+  * testsuite: Allow running individual tests by passing them on the
+    command line.
+
+  [ Martin Pitt ]
+  * pg_ctlcluster: Do not remove the PID file after SIGKILLing the
+    postmaster in the "last-ditch effort to shut down" in --force mode. This
+    is a potentially dangerous thing to do when trying to start a second
+    postmaster in parallel while the first one is still being shut down.
+    (see http://archives.postgresql.org/pgsql-general/2012-07/msg00475.php)
+
+ -- Martin Pitt <mpitt@debian.org>  Thu, 26 Jul 2012 13:20:10 +0200
+
 postgresql-common (132) unstable; urgency=low
 
   [ Martin Pitt ]
diff -Nru postgresql-common-132/debian/control postgresql-common-134/debian/control
--- postgresql-common-132/debian/control	2012-06-30 21:30:23.000000000 +0200
+++ postgresql-common-134/debian/control	2012-07-25 06:32:33.000000000 +0200
@@ -2,7 +2,7 @@
 Section: database
 Priority: optional
 Maintainer: Debian PostgreSQL Maintainers <pkg-postgresql-public@lists.alioth.debian.org>
-Uploaders: Martin Pitt <mpitt@debian.org>, Christoph Berg <myon@debian.org>
+Uploaders: Martin Pitt <mpitt@debian.org>, Christoph Berg <myon@debian.org>, Peter Eisentraut <petere@debian.org>
 Standards-Version: 3.9.3
 Vcs-Bzr: http://bzr.debian.org/bzr/pkg-postgresql/postgresql-common/trunk/
 Vcs-Browser: http://anonscm.debian.org/loggerhead/pkg-postgresql/postgresql-common/trunk
diff -Nru postgresql-common-132/debian/postgresql-common.lintian-overrides postgresql-common-134/debian/postgresql-common.lintian-overrides
--- postgresql-common-132/debian/postgresql-common.lintian-overrides	2012-06-06 19:55:54.000000000 +0200
+++ postgresql-common-134/debian/postgresql-common.lintian-overrides	2012-07-25 06:32:33.000000000 +0200
@@ -1,15 +1 @@
-postgresql-common: binary-without-manpage clusterdb
-postgresql-common: binary-without-manpage createdb
-postgresql-common: binary-without-manpage createlang
-postgresql-common: binary-without-manpage createuser
-postgresql-common: binary-without-manpage dropdb
-postgresql-common: binary-without-manpage droplang
-postgresql-common: binary-without-manpage dropuser
-postgresql-common: binary-without-manpage pg_dump
-postgresql-common: binary-without-manpage pg_dumpall
-postgresql-common: binary-without-manpage pg_restore
-postgresql-common: binary-without-manpage psql
-postgresql-common: binary-without-manpage reindexdb
-postgresql-common: binary-without-manpage vacuumdb
-postgresql-common: binary-without-manpage vacuumlo
 postgresql-common: binary-without-manpage usr/bin/pg_config
diff -Nru postgresql-common-132/debian/rules postgresql-common-134/debian/rules
--- postgresql-common-132/debian/rules	2012-06-06 19:55:54.000000000 +0200
+++ postgresql-common-134/debian/rules	2012-07-25 06:41:10.000000000 +0200
@@ -12,21 +12,21 @@
 override_dh_install:
 	dh_install
 	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; done
-	for p in $(POD1PROGS_POD); do $(POD2MAN) --quotes=none --section 1 $$p.pod > $$p.1; done
-	for p in $(POD8PROGS); do $(POD2MAN) --quotes=none --section 8 $$p > $$p.8; done
+	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
 
 override_dh_installinit:
 	dh_installinit --name=postgresql -u'defaults 19 21' -r
 
 override_dh_gencontrol:
 	dh_gencontrol -ppostgresql-server-dev-all -- -Vserver-dev-all-depends="$(shell for v in `debian/supported-versions`; do echo "postgresql-server-dev-$$v,"; done)"
-	
+
 	# 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}'
-		
+
 	# will ship different conffiles for logrotate pre- and post-3.8
 	if dpkg --compare-versions `apt-cache show logrotate | grep ^Version | head -n1 | cut -f2- -d' '` ge 3.8; then \
 		dh_gencontrol -ppostgresql-common -- -Vlogrotate:version="(>= 3.8)"; \
@@ -35,7 +35,7 @@
 	fi
 
 	dh_gencontrol --remaining-packages
-	
+
 override_dh_installlogrotate:
 	dh_installlogrotate
 	# logrotate 3.8+ requires an additional "su" command which is not
@@ -47,5 +47,5 @@
 
 override_dh_clean:
 	dh_clean
-	for p in $(POD1PROGS) $(POD1PROGS_POD); do rm -f $$p.1; done
-	for p in $(POD8PROGS); do rm -f $$p.8; done
+	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-132/PgCommon.pm postgresql-common-134/PgCommon.pm
--- postgresql-common-132/PgCommon.pm	2012-06-06 19:55:54.000000000 +0200
+++ postgresql-common-134/PgCommon.pm	2012-07-26 21:19:37.000000000 +0200
@@ -1,6 +1,7 @@
 # Common functions for the postgresql-common framework
 #
 # (C) 2008-2009 Martin Pitt <mpitt@debian.org>
+# (C) 2012 Christoph Berg <myon@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
@@ -670,18 +671,35 @@
     }
 
     my $port;
-    for ($port = $defaultport; ; ++$port) {
+    for ($port = $defaultport; $port < 65536; ++$port) {
 	next if grep { $_ == $port } @ports;
 
         # check if port is already in use
-        socket (SOCK, PF_INET, SOCK_STREAM, getprotobyname('tcp')) or 
+	my ($have_ip4, $res4, $have_ip6, $res6);
+	if (socket (SOCK, PF_INET, SOCK_STREAM, getprotobyname('tcp'))) { # IPv4
+	    $have_ip4 = 1;
+	    $res4 = bind (SOCK, sockaddr_in($port, INADDR_ANY));
+	}
+	$have_ip6 = 0;
+	no strict; # avoid compilation errors with Perl < 5.14
+	if (exists $Socket::{"IN6ADDR_ANY"}) { # IPv6
+	    if (socket (SOCK, PF_INET6, SOCK_STREAM, getprotobyname('tcp'))) {
+		$have_ip6 = 1;
+		$res6 = bind (SOCK, sockaddr_in6($port, Socket::IN6ADDR_ANY));
+	    }
+	}
+	use strict;
+	unless ($have_ip4 or $have_ip6) {
+	    # require at least one protocol to work (PostgreSQL needs it anyway
+	    # for the stats collector)
             die "could not create socket: $!";
-        my $res = bind (SOCK, sockaddr_in($port, INADDR_ANY));
+	}
         close SOCK;
-        last if $res;
+	# return port if it is available on all supported protocols
+	return $port if ($have_ip4 ? $res4 : 1) and ($have_ip6 ? $res6 : 1);
     }
 
-    return $port;
+    die "no free port found";
 }
 
 # Return the PostgreSQL version, cluster, and database to connect to. version
diff -Nru postgresql-common-132/pg_ctlcluster postgresql-common-134/pg_ctlcluster
--- postgresql-common-132/pg_ctlcluster	2012-06-06 19:55:54.000000000 +0200
+++ postgresql-common-134/pg_ctlcluster	2012-07-25 06:28:07.000000000 +0200
@@ -260,7 +260,6 @@
             print "(does not shutdown, killing the process)";
             $pid = get_running_pid $info{'pgdata'}.'/postmaster.pid';
             kill (9, $pid) if $pid;
-            unlink $info{'pgdata'}.'/postmaster.pid';
 	    $result = 0;
         }
     } else {
diff -Nru postgresql-common-132/pg_wrapper postgresql-common-134/pg_wrapper
--- postgresql-common-132/pg_wrapper	2012-06-06 19:55:54.000000000 +0200
+++ postgresql-common-134/pg_wrapper	2012-07-25 18:03:59.000000000 +0200
@@ -111,9 +111,16 @@
 	    my $out;
 	    read PS, $out, 10000;
 	    close PS;
-	    my ($lib_path) = $out =~ m!(/lib/.*)/libedit.so!;
+	    if ($out =~ m!/libreadline.so!) {
+		# already linked against libreadline
+		@readlines = ();
+	    }
+	    else
+	    {
+		my ($lib_path) = $out =~ m!(/lib/.*)/libedit.so!;
 
-	    @readlines = sort(<$lib_path/libreadline.so.?>);
+		@readlines = sort(<$lib_path/libreadline.so.?>);
+	    }
 	}
     }
 
diff -Nru postgresql-common-132/testsuite postgresql-common-134/testsuite
--- postgresql-common-132/testsuite	2012-06-06 19:55:54.000000000 +0200
+++ postgresql-common-134/testsuite	2012-07-26 13:18:43.000000000 +0200
@@ -57,21 +57,28 @@
     install -d -m 1775 -o root -g postgres /var/log/postgresql
 fi
 
+# reset core limit for pg_ctl tests
+ulimit -S -c 0
+
 # set variables which cause taint check errors
 export IFS=' '
 export CDPATH=/usr
 export ENV=/nonexisting
 export BASH_ENV=/nonexisting
 
+if [ $# -eq 0 ]; then
+    set -- $TESTSDIR/*.t
+fi
+
 echo "====== Running all tests with default umask 022 ======="
 umask 022
-for T in $TESTSDIR/*.t; do
+for T; do
     echo "=== Running test `basename $T`... ==="
     perl $T
 done
 echo "====== Running all tests with tight umask 077 ======="
 umask 077
-for T in $TESTSDIR/*.t; do
+for T; do
     echo "=== Running test `basename $T`... ==="
     perl $T
 done

--- End Message ---
--- Begin Message ---
On Sat, 2012-07-28 at 15:53 +0200, Martin Pitt wrote:
> I have uploaded version 133 and 134 of postgresql-common which fixes
> two really important bugs which should go into Wheezy, as well as some
> rather harmless cleanup which I consider appropriate for Wheezy as
> well. Can this please considered to get an unblock request?

Unblocked; thanks.

One comment; this:

> |   [ Christoph Berg ]
> |   * Add .bzrignore file.
> 
> No runtime impact at all, just VCS cleanup.

doesn't end up in the source package, so probably shouldn't be in the
packaging changelog.

Regards,

Adam

--- End Message ---

Reply to: