summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiziano Müller <dev-zero@gentoo.org>2008-04-10 13:13:06 +0000
committerTiziano Müller <dev-zero@gentoo.org>2008-04-10 13:13:06 +0000
commitf9878aaef44ce9ff007e40cabb8978cd29a068ed (patch)
treeb3ffd6cffa098662ebc64cc8c0e3783b97edb86b
parentdev-db/postgresql-base: Added patch to relax strict permission check on ssl k... (diff)
downloadexperimental-f9878aaef44ce9ff007e40cabb8978cd29a068ed.tar.gz
experimental-f9878aaef44ce9ff007e40cabb8978cd29a068ed.tar.bz2
experimental-f9878aaef44ce9ff007e40cabb8978cd29a068ed.zip
app-admin/eselect-postgresql: Added some instructions. Added an env.d file to mask /etc/eselect/postgresql. Fixed some multilib bugs (forgotten ${D}). Create relative symlinks instead of absolute ones. Keep slot-files in /etc/eselect/postgresql/slots instead of /usr to avoid problems with having /usr on a separate volume.
svn path=/experimental/; revision=359
-rw-r--r--app-admin/eselect-postgresql/ChangeLog9
-rw-r--r--app-admin/eselect-postgresql/Manifest7
-rw-r--r--app-admin/eselect-postgresql/eselect-postgresql-0.3.ebuild (renamed from app-admin/eselect-postgresql/eselect-postgresql-0.2.ebuild)25
-rw-r--r--app-admin/eselect-postgresql/files/50postgresql-eselect1
-rw-r--r--app-admin/eselect-postgresql/files/postgresql.eselect15
5 files changed, 42 insertions, 15 deletions
diff --git a/app-admin/eselect-postgresql/ChangeLog b/app-admin/eselect-postgresql/ChangeLog
index 4e27866..ff89175 100644
--- a/app-admin/eselect-postgresql/ChangeLog
+++ b/app-admin/eselect-postgresql/ChangeLog
@@ -2,6 +2,15 @@
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 10 Apr 2008; Tiziano Müller <dev-zero@gentoo.org>
+ +files/50postgresql-eselect, -eselect-postgresql-0.2.ebuild,
+ +eselect-postgresql-0.3.ebuild, files/postgresql.eselect:
+ Added some instructions. Added an env.d file to mask
+ /etc/eselect/postgresql. Fixed some multilib bugs (forgotten ${D}). Create
+ relative symlinks instead of absolute ones. Keep slot-files in
+ /etc/eselect/postgresql/slots instead of /usr to avoid problems with having
+ /usr on a separate volume.
+
19 Mar 2008; Tiziano Müller <dev-zero@gentoo.org>
eselect-postgresql-0.2.ebuild:
Added quotes
diff --git a/app-admin/eselect-postgresql/Manifest b/app-admin/eselect-postgresql/Manifest
index fad0191..15b90e0 100644
--- a/app-admin/eselect-postgresql/Manifest
+++ b/app-admin/eselect-postgresql/Manifest
@@ -1,4 +1,5 @@
+AUX 50postgresql-eselect 46 RMD160 d7cdbde94df59d4ef758015304654a879fef6e72 SHA1 ac56ae31172f4916107c289c47463f6ddcc80d41 SHA256 3aa6dd48312eb63e181c46012a918e7744365949d58f76a73823592e32de06fc
AUX binwrapper 515 RMD160 774f14cc09d6534800e91845e2c4b40b9911af11 SHA1 b9598d625312383768236571a72bf9b0dddf498b SHA256 99d4774e841f0057fdbf141b9b123975939eac1e5ab6e711d08c44b4adc2b4d1
-AUX postgresql.eselect 7058 RMD160 e9b2af5facf429ce03789a6c90daf6b04ede558d SHA1 04b614f2020d0c286acc3d6f1e9fc59b5eec80ff SHA256 d80099016728799cc23445019b623505834c899a91bca4695d38d888bfaed11f
-EBUILD eselect-postgresql-0.2.ebuild 1436 RMD160 4bfb011083d8020986e8245a4aacf699de7086a7 SHA1 4d3ae15ad697a24d476bc16f653594b8b8ead2ff SHA256 3d180ed81aea764b76121ecec2f45287ed5b608ff34cb41c6acbc4b81e14d958
-MISC ChangeLog 231 RMD160 366afe6ba8effbb8ccc0cc000379dc18207d3bde SHA1 c388a1c619ea00fd45cc4f962db1fa70c05ab9ca SHA256 48951655cadf9916b0763e44d2fafa897ff0c08bae11d42b7f17be86872e74ee
+AUX postgresql.eselect 7001 RMD160 16f49bf9577d85b89f200a90eaddcbc911929b6c SHA1 c3a1b7b0f3684c55e8799366d397fb517b3b4503 SHA256 9c287e5119806c58355c356b14667ea37d1b2e4e0263fbbe79bcf7978d719946
+EBUILD eselect-postgresql-0.3.ebuild 2340 RMD160 94448ec91ca17fc77c3b4fcc58d6b48921dc2586 SHA1 f48d4888195fd8c0bfa6755edd1b8becc40441d8 SHA256 6593d32b584bc6086df4d19fcab6d961adbfc50d8f9791861e16c1b040554ba8
+MISC ChangeLog 712 RMD160 779d3e4df6bfdff85128a496a03c8f2085a10439 SHA1 fff24c635dfe0d0ad48ce0a809001f8217d6a470 SHA256 fb529eb35f247e3572cbf1166fc0d790f5c74d95e402840d88bf4f12bb4e4e9c
diff --git a/app-admin/eselect-postgresql/eselect-postgresql-0.2.ebuild b/app-admin/eselect-postgresql/eselect-postgresql-0.3.ebuild
index abcb951..0b31666 100644
--- a/app-admin/eselect-postgresql/eselect-postgresql-0.2.ebuild
+++ b/app-admin/eselect-postgresql/eselect-postgresql-0.3.ebuild
@@ -7,7 +7,6 @@ inherit multilib
DESCRIPTION="Utility to change the default postgresql installation"
HOMEPAGE="http://www.gentoo.org/"
SRC_URI=""
-
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
@@ -18,13 +17,17 @@ RDEPEND="app-admin/eselect
src_install() {
keepdir /etc/eselect/postgresql
+ doenvd "${FILESDIR}/50postgresql-eselect"
+
insinto /usr/share/eselect/modules
doins "${FILESDIR}/postgresql.eselect"
sed -i \
-e "s|/usr/lib/|/usr/$(get_libdir)|g" \
- /usr/share/eselect/modules/postgresql.eselect
- exeinto /usr/lib/${PN}
+ "${D}/usr/share/eselect/modules/postgresql.eselect"
+
+ exeinto /usr/$(get_libdir)/${PN}
doexe "${FILESDIR}/binwrapper"
+
dodir /usr/bin
dosym /usr/bin/eselect /usr/bin/postgresql-config
}
@@ -35,7 +38,7 @@ pkg_preinst() {
[[ -e "${f}" ]] || continue
[[ -L "${f}" ]] && continue
if [[ -d "${f}" ]] ; then
- if [[ -z "$(find "${f}" -not \( -type l -or -type d \))" ]] ; then
+ if [[ -z "$(find \"${f}\" -not \( -type l -or -type d \))" ]] ; then
rm -rf "${f}"
else
ff="$ff $f"
@@ -55,3 +58,17 @@ pkg_preinst() {
fi
}
+pkg_postinst() {
+ elog "This eselect module can be used to define which PostgreSQL version is being used"
+ elog "to link against and which (major) version of PostgreSQL is being started by the init-system"
+ elog "when an init.d file lists 'need postgresql' or 'use postgresql' in its dependencies."
+ elog
+ elog "For users of the 'postgresql' overlay:"
+ elog "In case you have dev-db/postgresql-{base,server} installed but 'eselect postgresql list'"
+ elog "doesn't anything, please re-install dev-db/postgresql-{base,server} since we had to move"
+ elog "around some stuff. Sorry for the inconvenience."
+ elog
+ elog "Please make sure that you use the new postgresql ebuilds (dev-db/postgresql-{base,server})."
+ elog "This eselect module won't list the old dev-db/{postgresql,libpq} installations as available"
+ elog "libraries or services."
+}
diff --git a/app-admin/eselect-postgresql/files/50postgresql-eselect b/app-admin/eselect-postgresql/files/50postgresql-eselect
new file mode 100644
index 0000000..05f9b9d
--- /dev/null
+++ b/app-admin/eselect-postgresql/files/50postgresql-eselect
@@ -0,0 +1 @@
+CONFIG_PROTECT_MASK="/etc/eselect/postgresql"
diff --git a/app-admin/eselect-postgresql/files/postgresql.eselect b/app-admin/eselect-postgresql/files/postgresql.eselect
index e48fb13..05ba7fb 100644
--- a/app-admin/eselect-postgresql/files/postgresql.eselect
+++ b/app-admin/eselect-postgresql/files/postgresql.eselect
@@ -1,4 +1,4 @@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id: $
@@ -18,7 +18,7 @@ VERSION=$(svn_date_to_version "${SVN_DATE}" )
do_list() {
write_list_start "Available postgresql installations"
- for s in /usr/lib/eselect-postgresql/slots/* ; do
+ for s in /etc/eselect/postgresql/slots/* ; do
[[ -d "$s" ]] || continue;
local slot=$(basename $s)
local postgres_ebuilds=""
@@ -93,7 +93,7 @@ VERSION=$(svn_date_to_version "${SVN_DATE}" )
do_set() {
local alibdir='/usr/lib/'
[[ ${#@} -ne 1 ]] && die -q "Only one parameter is expected"
- local slotdir="/usr/lib/eselect-postgresql/slots/${1}"
+ local slotdir="/etc/eselect/postgresql/slots/${1}"
[[ -d "${slotdir}" ]] || die -q "No such version installed"
do_reset
unset postgres_symlinks
@@ -124,8 +124,7 @@ VERSION=$(svn_date_to_version "${SVN_DATE}" )
done
mkdir -p /etc/eselect/postgresql &>/dev/null || die "Failed to create /etc/eselect/postgresql"
exec 9>/etc/eselect/postgresql/active.links || die "Failed to store list of links"
- rm -f /etc/eselect/postgresql/active
- ln -s "${slotdir}" /etc/eselect/postgresql/active
+ ln -sf slots/${1} /etc/eselect/postgresql/active
for (( i=0;i<slinks;i++ )); do
local s=${postgres_symlinks[i]};
(( i++ ));
@@ -147,7 +146,7 @@ VERSION=$(svn_date_to_version "${SVN_DATE}" )
do_set-service() {
local alibdir='/usr/lib/'
[[ ${#@} -ne 1 ]] && die -q "Only one parameter is expected"
- local slotdir="/usr/lib/eselect-postgresql/slots/${1}"
+ local slotdir="/etc/eselect/postgresql/slots/${1}"
[[ -d "${slotdir}" ]] || die -q "No such version installed"
do_reset-service
unset postgres_service
@@ -155,7 +154,7 @@ VERSION=$(svn_date_to_version "${SVN_DATE}" )
[[ -x "/etc/init.d/${p_service}" ]] || die -1 "Selected installation doesn't provide PostgreSQL service"
mkdir -p /etc/eselect/postgresql &>/dev/null || die "Failed to create /etc/eselect/postgresql"
rm -f /etc/eselect/postgresql/service
- ln -s "${slotdir}" /etc/eselect/postgresql/service
+ ln -sf slots/${1} /etc/eselect/postgresql/service
touch /etc/conf.d/${p_service}
}
## }}}
@@ -239,7 +238,7 @@ VERSION=$(svn_date_to_version "${SVN_DATE}" )
do_update() {
# collect all binaries names
local binaries="$((
- for s in /usr/lib/eselect-postgresql/slots/* ; do
+ for s in /etc/eselect/postgresql/slots/* ; do
[[ -d "$s" ]] || continue;
local slot=$(basename $s)
for src in ${s}/* ; do