summaryrefslogtreecommitdiff
path: root/net-fs
diff options
context:
space:
mode:
authorNP-Hardass <NP-Hardass@gentoo.org>2015-08-13 19:02:36 -0400
committerNP-Hardass <NP-Hardass@gentoo.org>2015-08-13 19:19:37 -0400
commit526f3a75301840d7e04e436ca06aaa341b006d2c (patch)
tree70dba56886b8e53dc7616b20337979339705b4af /net-fs
parentdev-java/javacsv: Move package from overlay to the tree. Fixes bug 217500. (diff)
downloadgentoo-526f3a75301840d7e04e436ca06aaa341b006d2c.tar.gz
gentoo-526f3a75301840d7e04e436ca06aaa341b006d2c.tar.bz2
gentoo-526f3a75301840d7e04e436ca06aaa341b006d2c.zip
net-fs/openafs{,-kernel}: Resolves bug #556354 and bug #425352
Patches for CVE-2015-{3282,3283,3284,3285,3286,3287} FreeBSD ebuild code backported to all versions in the newly created -r1s
Diffstat (limited to 'net-fs')
-rw-r--r--net-fs/openafs-kernel/Manifest1
-rw-r--r--net-fs/openafs-kernel/openafs-kernel-1.6.11-r1.ebuild125
-rw-r--r--net-fs/openafs-kernel/openafs-kernel-1.6.11.1-r1.ebuild125
-rw-r--r--net-fs/openafs-kernel/openafs-kernel-1.6.12-r1.ebuild125
-rw-r--r--net-fs/openafs/Manifest1
-rw-r--r--net-fs/openafs/openafs-1.6.11-r1.ebuild176
-rw-r--r--net-fs/openafs/openafs-1.6.11.1-r1.ebuild176
-rw-r--r--net-fs/openafs/openafs-1.6.12-r1.ebuild176
8 files changed, 905 insertions, 0 deletions
diff --git a/net-fs/openafs-kernel/Manifest b/net-fs/openafs-kernel/Manifest
index b08b12942f08..703a6891a39c 100644
--- a/net-fs/openafs-kernel/Manifest
+++ b/net-fs/openafs-kernel/Manifest
@@ -9,3 +9,4 @@ DIST openafs-1.6.13-doc.tar.bz2 3501580 SHA256 a0517efcb665efc70ac0813256730443b
DIST openafs-1.6.13-src.tar.bz2 14373447 SHA256 6139370633b48f0149d4dacdd01af7ee29b800b0866c2d18a679c1669e317b26 SHA512 1c50ff5c482be76af8ca1a62bd4d0402c33f8107b8ee5bcbf2b582b734619a26ba54ec49251360583a5d1b3e43827314742e7fe1aee95223c995730e9e00d887 WHIRLPOOL 6cffed9877a27531f7eb49857bdc7bead44fa804b7be36e983dffeb6587cadc1a7372502cd83072b8f3c63c67151ac807e83bdb0e2a6e4fec4042f557937c98c
DIST openafs-patches-20150503.tar.xz 9736 SHA256 066f61fe795e2cb3235a0a991abe8c5e876758bae7ea9bec61e98a3f601c9d7d SHA512 c687be78c7a6442b81c1362cab6ba215301911bdefcf39d2758ffeddecfa3efaa67990ea8277bbc1dedc14ad70a33213a37dbc45c43cd53871eec089759596c6 WHIRLPOOL 0935946c9a535f8e9ce6dd292801c671aef1c40f2a3f51aa4a85e5f4181fb46c3b2df55be56eec56c7fcab0eaf27d97cc6cef98c1b70178ba8cd7258174036cf
DIST openafs-patches-20150626.tar.xz 10588 SHA256 b221842e82e4807e6b8064454df3792b12f3d73104462d83aa88c79e3028fb4a SHA512 b77df9dc734965301585d5f66732fef119282e49cbd5c121f45aa9f0b64fc6c62e1cd93c8b7ff81702f6baece0df3cf9d99ab796e84f2c0c610dc2e2fd3cedf6 WHIRLPOOL 71778ab6f64a156f8f559d446e09cbb8278f2f0965225a21767a2a28883e228620c37241cd439426a3163ede8b04f676f2b4aea7c14394c82bdc47dc2643e6b2
+DIST openafs-patches-20150813.tar.xz 15520 SHA256 209766f5e97e924eab91d862875f360e0ed9821b317ee609789a77d7fbdeb8f0 SHA512 2703f65e7c3f1a724e9330d8f2aedf80f9d0b8ba4b03a5f466cd523eb8d0a1692542df722b24e06ce4ced476fb8615e2caca6159de7b18f151ecf7a14a5f0565 WHIRLPOOL c4055a7c0cf19847ecd8679316a0146b41589f157996b2f15b807d272270e65c1a6ee5f916d3127803cd26370c392b1e751d100d2ab383a57530b768e1682d60
diff --git a/net-fs/openafs-kernel/openafs-kernel-1.6.11-r1.ebuild b/net-fs/openafs-kernel/openafs-kernel-1.6.11-r1.ebuild
new file mode 100644
index 000000000000..30a7cf6763ef
--- /dev/null
+++ b/net-fs/openafs-kernel/openafs-kernel-1.6.11-r1.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils linux-mod multilib toolchain-funcs versionator
+
+MY_PV=$(delete_version_separator '_')
+MY_PN="${PN/-kernel}"
+MY_P="${MY_PN}-${MY_PV}"
+PVER="20150813"
+
+DESCRIPTION="The OpenAFS distributed file system kernel module"
+HOMEPAGE="http://www.openafs.org/"
+# We always d/l the doc tarball as man pages are not USE=doc material
+[[ ${PV} == *_pre* ]] && MY_PRE="candidate/" || MY_PRE=""
+SRC_URI="
+ http://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2
+ http://openafs.org/dl/openafs/${MY_PV}/${MY_P}-doc.tar.bz2
+ http://dev.gentoo.org/~bircoph/afs/${MY_PN}-patches-${PVER}.tar.xz
+"
+
+LICENSE="IBM BSD openafs-krb5-a APSL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~amd64-fbsd ~amd64-linux ~sparc ~x86 ~x86-fbsd ~x86-linux"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+CONFIG_CHECK="!DEBUG_RODATA ~!AFS_FS KEYS"
+ERROR_DEBUG_RODATA="OpenAFS is incompatible with linux' CONFIG_DEBUG_RODATA option"
+ERROR_AFS_FS="OpenAFS conflicts with the in-kernel AFS-support. Make sure not to load both at the same time!"
+ERROR_KEYS="OpenAFS needs CONFIG_KEYS option enabled"
+
+QA_TEXTRELS_x86_fbsd="/boot/modules/libafs.ko"
+QA_TEXTRELS_amd64_fbsd="/boot/modules/libafs.ko"
+
+pkg_pretend() {
+ if use kernel_linux && kernel_is ge 4 ; then
+ ewarn "Gentoo supports kernels which are supported by OpenAFS"
+ ewarn "which are limited to the kernel versions: <4.0"
+ ewarn ""
+ ewarn "You are free to utilize epatch_user to provide whatever"
+ ewarn "support you feel is appropriate, but will not receive"
+ ewarn "support as a result of those changes."
+ ewarn ""
+ ewarn "Please do not file a bug report about this."
+ fi
+}
+
+pkg_setup() {
+ if use kernel_linux; then
+ linux-mod_pkg_setup
+ fi
+}
+
+src_prepare() {
+ # do not tamper with CFLAGS for the kernel module
+ EPATCH_EXCLUDE="040_all_flags.patch" \
+ EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}"/gentoo/patches
+ epatch "${WORKDIR}"/gentoo/security-patches/CVE-2015-{3282..3287}.patch
+ epatch_user
+
+ # packaging is f-ed up, so we can't run eautoreconf
+ # run autotools commands based on what is listed in regen.sh
+ eaclocal -I src/cf
+ eautoconf
+ eautoconf -o configure-libafs configure-libafs.ac
+ eautoheader
+ einfo "Deleting autom4te.cache directory"
+ rm -rf autom4te.cache
+}
+
+src_configure() {
+ local myconf=""
+ # OpenAFS 1.6.11 has a bug with kernels 3.17-3.17.2 that requires a config option
+ if use kernel_linux && kernel_is -ge 3 17 && kernel_is -le 3 17 2; then
+ myconf="--enable-linux-d_splice_alias-extra-iput"
+ fi
+
+ local ARCH="$(tc-arch-kernel)"
+ local MY_ARCH="$(tc-arch)"
+ local BSD_BUILD_DIR="/usr/src/sys/${MY_ARCH}/compile/GENERIC"
+
+ if use kernel_linux; then
+ myconf+=( --with-linux-kernel-headers="${KV_DIR}" \
+ --with-linux-kernel-build="${KV_OUT_DIR}"
+ )
+ elif use kernel_FreeBSD; then
+ myconf+=( --with-bsd-kernel-build="${BSD_BUILD_DIR}" )
+ fi
+ econf "${myconf[@]}"
+}
+
+src_compile() {
+ ARCH="$(tc-arch-kernel)" AR="$(tc-getAR)" emake V=1 -j1 only_libafs
+}
+
+src_install() {
+ if use kernel_linux; then
+ local srcdir=$(expr "${S}"/src/libafs/MODLOAD-*)
+ [[ -f ${srcdir}/libafs.${KV_OBJ} ]] || die "Couldn't find compiled kernel module"
+
+ MODULE_NAMES="libafs(fs/openafs:${srcdir})"
+
+ linux-mod_src_install
+ elif use kernel_FreeBSD; then
+ insinto /boot/modules
+ doins "${S}"/src/libafs/MODLOAD/libafs.ko
+ fi
+}
+
+pkg_postinst() {
+ # Update linker.hints file
+ use kernel_FreeBSD && /usr/sbin/kldxref "${EPREFIX}/boot/modules"
+ use kernel_linux && linux-mod_pkg_postinst
+}
+
+pkg_postrm() {
+ # Update linker.hints file
+ use kernel_FreeBSD && /usr/sbin/kldxref "${EPREFIX}/boot/modules"
+ use kernel_linux && linux-mod_pkg_postrm
+}
diff --git a/net-fs/openafs-kernel/openafs-kernel-1.6.11.1-r1.ebuild b/net-fs/openafs-kernel/openafs-kernel-1.6.11.1-r1.ebuild
new file mode 100644
index 000000000000..068ea99e22e5
--- /dev/null
+++ b/net-fs/openafs-kernel/openafs-kernel-1.6.11.1-r1.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils linux-mod multilib toolchain-funcs versionator
+
+MY_PV=$(delete_version_separator '_')
+MY_PN="${PN/-kernel}"
+MY_P="${MY_PN}-${MY_PV}"
+PVER="20150813"
+
+DESCRIPTION="The OpenAFS distributed file system kernel module"
+HOMEPAGE="http://www.openafs.org/"
+# We always d/l the doc tarball as man pages are not USE=doc material
+[[ ${PV} == *_pre* ]] && MY_PRE="candidate/" || MY_PRE=""
+SRC_URI="
+ http://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2
+ http://openafs.org/dl/openafs/${MY_PV}/${MY_P}-doc.tar.bz2
+ http://dev.gentoo.org/~bircoph/afs/${MY_PN}-patches-${PVER}.tar.xz
+"
+
+LICENSE="IBM BSD openafs-krb5-a APSL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~amd64-fbsd ~amd64-linux ~sparc ~x86 ~x86-fbsd ~x86-linux"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+CONFIG_CHECK="!DEBUG_RODATA ~!AFS_FS KEYS"
+ERROR_DEBUG_RODATA="OpenAFS is incompatible with linux' CONFIG_DEBUG_RODATA option"
+ERROR_AFS_FS="OpenAFS conflicts with the in-kernel AFS-support. Make sure not to load both at the same time!"
+ERROR_KEYS="OpenAFS needs CONFIG_KEYS option enabled"
+
+QA_TEXTRELS_x86_fbsd="/boot/modules/libafs.ko"
+QA_TEXTRELS_amd64_fbsd="/boot/modules/libafs.ko"
+
+pkg_pretend() {
+ if use kernel_linux && kernel_is ge 4 1 ; then
+ ewarn "Gentoo supports kernels which are supported by OpenAFS"
+ ewarn "which are limited to the kernel versions: <4.1"
+ ewarn ""
+ ewarn "You are free to utilize epatch_user to provide whatever"
+ ewarn "support you feel is appropriate, but will not receive"
+ ewarn "support as a result of those changes."
+ ewarn ""
+ ewarn "Please do not file a bug report about this."
+ fi
+}
+
+pkg_setup() {
+ if use kernel_linux; then
+ linux-mod_pkg_setup
+ fi
+}
+
+src_prepare() {
+ # do not tamper with CFLAGS for the kernel module
+ EPATCH_EXCLUDE="040_all_flags.patch" \
+ EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}"/gentoo/patches
+ epatch "${WORKDIR}"/gentoo/security-patches/CVE-2015-{3282..3287}.patch
+ epatch_user
+
+ # packaging is f-ed up, so we can't run eautoreconf
+ # run autotools commands based on what is listed in regen.sh
+ eaclocal -I src/cf
+ eautoconf
+ eautoconf -o configure-libafs configure-libafs.ac
+ eautoheader
+ einfo "Deleting autom4te.cache directory"
+ rm -rf autom4te.cache
+}
+
+src_configure() {
+ local myconf=""
+ # OpenAFS 1.6.11 has a bug with kernels 3.17-3.17.2 that requires a config option
+ if use kernel_linux && kernel_is -ge 3 17 && kernel_is -le 3 17 2; then
+ myconf="--enable-linux-d_splice_alias-extra-iput"
+ fi
+
+ local ARCH="$(tc-arch-kernel)"
+ local MY_ARCH="$(tc-arch)"
+ local BSD_BUILD_DIR="/usr/src/sys/${MY_ARCH}/compile/GENERIC"
+
+ if use kernel_linux; then
+ myconf+=( --with-linux-kernel-headers="${KV_DIR}" \
+ --with-linux-kernel-build="${KV_OUT_DIR}"
+ )
+ elif use kernel_FreeBSD; then
+ myconf+=( --with-bsd-kernel-build="${BSD_BUILD_DIR}" )
+ fi
+ econf "${myconf[@]}"
+}
+
+src_compile() {
+ ARCH="$(tc-arch-kernel)" AR="$(tc-getAR)" emake V=1 -j1 only_libafs
+}
+
+src_install() {
+ if use kernel_linux; then
+ local srcdir=$(expr "${S}"/src/libafs/MODLOAD-*)
+ [[ -f ${srcdir}/libafs.${KV_OBJ} ]] || die "Couldn't find compiled kernel module"
+
+ MODULE_NAMES="libafs(fs/openafs:${srcdir})"
+
+ linux-mod_src_install
+ elif use kernel_FreeBSD; then
+ insinto /boot/modules
+ doins "${S}"/src/libafs/MODLOAD/libafs.ko
+ fi
+}
+
+pkg_postinst() {
+ # Update linker.hints file
+ use kernel_FreeBSD && /usr/sbin/kldxref "${EPREFIX}/boot/modules"
+ use kernel_linux && linux-mod_pkg_postinst
+}
+
+pkg_postrm() {
+ # Update linker.hints file
+ use kernel_FreeBSD && /usr/sbin/kldxref "${EPREFIX}/boot/modules"
+ use kernel_linux && linux-mod_pkg_postrm
+}
diff --git a/net-fs/openafs-kernel/openafs-kernel-1.6.12-r1.ebuild b/net-fs/openafs-kernel/openafs-kernel-1.6.12-r1.ebuild
new file mode 100644
index 000000000000..7e474e15bf89
--- /dev/null
+++ b/net-fs/openafs-kernel/openafs-kernel-1.6.12-r1.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils linux-mod multilib toolchain-funcs versionator
+
+MY_PV=$(delete_version_separator '_')
+MY_PN="${PN/-kernel}"
+MY_P="${MY_PN}-${MY_PV}"
+PVER="20150813"
+
+DESCRIPTION="The OpenAFS distributed file system kernel module"
+HOMEPAGE="http://www.openafs.org/"
+# We always d/l the doc tarball as man pages are not USE=doc material
+[[ ${PV} == *_pre* ]] && MY_PRE="candidate/" || MY_PRE=""
+SRC_URI="
+ http://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2
+ http://openafs.org/dl/openafs/${MY_PV}/${MY_P}-doc.tar.bz2
+ http://dev.gentoo.org/~bircoph/afs/${MY_PN}-patches-${PVER}.tar.xz
+"
+
+LICENSE="IBM BSD openafs-krb5-a APSL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~amd64-fbsd ~amd64-linux ~sparc ~x86 ~x86-fbsd ~x86-linux"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+CONFIG_CHECK="!DEBUG_RODATA ~!AFS_FS KEYS"
+ERROR_DEBUG_RODATA="OpenAFS is incompatible with linux' CONFIG_DEBUG_RODATA option"
+ERROR_AFS_FS="OpenAFS conflicts with the in-kernel AFS-support. Make sure not to load both at the same time!"
+ERROR_KEYS="OpenAFS needs CONFIG_KEYS option enabled"
+
+QA_TEXTRELS_x86_fbsd="/boot/modules/libafs.ko"
+QA_TEXTRELS_amd64_fbsd="/boot/modules/libafs.ko"
+
+pkg_pretend() {
+ if use kernel_linux && kernel_is ge 4 2 ; then
+ ewarn "Gentoo supports kernels which are supported by OpenAFS"
+ ewarn "which are limited to the kernel versions: <4.2"
+ ewarn ""
+ ewarn "You are free to utilize epatch_user to provide whatever"
+ ewarn "support you feel is appropriate, but will not receive"
+ ewarn "support as a result of those changes."
+ ewarn ""
+ ewarn "Please do not file a bug report about this."
+ fi
+}
+
+pkg_setup() {
+ if use kernel_linux; then
+ linux-mod_pkg_setup
+ fi
+}
+
+src_prepare() {
+ # do not tamper with CFLAGS for the kernel module
+ EPATCH_EXCLUDE="040_all_flags.patch" \
+ EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}"/gentoo/patches
+ epatch "${WORKDIR}"/gentoo/security-patches/CVE-2015-{3282..3287}.patch
+ epatch_user
+
+ # packaging is f-ed up, so we can't run eautoreconf
+ # run autotools commands based on what is listed in regen.sh
+ eaclocal -I src/cf
+ eautoconf
+ eautoconf -o configure-libafs configure-libafs.ac
+ eautoheader
+ einfo "Deleting autom4te.cache directory"
+ rm -rf autom4te.cache
+}
+
+src_configure() {
+ local myconf=""
+ # OpenAFS 1.6.11 has a bug with kernels 3.17-3.17.2 that requires a config option
+ if use kernel_linux && kernel_is -ge 3 17 && kernel_is -le 3 17 2; then
+ myconf="--enable-linux-d_splice_alias-extra-iput"
+ fi
+
+ local ARCH="$(tc-arch-kernel)"
+ local MY_ARCH="$(tc-arch)"
+ local BSD_BUILD_DIR="/usr/src/sys/${MY_ARCH}/compile/GENERIC"
+
+ if use kernel_linux; then
+ myconf+=( --with-linux-kernel-headers="${KV_DIR}" \
+ --with-linux-kernel-build="${KV_OUT_DIR}"
+ )
+ elif use kernel_FreeBSD; then
+ myconf+=( --with-bsd-kernel-build="${BSD_BUILD_DIR}" )
+ fi
+ econf "${myconf[@]}"
+}
+
+src_compile() {
+ ARCH="$(tc-arch-kernel)" AR="$(tc-getAR)" emake V=1 -j1 only_libafs
+}
+
+src_install() {
+ if use kernel_linux; then
+ local srcdir=$(expr "${S}"/src/libafs/MODLOAD-*)
+ [[ -f ${srcdir}/libafs.${KV_OBJ} ]] || die "Couldn't find compiled kernel module"
+
+ MODULE_NAMES="libafs(fs/openafs:${srcdir})"
+
+ linux-mod_src_install
+ elif use kernel_FreeBSD; then
+ insinto /boot/modules
+ doins "${S}"/src/libafs/MODLOAD/libafs.ko
+ fi
+}
+
+pkg_postinst() {
+ # Update linker.hints file
+ use kernel_FreeBSD && /usr/sbin/kldxref "${EPREFIX}/boot/modules"
+ use kernel_linux && linux-mod_pkg_postinst
+}
+
+pkg_postrm() {
+ # Update linker.hints file
+ use kernel_FreeBSD && /usr/sbin/kldxref "${EPREFIX}/boot/modules"
+ use kernel_linux && linux-mod_pkg_postrm
+}
diff --git a/net-fs/openafs/Manifest b/net-fs/openafs/Manifest
index b08b12942f08..703a6891a39c 100644
--- a/net-fs/openafs/Manifest
+++ b/net-fs/openafs/Manifest
@@ -9,3 +9,4 @@ DIST openafs-1.6.13-doc.tar.bz2 3501580 SHA256 a0517efcb665efc70ac0813256730443b
DIST openafs-1.6.13-src.tar.bz2 14373447 SHA256 6139370633b48f0149d4dacdd01af7ee29b800b0866c2d18a679c1669e317b26 SHA512 1c50ff5c482be76af8ca1a62bd4d0402c33f8107b8ee5bcbf2b582b734619a26ba54ec49251360583a5d1b3e43827314742e7fe1aee95223c995730e9e00d887 WHIRLPOOL 6cffed9877a27531f7eb49857bdc7bead44fa804b7be36e983dffeb6587cadc1a7372502cd83072b8f3c63c67151ac807e83bdb0e2a6e4fec4042f557937c98c
DIST openafs-patches-20150503.tar.xz 9736 SHA256 066f61fe795e2cb3235a0a991abe8c5e876758bae7ea9bec61e98a3f601c9d7d SHA512 c687be78c7a6442b81c1362cab6ba215301911bdefcf39d2758ffeddecfa3efaa67990ea8277bbc1dedc14ad70a33213a37dbc45c43cd53871eec089759596c6 WHIRLPOOL 0935946c9a535f8e9ce6dd292801c671aef1c40f2a3f51aa4a85e5f4181fb46c3b2df55be56eec56c7fcab0eaf27d97cc6cef98c1b70178ba8cd7258174036cf
DIST openafs-patches-20150626.tar.xz 10588 SHA256 b221842e82e4807e6b8064454df3792b12f3d73104462d83aa88c79e3028fb4a SHA512 b77df9dc734965301585d5f66732fef119282e49cbd5c121f45aa9f0b64fc6c62e1cd93c8b7ff81702f6baece0df3cf9d99ab796e84f2c0c610dc2e2fd3cedf6 WHIRLPOOL 71778ab6f64a156f8f559d446e09cbb8278f2f0965225a21767a2a28883e228620c37241cd439426a3163ede8b04f676f2b4aea7c14394c82bdc47dc2643e6b2
+DIST openafs-patches-20150813.tar.xz 15520 SHA256 209766f5e97e924eab91d862875f360e0ed9821b317ee609789a77d7fbdeb8f0 SHA512 2703f65e7c3f1a724e9330d8f2aedf80f9d0b8ba4b03a5f466cd523eb8d0a1692542df722b24e06ce4ced476fb8615e2caca6159de7b18f151ecf7a14a5f0565 WHIRLPOOL c4055a7c0cf19847ecd8679316a0146b41589f157996b2f15b807d272270e65c1a6ee5f916d3127803cd26370c392b1e751d100d2ab383a57530b768e1682d60
diff --git a/net-fs/openafs/openafs-1.6.11-r1.ebuild b/net-fs/openafs/openafs-1.6.11-r1.ebuild
new file mode 100644
index 000000000000..bf62b37cade2
--- /dev/null
+++ b/net-fs/openafs/openafs-1.6.11-r1.ebuild
@@ -0,0 +1,176 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils flag-o-matic multilib pam systemd toolchain-funcs versionator
+
+MY_PV=$(delete_version_separator '_')
+MY_P="${PN}-${MY_PV}"
+PVER="20150813"
+
+DESCRIPTION="The OpenAFS distributed file system"
+HOMEPAGE="http://www.openafs.org/"
+# We always d/l the doc tarball as man pages are not USE=doc material
+[[ ${PV} == *_pre* ]] && MY_PRE="candidate/" || MY_PRE=""
+SRC_URI="
+ http://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2
+ http://openafs.org/dl/openafs/${MY_PV}/${MY_P}-doc.tar.bz2
+ http://dev.gentoo.org/~bircoph/afs/${PN}-patches-${PVER}.tar.xz
+"
+
+LICENSE="IBM BSD openafs-krb5-a APSL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~amd64-linux ~sparc ~x86 ~x86-linux"
+
+IUSE="doc kerberos +modules pam"
+
+CDEPEND="
+ sys-libs/ncurses
+ pam? ( virtual/pam )
+ kerberos? ( virtual/krb5 )"
+
+DEPEND="${CDEPEND}
+ doc? (
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ )"
+
+RDEPEND="${CDEPEND}
+ modules? ( ~net-fs/openafs-kernel-${PV} )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ EPATCH_EXCLUDE="050_all_job_server.patch" \
+ EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}"/gentoo/patches
+ epatch "${WORKDIR}"/gentoo/security-patches/CVE-2015-{3282..3287}.patch
+ epatch_user
+
+ # fixing 2-nd level makefiles to honor flags
+ sed -i -r 's/\<CFLAGS[[:space:]]*=/CFLAGS+=/; s/\<LDFLAGS[[:space:]]*=/LDFLAGS+=/' \
+ src/*/Makefile.in || die '*/Makefile.in sed failed'
+
+ # packaging is f-ed up, so we can't run eautoreconf
+ # run autotools commands based on what is listed in regen.sh
+ eaclocal -I src/cf
+ eautoconf
+ eautoconf -o configure-libafs configure-libafs.ac
+ eautoheader
+ einfo "Deleting autom4te.cache directory"
+ rm -rf autom4te.cache
+}
+
+src_configure() {
+ AFS_SYSKVERS=26 \
+ econf \
+ --disable-kernel-module \
+ --disable-strip-binaries \
+ --enable-supergroups \
+ $(use_enable pam) \
+ $(use_with doc html-xsl /usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl) \
+ $(use_with kerberos krb5)
+}
+
+src_compile() {
+ emake all_nolibafs
+ local d
+ if use doc; then
+ for d in doc/xml/{AdminGuide,QuickStartUnix,UserGuide}; do
+ emake -C "${d}" html;
+ done
+ fi
+}
+
+src_install() {
+ local OPENRCDIR="${WORKDIR}/gentoo/openrc"
+ local SYSTEMDDIR="${WORKDIR}/gentoo/systemd"
+
+ emake DESTDIR="${ED}" install_nolibafs
+
+ insinto /etc/openafs
+ doins src/afsd/CellServDB
+ echo "/afs:/var/cache/openafs:200000" > "${ED}"/etc/openafs/cacheinfo
+ echo "openafs.org" > "${ED}"/etc/openafs/ThisCell
+
+ # pam_afs and pam_afs.krb have been installed in irregular locations, fix
+ if use pam ; then
+ dopammod "${ED}"/usr/$(get_libdir)/pam_afs*
+ fi
+ rm -f "${ED}"/usr/$(get_libdir)/pam_afs* || die
+
+ # remove kdump stuff provided by kexec-tools #222455
+ rm -rf "${ED}"/usr/sbin/kdump*
+
+ # avoid collision with mit_krb5's version of kpasswd
+ mv "${ED}"/usr/bin/kpasswd{,_afs} || die
+ mv "${ED}"/usr/share/man/man1/kpasswd{,_afs}.1 || die
+
+ # move lwp stuff around #200674 #330061
+ mv "${ED}"/usr/include/{lwp,lock,timer}.h "${ED}"/usr/include/afs/ || die
+ mv "${ED}"/usr/$(get_libdir)/liblwp* "${ED}"/usr/$(get_libdir)/afs/ || die
+ # update paths to the relocated lwp headers
+ sed -ri \
+ -e '/^#include <(lwp|lock|timer).h>/s:<([^>]*)>:<afs/\1>:' \
+ "${ED}"/usr/include/*.h \
+ "${ED}"/usr/include/*/*.h \
+ || die
+
+ # minimal documentation
+ use pam && doman src/pam/pam_afs.5
+ dodoc "${WORKDIR}/gentoo/README" src/afsd/CellServDB
+
+ # documentation package
+ if use doc ; then
+ dodoc -r doc/{arch,examples,protocol,txt}
+ dohtml -r doc/xml/*
+ fi
+
+ # Gentoo related scripts
+ newinitd "${OPENRCDIR}"/openafs-client.initd openafs-client
+ newconfd "${OPENRCDIR}"/openafs-client.confd openafs-client
+ newinitd "${OPENRCDIR}"/openafs-server.initd openafs-server
+ newconfd "${OPENRCDIR}"/openafs-server.confd openafs-server
+ systemd_dotmpfilesd "${SYSTEMDDIR}"/tmpfiles.d/openafs-client.conf
+ systemd_dounit "${SYSTEMDDIR}"/openafs-client.service
+ systemd_dounit "${SYSTEMDDIR}"/openafs-server.service
+
+ # used directories: client
+ keepdir /etc/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
+
+ # link logfiles to /var/log
+ dosym ../lib/openafs/logs /var/log/openafs
+}
+
+pkg_preinst() {
+ ## Somewhat intelligently install default configuration files
+ ## (when they are not present)
+ local x
+ for x in cacheinfo CellServDB ThisCell ; do
+ if [ -e "${EROOT}"/etc/openafs/${x} ] ; then
+ cp "${EROOT}"/etc/openafs/${x} "${ED}"/etc/openafs/
+ fi
+ done
+}
+
+pkg_postinst() {
+ elog "This installation should work out of the box (at least the"
+ elog "client part doing global afs-cell browsing, unless you had"
+ elog "a previous and different configuration). If you want to"
+ elog "set up your own cell or modify the standard config,"
+ elog "please have a look at the Gentoo OpenAFS documentation"
+ elog "(warning: it is not yet up to date wrt the new file locations)"
+ elog
+ elog "The documentation can be found at:"
+ elog " https://wiki.gentoo.org/wiki/OpenAFS"
+}
diff --git a/net-fs/openafs/openafs-1.6.11.1-r1.ebuild b/net-fs/openafs/openafs-1.6.11.1-r1.ebuild
new file mode 100644
index 000000000000..bf62b37cade2
--- /dev/null
+++ b/net-fs/openafs/openafs-1.6.11.1-r1.ebuild
@@ -0,0 +1,176 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils flag-o-matic multilib pam systemd toolchain-funcs versionator
+
+MY_PV=$(delete_version_separator '_')
+MY_P="${PN}-${MY_PV}"
+PVER="20150813"
+
+DESCRIPTION="The OpenAFS distributed file system"
+HOMEPAGE="http://www.openafs.org/"
+# We always d/l the doc tarball as man pages are not USE=doc material
+[[ ${PV} == *_pre* ]] && MY_PRE="candidate/" || MY_PRE=""
+SRC_URI="
+ http://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2
+ http://openafs.org/dl/openafs/${MY_PV}/${MY_P}-doc.tar.bz2
+ http://dev.gentoo.org/~bircoph/afs/${PN}-patches-${PVER}.tar.xz
+"
+
+LICENSE="IBM BSD openafs-krb5-a APSL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~amd64-linux ~sparc ~x86 ~x86-linux"
+
+IUSE="doc kerberos +modules pam"
+
+CDEPEND="
+ sys-libs/ncurses
+ pam? ( virtual/pam )
+ kerberos? ( virtual/krb5 )"
+
+DEPEND="${CDEPEND}
+ doc? (
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ )"
+
+RDEPEND="${CDEPEND}
+ modules? ( ~net-fs/openafs-kernel-${PV} )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ EPATCH_EXCLUDE="050_all_job_server.patch" \
+ EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}"/gentoo/patches
+ epatch "${WORKDIR}"/gentoo/security-patches/CVE-2015-{3282..3287}.patch
+ epatch_user
+
+ # fixing 2-nd level makefiles to honor flags
+ sed -i -r 's/\<CFLAGS[[:space:]]*=/CFLAGS+=/; s/\<LDFLAGS[[:space:]]*=/LDFLAGS+=/' \
+ src/*/Makefile.in || die '*/Makefile.in sed failed'
+
+ # packaging is f-ed up, so we can't run eautoreconf
+ # run autotools commands based on what is listed in regen.sh
+ eaclocal -I src/cf
+ eautoconf
+ eautoconf -o configure-libafs configure-libafs.ac
+ eautoheader
+ einfo "Deleting autom4te.cache directory"
+ rm -rf autom4te.cache
+}
+
+src_configure() {
+ AFS_SYSKVERS=26 \
+ econf \
+ --disable-kernel-module \
+ --disable-strip-binaries \
+ --enable-supergroups \
+ $(use_enable pam) \
+ $(use_with doc html-xsl /usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl) \
+ $(use_with kerberos krb5)
+}
+
+src_compile() {
+ emake all_nolibafs
+ local d
+ if use doc; then
+ for d in doc/xml/{AdminGuide,QuickStartUnix,UserGuide}; do
+ emake -C "${d}" html;
+ done
+ fi
+}
+
+src_install() {
+ local OPENRCDIR="${WORKDIR}/gentoo/openrc"
+ local SYSTEMDDIR="${WORKDIR}/gentoo/systemd"
+
+ emake DESTDIR="${ED}" install_nolibafs
+
+ insinto /etc/openafs
+ doins src/afsd/CellServDB
+ echo "/afs:/var/cache/openafs:200000" > "${ED}"/etc/openafs/cacheinfo
+ echo "openafs.org" > "${ED}"/etc/openafs/ThisCell
+
+ # pam_afs and pam_afs.krb have been installed in irregular locations, fix
+ if use pam ; then
+ dopammod "${ED}"/usr/$(get_libdir)/pam_afs*
+ fi
+ rm -f "${ED}"/usr/$(get_libdir)/pam_afs* || die
+
+ # remove kdump stuff provided by kexec-tools #222455
+ rm -rf "${ED}"/usr/sbin/kdump*
+
+ # avoid collision with mit_krb5's version of kpasswd
+ mv "${ED}"/usr/bin/kpasswd{,_afs} || die
+ mv "${ED}"/usr/share/man/man1/kpasswd{,_afs}.1 || die
+
+ # move lwp stuff around #200674 #330061
+ mv "${ED}"/usr/include/{lwp,lock,timer}.h "${ED}"/usr/include/afs/ || die
+ mv "${ED}"/usr/$(get_libdir)/liblwp* "${ED}"/usr/$(get_libdir)/afs/ || die
+ # update paths to the relocated lwp headers
+ sed -ri \
+ -e '/^#include <(lwp|lock|timer).h>/s:<([^>]*)>:<afs/\1>:' \
+ "${ED}"/usr/include/*.h \
+ "${ED}"/usr/include/*/*.h \
+ || die
+
+ # minimal documentation
+ use pam && doman src/pam/pam_afs.5
+ dodoc "${WORKDIR}/gentoo/README" src/afsd/CellServDB
+
+ # documentation package
+ if use doc ; then
+ dodoc -r doc/{arch,examples,protocol,txt}
+ dohtml -r doc/xml/*
+ fi
+
+ # Gentoo related scripts
+ newinitd "${OPENRCDIR}"/openafs-client.initd openafs-client
+ newconfd "${OPENRCDIR}"/openafs-client.confd openafs-client
+ newinitd "${OPENRCDIR}"/openafs-server.initd openafs-server
+ newconfd "${OPENRCDIR}"/openafs-server.confd openafs-server
+ systemd_dotmpfilesd "${SYSTEMDDIR}"/tmpfiles.d/openafs-client.conf
+ systemd_dounit "${SYSTEMDDIR}"/openafs-client.service
+ systemd_dounit "${SYSTEMDDIR}"/openafs-server.service
+
+ # used directories: client
+ keepdir /etc/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
+
+ # link logfiles to /var/log
+ dosym ../lib/openafs/logs /var/log/openafs
+}
+
+pkg_preinst() {
+ ## Somewhat intelligently install default configuration files
+ ## (when they are not present)
+ local x
+ for x in cacheinfo CellServDB ThisCell ; do
+ if [ -e "${EROOT}"/etc/openafs/${x} ] ; then
+ cp "${EROOT}"/etc/openafs/${x} "${ED}"/etc/openafs/
+ fi
+ done
+}
+
+pkg_postinst() {
+ elog "This installation should work out of the box (at least the"
+ elog "client part doing global afs-cell browsing, unless you had"
+ elog "a previous and different configuration). If you want to"
+ elog "set up your own cell or modify the standard config,"
+ elog "please have a look at the Gentoo OpenAFS documentation"
+ elog "(warning: it is not yet up to date wrt the new file locations)"
+ elog
+ elog "The documentation can be found at:"
+ elog " https://wiki.gentoo.org/wiki/OpenAFS"
+}
diff --git a/net-fs/openafs/openafs-1.6.12-r1.ebuild b/net-fs/openafs/openafs-1.6.12-r1.ebuild
new file mode 100644
index 000000000000..bf62b37cade2
--- /dev/null
+++ b/net-fs/openafs/openafs-1.6.12-r1.ebuild
@@ -0,0 +1,176 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils flag-o-matic multilib pam systemd toolchain-funcs versionator
+
+MY_PV=$(delete_version_separator '_')
+MY_P="${PN}-${MY_PV}"
+PVER="20150813"
+
+DESCRIPTION="The OpenAFS distributed file system"
+HOMEPAGE="http://www.openafs.org/"
+# We always d/l the doc tarball as man pages are not USE=doc material
+[[ ${PV} == *_pre* ]] && MY_PRE="candidate/" || MY_PRE=""
+SRC_URI="
+ http://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2
+ http://openafs.org/dl/openafs/${MY_PV}/${MY_P}-doc.tar.bz2
+ http://dev.gentoo.org/~bircoph/afs/${PN}-patches-${PVER}.tar.xz
+"
+
+LICENSE="IBM BSD openafs-krb5-a APSL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~amd64-linux ~sparc ~x86 ~x86-linux"
+
+IUSE="doc kerberos +modules pam"
+
+CDEPEND="
+ sys-libs/ncurses
+ pam? ( virtual/pam )
+ kerberos? ( virtual/krb5 )"
+
+DEPEND="${CDEPEND}
+ doc? (
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ )"
+
+RDEPEND="${CDEPEND}
+ modules? ( ~net-fs/openafs-kernel-${PV} )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ EPATCH_EXCLUDE="050_all_job_server.patch" \
+ EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}"/gentoo/patches
+ epatch "${WORKDIR}"/gentoo/security-patches/CVE-2015-{3282..3287}.patch
+ epatch_user
+
+ # fixing 2-nd level makefiles to honor flags
+ sed -i -r 's/\<CFLAGS[[:space:]]*=/CFLAGS+=/; s/\<LDFLAGS[[:space:]]*=/LDFLAGS+=/' \
+ src/*/Makefile.in || die '*/Makefile.in sed failed'
+
+ # packaging is f-ed up, so we can't run eautoreconf
+ # run autotools commands based on what is listed in regen.sh
+ eaclocal -I src/cf
+ eautoconf
+ eautoconf -o configure-libafs configure-libafs.ac
+ eautoheader
+ einfo "Deleting autom4te.cache directory"
+ rm -rf autom4te.cache
+}
+
+src_configure() {
+ AFS_SYSKVERS=26 \
+ econf \
+ --disable-kernel-module \
+ --disable-strip-binaries \
+ --enable-supergroups \
+ $(use_enable pam) \
+ $(use_with doc html-xsl /usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl) \
+ $(use_with kerberos krb5)
+}
+
+src_compile() {
+ emake all_nolibafs
+ local d
+ if use doc; then
+ for d in doc/xml/{AdminGuide,QuickStartUnix,UserGuide}; do
+ emake -C "${d}" html;
+ done
+ fi
+}
+
+src_install() {
+ local OPENRCDIR="${WORKDIR}/gentoo/openrc"
+ local SYSTEMDDIR="${WORKDIR}/gentoo/systemd"
+
+ emake DESTDIR="${ED}" install_nolibafs
+
+ insinto /etc/openafs
+ doins src/afsd/CellServDB
+ echo "/afs:/var/cache/openafs:200000" > "${ED}"/etc/openafs/cacheinfo
+ echo "openafs.org" > "${ED}"/etc/openafs/ThisCell
+
+ # pam_afs and pam_afs.krb have been installed in irregular locations, fix
+ if use pam ; then
+ dopammod "${ED}"/usr/$(get_libdir)/pam_afs*
+ fi
+ rm -f "${ED}"/usr/$(get_libdir)/pam_afs* || die
+
+ # remove kdump stuff provided by kexec-tools #222455
+ rm -rf "${ED}"/usr/sbin/kdump*
+
+ # avoid collision with mit_krb5's version of kpasswd
+ mv "${ED}"/usr/bin/kpasswd{,_afs} || die
+ mv "${ED}"/usr/share/man/man1/kpasswd{,_afs}.1 || die
+
+ # move lwp stuff around #200674 #330061
+ mv "${ED}"/usr/include/{lwp,lock,timer}.h "${ED}"/usr/include/afs/ || die
+ mv "${ED}"/usr/$(get_libdir)/liblwp* "${ED}"/usr/$(get_libdir)/afs/ || die
+ # update paths to the relocated lwp headers
+ sed -ri \
+ -e '/^#include <(lwp|lock|timer).h>/s:<([^>]*)>:<afs/\1>:' \
+ "${ED}"/usr/include/*.h \
+ "${ED}"/usr/include/*/*.h \
+ || die
+
+ # minimal documentation
+ use pam && doman src/pam/pam_afs.5
+ dodoc "${WORKDIR}/gentoo/README" src/afsd/CellServDB
+
+ # documentation package
+ if use doc ; then
+ dodoc -r doc/{arch,examples,protocol,txt}
+ dohtml -r doc/xml/*
+ fi
+
+ # Gentoo related scripts
+ newinitd "${OPENRCDIR}"/openafs-client.initd openafs-client
+ newconfd "${OPENRCDIR}"/openafs-client.confd openafs-client
+ newinitd "${OPENRCDIR}"/openafs-server.initd openafs-server
+ newconfd "${OPENRCDIR}"/openafs-server.confd openafs-server
+ systemd_dotmpfilesd "${SYSTEMDDIR}"/tmpfiles.d/openafs-client.conf
+ systemd_dounit "${SYSTEMDDIR}"/openafs-client.service
+ systemd_dounit "${SYSTEMDDIR}"/openafs-server.service
+
+ # used directories: client
+ keepdir /etc/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
+
+ # link logfiles to /var/log
+ dosym ../lib/openafs/logs /var/log/openafs
+}
+
+pkg_preinst() {
+ ## Somewhat intelligently install default configuration files
+ ## (when they are not present)
+ local x
+ for x in cacheinfo CellServDB ThisCell ; do
+ if [ -e "${EROOT}"/etc/openafs/${x} ] ; then
+ cp "${EROOT}"/etc/openafs/${x} "${ED}"/etc/openafs/
+ fi
+ done
+}
+
+pkg_postinst() {
+ elog "This installation should work out of the box (at least the"
+ elog "client part doing global afs-cell browsing, unless you had"
+ elog "a previous and different configuration). If you want to"
+ elog "set up your own cell or modify the standard config,"
+ elog "please have a look at the Gentoo OpenAFS documentation"
+ elog "(warning: it is not yet up to date wrt the new file locations)"
+ elog
+ elog "The documentation can be found at:"
+ elog " https://wiki.gentoo.org/wiki/OpenAFS"
+}