Bug#703696: Patch to ensure /var/run/postgresql is present

2013-04-10 Thread Christoph Berg
Re: Scott Kitterman 2013-04-10 4760683.lmcPC93o9i@scott-latitude-e6320
 On Tuesday, April 09, 2013 07:29:24 PM you wrote:
  Tags: patch
  
  The following patch to pgpool2's init script makes
  sure /var/run/postgresql exists and sets proper permissions so it works
  with and without PostgreSQL coexisting on the same machine.
 
 If postgresql isn't installed, how does the postgresql user get created for 
 the chown in the patch to work?

pgpool2 depends on postgresql-common which creates the user.

 Unless there's some specific reason to put the pgpool2 pid file in 
 /var/run/postgresql, don't do that.

Iirc it needs a writable directory, which /var/run isn't (owned by
root). I'd also rather not change the pid location at that point in
the freeze.

Fixes are on the way, thanks for spotting.

Christoph
-- 
c...@df7cb.de | http://www.df7cb.de/


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#703696: Patch to ensure /var/run/postgresql is present

2013-04-09 Thread Ernesto Hernández-Novich
Tags: patch

The following patch to pgpool2's init script makes
sure /var/run/postgresql exists and sets proper permissions so it works
with and without PostgreSQL coexisting on the same machine.
-- 
Prof. Ernesto Hernández-Novich - MYS-220C - @iamemhn
Geek by nature, Linux by choice, Debian of course.
If you can't aptitude it, it isn't useful or doesn't exist.
GPG Key Fingerprint = 438C 49A2 A8C7 E7D7 1500 C507 96D6 A3D6 2F4C 85E3
diff -Naur pgpool2-3.1.3.orig/debian/pgpool2.init.d pgpool2-3.1.3/debian/pgpool2.init.d
--- pgpool2-3.1.3.orig/debian/pgpool2.init.d	2012-10-12 04:49:23.0 -0430
+++ pgpool2-3.1.3/debian/pgpool2.init.d	2013-04-09 19:16:46.698088278 -0430
@@ -38,6 +38,11 @@
 
 
 d_start() {
+# dirs under /var/run can go away on reboots
+mkdir -p /var/run/postgresql
+chmod u+rwx,g+rwxs,o+rw /var/run/postgresql/# 2775
+chown postgres:postgres /var/run/postgresql/
+
 	if is_running; then
 		:
 	else


Bug#703696: Patch to ensure /var/run/postgresql is present

2013-04-09 Thread Scott Kitterman
On Tuesday, April 09, 2013 07:29:24 PM you wrote:
 Tags: patch
 
 The following patch to pgpool2's init script makes
 sure /var/run/postgresql exists and sets proper permissions so it works
 with and without PostgreSQL coexisting on the same machine.

If postgresql isn't installed, how does the postgresql user get created for 
the chown in the patch to work?

Unless there's some specific reason to put the pgpool2 pid file in 
/var/run/postgresql, don't do that.

signature.asc
Description: This is a digitally signed message part.