1 |
patrick 09/09/09 22:58:27 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: postgresql-server-8.0.22.ebuild |
5 |
Log: |
6 |
Bump to 8.0.22 |
7 |
(Portage version: 2.2_rc40/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.21 dev-db/postgresql-server/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql-server/ChangeLog?rev=1.21&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql-server/ChangeLog?rev=1.21&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql-server/ChangeLog?r1=1.20&r2=1.21 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/ChangeLog,v |
19 |
retrieving revision 1.20 |
20 |
retrieving revision 1.21 |
21 |
diff -u -r1.20 -r1.21 |
22 |
--- ChangeLog 9 Sep 2009 22:34:45 -0000 1.20 |
23 |
+++ ChangeLog 9 Sep 2009 22:58:27 -0000 1.21 |
24 |
@@ -1,6 +1,12 @@ |
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.20 2009/09/09 22:34:45 patrick Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/ChangeLog,v 1.21 2009/09/09 22:58:27 patrick Exp $ |
29 |
+ |
30 |
+*postgresql-server-8.0.22 (09 Sep 2009) |
31 |
+ |
32 |
+ 09 Sep 2009; Patrick Lauer <patrick@g.o> |
33 |
+ +postgresql-server-8.0.22.ebuild: |
34 |
+ Bump to 8.0.22 |
35 |
|
36 |
*postgresql-server-8.2.14 (09 Sep 2009) |
37 |
*postgresql-server-8.1.18 (09 Sep 2009) |
38 |
|
39 |
|
40 |
|
41 |
1.1 dev-db/postgresql-server/postgresql-server-8.0.22.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql-server/postgresql-server-8.0.22.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql-server/postgresql-server-8.0.22.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: postgresql-server-8.0.22.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2009 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-8.0.22.ebuild,v 1.1 2009/09/09 22:58:27 patrick Exp $ |
51 |
|
52 |
EAPI="1" |
53 |
|
54 |
WANT_AUTOCONF="latest" |
55 |
WANT_AUTOMAKE="none" |
56 |
inherit eutils multilib toolchain-funcs versionator autotools |
57 |
|
58 |
KEYWORDS="~amd64 ~x86" |
59 |
|
60 |
DESCRIPTION="PostgreSQL server" |
61 |
HOMEPAGE="http://www.postgresql.org/" |
62 |
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2" |
63 |
LICENSE="POSTGRESQL" |
64 |
SLOT="$(get_version_component_range 1-2)" |
65 |
IUSE_LINGUAS=" |
66 |
linguas_af linguas_cs linguas_de linguas_es linguas_fa linguas_fr |
67 |
linguas_hr linguas_hu linguas_it linguas_ko linguas_nb linguas_pl |
68 |
linguas_pt_BR linguas_ro linguas_ru linguas_sk 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-${SLOT}-common.patch" \ |
101 |
"${FILESDIR}/postgresql-${SLOT}-server.patch" |
102 |
|
103 |
if hasq test ${FEATURES}; then |
104 |
sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" -i src/test/regress/{input,output}/tablespace.source |
105 |
fi |
106 |
|
107 |
eautoconf |
108 |
} |
109 |
|
110 |
src_compile() { |
111 |
# TODO: test if PPC really cannot work with other CFLAGS settings |
112 |
# use ppc && CFLAGS="-pipe -fsigned-char" |
113 |
|
114 |
# eval is needed to get along with pg_config quotation of space-rich entities. |
115 |
eval econf "$(/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \ |
116 |
$(use_with perl) \ |
117 |
$(use_with python) \ |
118 |
$(use_with tcl) \ |
119 |
--with-includes="/usr/include/postgresql-${SLOT}/" \ |
120 |
"$(built_with_use ~dev-db/postgresql-base-${PV} nls && use_enable nls nls "$(wanted_languages)")" \ |
121 |
|| die "configure failed" |
122 |
|
123 |
for bd in . contrib $(use xml && echo contrib/xml2) ; do |
124 |
PATH="/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ |
125 |
emake -C $bd -j1 LD="$(tc-getLD) $(get_abi_LDFLAGS)" \ |
126 |
PGXS=$(/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --pgxs) \ |
127 |
NO_PGXS=0 USE_PGXS=1 docdir=/usr/share/doc/${PF} || die "emake in $bd failed" |
128 |
done |
129 |
} |
130 |
|
131 |
src_install() { |
132 |
if use perl ; then |
133 |
mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig" |
134 |
sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \ |
135 |
"${S}/src/pl/plperl/GNUmakefile_orig" > "${S}/src/pl/plperl/GNUmakefile" |
136 |
fi |
137 |
|
138 |
for bd in . contrib $(use xml && echo contrib/xml2) ; do |
139 |
PATH="/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ |
140 |
emake install -C $bd -j1 DESTDIR="${D}" \ |
141 |
PGXS=$(/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --pgxs) \ |
142 |
NO_PGXS=0 USE_PGXS=1 docdir=/usr/share/doc/${PF} || 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}.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 |
sed -i \ |
273 |
-e '/test: horology/d' \ |
274 |
src/test/regress/{parallel_schedule,serial_schedule} || die "sed failed" |
275 |
|
276 |
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" |
277 |
PATH="/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \ |
278 |
emake -j1 check \ |
279 |
PGXS=$(/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --pgxs) \ |
280 |
NO_PGXS=0 USE_PGXS=1 SLOT=${SLOT} || die "Make check failed. See above for details." |
281 |
|
282 |
einfo "Yes, there are other tests which could be run." |
283 |
einfo "... and no, we don't plan to add/support them." |
284 |
einfo "For now, the main regressions tests will suffice." |
285 |
einfo "If you think other tests are necessary, please submit a" |
286 |
einfo "bug including a patch for this ebuild to enable them." |
287 |
} |