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