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