Your message dated Sun, 10 Sep 2006 05:02:04 -0700
with message-id <[EMAIL PROTECTED]>
and subject line Bug#386148: fixed in postgresql-common 60
has caused the attached Bug report 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 I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--- Begin Message ---
Package: postgresql-common
Version: 59
Severity: minor
Tags: patch
Hi,
I made the following improvements to some of the pg_* scripts:
- pg_createcluster creates and sets permissions on a non-standard socketdir
- pg_createcluster(8) manpage now has consistent long-option syntax
- pg_dropcluster removes a non-standard socketdir
The patches are attached and tested on my box.
Regards,
Bastian
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-treasure8
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)
Versions of packages postgresql-common depends on:
ii adduser 3.97 Add and remove users and groups
ii debconf [debconf-2.0] 1.5.3 Debian configuration management sy
ii lsb-base 3.1-15 Linux Standard Base 3.1 init scrip
ii postgresql-client-common 59 manager for multiple PostgreSQL cl
ii procps 1:3.2.7-2 /proc file system utilities
ii ssl-cert 1.0.13 Simple debconf wrapper for openssl
postgresql-common recommends no packages.
-- debconf information:
postgresql-common/obsolete-major:
postgresql-common/untransitioned:
--- /usr/bin/pg_createcluster.orig 2006-09-05 12:14:16.000000000 +0200
+++ /usr/bin/pg_createcluster 2006-09-05 16:31:47.000000000 +0200
@@ -304,6 +304,15 @@
setup_pg_hba if $newcluster;
# configure socket directory
+if ($socketdir) {
+ if (-e $socketdir) {
+ chmod 0750, $socketdir;
+ chown $owneruid, $ownergid, $socketdir;
+ }
+ elsif (system 'install', '-d', '-m', '0750', '-o', $owneruid, '-g',
$ownergid, $socketdir) {
+ error 'could not create socket directory';
+ }
+}
$orig_euid = $>;
$> = $owneruid;
unless ($socketdir) {
@@ -453,8 +462,12 @@
it is integrated into the B<postgresql-common> structure by moving the
configuration file and creating the C<pgdata> link.
+If a custom socket directory is given and it does not exist, it is created.
+The permissions are adjusted to allow write access to the cluster owner and
+group.
+
If the log file does not exist, it is created. In any case the permissions are
-adjusted to allow write access to the cluster owner. Please note that
+adjusted to allow write access to the cluster owner and group. Please note that
C<postgresql.conf> can be customized to specify C<log_directory> and/or
C<log_filename>; if at least one of these options is present, then the symbolic
link C<log> in the cluster configuration directory is ignored.
@@ -502,7 +515,7 @@
Explicitly set the path for the L<postmaster(1)> server log file. Defaults to
C</var/log/postgresql/postgresql->I<version>C<->I<cluster>C<.log>.
-=item B<-e> I<encoding>, B<--encoding> I<encoding>
+=item B<-e> I<encoding>, B<--encoding=>I<encoding>
Select the encoding of the template database. This will also be the default
encoding of any database you create later, unless you override it there. The
@@ -510,7 +523,7 @@
character sets supported by the PostgreSQL server are described in the
documentation.
-=item B<-p> I<port>, B<--port> I<port>
+=item B<-p> I<port>, B<--port=>I<port>
Select the port the new cluster listens on (for the Unix socket and the TCP
port); this must be a number between 1024 and 65535, since PostgreSQL does not
@@ -523,7 +536,7 @@
C<pg_ctlcluster> I<version cluster> C<start> on it). By default, the cluster is
not started.
-=item B<--start-conf> B<auto>|B<manual>|B<disabled>
+=item B<--start-conf=>B<auto>|B<manual>|B<disabled>
Set the initial value in the C<start.conf> configuration file. See B<STARTUP
CONTROL> below. By default, B<auto> is used, which means that the cluster is
--- /usr/bin/pg_dropcluster.orig 2006-09-05 12:29:12.000000000 +0200
+++ /usr/bin/pg_dropcluster 2006-09-05 16:31:47.000000000 +0200
@@ -66,6 +66,9 @@
$c.'/environment';
unlink $info{'logfile'} if defined ($info{'logfile'});
unlink $info{'avac_logfile'} if defined ($info{'avac_logfile'});
+if ($info{'socketdir'} !~ /^(\/tmp|\/var\/run\/postgresql)\/?$/) {
+ rmdir $info{'socketdir'};
+}
rmdir $c;
rmdir "/etc/postgresql/$version";
rmdir "/var/lib/postgresql/$version/$cluster";
@@ -90,6 +93,8 @@
were created by L<pg_createcluster(1)>. If the configuration directory
(C</etc/postgresql/>I<version>C</>I<cluster>) is empty after this, it is
removed as well.
+An empty socket directory other than B</var/run/postgresql> or B</tmp> is
+also removed.
Usually a cluster which still has a running server attached will not be
deleted. To override this, the B<--stop> option forces a server shutdown
--- End Message ---
--- Begin Message ---
Source: postgresql-common
Source-Version: 60
We believe that the bug you reported is fixed in the latest version of
postgresql-common, which is due to be installed in the Debian FTP archive:
postgresql-client-common_60_all.deb
to pool/main/p/postgresql-common/postgresql-client-common_60_all.deb
postgresql-common_60.dsc
to pool/main/p/postgresql-common/postgresql-common_60.dsc
postgresql-common_60.tar.gz
to pool/main/p/postgresql-common/postgresql-common_60.tar.gz
postgresql-common_60_all.deb
to pool/main/p/postgresql-common/postgresql-common_60_all.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Martin Pitt <[EMAIL PROTECTED]> (supplier of updated postgresql-common package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Sun, 10 Sep 2006 13:31:11 +0200
Source: postgresql-common
Binary: postgresql-client-common postgresql-common
Architecture: source all
Version: 60
Distribution: unstable
Urgency: low
Maintainer: Martin Pitt <[EMAIL PROTECTED]>
Changed-By: Martin Pitt <[EMAIL PROTECTED]>
Description:
postgresql-client-common - manager for multiple PostgreSQL client versions
postgresql-common - manager for PostgreSQL database clusters
Closes: 384757 385971 386148 386704
Changes:
postgresql-common (60) unstable; urgency=low
.
* Update Czech debconf translations, thanks to Miroslav Kure.
Closes: #384757
* t/090_multicluster.t: Check that $PGHOST and $PGDATABASE environment
variables are respected and have the correct precedence. (This reproduces
#385971). Now this test has full coverage of all libpq environment
variables but $PGUSER (which is not used at all anywhere).
* pg_wrapper: Do not override $PGDATABASE and $PGHOST with user_clusters
map. Closes: #385971
* Update Dutch debconf translations, thanks to Vincent Zweije.
Closes: #386704
* pg_createcluster: Fix POD to have consistent long-option syntax. Thanks to
Bastian Kleineidam! (Part of bug #386148)
* Improve handling of custom socket directories:
- pg_createcluster: Create a nonexisting directory.
- pg_dropcluster: Remove empty socket directory unless it's /tmp or
/var/run/postgresql.
- Thanks to Bastian Kleineidam for the suggestions.
- t/030_errors.t: Do not create our custom socket dir ourselves any more,
since pg_createcluster is now supposed to handle that (thus providing a
test case).
- Closes: #386148
Files:
607359e1af56556a1117558f9c5cc8c3 604 misc optional postgresql-common_60.dsc
2708d064651ed8e23e9fc1e0c4cbe672 87381 misc optional
postgresql-common_60.tar.gz
45d8cdff81a47452f353f05606c5e9c0 93046 misc optional
postgresql-common_60_all.deb
25f012f4c79b4c5fd153a4d702ea7286 37400 misc optional
postgresql-client-common_60_all.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFFA/t0DecnbV4Fd/IRAtAMAJ4i2sk4FyAKBQMvtD3jIIzpYNvbOACfU8ta
0szN1HW3J7oHtNe6FNbSwVg=
=h68m
-----END PGP SIGNATURE-----
--- End Message ---