summaryrefslogtreecommitdiff
path: root/net-fs
diff options
context:
space:
mode:
authorStefaan De Roeck <stefaan@gentoo.org>2006-04-22 10:34:15 +0000
committerStefaan De Roeck <stefaan@gentoo.org>2006-04-22 10:34:15 +0000
commita2d5e596412bb6e2d210f0515f79cdef5b313884 (patch)
tree3b9fd5a2ca45300fd2b4262cc187bba3231dd79f /net-fs
parentfix #130777 (diff)
downloadhistorical-a2d5e596412bb6e2d210f0515f79cdef5b313884.tar.gz
historical-a2d5e596412bb6e2d210f0515f79cdef5b313884.tar.bz2
historical-a2d5e596412bb6e2d210f0515f79cdef5b313884.zip
Version bump, fixes #126420
Package-Manager: portage-2.1_pre7-r5
Diffstat (limited to 'net-fs')
-rw-r--r--net-fs/openafs-kernel/ChangeLog8
-rw-r--r--net-fs/openafs-kernel/Manifest22
-rw-r--r--net-fs/openafs-kernel/files/digest-openafs-kernel-1.4.16
-rw-r--r--net-fs/openafs-kernel/openafs-kernel-1.4.1.ebuild52
-rw-r--r--net-fs/openafs/ChangeLog7
-rw-r--r--net-fs/openafs/Manifest6
-rw-r--r--net-fs/openafs/files/digest-openafs-1.4.19
-rw-r--r--net-fs/openafs/openafs-1.4.1.ebuild314
8 files changed, 422 insertions, 2 deletions
diff --git a/net-fs/openafs-kernel/ChangeLog b/net-fs/openafs-kernel/ChangeLog
index 754ec6544a02..a2196405c3b3 100644
--- a/net-fs/openafs-kernel/ChangeLog
+++ b/net-fs/openafs-kernel/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-fs/openafs-kernel
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-fs/openafs-kernel/ChangeLog,v 1.20 2006/04/17 19:04:10 corsair Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-fs/openafs-kernel/ChangeLog,v 1.21 2006/04/22 10:31:34 stefaan Exp $
+
+*openafs-kernel-1.4.1 (22 Apr 2006)
+
+ 22 Apr 2006; Stefaan De Roeck <stefaan@gentoo.org>
+ +openafs-kernel-1.4.1.ebuild:
+ Version bump, fixes #126420
17 Apr 2006; Markus Rothe <corsair@gentoo.org>
openafs-kernel-1.4.0-r1.ebuild:
diff --git a/net-fs/openafs-kernel/Manifest b/net-fs/openafs-kernel/Manifest
index f5205b45e707..8bfa9e1dc92e 100644
--- a/net-fs/openafs-kernel/Manifest
+++ b/net-fs/openafs-kernel/Manifest
@@ -1,8 +1,30 @@
MD5 7a174d40e9f9a5152bd6fd8b308e1a87 ChangeLog 3335
+RMD160 dd2347dd4dae40050994fac9bfacae36136b7be0 ChangeLog 3335
+SHA256 407ecd1c95c865211c529952a9cf908c5d9ab426657ad2176c1809ea738ddc6e ChangeLog 3335
MD5 154b7f0bf57bb9377c49d03565366b15 files/digest-openafs-kernel-1.2.13 144
+RMD160 dab8ce2378890c72e7c751a4b5c104753d6aa397 files/digest-openafs-kernel-1.2.13 144
+SHA256 feb32bad7453da49c74d52f24b4607a87a39e8c406bef4e3cb13f02fbc5be411 files/digest-openafs-kernel-1.2.13 144
MD5 ca384510d7062141681b910cc4603007 files/digest-openafs-kernel-1.4.0 518
+RMD160 9369634df1713e3d491fb109649d30da07d1cac5 files/digest-openafs-kernel-1.4.0 518
+SHA256 707edf6a74374d219a6b7ce67332d923a885a293c906a920651f9d63a74b6818 files/digest-openafs-kernel-1.4.0 518
MD5 14e2a15196e2a9861d6a603628e77f08 files/digest-openafs-kernel-1.4.0-r1 518
+RMD160 5b4595b1aecafd7ba5eb28381316a5bad09de698 files/digest-openafs-kernel-1.4.0-r1 518
+SHA256 ab6957b6034684ff4cb1627310b7cb5eebba130009838b582827b082224e5267 files/digest-openafs-kernel-1.4.0-r1 518
+MD5 553b9261231657b103076ffca205f3df files/digest-openafs-kernel-1.4.1 518
+RMD160 5ff6612ecf10601058fce0bd37ae7b1a2851164d files/digest-openafs-kernel-1.4.1 518
+SHA256 06ae0e867147834bb8ad6cc0dc2fdb1c097d4c3be24015dff19fea5c504606b4 files/digest-openafs-kernel-1.4.1 518
MD5 833551f00cc2163ac7f9eb367ee9caa8 metadata.xml 254
+RMD160 1bef8b94265bf2b400fb6235b3e43b504b8d2b71 metadata.xml 254
+SHA256 90d7dcb6aede67bf64f610984a31fc03573512de9e241db42acb32601373db62 metadata.xml 254
MD5 228eb67d0e3ba6073ade6a9569dda9ec openafs-kernel-1.2.13.ebuild 1548
+RMD160 8b3c8e01b597cf2493a0c42dca7098d948693222 openafs-kernel-1.2.13.ebuild 1548
+SHA256 6d377d407f4dda8f2d1a7a24b109b26f6158f0bd786166c9dbe3b726a09ebc4f openafs-kernel-1.2.13.ebuild 1548
MD5 74eea0cb00b56ade3477c94ee54dac5b openafs-kernel-1.4.0-r1.ebuild 1419
+RMD160 4911cc7a1f973cbae86c900a674cc5cced0cbbe3 openafs-kernel-1.4.0-r1.ebuild 1419
+SHA256 9e0e81ed8263727ba3ed041d3b414856bdaf87c4c273c9035e4ded21f56df93f openafs-kernel-1.4.0-r1.ebuild 1419
MD5 27b0cfb3bd9ab616e69dd15c26b294fe openafs-kernel-1.4.0.ebuild 1240
+RMD160 04129e8dbcc5dccfe9093cf0903ee2898e81587f openafs-kernel-1.4.0.ebuild 1240
+SHA256 21839ff7dcca92e84941b4cb7aefc4a59250b4f8a7865fda6ec78bdde2b72933 openafs-kernel-1.4.0.ebuild 1240
+MD5 18b0e15f9083e56c4fac4d64df208c99 openafs-kernel-1.4.1.ebuild 1420
+RMD160 6c106c5ebf85440c2972fc23d9ff1f94f8fd16c0 openafs-kernel-1.4.1.ebuild 1420
+SHA256 c814141097e18d4d9596b07d8697685c498c304974b90888474688bace8ddf67 openafs-kernel-1.4.1.ebuild 1420
diff --git a/net-fs/openafs-kernel/files/digest-openafs-kernel-1.4.1 b/net-fs/openafs-kernel/files/digest-openafs-kernel-1.4.1
new file mode 100644
index 000000000000..3c2561a975f1
--- /dev/null
+++ b/net-fs/openafs-kernel/files/digest-openafs-kernel-1.4.1
@@ -0,0 +1,6 @@
+MD5 3e125de450dda0d733ba5d57a156195e openafs-1.4.1-src.tar.bz2 11244316
+RMD160 f842cc0ba7c434eea82721528c0449a307aea62b openafs-1.4.1-src.tar.bz2 11244316
+SHA256 9563259772342ce50c5efd1c2c96cf643f4e9c818e1922e48a3d9183bb7fece6 openafs-1.4.1-src.tar.bz2 11244316
+MD5 2b4f7f7346fba1b32f313dd6d74a00ad openafs-gentoo-0.8.tar.bz2 16749
+RMD160 59b4fea61bf21554d69c594d9d1a386cef469f82 openafs-gentoo-0.8.tar.bz2 16749
+SHA256 af51dea1b3ea8d22ee646de71f97535c057ef1e232c0f9ac498d94c7e44d021f openafs-gentoo-0.8.tar.bz2 16749
diff --git a/net-fs/openafs-kernel/openafs-kernel-1.4.1.ebuild b/net-fs/openafs-kernel/openafs-kernel-1.4.1.ebuild
new file mode 100644
index 000000000000..a37a28ed14e0
--- /dev/null
+++ b/net-fs/openafs-kernel/openafs-kernel-1.4.1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/openafs-kernel/openafs-kernel-1.4.1.ebuild,v 1.1 2006/04/22 10:31:34 stefaan Exp $
+
+inherit eutils linux-mod versionator toolchain-funcs
+
+PATCHVER=0.8
+MY_PN=${PN/-kernel}
+MY_P=${MY_PN}-${PV}
+S=${WORKDIR}/${MY_P}
+DESCRIPTION="The OpenAFS distributed file system kernel module"
+HOMEPAGE="http://www.openafs.org/"
+SRC_URI="http://openafs.org/dl/${MY_PN}/${PV}/${MY_P}-src.tar.bz2
+ mirror://gentoo/${MY_PN}-gentoo-${PATCHVER}.tar.bz2"
+
+LICENSE="IPL-1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~x86"
+IUSE=""
+
+PATCHDIR=${WORKDIR}/gentoo/patches/$(get_version_component_range 1-2)
+
+CONFIG_CHECK="!DEBUG_RODATA"
+DEBUG_RODATA_ERROR="OpenAFS is incompatible with linux' CONFIG_DEBUG_RODATA option"
+
+pkg_setup() {
+ linux-mod_pkg_setup
+}
+
+src_unpack() {
+ unpack ${A}; cd ${S}
+
+ EPATCH_SUFFIX="patch" epatch ${PATCHDIR}
+
+ ./regen.sh || die "Failed: regenerating configure script"
+}
+
+src_compile() {
+ econf --with-linux-kernel-headers=${KV_DIR} || die "Failed: econf"
+ ARCH="$(tc-arch-kernel)" make only_libafs || die "Failed: make"
+}
+
+src_install() {
+ MOD_SRCDIR=$(expr ${S}/src/libafs/MODLOAD-*)
+ [ -f ${MOD_SRCDIR}/openafs.${KV_OBJ} ] \
+ || die "Couldn't find compiled kernel module"
+
+ MODULE_NAMES='openafs(kernel/fs/openafs:$MOD_SRCDIR)'
+
+ linux-mod_src_install
+}
+
diff --git a/net-fs/openafs/ChangeLog b/net-fs/openafs/ChangeLog
index cf9927752b4e..a0f3427f0b2a 100644
--- a/net-fs/openafs/ChangeLog
+++ b/net-fs/openafs/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for net-fs/openafs
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-fs/openafs/ChangeLog,v 1.66 2006/03/30 08:54:22 stefaan Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-fs/openafs/ChangeLog,v 1.67 2006/04/22 10:34:14 stefaan Exp $
+
+*openafs-1.4.1 (22 Apr 2006)
+
+ 22 Apr 2006; Stefaan De Roeck <stefaan@gentoo.org> +openafs-1.4.1.ebuild:
+ Version bump, fixes #126420
30 Mar 2006; Stefaan De Roeck <stefaan@gentoo.org>
openafs-1.4.0-r2.ebuild:
diff --git a/net-fs/openafs/Manifest b/net-fs/openafs/Manifest
index e38efa301a47..afbd90755c63 100644
--- a/net-fs/openafs/Manifest
+++ b/net-fs/openafs/Manifest
@@ -31,6 +31,9 @@ SHA256 d0149212cea83c4edaedab39e9559a87023a06ae313f4db0f350719f734f448f files/di
MD5 533710863cf8b6972a429a74a0343407 files/digest-openafs-1.4.0-r3 777
RMD160 631b8906f337b0884cf21c5c818ae23aba060075 files/digest-openafs-1.4.0-r3 777
SHA256 c4228297b7e69e79dc7d06098e1ba73d4180b4931167e146279bd6b21f08f809 files/digest-openafs-1.4.0-r3 777
+MD5 adb64e055ad9be7bacf91c93f40b1e69 files/digest-openafs-1.4.1 777
+RMD160 77ddbc57d57c06217814f7add5996761560c5ddf files/digest-openafs-1.4.1 777
+SHA256 c30e22d480057e730df2d91c4e18da56e345b98e37f4a746e02d299ae8427efc files/digest-openafs-1.4.1 777
MD5 36dc33d8c6e647e8aacf8e69849a28a3 files/openafs-pinstall-execve-1.2.10.patch 1242
RMD160 51ed3ebe3c36a39a7c2e367c92bc78d325dfc244 files/openafs-pinstall-execve-1.2.10.patch 1242
SHA256 9c7168d077dcf3a539b34cd9fb234097ba8a5896511967f075616e65d464f84c files/openafs-pinstall-execve-1.2.10.patch 1242
@@ -55,3 +58,6 @@ SHA256 9394c48d1759abc563767e1c166b9e1bb726fbfd452c916033874436a0be8a37 openafs-
MD5 1ea3c826321757888dec24f78b549a24 openafs-1.4.0.ebuild 9995
RMD160 ae691d6d39488d67c883ce459b39292e0fb0c403 openafs-1.4.0.ebuild 9995
SHA256 53a8d8c6da040526373b86f688f26b3c3b9c5819125d0f8b72d0d9c78660d261 openafs-1.4.0.ebuild 9995
+MD5 3870e1223b8f37e819b9f8c50dd9a202 openafs-1.4.1.ebuild 9918
+RMD160 3ab96e696cb0444d3563cacf0886b7a413609ec8 openafs-1.4.1.ebuild 9918
+SHA256 51921daf28d920a9307da67b25c11eff525e82ce94da6f0df03d00d4cbed7e01 openafs-1.4.1.ebuild 9918
diff --git a/net-fs/openafs/files/digest-openafs-1.4.1 b/net-fs/openafs/files/digest-openafs-1.4.1
new file mode 100644
index 000000000000..ff20b49ef932
--- /dev/null
+++ b/net-fs/openafs/files/digest-openafs-1.4.1
@@ -0,0 +1,9 @@
+MD5 4f1d66c90a05d35f04b85a978dc585d9 openafs-1.4.1-doc.tar.bz2 3090382
+RMD160 1e8265191affec7584626e88fde018332937fcd0 openafs-1.4.1-doc.tar.bz2 3090382
+SHA256 6331c755bed05d40e97e1d53ac3c3feaf05b5fbd4aac6aec373b32cfe597e295 openafs-1.4.1-doc.tar.bz2 3090382
+MD5 3e125de450dda0d733ba5d57a156195e openafs-1.4.1-src.tar.bz2 11244316
+RMD160 f842cc0ba7c434eea82721528c0449a307aea62b openafs-1.4.1-src.tar.bz2 11244316
+SHA256 9563259772342ce50c5efd1c2c96cf643f4e9c818e1922e48a3d9183bb7fece6 openafs-1.4.1-src.tar.bz2 11244316
+MD5 2b4f7f7346fba1b32f313dd6d74a00ad openafs-gentoo-0.8.tar.bz2 16749
+RMD160 59b4fea61bf21554d69c594d9d1a386cef469f82 openafs-gentoo-0.8.tar.bz2 16749
+SHA256 af51dea1b3ea8d22ee646de71f97535c057ef1e232c0f9ac498d94c7e44d021f openafs-gentoo-0.8.tar.bz2 16749
diff --git a/net-fs/openafs/openafs-1.4.1.ebuild b/net-fs/openafs/openafs-1.4.1.ebuild
new file mode 100644
index 000000000000..f9db03ce09df
--- /dev/null
+++ b/net-fs/openafs/openafs-1.4.1.ebuild
@@ -0,0 +1,314 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/openafs/openafs-1.4.1.ebuild,v 1.1 2006/04/22 10:34:14 stefaan Exp $
+
+inherit flag-o-matic eutils toolchain-funcs versionator
+
+PATCHVER=0.8
+DESCRIPTION="The OpenAFS distributed file system"
+HOMEPAGE="http://www.openafs.org/"
+SRC_URI="http://openafs.org/dl/${PN}/${PV}/${P}-src.tar.bz2
+ doc? ( http://openafs.org/dl/${PN}/${PV}/${P}-doc.tar.bz2 )
+ mirror://gentoo/${PN}-gentoo-${PATCHVER}.tar.bz2"
+
+LICENSE="IPL-1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~x86"
+IUSE="debug kerberos pam doc"
+
+RDEPEND="=net-fs/openafs-kernel-${PV}*
+ pam? ( sys-libs/pam )
+ kerberos? ( virtual/krb5 )"
+
+PATCHDIR=${WORKDIR}/gentoo/patches/$(get_version_component_range 1-2)
+CONFDIR=${WORKDIR}/gentoo/configs
+SCRIPTDIR=${WORKDIR}/gentoo/scripts
+
+src_unpack() {
+ unpack ${A}; cd ${S}
+
+ # Apply patches to apply chosen compiler settings, fix the hardcoded paths
+ # to be more FHS friendly, and the fix the incorrect typecasts for va_arg
+ EPATCH_SUFFIX="patch" epatch ${PATCHDIR}
+
+ ./regen.sh || die "Failed: regenerating configure script"
+}
+
+src_compile() {
+ # cannot use "use_with" macro, as --without-krb5-config crashes the econf
+ local myconf=""
+ if use kerberos; then
+ myconf="--with-krb5-conf=$(type -p krb5-config)"
+ fi
+
+ econf \
+ $(use_enable pam) \
+ $(use_enable debug) \
+ --enable-largefile-fileserver \
+ ${myconf} || die econf
+
+ emake -j1 all_nolibafs || die "Build failed"
+}
+
+src_install() {
+ make DESTDIR=${D} install_nolibafs || die "Installing failed"
+
+ # pam_afs and pam_afs.krb have been installed in irregular locations, fix
+ if use pam; then
+ dodir /$(get_libdir)/security
+ mv ${D}/usr/$(get_libdir)/pam_afs* ${D}/$(get_libdir)/security
+ fi
+
+ # compile_et collides with com_err. Remove it from this package.
+ rm ${D}/usr/bin/compile_et
+
+ # avoid collision with mit_krb5's version of kpasswd
+ mv ${D}/usr/bin/kpasswd ${D}/usr/bin/kpasswd_afs
+ mv src/man/kpasswd.1 src/man/kpasswd_afs.1
+
+ # install manuals
+ doman src/man/*.?
+
+ use kerberos && doman src/aklog/aklog.1
+ use pam && doman src/pam/pam_afs.5
+
+ # minimal documentation
+ dodoc ${CONFDIR}/README ${CONFDIR}/CellServDB
+
+ # documentation package
+ if use doc; then
+ cp -pPR doc/* ${D}/usr/share/doc/${PF}
+ fi
+
+ # Gentoo related scripts
+ newconfd ${CONFDIR}/openafs-client openafs-client
+ newconfd ${CONFDIR}/openafs-server openafs-server
+ newinitd ${SCRIPTDIR}/openafs-client openafs-client
+ newinitd ${SCRIPTDIR}/openafs-server openafs-server
+
+ # used directories: client
+ keepdir /etc/openafs
+ keepdir /var/cache/openafs
+
+ # used directories: server
+ keepdir /etc/openafs/server
+ diropts -m0700
+ keepdir /var/lib/openafs
+ keepdir /var/lib/openafs/db
+ diropts -m0755
+ keepdir /var/lib/openafs/logs
+}
+
+migrate_to_fhs() {
+ # conventions:
+ # only automatically migrate if the destination directories are
+ # as of yet non-existant
+
+ # path translations
+ local oldafsconfdir=${ROOT}usr/afs/etc
+ local newafsconfdir=${ROOT}etc/openafs/server
+ local oldviceetcdir=${ROOT}usr/vice/etc
+ local newviceetcdir=${ROOT}etc/openafs
+ local oldafslocaldir=${ROOT}usr/afs/local
+ local newafslocaldir=${ROOT}var/lib/openafs
+ local oldafsdbdir=${ROOT}usr/afs/db
+ local newafsdbdir=${ROOT}var/lib/openafs/db
+
+ # detect Transarc afsconfdir
+ local afsconfdir=0
+ [ ! -L ${oldafsconfdir} -a -d ${oldafsconfdir} -a ! -e ${newafsconfdir} ] && afsconfdir=1
+
+ # detect Transarc viceetcdir
+ local viceetcdir=0
+ local viceetcsoftlink=0
+ if [ -d ${oldviceetcdir} -a ! -e ${newviceetcdir} ]; then
+ if [ ! -L ${oldviceetcdir} ]; then
+ viceetcdir=1
+ else
+ if [ $(readlink ${oldviceetcdir}) = /etc/afs ]; then
+ viceetcdir=1
+ viceetcsoftlink=1
+ fi
+ fi
+ fi
+
+ # detect Transarc afslocaldir
+ local afslocaldir=0
+ [ ! -L ${oldafslocaldir} -a -d ${oldafslocaldir} -a ! -e ${newafslocaldir} ] && afslocaldir=1
+
+ # detect Transarc afsdbdir
+ local afsdbdir=0
+ [ ! -L ${oldafsdbdir} -a -d ${oldafsdbdir} -a ! -e ${newafsdbdir} ] && afsdbdir=1
+
+ # detect Transarc afsbosconfigdir
+ local afsbosconfigdir=0
+ [ ${afslocaldir} = 1 -a -f ${oldafslocaldir}/BosConfig ] && afsbosconfigdir=1
+
+ # any of these?
+ local any=$((${afsconfdir}+${viceetcdir}+${afsdbdir}+${afslocaldir}))
+
+ # No migration needed? Then bail out
+ if [ ${any} = 0 ]; then
+ return 0
+ fi
+
+ # Root not / ? Then do not attempt automatic migration
+ if [ "$ROOT" != "/" ]; then
+ ewarn Old-style configuration files found, but not migrating
+ ewarn because installation rootdir is not /
+ ebeep 5
+ return 0
+ fi
+
+ # detect whether an installation with old config files is running
+ local pid
+ if pid=$(pgrep -n -U 0 bosserver) &>/dev/null; then
+ # find location of executable
+ if ! executable=$(readlink /proc/${pid}/exe); then
+ die "Couldn't execute readlink on bosserver process"
+ fi
+ # if executable is not located in /usr/sbin, assume Transarc locations
+ if [[ $executable != ${ROOT}usr/sbin/* ]]; then
+ ewarn "Found a running process with the name \"bosserver\" and pid ${pid}"
+ ewarn "that is not located in /usr/sbin. This suggests a running"
+ ewarn "OpenAFS-server with traditional TransARC path conventions."
+ ewarn "This installation procedure aims to migrate old"
+ ewarn "configuration files to new FHS-conform locations."
+ ewarn "Please stop the running server and reattempt the upgrade"
+ die "Installation aborted because of running OpenAFS server"
+ fi
+ fi
+
+ # warn about migration
+ ewarn
+ ewarn "OpenAFS configuration/data-files have been found in old"
+ ewarn "TransARC-style locations, for which the standard FHS equivalents"
+ ewarn "do not exist yet. "
+ ewarn "Following procedure will copy those files to the new locations such"
+ ewarn "that, given a previously working configuration, both server"
+ ewarn "and client should restart without problems. Files will be copied"
+ ewarn "only, and not removed from the old locations. For assistance"
+ ewarn "in removing the old files, consult the section on Upgrading in"
+ ewarn "the Gentoo OpenAFS documentation"
+ ewarn "(see http://www.gentoo.org/doc/en/openafs.xml)"
+ ewarn "Will continue in 30 seconds, press Ctrl-C to abort"
+ ewarn
+ ebeep 10
+ epause 20
+
+ # fortunately, there's no overlap between the old locations and the new ones
+
+ # afsconfdir: migrate /usr/afs/etc to /etc/openafs/server
+ if [ ${afsconfdir} = 1 ]; then
+ mkdir -m 755 -p ${newafsconfdir}
+ cp ${oldafsconfdir}/* ${newafsconfdir}
+ fi
+
+ # viceetcdir: migrate /usr/vice/etc (likely a link to /etc/afs) to /etc/openafs
+ if [ ${viceetcdir} = 1 ]; then
+ mkdir -m 755 -p ${newviceetcdir}
+ cp ${oldviceetcdir}/* ${newviceetcdir}
+ fi
+
+ # afslocaldir: migrate /usr/afs/local to /var/lib/openafs
+ if [ ${afslocaldir} = 1 ]; then
+ mkdir -m 700 -p ${newafslocaldir}
+ cp ${oldafslocaldir}/* ${newafslocaldir}
+
+ # afsbosconfigdir: migrate /usr/afs/local/BosConfig to /etc/openafs/BosConfig
+ if [ ${afsbosconfigdir} = 1 ]; then
+ sed -i \
+ -e 's:/usr/afs/bin/:/usr/libexec/openafs/:g' \
+ -e 's:/usr/afs/etc:/etc/openafs/server:g' \
+ -e 's:/usr/afs/bin:/usr/bin:g' \
+ ${newafslocaldir}/BosConfig
+ if [ -d ${newviceetcdir} ]; then
+ mv ${newafslocaldir}/BosConfig ${newviceetcdir}
+ else
+ ewarn
+ ewarn "No ${newviceetcdir} found, couldn't move BosConfig there,"
+ ewarn "it will remain in ${newafslocaldir}. Please investigate"
+ ewarn "before attempting to start the server"
+ ewarn
+ ebeep 3
+ fi
+ fi
+ fi
+
+ # afsdbdir: migrate /usr/afs/db to /var/lib/openafs/db
+ if [ ${afsdbdir} = 1 ]; then
+ mkdir -m 700 -p ${newafsdbdir}
+ cp ${oldafsdbdir}/* ${newafsdbdir}
+ fi
+
+ ewarn "Migration finished"
+ ewarn "Please remember to manually migrate disk-cache (if present)"
+ ewarn "Alter /etc/openafs/cacheinfo to do so"
+ ebeep 5
+}
+
+migrate_configfile() {
+ local oldconfigfile=${ROOT}etc/conf.d/afs
+ local oldconfigfile2=${ROOT}etc/conf.d/afs-client
+ local newconfigfile=${ROOT}etc/conf.d/openafs-client
+
+ if [ -f ${oldconfigfile} -a ! -e ${newconfigfile} ]; then
+ cp ${oldconfigfile} ${newconfigfile}
+ elif [ -f ${oldconfigfile2} -a ! -e ${newconfigfile} ]; then
+ cp ${oldconfigfile2} ${newconfigfile}
+ fi
+
+ oldconfigfile=${ROOT}etc/conf.d/afs-server
+ newconfigfile=${ROOT}etc/conf.d/openafs-server
+ if [ -f ${oldconfigfile} -a ! -e ${newconfigfile} ]; then
+ cp ${oldconfigfile} ${newconfigfile}
+ fi
+}
+
+pkg_preinst() {
+ migrate_to_fhs
+ migrate_configfile
+
+ ## Somewhat intelligently install default configuration files
+ ## (when they are not present)
+ # CellServDB
+ if [ ! -e ${ROOT}etc/openafs/CellServDB ] \
+ || grep "GCO Public CellServDB" ${ROOT}etc/openafs/CellServDB &> /dev/null
+ then
+ cp ${CONFDIR}/CellServDB ${IMAGE}etc/openafs
+ fi
+ # cacheinfo: use a default location cache, 200 megabyte in size
+ # (should be safe for about any root partition, the user can increase
+ # the size as required)
+ if [ ! -e ${ROOT}etc/openafs/cacheinfo ]; then
+ echo "/afs:/var/cache/openafs:200000" > ${IMAGE}etc/openafs/cacheinfo
+ fi
+ # ThisCell: default to "openafs.org"
+ if [ ! -e ${ROOT}etc/openafs/ThisCell ]; then
+ echo "openafs.org" > ${IMAGE}etc/openafs/ThisCell
+ fi
+}
+
+pkg_postinst() {
+ einfo ""
+ einfo "If you are upgrading from a < 1.4.0_rc8 version of the ebuild,"
+ einfo "we urge you to look at the upgrade-section of the"
+ einfo "Gentoo OpenAFS documentation. (If you're upgrading from"
+ einfo "< 1.3.85, then you really really should)"
+
+ ebeep 5
+
+ einfo ""
+ einfo "This installation should work out of the box (at least the"
+ einfo "client part doing global afs-cell browsing, unless you had"
+ einfo "a previous and different configuration). If you want to"
+ einfo "set up your own cell or modify the standard config,"
+ einfo "please have a look at the Gentoo OpenAFS documentation"
+ einfo "(warning: it is not yet up to date wrt the new file locations)"
+ einfo ""
+ einfo "The documentation can be found at:"
+ einfo " http://www.gentoo.org/doc/en/openafs.xml"
+
+ epause 5
+}
+