From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1N69yn-0002L7-VS for garchives@archives.gentoo.org; Thu, 05 Nov 2009 21:34:55 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 13A63E0C47; Thu, 5 Nov 2009 21:34:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 8A75CE0C47 for ; Thu, 5 Nov 2009 21:34:52 +0000 (UTC) Received: from stork.gentoo.org (stork.gentoo.org [64.127.104.133]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 1630467535 for ; Thu, 5 Nov 2009 21:34:52 +0000 (UTC) Received: from patrick by stork.gentoo.org with local (Exim 4.69) (envelope-from ) id 1N69yl-0005fy-JR for gentoo-commits@lists.gentoo.org; Thu, 05 Nov 2009 21:34:51 +0000 From: "Patrick Lauer (patrick)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, patrick@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in dev-db/postgresql: postgresql-7.4.26.ebuild postgresql-8.2.14.ebuild ChangeLog postgresql-8.1.18.ebuild postgresql-8.0.22.ebuild X-VCS-Repository: gentoo-x86 X-VCS-Files: postgresql-7.4.26.ebuild postgresql-8.2.14.ebuild ChangeLog postgresql-8.1.18.ebuild postgresql-8.0.22.ebuild X-VCS-Directories: dev-db/postgresql X-VCS-Committer: patrick X-VCS-Committer-Name: Patrick Lauer Content-Type: text/plain; charset=utf8 Message-Id: Sender: Patrick Lauer Date: Thu, 05 Nov 2009 21:34:51 +0000 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 3d675c09-1b9f-47e4-993a-cd6b2e231e6a X-Archives-Hash: 95e0cdf73eaae4cfc6d27629c30ec89c patrick 09/11/05 21:34:51 Modified: ChangeLog Added: postgresql-7.4.26.ebuild postgresql-8.2.14.ebuild postgresql-8.1.18.ebuild postgresql-8.0.22.ebuild Log: Bump for #284274 (Portage version: 2.2_rc48/cvs/Linux x86_64) Revision Changes Path 1.385 dev-db/postgresql/ChangeLog file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql/= ChangeLog?rev=3D1.385&view=3Dmarkup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql/= ChangeLog?rev=3D1.385&content-type=3Dtext/plain diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql/= ChangeLog?r1=3D1.384&r2=3D1.385 Index: ChangeLog =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /var/cvsroot/gentoo-x86/dev-db/postgresql/ChangeLog,v retrieving revision 1.384 retrieving revision 1.385 diff -u -r1.384 -r1.385 --- ChangeLog 14 Oct 2009 00:35:33 -0000 1.384 +++ ChangeLog 5 Nov 2009 21:34:49 -0000 1.385 @@ -1,6 +1,16 @@ # ChangeLog for dev-db/postgresql # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/ChangeLog,v 1.384 2= 009/10/14 00:35:33 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/ChangeLog,v 1.385 2= 009/11/05 21:34:49 patrick Exp $ + +*postgresql-8.2.14 (05 Nov 2009) +*postgresql-8.1.18 (05 Nov 2009) +*postgresql-8.0.22 (05 Nov 2009) +*postgresql-7.4.26 (05 Nov 2009) + + 05 Nov 2009; Patrick Lauer +postgresql-7.4.26.ebu= ild, + +postgresql-8.0.22.ebuild, +postgresql-8.1.18.ebuild, + +postgresql-8.2.14.ebuild: + Bump for #284274 =20 14 Oct 2009; Jeroen Roovers postgresql-8.1.11.ebuild: Stable for HPPA (bug #268138). 1.1 dev-db/postgresql/postgresql-7.4.26.ebuild file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql/= postgresql-7.4.26.ebuild?rev=3D1.1&view=3Dmarkup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql/= postgresql-7.4.26.ebuild?rev=3D1.1&content-type=3Dtext/plain Index: postgresql-7.4.26.ebuild =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/postgresql-7.4.26.eb= uild,v 1.1 2009/11/05 21:34:49 patrick Exp $ inherit eutils gnuconfig flag-o-matic multilib toolchain-funcs versionato= r KEYWORDS=3D"~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~s= parc ~x86" DESCRIPTION=3D"Sophisticated and powerful Object-Relational DBMS." HOMEPAGE=3D"http://www.postgresql.org/" SRC_URI=3D"mirror://postgresql/source/v${PV}/${PN}-${PV}.tar.bz2" LICENSE=3D"POSTGRESQL" SLOT=3D"0" IUSE=3D"doc kerberos nls pam perl pg-intdatetime python readline selinux = ssl tcl test xml zlib" RDEPEND=3D"~dev-db/libpq-${PV} >=3Dsys-libs/ncurses-5.2 kerberos? ( virtual/krb5 ) pam? ( virtual/pam ) perl? ( >=3Ddev-lang/perl-5.6.1-r2 ) python? ( >=3Ddev-lang/python-2.2 dev-python/egenix-mx-base ) readline? ( >=3Dsys-libs/readline-4.1 ) selinux? ( sec-policy/selinux-postgresql ) ssl? ( >=3Ddev-libs/openssl-0.9.6-r1 ) tcl? ( >=3Ddev-lang/tcl-8 ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( >=3Dsys-libs/zlib-1.1.3 ) virtual/logger !dev-db/postgresql-server" DEPEND=3D"${RDEPEND} sys-devel/autoconf >=3Dsys-devel/bison-1.875 nls? ( sys-devel/gettext ) xml? ( dev-util/pkgconfig )" PG_DIR=3D"/var/lib/postgresql" [[ -z "${PG_MAX_CONNECTIONS}" ]] && PG_MAX_CONNECTIONS=3D"512" cluster_exists() { [[ -f "${PG_DIR}/data/PG_VERSION" ]] && return 0 return 1 } pkg_setup() { if hasq pg-hier ${USE} ; then ewarn "Warning: pg-hier USE-flag detected:" ewarn "The hier-patch has been dropped for this version and the pg-hier= USE-flag is therefore deprecated." ewarn "If you really used the 'hier' patch in your database with the 'C= ONNECT BY' statement," ewarn "you should stop now and reconsider. You will be able to reuse yo= ur data, but not" ewarn "any VIEWS or QUERIES based on that statement." ewarn "Please disable the pg-hier USE-flag!" ebeep 3 if cluster_exists ; then eerror "There is already a database in '${PG_DIR}/data' and you have t= he pg-hier USE-flag set." eerror "Please read the message above first. If you decide that the wa= rnings there don't" eerror "apply to your situation, dump the database using pg_dump and m= ove the '${PG_DIR}/data'" eerror "away. Then restart the merge. After that create a new database= cluster and use pg_restore to" eerror "re-import the previously dumped data." eerror "Moving '${PG_DIR}/data' temporarely away or just disable the '= pg-hier' USE-flag won't work." die "Can't update this database." fi fi if cluster_exists ; then local cluster_version=3D$(cat "${PG_DIR}/data/PG_VERSION") if [[ ${cluster_version} !=3D $(get_version_component_range 1-2) ]] ; t= hen eerror "There is a database in '${PG_DIR}/data' from PostgreSQL versio= n ${cluster_version}." eerror "PostgreSQL doesn't support upgrades between major versions, yo= u have to use pg_dump" eerror "to dump your existing database. Then move your '${PG_DIR}/data= ' directory away and" eerror "restart the merge. After that create a new database cluster an= d use pg_restore to" eerror "re-import the previously dumped data." die "Can't update this database." fi fi enewgroup postgres 70 enewuser postgres 70 /bin/bash /var/lib postgres } src_unpack() { unpack ${A} cd "${S}" # libpq is provided separately as dev-db/libpq sed -i -e 's/^DIRS :=3D libpq ecpg/DIRS :=3D ecpg/' src/interfaces/Makef= ile sed -i -e '/\W\+\$.MAKE. -C include \$/d' src/Makefile sed -i -e '/^\W\+psql scripts pg_config pg_controldata/ s/pg_config //' = src/bin/Makefile epatch "${FILESDIR}/${PN}-7.4.19-hppa-testandset.patch" # Prepare package for future tests if use test ; then # We need to run the tests as a non-root user, portage seems the most f= itting here, # so if userpriv is enabled, we use it directly. If userpriv is disable= d, well, we # don't support that in this version of PostgreSQL ... :) mkdir -p "${S}/src/test/regress/tmp_check" chown portage "${S}/src/test/regress/tmp_check" einfo "Tests will be run as user portage." fi } src_compile() { filter-flags -ffast-math -feliminate-dwarf2-dups # Correctly support the XML stuff if use xml ; then CFLAGS=3D"${CFLAGS} $(pkg-config --cflags libxml-2.0)" LIBS=3D"${LIBS} $(pkg-config --libs libxml-2.0)" fi # Detect mips systems properly gnuconfig_update cd "${S}" ./configure --prefix=3D/usr \ --includedir=3D/usr/include/postgresql/pgsql \ --sysconfdir=3D/etc/postgresql \ --mandir=3D/usr/share/man \ --host=3D${CHOST} \ --docdir=3D/usr/share/doc/${PF} \ --libdir=3D/usr/$(get_libdir) \ --enable-depend \ $(use_with kerberos krb5) \ $(use_enable nls ) \ $(use_with pam) \ $(use_with perl) \ $(use_enable pg-intdatetime integer-datetimes ) \ $(use_with python) \ $(use_with readline) \ $(use_with ssl openssl) \ $(use_with tcl) \ --without-tk \ $(use_with zlib) \ || die "configure failed" emake -j1 LD=3D"$(tc-getLD) $(get_abi_LDFLAGS)" || die "main emake faile= d" cd "${S}/contrib" emake -j1 LD=3D"$(tc-getLD) $(get_abi_LDFLAGS)" || die "contrib emake fa= iled" if use xml ; then cd "${S}/contrib/xml" emake -j1 LD=3D"$(tc-getLD) $(get_abi_LDFLAGS)" || die "contrib/xml ema= ke failed" fi } src_install() { if use perl ; then mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_= orig" sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \ "${S}/src/pl/plperl/GNUmakefile_orig" > "${S}/src/pl/plperl/GNUmakefil= e" fi cd "${S}" emake -j1 DESTDIR=3D"${D}" LIBDIR=3D"${D}/usr/$(get_libdir)" install || = die "main emake install failed" cd "${S}/contrib" emake -j1 DESTDIR=3D"${D}" LIBDIR=3D"${D}/usr/$(get_libdir)" install || = die "contrib emake install failed" if use xml ; then cd "${S}/contrib/xml" emake -j1 DESTDIR=3D"${D}" LIBDIR=3D"${D}/usr/$(get_libdir)" install ||= die "contrib/xml emake install failed" fi cd "${S}" dodoc README HISTORY dodoc contrib/adddepend/* cd "${S}/doc" dodoc FAQ* README.* TODO bug.template if use doc ; then cd "${S}/doc" docinto FAQ_html dodoc src/FAQ/* docinto sgml dodoc src/sgml/*.{sgml,dsl} docinto sgml/ref dodoc src/sgml/ref/*.sgml docinto TODO.detail dodoc TODO.detail/* fi newinitd "${FILESDIR}/postgresql.init-${PV%.*}" postgresql || die "Inser= ting init.d-file failed" newconfd "${FILESDIR}/postgresql.conf-${PV%.*}" postgresql || die "Inser= ting conf.d-file failed" newinitd "${FILESDIR}/pg_autovacuum.init-${PV%.*}" pg_autovacuum || die = "Inserting pg_autovacuum init.d-file failed" newconfd "${FILESDIR}/pg_autovacuum.conf-${PV%.*}" pg_autovacuum || die = "Inserting pg_autovacuum conf.d-file failed" dosed "s:___DOCDIR___:/usr/share/doc/${PF}:" /etc/init.d/pg_autovacuum } pkg_postinst() { elog "Execute the following command to setup the initial database enviro= nment:" elog elog "emerge --config =3D${PF}" elog elog "If you need a global psqlrc-file, you can place it in '${ROOT%/}/e= tc/postgresql/'." } pkg_config() { einfo "Creating the data directory ..." mkdir -p "${PG_DIR}/data" chown -Rf postgres:postgres "${PG_DIR}" chmod 0700 "${PG_DIR}/data" einfo "Initializing the database ..." if [[ -f "${PG_DIR}/data/PG_VERSION" ]] ; then eerror "PostgreSQL ${PV} cannot upgrade your existing databases." eerror "You must remove your entire database directory to continue." eerror "(database directory =3D ${PG_DIR})." die "Remove your database directory to continue" else if use kernel_linux ; then local SEM=3D`sysctl -n kernel.sem | cut -f-3` local SEMMNI=3D`sysctl -n kernel.sem | cut -f4` local SEMMNI_MIN=3D`expr \( ${PG_MAX_CONNECTIONS} + 15 \) / 16` local SHMMAX=3D`sysctl -n kernel.shmmax` local SHMMAX_MIN=3D`expr 500000 + 30600 \* ${PG_MAX_CONNECTIONS}` if [ ${SEMMNI} -lt ${SEMMNI_MIN} ] ; then eerror "The current value of SEMMNI is too low" eerror "for PostgreSQL to run ${PG_MAX_CONNECTIONS} connections!" eerror "Temporary setting this value to ${SEMMNI_MIN} while creating = the initial database." echo ${SEM} ${SEMMNI_MIN} > /proc/sys/kernel/sem fi su postgres -c "/usr/bin/initdb --pgdata ${PG_DIR}/data" if [ ! `sysctl -n kernel.sem | cut -f4` -eq ${SEMMNI} ] ; then echo ${SEM} ${SEMMNI} > /proc/sys/kernel/sem ewarn "Restoring the SEMMNI value to the previous value." ewarn "Please edit the last value of kernel.sem in /etc/sysctl.conf" ewarn "and set it to at least ${SEMMNI_MIN}:" ewarn ewarn " kernel.sem =3D ${SEM} ${SEMMNI_MIN}" ewarn fi if [ ${SHMMAX} -lt ${SHMMAX_MIN} ] ; then eerror "The current value of SHMMAX is too low for postgresql to run.= " eerror "Please edit /etc/sysctl.conf and set this value to at least $= {SHMMAX_MIN}:" eerror eerror " kernel.shmmax =3D ${SHMMAX_MIN}" eerror fi else su postgres -c "/usr/bin/initdb --pgdata ${PG_DIR}/data" fi einfo einfo "You can use the '${ROOT%/}/etc/init.d/postgresql' script to run = PostgreSQL instead of 'pg_ctl'." einfo fi } src_test() { cd "${S}" einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" if hasq userpriv ${FEATURES} ; then if ! emake -j1 check ; then hasq test ${FEATURES} && die "Make check failed. See above for details= ." hasq test ${FEATURES} || eerror "Make check failed. See above for deta= ils." fi else eerror "Tests won't be run if FEATURES=3Duserpriv is disabled!" fi einfo "Yes, there are other tests which could be run." einfo "... and no, we don't plan to add/support them." einfo "For now, the main regressions tests will suffice." einfo "If you think other tests are necessary, please submit a" einfo "bug including a patch for this ebuild to enable them." } 1.1 dev-db/postgresql/postgresql-8.2.14.ebuild file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql/= postgresql-8.2.14.ebuild?rev=3D1.1&view=3Dmarkup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql/= postgresql-8.2.14.ebuild?rev=3D1.1&content-type=3Dtext/plain Index: postgresql-8.2.14.ebuild =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/postgresql-8.2.14.eb= uild,v 1.1 2009/11/05 21:34:49 patrick Exp $ inherit eutils flag-o-matic multilib toolchain-funcs versionator KEYWORDS=3D"~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~s= parc ~x86 ~sparc-fbsd ~x86-fbsd" DESCRIPTION=3D"Sophisticated and powerful Object-Relational DBMS." HOMEPAGE=3D"http://www.postgresql.org/" SRC_URI=3D"mirror://postgresql/source/v${PV}/${PN}-${PV}.tar.bz2" LICENSE=3D"POSTGRESQL" SLOT=3D"0" IUSE=3D"doc kerberos kernel_linux nls pam perl pg-intdatetime python read= line selinux ssl tcl test xml zlib" RDEPEND=3D"~dev-db/libpq-${PV} >=3Dsys-libs/ncurses-5.2 kerberos? ( virtual/krb5 ) pam? ( virtual/pam ) perl? ( >=3Ddev-lang/perl-5.6.1-r2 ) python? ( >=3Ddev-lang/python-2.2 dev-python/egenix-mx-base ) readline? ( >=3Dsys-libs/readline-4.1 ) selinux? ( sec-policy/selinux-postgresql ) ssl? ( >=3Ddev-libs/openssl-0.9.6-r1 ) tcl? ( >=3Ddev-lang/tcl-8 ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( >=3Dsys-libs/zlib-1.1.3 ) !dev-db/postgresql-server" DEPEND=3D"${RDEPEND} sys-devel/autoconf >=3Dsys-devel/bison-1.875 nls? ( sys-devel/gettext ) xml? ( dev-util/pkgconfig )" PG_DIR=3D"/var/lib/postgresql" [[ -z "${PG_MAX_CONNECTIONS}" ]] && PG_MAX_CONNECTIONS=3D"512" pkg_setup() { if [[ -f "${PG_DIR}/data/PG_VERSION" ]] ; then if [[ $(cat "${PG_DIR}/data/PG_VERSION") !=3D $(get_version_component_r= ange 1-2) ]] ; then eerror "PostgreSQL ${PV} cannot upgrade your existing databases, you m= ust" eerror "use pg_dump to export your existing databases to a file, and t= hen" eerror "pg_restore to import them when you have upgraded completely." eerror "You must remove your entire database directory to continue." eerror "(database directory =3D ${PG_DIR})." die "Remove your database directory to continue" fi fi enewgroup postgres 70 enewuser postgres 70 /bin/bash /var/lib postgres } src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}/${PN}-8.2.7-gentoo.patch" epatch "${FILESDIR}/${PN}-8.2.7-sh.patch" # Prepare package for future tests if use test ; then # Fix sandbox violation sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/loc= ation|g" -i src/test/regress/{input,output}/tablespace.source # Fix broken tests epatch "${FILESDIR}/${PN}-${PV}-regress_fix.patch" # We need to run the tests as a non-root user, portage seems the most f= itting here, # so if userpriv is enabled, we use it directly. If userpriv is disable= d, we need to # su - to a valid user, portage again, so we patch the test-scripts to = do that. mkdir -p "${S}/src/test/regress/tmp_check" chown portage "${S}/src/test/regress/tmp_check" einfo "Tests will be run as user portage." if ! hasq userpriv ${FEATURES} ; then mkdir -p "${S}/src/test/regress/results" chown portage "${S}/src/test/regress/results" epatch "${FILESDIR}/${PN}-${PV}-regress_su.patch" fi fi } src_compile() { filter-flags -ffast-math -feliminate-dwarf2-dups econf --prefix=3D/usr \ --includedir=3D/usr/include/postgresql/pgsql \ --sysconfdir=3D/etc/postgresql \ --mandir=3D/usr/share/man \ --host=3D${CHOST} \ --with-docdir=3D/usr/share/doc/${PF} \ --libdir=3D/usr/$(get_libdir) \ --enable-depend \ $(use_with kerberos krb5) \ $(use_enable nls ) \ $(use_with pam) \ $(use_with perl) \ $(use_enable pg-intdatetime integer-datetimes ) \ $(use_with python) \ $(use_with readline) \ $(use_with ssl openssl) \ $(use_with tcl) \ $(use_with zlib) \ || die "configure failed" emake -j1 LD=3D"$(tc-getLD) $(get_abi_LDFLAGS)" || die "main emake faile= d" cd "${S}/contrib" emake -j1 LD=3D"$(tc-getLD) $(get_abi_LDFLAGS)" || die "contrib emake fa= iled" if use xml ; then cd "${S}/contrib/xml2" emake -j1 LD=3D"$(tc-getLD) $(get_abi_LDFLAGS)" || die "contrib/xml2 em= ake failed" fi } src_install() { if use perl ; then mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_= orig" sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \ "${S}/src/pl/plperl/GNUmakefile_orig" > "${S}/src/pl/plperl/GNUmakefil= e" fi cd "${S}" emake -j1 DESTDIR=3D"${D}" LIBDIR=3D"${D}/usr/$(get_libdir)" install || = die "main emake install failed" cd "${S}/contrib" emake -j1 DESTDIR=3D"${D}" LIBDIR=3D"${D}/usr/$(get_libdir)" install || = die "contrib emake install failed" if use xml ; then cd "${S}/contrib/xml2" emake -j1 DESTDIR=3D"${D}" LIBDIR=3D"${D}/usr/$(get_libdir)" install ||= die "contrib/xml2 emake install failed" fi cd "${S}" dodoc README HISTORY cd "${S}/doc" dodoc FAQ* README.* TODO bug.template if use doc ; then cd "${S}/doc" docinto FAQ_html dodoc src/FAQ/* docinto sgml dodoc src/sgml/*.{sgml,dsl} docinto sgml/ref dodoc src/sgml/ref/*.sgml docinto TODO.detail dodoc TODO.detail/* fi newinitd "${FILESDIR}/postgresql.init-${PV%.*}" postgresql || die "Inser= ting init.d-file failed" newconfd "${FILESDIR}/postgresql.conf-${PV%.*}" postgresql || die "Inser= ting conf.d-file failed" } pkg_postinst() { elog "Execute the following command to setup the initial database enviro= nment:" elog elog "emerge --config =3D${PF}" elog elog "The autovacuum function, which was in contrib, has been moved to t= he main" elog "PostgreSQL functions starting with 8.1." elog "You can enable it in ${ROOT}/etc/postgresql/postgresql.conf." elog elog "If you need a global psqlrc-file, you can place it in '${ROOT}/etc= /postgresql/'." } pkg_config() { einfo "Creating the data directory ..." mkdir -p "${PG_DIR}/data" chown -Rf postgres:postgres "${PG_DIR}" chmod 0700 "${PG_DIR}/data" einfo "Initializing the database ..." if [[ -f "${PG_DIR}/data/PG_VERSION" ]] ; then eerror "PostgreSQL ${PV} cannot upgrade your existing databases." eerror "You must remove your entire database directory to continue." eerror "(database directory =3D ${PG_DIR})." die "Remove your database directory to continue" else if use kernel_linux ; then local SEM=3D`sysctl -n kernel.sem | cut -f-3` local SEMMNI=3D`sysctl -n kernel.sem | cut -f4` local SEMMNI_MIN=3D`expr \( ${PG_MAX_CONNECTIONS} + 15 \) / 16` local SHMMAX=3D`sysctl -n kernel.shmmax` local SHMMAX_MIN=3D`expr 500000 + 30600 \* ${PG_MAX_CONNECTIONS}` if [ ${SEMMNI} -lt ${SEMMNI_MIN} ] ; then eerror "The current value of SEMMNI is too low" eerror "for PostgreSQL to run ${PG_MAX_CONNECTIONS} connections!" eerror "Temporary setting this value to ${SEMMNI_MIN} while creating = the initial database." echo ${SEM} ${SEMMNI_MIN} > /proc/sys/kernel/sem fi su postgres -c "/usr/bin/initdb --pgdata ${PG_DIR}/data" if [ ! `sysctl -n kernel.sem | cut -f4` -eq ${SEMMNI} ] ; then echo ${SEM} ${SEMMNI} > /proc/sys/kernel/sem ewarn "Restoring the SEMMNI value to the previous value." ewarn "Please edit the last value of kernel.sem in /etc/sysctl.conf" ewarn "and set it to at least ${SEMMNI_MIN}:" ewarn ewarn " kernel.sem =3D ${SEM} ${SEMMNI_MIN}" ewarn fi if [ ${SHMMAX} -lt ${SHMMAX_MIN} ] ; then eerror "The current value of SHMMAX is too low for postgresql to run.= " eerror "Please edit /etc/sysctl.conf and set this value to at least $= {SHMMAX_MIN}:" eerror eerror " kernel.shmmax =3D ${SHMMAX_MIN}" eerror fi else su postgres -c "/usr/bin/initdb --pgdata ${PG_DIR}/data" fi einfo einfo "You can use the '${ROOT}/etc/init.d/postgresql' script to run Po= stgreSQL instead of 'pg_ctl'." einfo fi } src_test() { einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" if ! emake -j1 check ; then hasq test ${FEATURES} && die "Make check failed. See above for details.= " hasq test ${FEATURES} || eerror "Make check failed. See above for detai= ls." fi einfo "Yes, there are other tests which could be run." einfo "... and no, we don't plan to add/support them." einfo "For now, the main regressions tests will suffice." einfo "If you think other tests are necessary, please submit a" einfo "bug including a patch for this ebuild to enable them." } 1.1 dev-db/postgresql/postgresql-8.1.18.ebuild file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql/= postgresql-8.1.18.ebuild?rev=3D1.1&view=3Dmarkup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql/= postgresql-8.1.18.ebuild?rev=3D1.1&content-type=3Dtext/plain Index: postgresql-8.1.18.ebuild =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/postgresql-8.1.18.eb= uild,v 1.1 2009/11/05 21:34:49 patrick Exp $ inherit eutils gnuconfig flag-o-matic multilib toolchain-funcs versionato= r KEYWORDS=3D"~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~s= parc ~x86 ~sparc-fbsd ~x86-fbsd" DESCRIPTION=3D"Sophisticated and powerful Object-Relational DBMS." HOMEPAGE=3D"http://www.postgresql.org/" SRC_URI=3D"mirror://postgresql/source/v${PV}/${PN}-${PV}.tar.bz2" LICENSE=3D"POSTGRESQL" SLOT=3D"0" IUSE=3D"doc kerberos nls pam perl pg-intdatetime python readline selinux = ssl tcl test xml zlib" RDEPEND=3D"~dev-db/libpq-${PV} >=3Dsys-libs/ncurses-5.2 kerberos? ( virtual/krb5 ) pam? ( virtual/pam ) perl? ( >=3Ddev-lang/perl-5.6.1-r2 ) python? ( >=3Ddev-lang/python-2.2 dev-python/egenix-mx-base ) readline? ( >=3Dsys-libs/readline-4.1 ) selinux? ( sec-policy/selinux-postgresql ) ssl? ( >=3Ddev-libs/openssl-0.9.6-r1 ) tcl? ( >=3Ddev-lang/tcl-8 ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( >=3Dsys-libs/zlib-1.1.3 ) virtual/logger !dev-db/postgresql-server" DEPEND=3D"${RDEPEND} sys-devel/autoconf >=3Dsys-devel/bison-1.875 nls? ( sys-devel/gettext ) xml? ( dev-util/pkgconfig )" PG_DIR=3D"/var/lib/postgresql" [[ -z "${PG_MAX_CONNECTIONS}" ]] && PG_MAX_CONNECTIONS=3D"512" pkg_setup() { if [[ -f "${PG_DIR}/data/PG_VERSION" ]] ; then if [[ $(cat "${PG_DIR}/data/PG_VERSION") !=3D $(get_version_component_r= ange 1-2) ]] ; then eerror "PostgreSQL ${PV} cannot upgrade your existing databases, you m= ust" eerror "use pg_dump to export your existing databases to a file, and t= hen" eerror "pg_restore to import them when you have upgraded completely." eerror "You must remove your entire database directory to continue." eerror "(database directory =3D ${PG_DIR})." die "Remove your database directory to continue" fi fi enewgroup postgres 70 enewuser postgres 70 /bin/bash /var/lib postgres } src_unpack() { unpack ${A} cd "${S}" # libpq is provided separately as dev-db/libpq sed -i -e 's/^DIRS :=3D libpq ecpg/DIRS :=3D ecpg/' src/interfaces/Makef= ile sed -i -e '/\W\+\$.MAKE. -C include \$/d' src/Makefile sed -i -e '/^\W\+psql scripts pg_config pg_controldata/ s/pg_config //' = src/bin/Makefile epatch "${FILESDIR}/${PN}-8.1.11-sh.patch" # Prepare package for future tests if use test ; then # Fix sandbox violation sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/loc= ation|g" -i src/test/regress/{input,output}/tablespace.source # Fix broken tests #epatch "${FILESDIR}/${P}-regress_fix.patch" # We need to run the tests as a non-root user, portage seems the most f= itting here, # so if userpriv is enabled, we use it directly. If userpriv is disable= d, we need to # su - to a valid user, portage again, so we patch the test-scripts to = do that. mkdir -p "${S}/src/test/regress/tmp_check" chown portage "${S}/src/test/regress/tmp_check" einfo "Tests will be run as user portage." if ! hasq userpriv ${FEATURES} ; then mkdir -p "${S}/src/test/regress/results" chown portage "${S}/src/test/regress/results" epatch "${FILESDIR}/${P}-regress_su.patch" sed -e "s|PORTAGETEMPDIRPG|${S}/src/test/regress|g" -i src/test/regres= s/pg_regress.sh fi fi } src_compile() { filter-flags -ffast-math -feliminate-dwarf2-dups # Detect mips systems properly gnuconfig_update cd "${S}" ./configure --prefix=3D/usr \ --includedir=3D/usr/include/postgresql/pgsql \ --sysconfdir=3D/etc/postgresql \ --mandir=3D/usr/share/man \ --host=3D${CHOST} \ --with-docdir=3D/usr/share/doc/${PF} \ --libdir=3D/usr/$(get_libdir) \ --enable-depend \ $(use_with kerberos krb5) \ $(use_enable nls ) \ $(use_with pam) \ $(use_with perl) \ $(use_enable pg-intdatetime integer-datetimes ) \ $(use_with python) \ $(use_with readline) \ $(use_with ssl openssl) \ $(use_with tcl) \ $(use_with zlib) \ || die "configure failed" emake -j1 LD=3D"$(tc-getLD) $(get_abi_LDFLAGS)" || die "main emake faile= d" cd "${S}/contrib" emake -j1 LD=3D"$(tc-getLD) $(get_abi_LDFLAGS)" || die "contrib emake fa= iled" if use xml ; then cd "${S}/contrib/xml2" emake -j1 LD=3D"$(tc-getLD) $(get_abi_LDFLAGS)" || die "contrib/xml2 em= ake failed" fi } src_install() { if use perl ; then mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_= orig" sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \ "${S}/src/pl/plperl/GNUmakefile_orig" > "${S}/src/pl/plperl/GNUmakefil= e" fi cd "${S}" emake -j1 DESTDIR=3D"${D}" LIBDIR=3D"${D}/usr/$(get_libdir)" install || = die "main emake install failed" cd "${S}/contrib" emake -j1 DESTDIR=3D"${D}" LIBDIR=3D"${D}/usr/$(get_libdir)" install || = die "contrib emake install failed" if use xml ; then cd "${S}/contrib/xml2" emake -j1 DESTDIR=3D"${D}" LIBDIR=3D"${D}/usr/$(get_libdir)" install ||= die "contrib/xml2 emake install failed" fi cd "${S}" dodoc README HISTORY dodoc contrib/adddepend/* cd "${S}/doc" dodoc FAQ* README.* TODO bug.template if use doc ; then cd "${S}/doc" docinto FAQ_html dodoc src/FAQ/* docinto sgml dodoc src/sgml/*.{sgml,dsl} docinto sgml/ref dodoc src/sgml/ref/*.sgml docinto TODO.detail dodoc TODO.detail/* fi newinitd "${FILESDIR}/postgresql.init-${PV%.*}" postgresql || die "Inser= ting init.d-file failed" newconfd "${FILESDIR}/postgresql.conf-${PV%.*}" postgresql || die "Inser= ting conf.d-file failed" } pkg_postinst() { elog "Execute the following command to setup the initial database enviro= nment:" elog elog "emerge --config =3D${PF}" elog elog "The autovacuum function, which was in contrib, has been moved to t= he main" elog "PostgreSQL functions starting with 8.1." elog "You can enable it in ${ROOT%/}/etc/postgresql/postgresql.conf." elog elog "If you need a global psqlrc-file, you can place it in '${ROOT%/}/e= tc/postgresql/'." } pkg_config() { einfo "Creating the data directory ..." mkdir -p "${PG_DIR}/data" chown -Rf postgres:postgres "${PG_DIR}" chmod 0700 "${PG_DIR}/data" einfo "Initializing the database ..." if [[ -f "${PG_DIR}/data/PG_VERSION" ]] ; then eerror "PostgreSQL ${PV} cannot upgrade your existing databases." eerror "You must remove your entire database directory to continue." eerror "(database directory =3D ${PG_DIR})." die "Remove your database directory to continue" else if use kernel_linux ; then local SEM=3D`sysctl -n kernel.sem | cut -f-3` local SEMMNI=3D`sysctl -n kernel.sem | cut -f4` local SEMMNI_MIN=3D`expr \( ${PG_MAX_CONNECTIONS} + 15 \) / 16` local SHMMAX=3D`sysctl -n kernel.shmmax` local SHMMAX_MIN=3D`expr 500000 + 30600 \* ${PG_MAX_CONNECTIONS}` if [ ${SEMMNI} -lt ${SEMMNI_MIN} ] ; then eerror "The current value of SEMMNI is too low" eerror "for PostgreSQL to run ${PG_MAX_CONNECTIONS} connections!" eerror "Temporary setting this value to ${SEMMNI_MIN} while creating = the initial database." echo ${SEM} ${SEMMNI_MIN} > /proc/sys/kernel/sem fi su postgres -c "/usr/bin/initdb --pgdata ${PG_DIR}/data" if [ ! `sysctl -n kernel.sem | cut -f4` -eq ${SEMMNI} ] ; then echo ${SEM} ${SEMMNI} > /proc/sys/kernel/sem ewarn "Restoring the SEMMNI value to the previous value." ewarn "Please edit the last value of kernel.sem in /etc/sysctl.conf" ewarn "and set it to at least ${SEMMNI_MIN}:" ewarn ewarn " kernel.sem =3D ${SEM} ${SEMMNI_MIN}" ewarn fi if [ ${SHMMAX} -lt ${SHMMAX_MIN} ] ; then eerror "The current value of SHMMAX is too low for postgresql to run.= " eerror "Please edit /etc/sysctl.conf and set this value to at least $= {SHMMAX_MIN}:" eerror eerror " kernel.shmmax =3D ${SHMMAX_MIN}" eerror fi else su postgres -c "/usr/bin/initdb --pgdata ${PG_DIR}/data" fi einfo einfo "You can use the '${ROOT%/}/etc/init.d/postgresql' script to run = PostgreSQL instead of 'pg_ctl'." einfo fi } src_test() { cd "${S}" einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" if ! emake -j1 check ; then hasq test ${FEATURES} && die "Make check failed. See above for details.= " hasq test ${FEATURES} || eerror "Make check failed. See above for detai= ls." fi einfo "Yes, there are other tests which could be run." einfo "... and no, we don't plan to add/support them." einfo "For now, the main regressions tests will suffice." einfo "If you think other tests are necessary, please submit a" einfo "bug including a patch for this ebuild to enable them." } 1.1 dev-db/postgresql/postgresql-8.0.22.ebuild file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql/= postgresql-8.0.22.ebuild?rev=3D1.1&view=3Dmarkup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/postgresql/= postgresql-8.0.22.ebuild?rev=3D1.1&content-type=3Dtext/plain Index: postgresql-8.0.22.ebuild =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/postgresql-8.0.22.eb= uild,v 1.1 2009/11/05 21:34:49 patrick Exp $ inherit eutils gnuconfig flag-o-matic multilib toolchain-funcs versionato= r KEYWORDS=3D"~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~s= parc ~x86" DESCRIPTION=3D"Sophisticated and powerful Object-Relational DBMS." HOMEPAGE=3D"http://www.postgresql.org/" SRC_URI=3D"mirror://postgresql/source/v${PV}/${PN}-${PV}.tar.bz2" LICENSE=3D"POSTGRESQL" SLOT=3D"0" IUSE=3D"doc kerberos nls pam perl pg-intdatetime python readline selinux = ssl tcl test xml zlib" RDEPEND=3D"~dev-db/libpq-${PV} >=3Dsys-libs/ncurses-5.2 kerberos? ( virtual/krb5 ) pam? ( virtual/pam ) perl? ( >=3Ddev-lang/perl-5.6.1-r2 ) python? ( >=3Ddev-lang/python-2.2 dev-python/egenix-mx-base ) readline? ( >=3Dsys-libs/readline-4.1 ) selinux? ( sec-policy/selinux-postgresql ) ssl? ( >=3Ddev-libs/openssl-0.9.6-r1 ) tcl? ( >=3Ddev-lang/tcl-8 ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) zlib? ( >=3Dsys-libs/zlib-1.1.3 ) virtual/logger !dev-db/postgresql-server" DEPEND=3D"${RDEPEND} sys-devel/autoconf >=3Dsys-devel/bison-1.875 nls? ( sys-devel/gettext ) xml? ( dev-util/pkgconfig )" PG_DIR=3D"/var/lib/postgresql" [[ -z "${PG_MAX_CONNECTIONS}" ]] && PG_MAX_CONNECTIONS=3D"512" cluster_exists() { [[ -f "${PG_DIR}/data/PG_VERSION" ]] && return 0 return 1 } pkg_setup() { if hasq pg-hier ${USE} ; then ewarn "Warning: pg-hier USE-flag detected:" ewarn "The hier-patch has been dropped for this version and the pg-hier= USE-flag is therefore deprecated." ewarn "If you really used the 'hier' patch in your database with the 'C= ONNECT BY' statement," ewarn "you should stop now and reconsider. You will be able to reuse yo= ur data, but not" ewarn "any VIEWS or QUERIES based on that statement." ewarn "Please disable the pg-hier USE-flag!" ebeep 3 if cluster_exists ; then eerror "There is already a database in '${PG_DIR}/data' and you have t= he pg-hier USE-flag set." eerror "Please read the message above first. If you decide that the wa= rnings there don't" eerror "apply to your situation, dump the database using pg_dump and m= ove the '${PG_DIR}/data'" eerror "away. Then restart the merge. After that create a new database= cluster and use pg_restore to" eerror "re-import the previously dumped data." eerror "Moving '${PG_DIR}/data' temporarely away or just disable the '= pg-hier' USE-flag won't work." die "Can't update this database." fi fi if cluster_exists ; then local cluster_version=3D$(cat "${PG_DIR}/data/PG_VERSION") if [[ ${cluster_version} !=3D $(get_version_component_range 1-2) ]] ; t= hen eerror "There is a database in '${PG_DIR}/data' from PostgreSQL versio= n ${cluster_version}." eerror "PostgreSQL doesn't support upgrades between major versions, yo= u have to use pg_dump" eerror "to dump your existing database. Then move your '${PG_DIR}/data= ' directory away and" eerror "restart the merge. After that create a new database cluster an= d use pg_restore to" eerror "re-import the previously dumped data." die "Can't update this database." fi fi enewgroup postgres 70 enewuser postgres 70 /bin/bash /var/lib postgres } src_unpack() { unpack ${A} cd "${S}" # libpq is provided separately as dev-db/libpq sed -i -e 's/^DIRS :=3D libpq ecpg/DIRS :=3D ecpg/' src/interfaces/Makef= ile sed -i -e '/\W\+\$.MAKE. -C include \$/d' src/Makefile sed -i -e '/^\W\+psql scripts pg_config pg_controldata/ s/pg_config //' = src/bin/Makefile epatch "${FILESDIR}/${PN}-8.0.15-sh.patch" # Prepare package for future tests if use test ; then # Fix sandbox violation sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/loc= ation|g" -i src/test/regress/{input,output}/tablespace.source # We need to run the tests as a non-root user, portage seems the most f= itting here, # so if userpriv is enabled, we use it directly. If userpriv is disable= d, well, we # don't support that in this version of PostgreSQL ... :) mkdir -p "${S}/src/test/regress/tmp_check" chown portage "${S}/src/test/regress/tmp_check" einfo "Tests will be run as user portage." fi } src_compile() { filter-flags -ffast-math -feliminate-dwarf2-dups # Detect mips systems properly gnuconfig_update cd "${S}" ./configure --prefix=3D/usr \ --includedir=3D/usr/include/postgresql/pgsql \ --sysconfdir=3D/etc/postgresql \ --mandir=3D/usr/share/man \ --host=3D${CHOST} \ --with-docdir=3D/usr/share/doc/${PF} \ --libdir=3D/usr/$(get_libdir) \ --enable-depend \ $(use_with kerberos krb5) \ $(use_enable nls ) \ $(use_with pam) \ $(use_with perl) \ $(use_enable pg-intdatetime integer-datetimes ) \ $(use_with python) \ $(use_with readline) \ $(use_with ssl openssl) \ $(use_with tcl) \ $(use_with zlib) \ || die "configure failed" emake -j1 LD=3D"$(tc-getLD) $(get_abi_LDFLAGS)" || die "main emake faile= d" cd "${S}/contrib" emake -j1 LD=3D"$(tc-getLD) $(get_abi_LDFLAGS)" || die "contrib emake fa= iled" if use xml ; then cd "${S}/contrib/xml2" emake -j1 LD=3D"$(tc-getLD) $(get_abi_LDFLAGS)" || die "contrib/xml2 em= ake failed" fi } src_install() { if use perl ; then mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_= orig" sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \ "${S}/src/pl/plperl/GNUmakefile_orig" > "${S}/src/pl/plperl/GNUmakefil= e" fi cd "${S}" emake -j1 DESTDIR=3D"${D}" LIBDIR=3D"${D}/usr/$(get_libdir)" install || = die "main emake install failed" cd "${S}/contrib" emake -j1 DESTDIR=3D"${D}" LIBDIR=3D"${D}/usr/$(get_libdir)" install || = die "contrib emake install failed" if use xml ; then cd "${S}/contrib/xml2" emake -j1 DESTDIR=3D"${D}" LIBDIR=3D"${D}/usr/$(get_libdir)" install ||= die "contrib/xml2 emake install failed" fi cd "${S}" dodoc README HISTORY dodoc contrib/adddepend/* cd "${S}/doc" dodoc FAQ* README.* TODO bug.template if use doc ; then cd "${S}/doc" docinto FAQ_html dodoc src/FAQ/* docinto sgml dodoc src/sgml/*.{sgml,dsl} docinto sgml/ref dodoc src/sgml/ref/*.sgml docinto TODO.detail dodoc TODO.detail/* fi newinitd "${FILESDIR}/postgresql.init-${PV%.*}" postgresql || die "Inser= ting init.d-file failed" newconfd "${FILESDIR}/postgresql.conf-${PV%.*}" postgresql || die "Inser= ting conf.d-file failed" newinitd "${FILESDIR}/pg_autovacuum.init-${PV%.*}" pg_autovacuum || die = "Inserting pg_autovacuum init.d-file failed" newconfd "${FILESDIR}/pg_autovacuum.conf-${PV%.*}" pg_autovacuum || die = "Inserting pg_autovacuum conf.d-file failed" dosed "s:___DOCDIR___:/usr/share/doc/${PF}:" /etc/init.d/pg_autovacuum } pkg_postinst() { elog "Execute the following command to setup the initial database enviro= nment:" elog elog "emerge --config =3D${PF}" elog elog "If you need a global psqlrc-file, you can place it in '${ROOT}/etc= /postgresql/'." } pkg_config() { einfo "Creating the data directory ..." mkdir -p "${PG_DIR}/data" chown -Rf postgres:postgres "${PG_DIR}" chmod 0700 "${PG_DIR}/data" einfo "Initializing the database ..." if [[ -f "${PG_DIR}/data/PG_VERSION" ]] ; then eerror "PostgreSQL ${PV} cannot upgrade your existing databases." eerror "You must remove your entire database directory to continue." eerror "(database directory =3D ${PG_DIR})." die "Remove your database directory to continue" else if use kernel_linux ; then local SEM=3D`sysctl -n kernel.sem | cut -f-3` local SEMMNI=3D`sysctl -n kernel.sem | cut -f4` local SEMMNI_MIN=3D`expr \( ${PG_MAX_CONNECTIONS} + 15 \) / 16` local SHMMAX=3D`sysctl -n kernel.shmmax` local SHMMAX_MIN=3D`expr 500000 + 30600 \* ${PG_MAX_CONNECTIONS}` if [ ${SEMMNI} -lt ${SEMMNI_MIN} ] ; then eerror "The current value of SEMMNI is too low" eerror "for PostgreSQL to run ${PG_MAX_CONNECTIONS} connections!" eerror "Temporary setting this value to ${SEMMNI_MIN} while creating = the initial database." echo ${SEM} ${SEMMNI_MIN} > /proc/sys/kernel/sem fi su postgres -c "/usr/bin/initdb --pgdata ${PG_DIR}/data" if [ ! `sysctl -n kernel.sem | cut -f4` -eq ${SEMMNI} ] ; then echo ${SEM} ${SEMMNI} > /proc/sys/kernel/sem ewarn "Restoring the SEMMNI value to the previous value." ewarn "Please edit the last value of kernel.sem in /etc/sysctl.conf" ewarn "and set it to at least ${SEMMNI_MIN}:" ewarn ewarn " kernel.sem =3D ${SEM} ${SEMMNI_MIN}" ewarn fi if [ ${SHMMAX} -lt ${SHMMAX_MIN} ] ; then eerror "The current value of SHMMAX is too low for postgresql to run.= " eerror "Please edit /etc/sysctl.conf and set this value to at least $= {SHMMAX_MIN}:" eerror eerror " kernel.shmmax =3D ${SHMMAX_MIN}" eerror fi else su postgres -c "/usr/bin/initdb --pgdata ${PG_DIR}/data" fi einfo einfo "You can use the '${ROOT}/etc/init.d/postgresql' script to run Po= stgreSQL instead of 'pg_ctl'." einfo fi } src_test() { cd "${S}" einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" if hasq userpriv ${FEATURES} ; then if ! emake -j1 check ; then hasq test ${FEATURES} && die "Make check failed. See above for details= ." hasq test ${FEATURES} || eerror "Make check failed. See above for deta= ils." fi else eerror "Tests won't be run if FEATURES=3Duserpriv is disabled!" fi einfo "Yes, there are other tests which could be run." einfo "... and no, we don't plan to add/support them." einfo "For now, the main regressions tests will suffice." einfo "If you think other tests are necessary, please submit a" einfo "bug including a patch for this ebuild to enable them." }