1 |
patrick 09/10/03 16:28:57 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: postgresql-server-7.4.26.ebuild |
5 |
Log: |
6 |
Bump to 7.4.26 |
7 |
(Portage version: 2.2_rc42/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.25 dev-db/postgresql-server/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql-server/ChangeLog?rev=1.25&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql-server/ChangeLog?rev=1.25&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql-server/ChangeLog?r1=1.24&r2=1.25 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/ChangeLog,v |
19 |
retrieving revision 1.24 |
20 |
retrieving revision 1.25 |
21 |
diff -u -r1.24 -r1.25 |
22 |
--- ChangeLog 1 Oct 2009 20:55:34 -0000 1.24 |
23 |
+++ ChangeLog 3 Oct 2009 16:28:56 -0000 1.25 |
24 |
@@ -1,6 +1,13 @@ |
25 |
# ChangeLog for dev-db/postgresql-server |
26 |
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/ChangeLog,v 1.24 2009/10/01 20:55:34 klausman Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/ChangeLog,v 1.25 2009/10/03 16:28:56 patrick Exp $ |
29 |
+ |
30 |
+*postgresql-server-7.4.26 (03 Oct 2009) |
31 |
+ |
32 |
+ 03 Oct 2009; Patrick Lauer <patrick@g.o> |
33 |
+ +postgresql-server-7.4.26.ebuild, +files/postgresql-7.4.26-autoconf.patch: |
34 |
+ Bump to 7.4.26, fixes other half of #286700. Thanks to Aaron W. Swenson |
35 |
+ for testing and patching. |
36 |
|
37 |
01 Oct 2009; Tobias Klausmann <klausman@g.o> |
38 |
postgresql-server-8.4.1.ebuild: |
39 |
|
40 |
|
41 |
|
42 |
1.1 dev-db/postgresql-server/postgresql-server-7.4.26.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql-server/postgresql-server-7.4.26.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql-server/postgresql-server-7.4.26.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: postgresql-server-7.4.26.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2009 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-7.4.26.ebuild,v 1.1 2009/10/03 16:28:56 patrick Exp $ |
52 |
|
53 |
EAPI="1" |
54 |
|
55 |
WANT_AUTOCONF="latest" |
56 |
WANT_AUTOMAKE="none" |
57 |
inherit eutils multilib toolchain-funcs versionator autotools |
58 |
|
59 |
KEYWORDS="~amd64 ~x86" |
60 |
|
61 |
DESCRIPTION="PostgreSQL server" |
62 |
HOMEPAGE="http://www.postgresql.org/" |
63 |
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2" |
64 |
LICENSE="POSTGRESQL" |
65 |
SLOT="$(get_version_component_range 1-2)" |
66 |
IUSE_LINGUAS=" |
67 |
linguas_cs linguas_de linguas_es linguas_fr linguas_hr linguas_hu |
68 |
linguas_it linguas_nb linguas_pt_BR linguas_ru linguas_sl linguas_sv |
69 |
linguas_tr linguas_zh_CN linguas_zh_TW" |
70 |
IUSE="doc perl python selinux tcl xml nls kernel_linux ${IUSE_LINGUAS}" |
71 |
|
72 |
wanted_languages() { |
73 |
for u in ${IUSE_LINGUAS} ; do |
74 |
use $u && echo -n "${u#linguas_} " |
75 |
done |
76 |
} |
77 |
|
78 |
RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT} |
79 |
perl? ( >=dev-lang/perl-5.6.1-r2 ) |
80 |
python? ( >=dev-lang/python-2.2 dev-python/egenix-mx-base ) |
81 |
selinux? ( sec-policy/selinux-postgresql ) |
82 |
tcl? ( >=dev-lang/tcl-8 ) |
83 |
xml? ( dev-libs/libxml2 dev-libs/libxslt )" |
84 |
DEPEND="${RDEPEND} |
85 |
sys-devel/flex |
86 |
xml? ( dev-util/pkgconfig )" |
87 |
PDEPEND="doc? ( dev-db/postgresql-docs:${SLOT} )" |
88 |
|
89 |
S="${WORKDIR}/postgresql-${PV}" |
90 |
|
91 |
pkg_setup() { |
92 |
enewgroup postgres 70 |
93 |
enewuser postgres 70 /bin/bash /var/lib/postgresql postgres |
94 |
} |
95 |
|
96 |
src_unpack() { |
97 |
unpack ${A} |
98 |
cd "${S}" |
99 |
|
100 |
epatch "${FILESDIR}/postgresql-${PV}-autoconf.patch" \ |
101 |
"${FILESDIR}/postgresql-${SLOT}-vacuum-delay.patch" \ |
102 |
"${FILESDIR}/postgresql-${SLOT}-server.patch" |
103 |
|
104 |
if hasq test ${FEATURES}; then |
105 |
epatch "${FILESDIR}/postgresql-${SLOT}-regress.patch" |
106 |
fi |
107 |
|
108 |
eautoreconf |
109 |
} |
110 |
|
111 |
src_compile() { |
112 |
|
113 |
# eval is needed to get along with pg_config quotation of space-rich entities. |
114 |
eval econf "$(/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \ |
115 |
$(use_with perl) \ |
116 |
$(use_with python) \ |
117 |
$(use_with tcl) \ |
118 |
--with-includes="/usr/include/postgresql-${SLOT}/" \ |
119 |
--with-libs="/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)/" \ |
120 |
"$(built_with_use ~dev-db/postgresql-base-${PV} nls && use_enable nls nls "$(wanted_languages)")" \ |
121 |
"CFLAGS='${CFLAGS} $(use xml && pkg-config --cflags libxml-2.0)'" \ |
122 |
"LIBS='${LIBS} -lpq $(use xml && pkg-config --libs libxml-2.0) -L/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)'" \ |
123 |
|| die "configure failed" |
124 |
|
125 |
for bd in . contrib $(use xml && echo contrib/xml) ; do |
126 |
PATH="/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ |
127 |
emake -C $bd -j1 LD="$(tc-getLD) $(get_abi_LDFLAGS)" \ |
128 |
docdir=/usr/share/doc/${PF} SLOT=${SLOT} || die "emake in $bd failed" |
129 |
done |
130 |
} |
131 |
|
132 |
src_install() { |
133 |
if use perl ; then |
134 |
mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig" |
135 |
sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \ |
136 |
"${S}/src/pl/plperl/GNUmakefile_orig" > "${S}/src/pl/plperl/GNUmakefile" |
137 |
fi |
138 |
|
139 |
for bd in . contrib $(use xml && echo contrib/xml) ; do |
140 |
PATH="/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ |
141 |
emake install -C $bd -j1 DESTDIR="${D}" \ |
142 |
docdir=/usr/share/doc/${PF} SLOT=${SLOT} || die "emake install in $bd failed" |
143 |
done |
144 |
|
145 |
rm -rf "${D}/usr/share/postgresql-${SLOT}/man/man7/" "${D}/usr/share/doc/${PF}/html" |
146 |
rm "${D}"/usr/share/postgresql-${SLOT}/man/man1/{clusterdb,create{db,lang,user},drop{db,lang,user},ecpg,pg_{config,dump,dumpall,restore},psql,vacuumdb,pgtksh,pgtclsh}.1 |
147 |
|
148 |
dodoc README HISTORY doc/{README.*,TODO,bug.template} |
149 |
|
150 |
dodir /etc/eselect/postgresql/slots/${SLOT} |
151 |
cat >"${D}/etc/eselect/postgresql/slots/${SLOT}/service" <<-__EOF__ |
152 |
postgres_ebuilds="\${postgres_ebuilds} ${PF}" |
153 |
postgres_service="postgresql-${SLOT}" |
154 |
__EOF__ |
155 |
|
156 |
newinitd "${FILESDIR}/postgresql.init-${SLOT}" postgresql-${SLOT} || die "Inserting init.d-file failed" |
157 |
newconfd "${FILESDIR}/postgresql.conf-${SLOT}" postgresql-${SLOT} || die "Inserting conf.d-file failed" |
158 |
|
159 |
keepdir /var/run/postgresql |
160 |
fperms 0770 /var/run/postgresql |
161 |
fowners postgres:postgres /var/run/postgresql |
162 |
} |
163 |
|
164 |
pkg_postinst() { |
165 |
eselect postgresql update |
166 |
[[ "$(eselect postgresql show)" = "(none)" ]] && eselect postgresql set ${SLOT} |
167 |
[[ "$(eselect postgresql show-service)" = "(none)" ]] && eselect postgresql set-service ${SLOT} |
168 |
|
169 |
ewarn "Please note that the standard location of the socket has changed from /tmp" |
170 |
ewarn "to /var/run/postgresql and you have to be in the 'postgres' group to access" |
171 |
ewarn "the socket." |
172 |
ewarn "This can break applications which have the standard location hard-coded." |
173 |
ewarn "If such an application links against the libpq, please re-emerge it," |
174 |
ewarn "if that doesn't help or the application accesses the socket without using libpq," |
175 |
ewarn "please file a bug-report." |
176 |
ewarn "You can set PGOPTS='-k /tmp' in /etc/conf.d/postgresql-${SLOT} to restore the original location." |
177 |
|
178 |
elog "Execute the following command to setup the initial database environment:" |
179 |
elog |
180 |
elog "emerge --config =${CATEGORY}/${PF}" |
181 |
elog |
182 |
} |
183 |
|
184 |
pkg_postrm() { |
185 |
eselect postgresql update |
186 |
} |
187 |
|
188 |
pkg_config() { |
189 |
[[ -z "${PGDATA}" ]] && PGDATA="/var/lib/postgresql/${SLOT}/data" |
190 |
|
191 |
einfo "You can pass options to initdb by setting the PG_INITDB_OPTS variable." |
192 |
einfo "More information can be found here:" |
193 |
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" |
194 |
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" |
195 |
einfo "Simply add the options you would have added to initdb to the PG_INITDB_OPTS variable." |
196 |
einfo |
197 |
einfo "You can change the directory where the database cluster is being created by setting" |
198 |
einfo "the PGDATA variable." |
199 |
einfo |
200 |
einfo "PG_INITDB_OPTS is currently set to:" |
201 |
einfo " \"${PG_INITDB_OPTS}\"" |
202 |
einfo "and the database cluster will be created in:" |
203 |
einfo " \"${PGDATA}\"" |
204 |
einfo "Are you ready to continue? (Y/n)" |
205 |
read answer |
206 |
[ -z $answer ] && answer=Y |
207 |
[ "$answer" == "Y" ] || [ "$answer" == "y" ] || die "aborted" |
208 |
|
209 |
if [[ -f "${PGDATA}/PG_VERSION" ]] ; then |
210 |
eerror "The given directory \"${PGDATA}\" already contains a database cluster." |
211 |
die "cluster already exists" |
212 |
fi |
213 |
|
214 |
[ -z "${PG_MAX_CONNECTIONS}" ] && PG_MAX_CONNECTIONS="128" |
215 |
einfo "Checking system parameters..." |
216 |
|
217 |
if ! use kernel_linux ; then |
218 |
SKIP_SYSTEM_TESTS=yes |
219 |
einfo " Tests not supported on this OS (yet)" |
220 |
fi |
221 |
|
222 |
if [ -z ${SKIP_SYSTEM_TESTS} ] ; then |
223 |
einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..." |
224 |
|
225 |
local SEMMSL=$(sysctl -n kernel.sem | cut -f1) |
226 |
local SEMMNS=$(sysctl -n kernel.sem | cut -f2) |
227 |
local SEMMNI=$(sysctl -n kernel.sem | cut -f4) |
228 |
local SHMMAX=$(sysctl -n kernel.shmmax) |
229 |
|
230 |
local SEMMSL_MIN=17 |
231 |
local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 )) |
232 |
local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 )) |
233 |
local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) )) |
234 |
|
235 |
for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do |
236 |
if [ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ] ; then |
237 |
eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)" |
238 |
eerror "You have now several options:" |
239 |
eerror " - Change the mentioned system parameter" |
240 |
eerror " - Lower the number of max.connections by setting PG_MAX_CONNECTIONS to a value lower than ${PG_MAX_CONNECTIONS}" |
241 |
eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely" |
242 |
eerror "More information can be found here:" |
243 |
eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html" |
244 |
die "system test failed" |
245 |
fi |
246 |
done |
247 |
einfo "Passed." |
248 |
else |
249 |
einfo "Skipped." |
250 |
fi |
251 |
|
252 |
einfo "Creating the data directory ..." |
253 |
mkdir -p "${PGDATA}" |
254 |
chown -Rf postgres:postgres "${PGDATA}" |
255 |
chmod 0700 "${PGDATA}" |
256 |
|
257 |
einfo "Initializing the database ..." |
258 |
|
259 |
su postgres -c "/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb --pgdata \"${PGDATA}\" ${PG_INITDB_OPTS}" |
260 |
|
261 |
einfo |
262 |
einfo "You can use the '${ROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL instead of 'pg_ctl'." |
263 |
einfo |
264 |
|
265 |
if [ "${PGDATA}" != "/var/lib/postgresql/${SLOT}/data" ] ; then |
266 |
ewarn "You didn't install the database cluster in the standard location, please make sure that you set" |
267 |
ewarn "PGDATA=\"${PGDATA}\" in the appropriate conf.d file (probably /etc/conf.d/postgresql-${SLOT})" |
268 |
fi |
269 |
} |
270 |
|
271 |
src_test() { |
272 |
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" |
273 |
PATH="/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ |
274 |
emake -j1 check \ |
275 |
PGXS=$(/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --pgxs) \ |
276 |
NO_PGXS=0 USE_PGXS=1 SLOT=${SLOT} || die "Make check failed. See above for details." |
277 |
|
278 |
einfo "Yes, there are other tests which could be run." |
279 |
einfo "... and no, we don't plan to add/support them." |
280 |
einfo "For now, the main regressions tests will suffice." |
281 |
einfo "If you think other tests are necessary, please submit a" |
282 |
einfo "bug including a patch for this ebuild to enable them." |
283 |
} |