1 |
mjolnir 08/01/13 01:44:21 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: postgresql-8.2.6.ebuild |
5 |
Log: |
6 |
Bump to 8.2.6 for #204760. Thanks to Michael Kefeder for ebuilds. |
7 |
(Portage version: 2.1.4) |
8 |
|
9 |
Revision Changes Path |
10 |
1.354 dev-db/postgresql/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql/ChangeLog?rev=1.354&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql/ChangeLog?rev=1.354&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql/ChangeLog?r1=1.353&r2=1.354 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/dev-db/postgresql/ChangeLog,v |
19 |
retrieving revision 1.353 |
20 |
retrieving revision 1.354 |
21 |
diff -u -r1.353 -r1.354 |
22 |
--- ChangeLog 28 Oct 2007 12:56:33 -0000 1.353 |
23 |
+++ ChangeLog 13 Jan 2008 01:44:21 -0000 1.354 |
24 |
@@ -1,6 +1,17 @@ |
25 |
# ChangeLog for dev-db/postgresql |
26 |
-# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/ChangeLog,v 1.353 2007/10/28 12:56:33 phreak Exp $ |
28 |
+# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 |
29 |
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/ChangeLog,v 1.354 2008/01/13 01:44:21 mjolnir Exp $ |
30 |
+ |
31 |
+*postgresql-8.2.6 (13 Jan 2008) |
32 |
+ |
33 |
+ 13 Jan 2008; Martin Jackson <mjolnir@g.o> |
34 |
+ +files/postgresql-8.2.6-gentoo.patch, |
35 |
+ +files/postgresql-8.2.6-no-test.patch, |
36 |
+ +files/postgresql-8.2.6-python-threads.patch, |
37 |
+ +files/postgresql-8.2.6-regress_fix.patch, |
38 |
+ +files/postgresql-8.2.6-regress_su.patch, |
39 |
+ +files/postgresql-8.2.6-sh.patch, +postgresql-8.2.6.ebuild: |
40 |
+ Bump to 8.2.6 for #204760. Thanks to Michael Kefeder for ebuilds. |
41 |
|
42 |
28 Oct 2007; Christian Heim <phreak@g.o> postgresql-7.3.19.ebuild, |
43 |
postgresql-7.4.17.ebuild, postgresql-8.0.13.ebuild, |
44 |
|
45 |
|
46 |
|
47 |
1.1 dev-db/postgresql/postgresql-8.2.6.ebuild |
48 |
|
49 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql/postgresql-8.2.6.ebuild?rev=1.1&view=markup |
50 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql/postgresql-8.2.6.ebuild?rev=1.1&content-type=text/plain |
51 |
|
52 |
Index: postgresql-8.2.6.ebuild |
53 |
=================================================================== |
54 |
# Copyright 1999-2008 Gentoo Foundation |
55 |
# Distributed under the terms of the GNU General Public License v2 |
56 |
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/postgresql-8.2.6.ebuild,v 1.1 2008/01/13 01:44:21 mjolnir Exp $ |
57 |
|
58 |
inherit eutils flag-o-matic multilib toolchain-funcs versionator |
59 |
|
60 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" |
61 |
|
62 |
DESCRIPTION="Sophisticated and powerful Object-Relational DBMS." |
63 |
HOMEPAGE="http://www.postgresql.org/" |
64 |
SRC_URI="mirror://postgresql/source/v${PV}/${PN}-${PV}.tar.bz2" |
65 |
LICENSE="POSTGRESQL" |
66 |
SLOT="0" |
67 |
IUSE="doc kerberos kernel_linux nls pam perl pg-intdatetime python readline selinux ssl tcl test xml zlib" |
68 |
|
69 |
RDEPEND="~dev-db/libpq-${PV} |
70 |
>=sys-libs/ncurses-5.2 |
71 |
kerberos? ( virtual/krb5 ) |
72 |
pam? ( virtual/pam ) |
73 |
perl? ( >=dev-lang/perl-5.6.1-r2 ) |
74 |
python? ( >=dev-lang/python-2.2 dev-python/egenix-mx-base ) |
75 |
readline? ( >=sys-libs/readline-4.1 ) |
76 |
selinux? ( sec-policy/selinux-postgresql ) |
77 |
ssl? ( >=dev-libs/openssl-0.9.6-r1 ) |
78 |
tcl? ( >=dev-lang/tcl-8 ) |
79 |
xml? ( dev-libs/libxml2 dev-libs/libxslt ) |
80 |
zlib? ( >=sys-libs/zlib-1.1.3 )" |
81 |
DEPEND="${RDEPEND} |
82 |
sys-devel/autoconf |
83 |
>=sys-devel/bison-1.875 |
84 |
nls? ( sys-devel/gettext ) |
85 |
xml? ( dev-util/pkgconfig )" |
86 |
|
87 |
PG_DIR="/var/lib/postgresql" |
88 |
[[ -z "${PG_MAX_CONNECTIONS}" ]] && PG_MAX_CONNECTIONS="512" |
89 |
|
90 |
pkg_setup() { |
91 |
if [[ -f "${PG_DIR}/data/PG_VERSION" ]] ; then |
92 |
if [[ $(cat "${PG_DIR}/data/PG_VERSION") != $(get_version_component_range 1-2) ]] ; then |
93 |
eerror "PostgreSQL ${PV} cannot upgrade your existing databases, you must" |
94 |
eerror "use pg_dump to export your existing databases to a file, and then" |
95 |
eerror "pg_restore to import them when you have upgraded completely." |
96 |
eerror "You must remove your entire database directory to continue." |
97 |
eerror "(database directory = ${PG_DIR})." |
98 |
die "Remove your database directory to continue" |
99 |
fi |
100 |
fi |
101 |
enewgroup postgres 70 |
102 |
enewuser postgres 70 /bin/bash /var/lib postgres |
103 |
} |
104 |
|
105 |
src_unpack() { |
106 |
unpack ${A} |
107 |
cd "${S}" |
108 |
|
109 |
epatch "${FILESDIR}/${PN}-${PV}-gentoo.patch" |
110 |
epatch "${FILESDIR}/${PN}-${PV}-sh.patch" |
111 |
|
112 |
# Prepare package for future tests |
113 |
if use test ; then |
114 |
# Fix sandbox violation |
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 |
|
117 |
# Fix broken tests |
118 |
epatch "${FILESDIR}/${PN}-${PV}-regress_fix.patch" |
119 |
|
120 |
# We need to run the tests as a non-root user, portage seems the most fitting here, |
121 |
# so if userpriv is enabled, we use it directly. If userpriv is disabled, we need to |
122 |
# su - to a valid user, portage again, so we patch the test-scripts to do that. |
123 |
mkdir -p "${S}/src/test/regress/tmp_check" |
124 |
chown portage "${S}/src/test/regress/tmp_check" |
125 |
einfo "Tests will be run as user portage." |
126 |
if ! hasq userpriv ${FEATURES} ; then |
127 |
mkdir -p "${S}/src/test/regress/results" |
128 |
chown portage "${S}/src/test/regress/results" |
129 |
epatch "${FILESDIR}/${PN}-${PV}-regress_su.patch" |
130 |
fi |
131 |
fi |
132 |
} |
133 |
|
134 |
src_compile() { |
135 |
filter-flags -ffast-math -feliminate-dwarf2-dups |
136 |
|
137 |
econf --prefix=/usr \ |
138 |
--includedir=/usr/include/postgresql/pgsql \ |
139 |
--sysconfdir=/etc/postgresql \ |
140 |
--mandir=/usr/share/man \ |
141 |
--host=${CHOST} \ |
142 |
--with-docdir=/usr/share/doc/${PF} \ |
143 |
--libdir=/usr/$(get_libdir) \ |
144 |
--enable-depend \ |
145 |
$(use_with kerberos krb5) \ |
146 |
$(use_enable nls ) \ |
147 |
$(use_with pam) \ |
148 |
$(use_with perl) \ |
149 |
$(use_enable pg-intdatetime integer-datetimes ) \ |
150 |
$(use_with python) \ |
151 |
$(use_with readline) \ |
152 |
$(use_with ssl openssl) \ |
153 |
$(use_with tcl) \ |
154 |
$(use_with zlib) \ |
155 |
|| die "configure failed" |
156 |
|
157 |
emake -j1 LD="$(tc-getLD) $(get_abi_LDFLAGS)" || die "main emake failed" |
158 |
|
159 |
cd "${S}/contrib" |
160 |
emake -j1 LD="$(tc-getLD) $(get_abi_LDFLAGS)" || die "contrib emake failed" |
161 |
|
162 |
if use xml ; then |
163 |
cd "${S}/contrib/xml2" |
164 |
emake -j1 LD="$(tc-getLD) $(get_abi_LDFLAGS)" || die "contrib/xml2 emake failed" |
165 |
fi |
166 |
} |
167 |
|
168 |
src_install() { |
169 |
if use perl ; then |
170 |
mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig" |
171 |
sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \ |
172 |
"${S}/src/pl/plperl/GNUmakefile_orig" > "${S}/src/pl/plperl/GNUmakefile" |
173 |
fi |
174 |
|
175 |
cd "${S}" |
176 |
emake -j1 DESTDIR="${D}" LIBDIR="${D}/usr/$(get_libdir)" install || die "main emake install failed" |
177 |
|
178 |
cd "${S}/contrib" |
179 |
emake -j1 DESTDIR="${D}" LIBDIR="${D}/usr/$(get_libdir)" install || die "contrib emake install failed" |
180 |
|
181 |
if use xml ; then |
182 |
cd "${S}/contrib/xml2" |
183 |
emake -j1 DESTDIR="${D}" LIBDIR="${D}/usr/$(get_libdir)" install || die "contrib/xml2 emake install failed" |
184 |
fi |
185 |
|
186 |
cd "${S}" |
187 |
dodoc README HISTORY |
188 |
|
189 |
cd "${S}/doc" |
190 |
dodoc FAQ* README.* TODO bug.template |
191 |
|
192 |
if use doc ; then |
193 |
cd "${S}/doc" |
194 |
docinto FAQ_html |
195 |
dodoc src/FAQ/* |
196 |
docinto sgml |
197 |
dodoc src/sgml/*.{sgml,dsl} |
198 |
docinto sgml/ref |
199 |
dodoc src/sgml/ref/*.sgml |
200 |
docinto TODO.detail |
201 |
dodoc TODO.detail/* |
202 |
fi |
203 |
|
204 |
newinitd "${FILESDIR}/postgresql.init-${PV%.*}" postgresql || die "Inserting init.d-file failed" |
205 |
newconfd "${FILESDIR}/postgresql.conf-${PV%.*}" postgresql || die "Inserting conf.d-file failed" |
206 |
} |
207 |
|
208 |
pkg_postinst() { |
209 |
elog "Execute the following command to setup the initial database environment:" |
210 |
elog |
211 |
elog "emerge --config =${PF}" |
212 |
elog |
213 |
elog "The autovacuum function, which was in contrib, has been moved to the main" |
214 |
elog "PostgreSQL functions starting with 8.1." |
215 |
elog "You can enable it in ${ROOT}/etc/postgresql/postgresql.conf." |
216 |
elog |
217 |
elog "If you need a global psqlrc-file, you can place it in '${ROOT}/etc/postgresql/'." |
218 |
} |
219 |
|
220 |
pkg_config() { |
221 |
einfo "Creating the data directory ..." |
222 |
mkdir -p "${PG_DIR}/data" |
223 |
chown -Rf postgres:postgres "${PG_DIR}" |
224 |
chmod 0700 "${PG_DIR}/data" |
225 |
|
226 |
einfo "Initializing the database ..." |
227 |
if [[ -f "${PG_DIR}/data/PG_VERSION" ]] ; then |
228 |
eerror "PostgreSQL ${PV} cannot upgrade your existing databases." |
229 |
eerror "You must remove your entire database directory to continue." |
230 |
eerror "(database directory = ${PG_DIR})." |
231 |
die "Remove your database directory to continue" |
232 |
else |
233 |
if use kernel_linux ; then |
234 |
local SEM=`sysctl -n kernel.sem | cut -f-3` |
235 |
local SEMMNI=`sysctl -n kernel.sem | cut -f4` |
236 |
local SEMMNI_MIN=`expr \( ${PG_MAX_CONNECTIONS} + 15 \) / 16` |
237 |
local SHMMAX=`sysctl -n kernel.shmmax` |
238 |
local SHMMAX_MIN=`expr 500000 + 30600 \* ${PG_MAX_CONNECTIONS}` |
239 |
|
240 |
if [ ${SEMMNI} -lt ${SEMMNI_MIN} ] ; then |
241 |
eerror "The current value of SEMMNI is too low" |
242 |
eerror "for PostgreSQL to run ${PG_MAX_CONNECTIONS} connections!" |
243 |
eerror "Temporary setting this value to ${SEMMNI_MIN} while creating the initial database." |
244 |
echo ${SEM} ${SEMMNI_MIN} > /proc/sys/kernel/sem |
245 |
fi |
246 |
|
247 |
su postgres -c "/usr/bin/initdb --pgdata ${PG_DIR}/data" |
248 |
|
249 |
if [ ! `sysctl -n kernel.sem | cut -f4` -eq ${SEMMNI} ] ; then |
250 |
echo ${SEM} ${SEMMNI} > /proc/sys/kernel/sem |
251 |
ewarn "Restoring the SEMMNI value to the previous value." |
252 |
ewarn "Please edit the last value of kernel.sem in /etc/sysctl.conf" |
253 |
ewarn "and set it to at least ${SEMMNI_MIN}:" |
254 |
ewarn |
255 |
ewarn " kernel.sem = ${SEM} ${SEMMNI_MIN}" |
256 |
ewarn |
257 |
fi |
258 |
|
259 |
if [ ${SHMMAX} -lt ${SHMMAX_MIN} ] ; then |
260 |
eerror "The current value of SHMMAX is too low for postgresql to run." |
261 |
eerror "Please edit /etc/sysctl.conf and set this value to at least ${SHMMAX_MIN}:" |
262 |
eerror |
263 |
eerror " kernel.shmmax = ${SHMMAX_MIN}" |
264 |
eerror |
265 |
fi |
266 |
else |
267 |
su postgres -c "/usr/bin/initdb --pgdata ${PG_DIR}/data" |
268 |
fi |
269 |
|
270 |
einfo |
271 |
einfo "You can use the '${ROOT}/etc/init.d/postgresql' script to run PostgreSQL instead of 'pg_ctl'." |
272 |
einfo |
273 |
fi |
274 |
} |
275 |
|
276 |
src_test() { |
277 |
cd "${S}" |
278 |
|
279 |
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" |
280 |
if ! emake -j1 check ; then |
281 |
hasq test ${FEATURES} && die "Make check failed. See above for details." |
282 |
hasq test ${FEATURES} || eerror "Make check failed. See above for details." |
283 |
fi |
284 |
|
285 |
einfo "Yes, there are other tests which could be run." |
286 |
einfo "... and no, we don't plan to add/support them." |
287 |
einfo "For now, the main regressions tests will suffice." |
288 |
einfo "If you think other tests are necessary, please submit a" |
289 |
einfo "bug including a patch for this ebuild to enable them." |
290 |
} |
291 |
|
292 |
|
293 |
|
294 |
-- |
295 |
gentoo-commits@l.g.o mailing list |