1 |
scarabeus 11/01/26 16:49:10 |
2 |
|
3 |
Added: pgpool2.initd 3.0.1-fix_md5_malloc.patch |
4 |
pgpool2-tmpdir.patch |
5 |
Log: |
6 |
Initial commit. Fixes bug #196300. Ebuild made thanks to ccss.cz. |
7 |
|
8 |
(Portage version: 2.2.0_alpha19/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 dev-db/pgpool2/files/pgpool2.initd |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/pgpool2/files/pgpool2.initd?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/pgpool2/files/pgpool2.initd?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: pgpool2.initd |
17 |
=================================================================== |
18 |
#!/sbin/runscript |
19 |
# Copyright 1999-2011 Gentoo Foundation |
20 |
# Distributed under the terms of the GNU General Public License v2 |
21 |
# $Header: /var/cvsroot/gentoo-x86/dev-db/pgpool2/files/pgpool2.initd,v 1.1 2011/01/26 16:49:10 scarabeus Exp $ |
22 |
|
23 |
depend() { |
24 |
need net |
25 |
} |
26 |
|
27 |
ARGS="-f /etc/pgpool2/pgpool.conf -a /etc/pgpool2/pool_hba.conf -F /etc/pgpool2/pcp.conf -n" |
28 |
LOGFILE="/var/log/pgpool2.log" |
29 |
|
30 |
start() { |
31 |
ebegin "Starting pgpool2" |
32 |
|
33 |
if [ -n "${RC_UNAME}" ]; then |
34 |
PARAMS="--background --stdout '${LOGFILE}' --stderr '${LOGFILE}' -- ${ARGS}" |
35 |
else |
36 |
PARAMS="-- ${ARGS} >> '${LOGFILE}' 2>&1" |
37 |
fi |
38 |
|
39 |
start-stop-daemon --start --quiet --background --exec /usr/bin/pgpool ${PARAMS} |
40 |
eend $? |
41 |
} |
42 |
|
43 |
stop() { |
44 |
ebegin "Stopping pgpool2" |
45 |
start-stop-daemon --stop --quiet --exec /usr/bin/pgpool |
46 |
eend $? |
47 |
} |
48 |
|
49 |
restart() { |
50 |
stop |
51 |
sleep 3 |
52 |
start |
53 |
} |
54 |
|
55 |
|
56 |
|
57 |
1.1 dev-db/pgpool2/files/3.0.1-fix_md5_malloc.patch |
58 |
|
59 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/pgpool2/files/3.0.1-fix_md5_malloc.patch?rev=1.1&view=markup |
60 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/pgpool2/files/3.0.1-fix_md5_malloc.patch?rev=1.1&content-type=text/plain |
61 |
|
62 |
Index: 3.0.1-fix_md5_malloc.patch |
63 |
=================================================================== |
64 |
diff -burN pgpool-II-3.0.1/pool_auth.c pgpool-II-3.0.1.new/pool_auth.c |
65 |
--- pgpool-II-3.0.1/pool_auth.c 2010-09-28 10:00:48.000000000 +0200 |
66 |
+++ pgpool-II-3.0.1.new/pool_auth.c 2011-01-24 14:12:00.646197002 +0100 |
67 |
@@ -987,7 +987,7 @@ |
68 |
|
69 |
backend->auth_kind = 5; |
70 |
backend->pwd_size = ntohl(size) - 4; |
71 |
- memcpy(backend->password, password, backend->pwd_size); |
72 |
+ memcpy(backend->password, password, sizeof(password)); |
73 |
memcpy(backend->salt, salt, sizeof(salt)); |
74 |
} |
75 |
return kind; |
76 |
|
77 |
|
78 |
1.1 dev-db/pgpool2/files/pgpool2-tmpdir.patch |
79 |
|
80 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/pgpool2/files/pgpool2-tmpdir.patch?rev=1.1&view=markup |
81 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/pgpool2/files/pgpool2-tmpdir.patch?rev=1.1&content-type=text/plain |
82 |
|
83 |
Index: pgpool2-tmpdir.patch |
84 |
=================================================================== |
85 |
diff -Nur pgpool-II-1.0.2/pgpool.conf.sample pgpool-II-1.0.2.new/pgpool.conf.sample |
86 |
--- pgpool-II-1.0.2/pgpool.conf.sample 2006-11-29 22:54:26.000000000 +0100 |
87 |
+++ pgpool-II-1.0.2.new/pgpool.conf.sample 2007-02-28 15:38:36.000000000 +0100 |
88 |
@@ -7,21 +7,21 @@ |
89 |
listen_addresses = 'localhost' |
90 |
|
91 |
# Port number for pgpool |
92 |
-port = 9999 |
93 |
+port = 5433 |
94 |
|
95 |
# Port number for pgpool communication manager |
96 |
pcp_port = 9898 |
97 |
|
98 |
# Unix domain socket path. (The Debian package defaults to |
99 |
# /var/run/postgresql.) |
100 |
-socket_dir = '/tmp' |
101 |
+socket_dir = '/var/run/postgresql' |
102 |
|
103 |
# Unix domain socket path for pgpool communication manager. |
104 |
# (Debian package defaults to /var/run/postgresql) |
105 |
-pcp_socket_dir = '/tmp' |
106 |
+pcp_socket_dir = '/var/run/postgresql' |
107 |
|
108 |
# Unix domain socket path for the backend. Debian package defaults to /var/run/postgresql! |
109 |
-backend_socket_dir = '/tmp' |
110 |
+backend_socket_dir = '/var/run/postgresql' |
111 |
|
112 |
# pgpool communication manager timeout. 0 means no timeout, but strongly not recommended! |
113 |
pcp_timeout = 10 |
114 |
@@ -43,8 +43,8 @@ |
115 |
# 0 means no exit. |
116 |
child_max_connections = 0 |
117 |
|
118 |
-# Logging directory |
119 |
-logdir = '/tmp' |
120 |
+# Logging directory (more accurately, the directory for the PID file) |
121 |
+logdir = '/var/run/postgresql' |
122 |
|
123 |
# Replication mode |
124 |
replication_mode = false |
125 |
diff -Nur pgpool-II-1.0.2/pool.h pgpool-II-1.0.2.new/pool.h |
126 |
--- pgpool-II-1.0.2/pool.h 2007-02-13 04:19:04.000000000 +0100 |
127 |
+++ pgpool-II-1.0.2.new/pool.h 2007-02-28 15:39:07.000000000 +0100 |
128 |
@@ -46,10 +46,10 @@ |
129 |
#define PCP_PASSWD_FILE_NAME "pcp.conf" |
130 |
|
131 |
/* pid file directory */ |
132 |
-#define DEFAULT_LOGDIR "/tmp" |
133 |
+#define DEFAULT_LOGDIR "/var/run/postgresql" |
134 |
|
135 |
/* Unix domain socket directory */ |
136 |
-#define DEFAULT_SOCKET_DIR "/tmp" |
137 |
+#define DEFAULT_SOCKET_DIR "/var/run/postgresql" |
138 |
|
139 |
/* pid file name */ |
140 |
#define PID_FILE_NAME "pgpool.pid" |