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