Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 147051 Details for
Bug 214438
The dev-db/postgresql-8.2.6 ebuild does not respect config set in /etc/conf.d/postgresql when doing pkg_configure
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to resolve my complaint.
pg.ebuild.patch (text/plain), 3.09 KB, created by
Max Hacking
on 2008-03-23 21:19:09 UTC
(
hide
)
Description:
Patch to resolve my complaint.
Filename:
MIME Type:
Creator:
Max Hacking
Created:
2008-03-23 21:19:09 UTC
Size:
3.09 KB
patch
obsolete
>--- postgresql-8.2.6.ebuild 2008-01-13 01:44:21.000000000 +0000 >+++ postgresql-8.2.6-r1.ebuild 2008-03-23 21:05:33.000000000 +0000 >@@ -31,17 +31,20 @@ > nls? ( sys-devel/gettext ) > xml? ( dev-util/pkgconfig )" > >-PG_DIR="/var/lib/postgresql" >+[[ -a "${ROOT}/etc/conf.d/postgresql" ]] && source "${ROOT}/etc/conf.d/postgresql" >+[[ -z PGDATA ]] && PGDATA="/var/lib/postgresql" >+[[ -z PGUSER ]] && PGUSER="postgres" >+[[ -z PGGROUP ]] && PGGROUP="postgres" > [[ -z "${PG_MAX_CONNECTIONS}" ]] && PG_MAX_CONNECTIONS="512" > > pkg_setup() { >- if [[ -f "${PG_DIR}/data/PG_VERSION" ]] ; then >- if [[ $(cat "${PG_DIR}/data/PG_VERSION") != $(get_version_component_range 1-2) ]] ; then >+ if [[ -f "${PGDATA}/data/PG_VERSION" ]] ; then >+ if [[ $(cat "${PGDATA}/data/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 = ${PG_DIR})." >+ eerror "(database directory = ${PGDATA})." > die "Remove your database directory to continue" > fi > fi >@@ -166,15 +169,15 @@ > > pkg_config() { > einfo "Creating the data directory ..." >- mkdir -p "${PG_DIR}/data" >- chown -Rf postgres:postgres "${PG_DIR}" >- chmod 0700 "${PG_DIR}/data" >+ mkdir -p "${PGDATA}/data" >+ chown -Rf $PGUSER:$PGGROUP "${PGDATA}" >+ chmod 0700 "${PGDATA}/data" > > einfo "Initializing the database ..." >- if [[ -f "${PG_DIR}/data/PG_VERSION" ]] ; then >+ if [[ -f "${PGDATA}/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 = ${PG_DIR})." >+ eerror "(database directory = ${PGDATA})." > die "Remove your database directory to continue" > else > if use kernel_linux ; then >@@ -191,7 +194,7 @@ > echo ${SEM} ${SEMMNI_MIN} > /proc/sys/kernel/sem > fi > >- su postgres -c "/usr/bin/initdb --pgdata ${PG_DIR}/data" >+ su $PGUSER -c "/usr/bin/initdb --pgdata ${PGDATA}/data" > > if [ ! `sysctl -n kernel.sem | cut -f4` -eq ${SEMMNI} ] ; then > echo ${SEM} ${SEMMNI} > /proc/sys/kernel/sem >@@ -211,7 +214,7 @@ > eerror > fi > else >- su postgres -c "/usr/bin/initdb --pgdata ${PG_DIR}/data" >+ su postgres -c "/usr/bin/initdb --pgdata ${PGDATA}/data" > fi > > einfo >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 214438
:
147051
|
147053
|
147133
|
147135
|
147167