diff options
author | 2008-04-07 15:36:00 +0000 | |
---|---|---|
committer | 2008-04-07 15:36:00 +0000 | |
commit | d8ded9c806beca9dcd0862b0e30b51328125704a (patch) | |
tree | 038eb1ee75d54d847c839aa6add241d816c3fb65 | |
parent | dev-db/postgresql-server: Removed old digest files. Refactored pkg_config: It... (diff) | |
download | experimental-d8ded9c806beca9dcd0862b0e30b51328125704a.tar.gz experimental-d8ded9c806beca9dcd0862b0e30b51328125704a.tar.bz2 experimental-d8ded9c806beca9dcd0862b0e30b51328125704a.zip |
dev-db/postgresql-server: Removed pkg_setup check whether there's an older database cluster installed because it's pointless now that we have slotting available. Added some more einfo/ewarns to inform the user how to change the database cluster location.
svn path=/experimental/; revision=356
-rw-r--r-- | dev-db/postgresql-server/ChangeLog | 8 | ||||
-rw-r--r-- | dev-db/postgresql-server/Manifest | 14 | ||||
-rw-r--r-- | dev-db/postgresql-server/postgresql-server-7.3.21.ebuild | 51 | ||||
-rw-r--r-- | dev-db/postgresql-server/postgresql-server-7.4.19.ebuild | 51 | ||||
-rw-r--r-- | dev-db/postgresql-server/postgresql-server-8.0.15.ebuild | 51 | ||||
-rw-r--r-- | dev-db/postgresql-server/postgresql-server-8.1.11.ebuild | 51 | ||||
-rw-r--r-- | dev-db/postgresql-server/postgresql-server-8.2.7.ebuild | 50 | ||||
-rw-r--r-- | dev-db/postgresql-server/postgresql-server-8.3.1.ebuild | 50 |
8 files changed, 169 insertions, 157 deletions
diff --git a/dev-db/postgresql-server/ChangeLog b/dev-db/postgresql-server/ChangeLog index c8da484..48067c6 100644 --- a/dev-db/postgresql-server/ChangeLog +++ b/dev-db/postgresql-server/ChangeLog @@ -3,6 +3,14 @@ # $Header: $ 07 Apr 2008; Tiziano Müller <dev-zero@gentoo.org> + postgresql-server-7.3.21.ebuild, postgresql-server-7.4.19.ebuild, + postgresql-server-8.0.15.ebuild, postgresql-server-8.1.11.ebuild, + postgresql-server-8.2.7.ebuild, postgresql-server-8.3.1.ebuild: + Removed pkg_setup check whether there's an older database cluster installed + because it's pointless now that we have slotting available. Added some more + einfo/ewarns to inform the user how to change the database cluster location. + + 07 Apr 2008; Tiziano Müller <dev-zero@gentoo.org> files/postgresql.conf-7.3, postgresql-server-7.3.21.ebuild, files/postgresql-7.3-server.patch, files/postgresql.conf-7.4, postgresql-server-7.4.19.ebuild, files/postgresql-7.4-server.patch, diff --git a/dev-db/postgresql-server/Manifest b/dev-db/postgresql-server/Manifest index 8eeab07..0a46aaa 100644 --- a/dev-db/postgresql-server/Manifest +++ b/dev-db/postgresql-server/Manifest @@ -32,11 +32,11 @@ DIST postgresql-8.0.15.tar.bz2 11253897 RMD160 6aff5c63dce73eea609f0b6e013cd043a DIST postgresql-8.1.11.tar.bz2 11735420 RMD160 9fb98eadc4f1015205970f26b31b68ea0378bda9 SHA1 73c0f09754fc8e3c7f8d7de49d70244b76927416 SHA256 3e91cdfc1353fa9c6416d9fc8ae9d6ab3171565f00aeb6c882214c2f08a03e2e DIST postgresql-8.2.7.tar.bz2 12576126 RMD160 96700e91c3b9e733c686b0fe377c7ba661710942 SHA1 0be0dbaa488810ebcba77ac7246180c5b2a9b669 SHA256 39528d1ba50f5abc51569e8b9bdeb47d0d4650d289a2c2e465621864b1ff3584 DIST postgresql-8.3.1.tar.bz2 13995572 RMD160 075efb67126f2b308d2a5fe4f9097fdbfbe94c89 SHA1 7397e0d8fd3c420ee845d9ae4995ae347bfaea1d SHA256 7ccf1e5c987920e4d6eb98b8589939e29d3a361d285055d5af35ddd8e1a2d992 -EBUILD postgresql-server-7.3.21.ebuild 8950 RMD160 45ef0b5075785bb3e5698e15f47028eab9bdfef4 SHA1 f6868066771106c691b43d456bfa2a032af19d6f SHA256 21fd96d0b2888c4580a5a2a12ae08ee13523d01f823e74c59fc169d9171cb18b -EBUILD postgresql-server-7.4.19.ebuild 8880 RMD160 197c5aa134179814f83c1d66983435e52f23c9e6 SHA1 56dbbc9971e39f6b37387c2dca5a2316435d0e2f SHA256 9fc12557ba7e076bdda1eefbce8002f611244f3558e962c3da7f8ca0bb860399 -EBUILD postgresql-server-8.0.15.ebuild 9076 RMD160 84042bb5335ddd21ac5556c79b609d13f0648e1f SHA1 2bbece26ef378d078aa6abdbde1a64b63feab316 SHA256 b93aedc7300827363542d6caf7f0a62bc90accdd416b5060e7fdef106a5bec5d -EBUILD postgresql-server-8.1.11.ebuild 9197 RMD160 a620bada30cf94c5a36cd2cdb18d312299cf6d84 SHA1 8265656f375a27d34221819e6565f62231e2441f SHA256 8a4123efaf42ea77845e265d58a75a0f6484ef80832e8360efedf8b56194864f -EBUILD postgresql-server-8.2.7.ebuild 9427 RMD160 f46e6997f3f71652d7e2505e0d237fbfb1966b02 SHA1 21f3d76c309de58021bcc97eea2d6ffc3702434b SHA256 5e78d8ca135091d5da7b74fae4c933e0fe98aaa1c81f2edf0b375b1233bba406 -EBUILD postgresql-server-8.3.1.ebuild 9515 RMD160 4bb833f5196fcda9500571c3a053c9e850a732db SHA1 eb0137c0bd621d5f4038342d15556eb9983dfdb7 SHA256 74a35dda8d22b9fb704d3cf9b141dec5c2abf8c0ec0693228547cf4caecabbc5 -MISC ChangeLog 5477 RMD160 3cc743660189c3eee3116ed7e5eeeadec59b4e23 SHA1 3c5d24ee30ad3e6c85f3c05d50dd1d90a9dc7116 SHA256 46d934de66e54a879eee0ef80d9e545855d8c59496e4d146ca0296b8e5d11894 +EBUILD postgresql-server-7.3.21.ebuild 8923 RMD160 c513a7de90e7f7ccece9413690e02fc83ba628ab SHA1 1f450fbb281f0dd493c057d5cab6775b91973aa2 SHA256 5119d295fc82aa67a8f378b0793bfee06d2923c4ec86d131418e4871f9d92c90 +EBUILD postgresql-server-7.4.19.ebuild 8853 RMD160 ccf911da219e67d8fed7c764f82c8beb359f9159 SHA1 600e661dff1f2d7c2b5e8871d4194a72ad432131 SHA256 ec0e1662d838242e01d901cf837814d33b10d95511676827c44000b2f09a9658 +EBUILD postgresql-server-8.0.15.ebuild 9049 RMD160 4d8733a1e7cdadb73c913d7db4625265af0c763f SHA1 50b8cdb4b9c86cd898f5b0f7e8acfac981c58a29 SHA256 69c7b19b47a77df479ecf14792217df215e1c58e86d8db0a095483de60cf7a64 +EBUILD postgresql-server-8.1.11.ebuild 9170 RMD160 5859faaad99441d2ff66fb4cb903d747147367a9 SHA1 6ebe5e8d981f7ceae876d5067ead069c9fdf7741 SHA256 f92d963fe32d33b1e390a24071769b9f530d9023aa86ef81b77e5c8b8f0ff082 +EBUILD postgresql-server-8.2.7.ebuild 9399 RMD160 f641d7b3a1c81927f776953aeb7a90a732a744e2 SHA1 1ab36d9cd936d07abc8d1b92b96c71ddcfbcf23a SHA256 0dd3a2426f34031b535474411adf4c8f97e0b164ab111c1d3ff8372dc0ee2d06 +EBUILD postgresql-server-8.3.1.ebuild 9487 RMD160 eaf2d931e1a458b4a4b0112da60fa22e7d1d5230 SHA1 ed92c06eef828399e40b6b0a9292eb49724d6ab6 SHA256 e84e9498008cbdaf9f887339ccec8c128eb1dab436786307f08182d2331977d8 +MISC ChangeLog 5968 RMD160 5bd8cb68abac9811a58131fd03ce36fbf65d8e84 SHA1 d1848d0aff273d35f853f9d3a9ee83ea7c86fb61 SHA256 9a454f630dcdd7910f4489ff2ffeb16d3e2c66a7a8a6afe30a1861ed458d4b84 MISC metadata.xml 164 RMD160 becfe652663bd65719dd11fa6ffb588b3d5b4ecc SHA1 f67b7ac1c5e6e65ef5a19a589d4759c84918f86c SHA256 7e8e8126bc8701c4a42c7dfed8bb755ac6040fe3d0e3f994d888f8b2b4fa7d8b diff --git a/dev-db/postgresql-server/postgresql-server-7.3.21.ebuild b/dev-db/postgresql-server/postgresql-server-7.3.21.ebuild index d77ac07..89d3ff2 100644 --- a/dev-db/postgresql-server/postgresql-server-7.3.21.ebuild +++ b/dev-db/postgresql-server/postgresql-server-7.3.21.ebuild @@ -37,22 +37,9 @@ DEPEND="${RDEPEND} xml? ( dev-util/pkgconfig )" PDEPEND="doc? ( dev-db/postgresql-docs:${SLOT} )" -[[ -r /etc/conf.d/postgresql-${SLOT} ]] && source /etc/conf.d/postgresql-${SLOT} -[[ -z "${PGDATA}" ]] && PGDATA="/var/lib/postgresql/${SLOT}/data" - S="${WORKDIR}/postgresql-${PV}" pkg_setup() { - if [[ -f "${PGDATA}/PG_VERSION" ]] ; then - if [[ $(cat "${PGDATA}/PG_VERSION") != $(get_version_component_range 1-2) ]] ; then - eerror "PostgreSQL ${PV} cannot upgrade your existing databases, you must" - eerror "use pg_dump to export your existing databases to a file, and then" - eerror "pg_restore to import them when you have upgraded completely." - eerror "You must remove your entire database directory to continue." - eerror "(database directory = ${PGDATA})." - die "Remove your database directory to continue" - fi - fi enewgroup postgres 70 enewuser postgres 70 /bin/bash /var/lib postgres } @@ -128,6 +115,7 @@ pkg_postinst() { eselect postgresql update [[ "$(eselect postgresql show)" = "(none)" ]] && eselect postgresql set ${SLOT} [[ "$(eselect postgresql show-service)" = "(none)" ]] && eselect postgresql set-service ${SLOT} + ewarn "Please note that the standard location of the socket has changed from /tmp" ewarn "to /var/run/postgresql and you have to be in the 'postgres' group to access" ewarn "the socket." @@ -148,23 +136,31 @@ pkg_postrm() { } pkg_config() { - if [[ -f "${PGDATA}/PG_VERSION" ]] ; then - eerror "PostgreSQL ${PV} cannot upgrade your existing databases." - eerror "You must remove your entire database directory to continue." - eerror "(database directory = ${PGDATA})." - die "Remove your database directory to continue" - fi + [[ -z "${PGDATA}" ]] && PGDATA="/var/lib/postgresql/${SLOT}/data" einfo "You can pass options to initdb by setting the PG_INITDB_OPTS variable." einfo "More information can be found here:" - einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - - einfo "PG_INITDB_OPTS is currently set to \"${PG_INITDB_OPTS}\"" + einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" + einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" + einfo "Simply add the options you would have added to initdb to the PG_INITDB_OPTS variable." + einfo + einfo "You can change the directory where the database cluster is being created by setting" + einfo "the PGDATA variable." + einfo + einfo "PG_INITDB_OPTS is currently set to:" + einfo " \"${PG_INITDB_OPTS}\"" + einfo "and the database cluster will be created in:" + einfo " \"${PGDATA}\"" einfo "Are you ready to continue? (Y/n)" read answer [ -z $answer ] && answer=Y [ "$answer" == "Y" ] || [ "$answer" == "y" ] || die "aborted" + if [[ -f "${PGDATA}/PG_VERSION" ]] ; then + eerror "The given directory \"${PGDATA}\" already contains a database cluster." + die "cluster already exists" + fi + [ -z "${PG_MAX_CONNECTIONS}" ] && PG_MAX_CONNECTIONS="128" einfo "Checking system parameters..." @@ -174,7 +170,7 @@ pkg_config() { fi if [ -z ${SKIP_SYSTEM_TESTS} ] ; then - einfo "Assuming that you want at least ${PG_MAX_CONNECTIONS} connections" + einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..." local SEMMSL=$(sysctl -n kernel.sem | cut -f1) local SEMMNS=$(sysctl -n kernel.sem | cut -f2) @@ -190,9 +186,9 @@ pkg_config() { if [ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ] ; then eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)" eerror "You have now several options:" - eerror " - Change the mentioned system parameter." + eerror " - Change the mentioned system parameter" eerror " - Lower the number of max.connections by setting PG_MAX_CONNECTIONS to a value lower than ${PG_MAX_CONNECTIONS}" - eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test" + eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely" eerror "More information can be found here:" eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html" die "system test failed" @@ -215,6 +211,11 @@ pkg_config() { einfo einfo "You can use the '${ROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL instead of 'pg_ctl'." einfo + + if [ "${PGDATA}" != "/var/lib/postgresql/${SLOT}/data" ] ; then + ewarn "You didn't install the database cluster in the standard location, please make sure that you set" + ewarn "PGDATA=\"${PGDATA}\" in the appropriate conf.d file (probably /etc/conf.d/postgresql-${SLOT})" + fi } src_test() { diff --git a/dev-db/postgresql-server/postgresql-server-7.4.19.ebuild b/dev-db/postgresql-server/postgresql-server-7.4.19.ebuild index 2689294..84533be 100644 --- a/dev-db/postgresql-server/postgresql-server-7.4.19.ebuild +++ b/dev-db/postgresql-server/postgresql-server-7.4.19.ebuild @@ -37,22 +37,9 @@ DEPEND="${RDEPEND} xml? ( dev-util/pkgconfig )" PDEPEND="doc? ( dev-db/postgresql-docs:${SLOT} )" -[[ -r /etc/conf.d/postgresql-${SLOT} ]] && source /etc/conf.d/postgresql-${SLOT} -[[ -z "${PGDATA}" ]] && PGDATA="/var/lib/postgresql/${SLOT}/data" - S="${WORKDIR}/postgresql-${PV}" pkg_setup() { - if [[ -f "${PGDATA}/PG_VERSION" ]] ; then - if [[ $(cat "${PGDATA}/PG_VERSION") != $(get_version_component_range 1-2) ]] ; then - eerror "PostgreSQL ${PV} cannot upgrade your existing databases, you must" - eerror "use pg_dump to export your existing databases to a file, and then" - eerror "pg_restore to import them when you have upgraded completely." - eerror "You must remove your entire database directory to continue." - eerror "(database directory = ${PGDATA})." - die "Remove your database directory to continue" - fi - fi enewgroup postgres 70 enewuser postgres 70 /bin/bash /var/lib postgres } @@ -128,6 +115,7 @@ pkg_postinst() { eselect postgresql update [[ "$(eselect postgresql show)" = "(none)" ]] && eselect postgresql set ${SLOT} [[ "$(eselect postgresql show-service)" = "(none)" ]] && eselect postgresql set-service ${SLOT} + ewarn "Please note that the standard location of the socket has changed from /tmp" ewarn "to /var/run/postgresql and you have to be in the 'postgres' group to access" ewarn "the socket." @@ -148,23 +136,31 @@ pkg_postrm() { } pkg_config() { - if [[ -f "${PGDATA}/PG_VERSION" ]] ; then - eerror "PostgreSQL ${PV} cannot upgrade your existing databases." - eerror "You must remove your entire database directory to continue." - eerror "(database directory = ${PGDATA})." - die "Remove your database directory to continue" - fi + [[ -z "${PGDATA}" ]] && PGDATA="/var/lib/postgresql/${SLOT}/data" einfo "You can pass options to initdb by setting the PG_INITDB_OPTS variable." einfo "More information can be found here:" - einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - - einfo "PG_INITDB_OPTS is currently set to \"${PG_INITDB_OPTS}\"" + einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" + einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" + einfo "Simply add the options you would have added to initdb to the PG_INITDB_OPTS variable." + einfo + einfo "You can change the directory where the database cluster is being created by setting" + einfo "the PGDATA variable." + einfo + einfo "PG_INITDB_OPTS is currently set to:" + einfo " \"${PG_INITDB_OPTS}\"" + einfo "and the database cluster will be created in:" + einfo " \"${PGDATA}\"" einfo "Are you ready to continue? (Y/n)" read answer [ -z $answer ] && answer=Y [ "$answer" == "Y" ] || [ "$answer" == "y" ] || die "aborted" + if [[ -f "${PGDATA}/PG_VERSION" ]] ; then + eerror "The given directory \"${PGDATA}\" already contains a database cluster." + die "cluster already exists" + fi + [ -z "${PG_MAX_CONNECTIONS}" ] && PG_MAX_CONNECTIONS="128" einfo "Checking system parameters..." @@ -174,7 +170,7 @@ pkg_config() { fi if [ -z ${SKIP_SYSTEM_TESTS} ] ; then - einfo "Assuming that you want at least ${PG_MAX_CONNECTIONS} connections" + einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..." local SEMMSL=$(sysctl -n kernel.sem | cut -f1) local SEMMNS=$(sysctl -n kernel.sem | cut -f2) @@ -190,9 +186,9 @@ pkg_config() { if [ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ] ; then eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)" eerror "You have now several options:" - eerror " - Change the mentioned system parameter." + eerror " - Change the mentioned system parameter" eerror " - Lower the number of max.connections by setting PG_MAX_CONNECTIONS to a value lower than ${PG_MAX_CONNECTIONS}" - eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test" + eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely" eerror "More information can be found here:" eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html" die "system test failed" @@ -215,6 +211,11 @@ pkg_config() { einfo einfo "You can use the '${ROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL instead of 'pg_ctl'." einfo + + if [ "${PGDATA}" != "/var/lib/postgresql/${SLOT}/data" ] ; then + ewarn "You didn't install the database cluster in the standard location, please make sure that you set" + ewarn "PGDATA=\"${PGDATA}\" in the appropriate conf.d file (probably /etc/conf.d/postgresql-${SLOT})" + fi } src_test() { diff --git a/dev-db/postgresql-server/postgresql-server-8.0.15.ebuild b/dev-db/postgresql-server/postgresql-server-8.0.15.ebuild index 16e3961..2808b0c 100644 --- a/dev-db/postgresql-server/postgresql-server-8.0.15.ebuild +++ b/dev-db/postgresql-server/postgresql-server-8.0.15.ebuild @@ -38,22 +38,9 @@ DEPEND="${RDEPEND} xml? ( dev-util/pkgconfig )" PDEPEND="doc? ( dev-db/postgresql-docs:${SLOT} )" -[[ -r /etc/conf.d/postgresql-${SLOT} ]] && source /etc/conf.d/postgresql-${SLOT} -[[ -z "${PGDATA}" ]] && PGDATA="/var/lib/postgresql/${SLOT}/data" - S="${WORKDIR}/postgresql-${PV}" pkg_setup() { - if [[ -f "${PGDATA}/PG_VERSION" ]] ; then - if [[ $(cat "${PGDATA}/PG_VERSION") != $(get_version_component_range 1-2) ]] ; then - eerror "PostgreSQL ${PV} cannot upgrade your existing databases, you must" - eerror "use pg_dump to export your existing databases to a file, and then" - eerror "pg_restore to import them when you have upgraded completely." - eerror "You must remove your entire database directory to continue." - eerror "(database directory = ${PGDATA})." - die "Remove your database directory to continue" - fi - fi enewgroup postgres 70 enewuser postgres 70 /bin/bash /var/lib postgres } @@ -129,6 +116,7 @@ pkg_postinst() { eselect postgresql update [[ "$(eselect postgresql show)" = "(none)" ]] && eselect postgresql set ${SLOT} [[ "$(eselect postgresql show-service)" = "(none)" ]] && eselect postgresql set-service ${SLOT} + ewarn "Please note that the standard location of the socket has changed from /tmp" ewarn "to /var/run/postgresql and you have to be in the 'postgres' group to access" ewarn "the socket." @@ -149,23 +137,31 @@ pkg_postrm() { } pkg_config() { - if [[ -f "${PGDATA}/PG_VERSION" ]] ; then - eerror "PostgreSQL ${PV} cannot upgrade your existing databases." - eerror "You must remove your entire database directory to continue." - eerror "(database directory = ${PGDATA})." - die "Remove your database directory to continue" - fi + [[ -z "${PGDATA}" ]] && PGDATA="/var/lib/postgresql/${SLOT}/data" einfo "You can pass options to initdb by setting the PG_INITDB_OPTS variable." einfo "More information can be found here:" - einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - - einfo "PG_INITDB_OPTS is currently set to \"${PG_INITDB_OPTS}\"" + einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" + einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" + einfo "Simply add the options you would have added to initdb to the PG_INITDB_OPTS variable." + einfo + einfo "You can change the directory where the database cluster is being created by setting" + einfo "the PGDATA variable." + einfo + einfo "PG_INITDB_OPTS is currently set to:" + einfo " \"${PG_INITDB_OPTS}\"" + einfo "and the database cluster will be created in:" + einfo " \"${PGDATA}\"" einfo "Are you ready to continue? (Y/n)" read answer [ -z $answer ] && answer=Y [ "$answer" == "Y" ] || [ "$answer" == "y" ] || die "aborted" + if [[ -f "${PGDATA}/PG_VERSION" ]] ; then + eerror "The given directory \"${PGDATA}\" already contains a database cluster." + die "cluster already exists" + fi + [ -z "${PG_MAX_CONNECTIONS}" ] && PG_MAX_CONNECTIONS="128" einfo "Checking system parameters..." @@ -175,7 +171,7 @@ pkg_config() { fi if [ -z ${SKIP_SYSTEM_TESTS} ] ; then - einfo "Assuming that you want at least ${PG_MAX_CONNECTIONS} connections" + einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..." local SEMMSL=$(sysctl -n kernel.sem | cut -f1) local SEMMNS=$(sysctl -n kernel.sem | cut -f2) @@ -191,9 +187,9 @@ pkg_config() { if [ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ] ; then eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)" eerror "You have now several options:" - eerror " - Change the mentioned system parameter." + eerror " - Change the mentioned system parameter" eerror " - Lower the number of max.connections by setting PG_MAX_CONNECTIONS to a value lower than ${PG_MAX_CONNECTIONS}" - eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test" + eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely" eerror "More information can be found here:" eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html" die "system test failed" @@ -216,6 +212,11 @@ pkg_config() { einfo einfo "You can use the '${ROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL instead of 'pg_ctl'." einfo + + if [ "${PGDATA}" != "/var/lib/postgresql/${SLOT}/data" ] ; then + ewarn "You didn't install the database cluster in the standard location, please make sure that you set" + ewarn "PGDATA=\"${PGDATA}\" in the appropriate conf.d file (probably /etc/conf.d/postgresql-${SLOT})" + fi } src_test() { diff --git a/dev-db/postgresql-server/postgresql-server-8.1.11.ebuild b/dev-db/postgresql-server/postgresql-server-8.1.11.ebuild index 02e9bbb..0bf158e 100644 --- a/dev-db/postgresql-server/postgresql-server-8.1.11.ebuild +++ b/dev-db/postgresql-server/postgresql-server-8.1.11.ebuild @@ -38,22 +38,9 @@ DEPEND="${RDEPEND} xml? ( dev-util/pkgconfig )" PDEPEND="doc? ( dev-db/postgresql-docs:${SLOT} )" -[[ -r /etc/conf.d/postgresql-${SLOT} ]] && source /etc/conf.d/postgresql-${SLOT} -[[ -z "${PGDATA}" ]] && PGDATA="/var/lib/postgresql/${SLOT}/data" - S="${WORKDIR}/postgresql-${PV}" pkg_setup() { - if [[ -f "${PGDATA}/PG_VERSION" ]] ; then - if [[ $(cat "${PGDATA}/PG_VERSION") != $(get_version_component_range 1-2) ]] ; then - eerror "PostgreSQL ${PV} cannot upgrade your existing databases, you must" - eerror "use pg_dump to export your existing databases to a file, and then" - eerror "pg_restore to import them when you have upgraded completely." - eerror "You must remove your entire database directory to continue." - eerror "(database directory = ${PGDATA})." - die "Remove your database directory to continue" - fi - fi enewgroup postgres 70 enewuser postgres 70 /bin/bash /var/lib postgres } @@ -129,6 +116,7 @@ pkg_postinst() { eselect postgresql update [[ "$(eselect postgresql show)" = "(none)" ]] && eselect postgresql set ${SLOT} [[ "$(eselect postgresql show-service)" = "(none)" ]] && eselect postgresql set-service ${SLOT} + ewarn "Please note that the standard location of the socket has changed from /tmp" ewarn "to /var/run/postgresql and you have to be in the 'postgres' group to access" ewarn "the socket." @@ -152,23 +140,31 @@ pkg_postrm() { } pkg_config() { - if [[ -f "${PGDATA}/PG_VERSION" ]] ; then - eerror "PostgreSQL ${PV} cannot upgrade your existing databases." - eerror "You must remove your entire database directory to continue." - eerror "(database directory = ${PGDATA})." - die "Remove your database directory to continue" - fi + [[ -z "${PGDATA}" ]] && PGDATA="/var/lib/postgresql/${SLOT}/data" einfo "You can pass options to initdb by setting the PG_INITDB_OPTS variable." einfo "More information can be found here:" - einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - - einfo "PG_INITDB_OPTS is currently set to \"${PG_INITDB_OPTS}\"" + einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" + einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" + einfo "Simply add the options you would have added to initdb to the PG_INITDB_OPTS variable." + einfo + einfo "You can change the directory where the database cluster is being created by setting" + einfo "the PGDATA variable." + einfo + einfo "PG_INITDB_OPTS is currently set to:" + einfo " \"${PG_INITDB_OPTS}\"" + einfo "and the database cluster will be created in:" + einfo " \"${PGDATA}\"" einfo "Are you ready to continue? (Y/n)" read answer [ -z $answer ] && answer=Y [ "$answer" == "Y" ] || [ "$answer" == "y" ] || die "aborted" + if [[ -f "${PGDATA}/PG_VERSION" ]] ; then + eerror "The given directory \"${PGDATA}\" already contains a database cluster." + die "cluster already exists" + fi + [ -z "${PG_MAX_CONNECTIONS}" ] && PG_MAX_CONNECTIONS="128" einfo "Checking system parameters..." @@ -178,7 +174,7 @@ pkg_config() { fi if [ -z ${SKIP_SYSTEM_TESTS} ] ; then - einfo "Assuming that you want at least ${PG_MAX_CONNECTIONS} connections" + einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..." local SEMMSL=$(sysctl -n kernel.sem | cut -f1) local SEMMNS=$(sysctl -n kernel.sem | cut -f2) @@ -194,9 +190,9 @@ pkg_config() { if [ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ] ; then eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)" eerror "You have now several options:" - eerror " - Change the mentioned system parameter." + eerror " - Change the mentioned system parameter" eerror " - Lower the number of max.connections by setting PG_MAX_CONNECTIONS to a value lower than ${PG_MAX_CONNECTIONS}" - eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test" + eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely" eerror "More information can be found here:" eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html" die "system test failed" @@ -219,6 +215,11 @@ pkg_config() { einfo einfo "You can use the '${ROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL instead of 'pg_ctl'." einfo + + if [ "${PGDATA}" != "/var/lib/postgresql/${SLOT}/data" ] ; then + ewarn "You didn't install the database cluster in the standard location, please make sure that you set" + ewarn "PGDATA=\"${PGDATA}\" in the appropriate conf.d file (probably /etc/conf.d/postgresql-${SLOT})" + fi } src_test() { diff --git a/dev-db/postgresql-server/postgresql-server-8.2.7.ebuild b/dev-db/postgresql-server/postgresql-server-8.2.7.ebuild index 83ae3d0..291a98e 100644 --- a/dev-db/postgresql-server/postgresql-server-8.2.7.ebuild +++ b/dev-db/postgresql-server/postgresql-server-8.2.7.ebuild @@ -38,22 +38,9 @@ DEPEND="${RDEPEND} xml? ( dev-util/pkgconfig )" PDEPEND="doc? ( dev-db/postgresql-docs:${SLOT} )" -[[ -r /etc/conf.d/postgresql-${SLOT} ]] && source /etc/conf.d/postgresql-${SLOT} -[[ -z "${PGDATA}" ]] && PGDATA="/var/lib/postgresql/${SLOT}/data" - S="${WORKDIR}/postgresql-${PV}" pkg_setup() { - if [[ -f "${PGDATA}/PG_VERSION" ]] ; then - if [[ $(cat "${PGDATA}/PG_VERSION") != $(get_version_component_range 1-2) ]] ; then - eerror "PostgreSQL ${PV} cannot upgrade your existing databases, you must" - eerror "use pg_dump to export your existing databases to a file, and then" - eerror "pg_restore to import them when you have upgraded completely." - eerror "You must remove your entire database directory to continue." - eerror "(database directory = ${PGDATA})." - die "Remove your database directory to continue" - fi - fi enewgroup postgres 70 enewuser postgres 70 /bin/bash /var/lib postgres } @@ -158,23 +145,31 @@ pkg_postrm() { } pkg_config() { - if [[ -f "${PGDATA}/PG_VERSION" ]] ; then - eerror "PostgreSQL ${PV} cannot upgrade your existing databases." - eerror "You must remove your entire database directory to continue." - eerror "(database directory = ${PGDATA})." - die "Remove your database directory to continue" - fi + [[ -z "${PGDATA}" ]] && PGDATA="/var/lib/postgresql/${SLOT}/data" einfo "You can pass options to initdb by setting the PG_INITDB_OPTS variable." einfo "More information can be found here:" - einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - - einfo "PG_INITDB_OPTS is currently set to \"${PG_INITDB_OPTS}\"" + einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" + einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" + einfo "Simply add the options you would have added to initdb to the PG_INITDB_OPTS variable." + einfo + einfo "You can change the directory where the database cluster is being created by setting" + einfo "the PGDATA variable." + einfo + einfo "PG_INITDB_OPTS is currently set to:" + einfo " \"${PG_INITDB_OPTS}\"" + einfo "and the database cluster will be created in:" + einfo " \"${PGDATA}\"" einfo "Are you ready to continue? (Y/n)" read answer [ -z $answer ] && answer=Y [ "$answer" == "Y" ] || [ "$answer" == "y" ] || die "aborted" + if [[ -f "${PGDATA}/PG_VERSION" ]] ; then + eerror "The given directory \"${PGDATA}\" already contains a database cluster." + die "cluster already exists" + fi + [ -z "${PG_MAX_CONNECTIONS}" ] && PG_MAX_CONNECTIONS="128" einfo "Checking system parameters..." @@ -184,7 +179,7 @@ pkg_config() { fi if [ -z ${SKIP_SYSTEM_TESTS} ] ; then - einfo "Assuming that you want at least ${PG_MAX_CONNECTIONS} connections" + einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..." local SEMMSL=$(sysctl -n kernel.sem | cut -f1) local SEMMNS=$(sysctl -n kernel.sem | cut -f2) @@ -200,9 +195,9 @@ pkg_config() { if [ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ] ; then eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)" eerror "You have now several options:" - eerror " - Change the mentioned system parameter." + eerror " - Change the mentioned system parameter" eerror " - Lower the number of max.connections by setting PG_MAX_CONNECTIONS to a value lower than ${PG_MAX_CONNECTIONS}" - eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test" + eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely" eerror "More information can be found here:" eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html" die "system test failed" @@ -225,6 +220,11 @@ pkg_config() { einfo einfo "You can use the '${ROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL instead of 'pg_ctl'." einfo + + if [ "${PGDATA}" != "/var/lib/postgresql/${SLOT}/data" ] ; then + ewarn "You didn't install the database cluster in the standard location, please make sure that you set" + ewarn "PGDATA=\"${PGDATA}\" in the appropriate conf.d file (probably /etc/conf.d/postgresql-${SLOT})" + fi } src_test() { diff --git a/dev-db/postgresql-server/postgresql-server-8.3.1.ebuild b/dev-db/postgresql-server/postgresql-server-8.3.1.ebuild index a322605..5682246 100644 --- a/dev-db/postgresql-server/postgresql-server-8.3.1.ebuild +++ b/dev-db/postgresql-server/postgresql-server-8.3.1.ebuild @@ -39,22 +39,9 @@ DEPEND="${RDEPEND} xml? ( dev-util/pkgconfig )" PDEPEND="doc? ( dev-db/postgresql-docs:${SLOT} )" -[[ -r /etc/conf.d/postgresql-${SLOT} ]] && source /etc/conf.d/postgresql-${SLOT} -[[ -z "${PGDATA}" ]] && PGDATA="/var/lib/postgresql/${SLOT}/data" - S="${WORKDIR}/postgresql-${PV}" pkg_setup() { - if [[ -f "${PGDATA}/PG_VERSION" ]] ; then - if [[ $(cat "${PGDATA}/PG_VERSION") != $(get_version_component_range 1-2) ]] ; then - eerror "PostgreSQL ${PV} cannot upgrade your existing databases, you must" - eerror "use pg_dump to export your existing databases to a file, and then" - eerror "pg_restore to import them when you have upgraded completely." - eerror "You must remove your entire database directory to continue." - eerror "(database directory = ${PGDATA})." - die "Remove your database directory to continue" - fi - fi enewgroup postgres 70 enewuser postgres 70 /bin/bash /var/lib postgres } @@ -163,23 +150,31 @@ pkg_postrm() { } pkg_config() { - if [[ -f "${PGDATA}/PG_VERSION" ]] ; then - eerror "PostgreSQL ${PV} cannot upgrade your existing databases." - eerror "You must remove your entire database directory to continue." - eerror "(database directory = ${PGDATA})." - die "Remove your database directory to continue" - fi + [[ -z "${PGDATA}" ]] && PGDATA="/var/lib/postgresql/${SLOT}/data" einfo "You can pass options to initdb by setting the PG_INITDB_OPTS variable." einfo "More information can be found here:" - einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" - - einfo "PG_INITDB_OPTS is currently set to \"${PG_INITDB_OPTS}\"" + einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" + einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" + einfo "Simply add the options you would have added to initdb to the PG_INITDB_OPTS variable." + einfo + einfo "You can change the directory where the database cluster is being created by setting" + einfo "the PGDATA variable." + einfo + einfo "PG_INITDB_OPTS is currently set to:" + einfo " \"${PG_INITDB_OPTS}\"" + einfo "and the database cluster will be created in:" + einfo " \"${PGDATA}\"" einfo "Are you ready to continue? (Y/n)" read answer [ -z $answer ] && answer=Y [ "$answer" == "Y" ] || [ "$answer" == "y" ] || die "aborted" + if [[ -f "${PGDATA}/PG_VERSION" ]] ; then + eerror "The given directory \"${PGDATA}\" already contains a database cluster." + die "cluster already exists" + fi + [ -z "${PG_MAX_CONNECTIONS}" ] && PG_MAX_CONNECTIONS="128" einfo "Checking system parameters..." @@ -189,7 +184,7 @@ pkg_config() { fi if [ -z ${SKIP_SYSTEM_TESTS} ] ; then - einfo "Assuming that you want at least ${PG_MAX_CONNECTIONS} connections" + einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..." local SEMMSL=$(sysctl -n kernel.sem | cut -f1) local SEMMNS=$(sysctl -n kernel.sem | cut -f2) @@ -205,9 +200,9 @@ pkg_config() { if [ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ] ; then eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)" eerror "You have now several options:" - eerror " - Change the mentioned system parameter." + eerror " - Change the mentioned system parameter" eerror " - Lower the number of max.connections by setting PG_MAX_CONNECTIONS to a value lower than ${PG_MAX_CONNECTIONS}" - eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test" + eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely" eerror "More information can be found here:" eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html" die "system test failed" @@ -230,6 +225,11 @@ pkg_config() { einfo einfo "You can use the '${ROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL instead of 'pg_ctl'." einfo + + if [ "${PGDATA}" != "/var/lib/postgresql/${SLOT}/data" ] ; then + ewarn "You didn't install the database cluster in the standard location, please make sure that you set" + ewarn "PGDATA=\"${PGDATA}\" in the appropriate conf.d file (probably /etc/conf.d/postgresql-${SLOT})" + fi } src_test() { |