diff options
author | NP-Hardass <NP-Hardass@gentoo.org> | 2016-03-22 18:09:12 -0400 |
---|---|---|
committer | NP-Hardass <NP-Hardass@gentoo.org> | 2016-03-22 18:11:08 -0400 |
commit | 8e33d4b5d5506a291ddcd93e2d060c1b0b450d00 (patch) | |
tree | 05391536b543d1a2d441341b9052335068af8dca /net-fs/openafs | |
parent | dev-ruby/niceogiri: Remove ruby19 (diff) | |
download | gentoo-8e33d4b5d5506a291ddcd93e2d060c1b0b450d00.tar.gz gentoo-8e33d4b5d5506a291ddcd93e2d060c1b0b450d00.tar.bz2 gentoo-8e33d4b5d5506a291ddcd93e2d060c1b0b450d00.zip |
net-fs/openafs: Version bump to 1.6.17. Security bugs and systemd bugs
Security Release 1.6.17.
Also fixes systemd units to make cache dir and sets env variables in
/etc/systemd/service.d/openafs-{client,server}.service.d/00gentoo.conf
to allow specifying daemon runtime args. Additionally, new pkg_config
phase exists to enable systemd users to set cache args for client daemon
because QA policies disencourage having the unit set the args dynamically.
Gentoo-Bug: 570410,544168,570540,564388
Package-Manager: portage-2.2.26
Diffstat (limited to 'net-fs/openafs')
-rw-r--r-- | net-fs/openafs/Manifest | 3 | ||||
-rw-r--r-- | net-fs/openafs/openafs-1.6.17.ebuild | 210 |
2 files changed, 213 insertions, 0 deletions
diff --git a/net-fs/openafs/Manifest b/net-fs/openafs/Manifest index 4f15a9971f8a..911d3d1ee8fa 100644 --- a/net-fs/openafs/Manifest +++ b/net-fs/openafs/Manifest @@ -4,6 +4,9 @@ DIST openafs-1.6.14-doc.tar.bz2 3530481 SHA256 544fb3370465881bd1aadb24cf9e40610 DIST openafs-1.6.14-src.tar.bz2 14605615 SHA256 3e62c798a7f982c4f88d85d32e46bee6a47848d207b1e318fe661ce44ae4e01f SHA512 957178b1c3f6262e831ec497b7dd76e208a48f2107942d44ce72b062081e2932b93cb800b786eb88b770a647daf3585f659fdd1e715d0e724ac56eae011f3601 WHIRLPOOL 43e58a9e34ed2340c732b88261ecf4043f7a6e7db18bac7113b74455b1a2f1ed864d345bf41bac42d6d437ae18778e7f37a794b738a882c0fb5e36257af7d960 DIST openafs-1.6.16-doc.tar.bz2 3533244 SHA256 4916a5e155a4419186dd166e5eff4f30881399e81a255f7d3f43942a0b5bbcba SHA512 0a193fd24a11bb06621378e7c54feca8dc835b191f0c921c6fa6deb3d43be140ab4854f01128d29c76a075a705e88178128c94e9483162f4ba8c5e7ce4a06606 WHIRLPOOL 0be7495c40ef614d8198606afa297828fbb3fbdb063598dbb6d58e95375e9b1a49c4d6ab793f3581520bd27c655da158d3efb1602dfbaa8bca0bfadc5c94ab35 DIST openafs-1.6.16-src.tar.bz2 14612920 SHA256 3431702bdcbd1b27833060c50869e618a192495877ebb0a66e4610de0b48eb81 SHA512 775c6b51e4a916ab14c2a33b746ffc67ce7f8e4d4d75e17374341d81b8d8b424971ffd67ba191848be28560cefceecc51f1f608ccdc7d896bafafa68e1726cb9 WHIRLPOOL 0da43210ee7779e49b86bb337bef5f3b70fdf3876eca763025d45628533a7ce7104b193c0c9d98d2f4363314faa79c7bd367432c5272c9b12249623f9b342812 +DIST openafs-1.6.17-doc.tar.bz2 3529538 SHA256 803e895f9a5dc4c74866e8de20e07a8b7b972ee48b1603fab215b49116117921 SHA512 6056d5f410984a333fcd1581de623c4a4f218269138ab6ee4c9b9622a85ab89748b35d36517c092d8a7bace932fac0d6566645abbca087ae2b5d40e72cd52593 WHIRLPOOL 093b1c770748910af4c2144710350cef131b5621575d5d1648ff90ba54c4de13a1cc0bbcd9c8fcf81b126a81f20998806c90ab3d904446630eac214679c9b650 +DIST openafs-1.6.17-src.tar.bz2 14607107 SHA256 96413a2dbffdc9170cc5dde6aa5ad0ae2383c6106994285ed8f186928813a398 SHA512 3ca61a7731c9bd9bae7da2f7b3900438fcc9f75c95b354574389c2203af2ec0a7b4dcaaf13a437743477fcad8a46c3bbb8c68255a976b9a9917b8f0a0cdf028f WHIRLPOOL 92de51878836a721e6fadbe2f6c7a8069ecf622a08fd05e3a01d8fef376bd2e18e9f3b4715d42a26e8d5f1d665f91924520ed6928ed1f460bac49b1bc906e129 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 DIST openafs-patches-20160223.tar.xz 10536 SHA256 19c14ecd625ce96370fe3629faffd2841567954d687e1ee30c81a848702231a6 SHA512 83018a4ace8189182de7b878094c773996d824f9127f15167e1b5795e4b7af8f3cb3a86e054b95043343ff88c8b505376005cd97cc91b50e6bf05b2d5242ccbd WHIRLPOOL 8f58b30446fccf37df9460ff3ab87cbd2338346c545aca48bc328578951b92b3e34fe102ade2bcb822ddee5c826d9834d0c2ce257092aa9bdde4717afbbd756d +DIST openafs-patches-20160321.tar.xz 10932 SHA256 2f5e9c6cd7cc78fa1661f17c1b89492db8c0c6450c1374540e91e79c7d82add7 SHA512 492acd4ab1888f9bf7df2c3367d035ffe1955bfa7cc95462812079a40a2cbc5029398b031c03bda180aa6f0422c87abea54f67b720db76bf6ddd6d1cf6b29f42 WHIRLPOOL 7674d51df4e19123ced57a9d0379e80def666fa58760788fd83b01573e793ad8908b2373a9e1c3e811f391b4ee611651cf8c4742c07973f46cd1b6cbd59a8564 diff --git a/net-fs/openafs/openafs-1.6.17.ebuild b/net-fs/openafs/openafs-1.6.17.ebuild new file mode 100644 index 000000000000..ac8aeb51439a --- /dev/null +++ b/net-fs/openafs/openafs-1.6.17.ebuild @@ -0,0 +1,210 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="6" + +inherit autotools eutils flag-o-matic multilib pam systemd toolchain-funcs versionator + +MY_PV=$(delete_version_separator '_') +MY_P="${PN}-${MY_PV}" +PVER="20160321" + +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 + https://dev.gentoo.org/~bircoph/afs/${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="doc kerberos +modules pam" + +CDEPEND=" + sys-libs/ncurses:0= + 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}" + +PATCHES=( "${WORKDIR}/gentoo/patches" ) + +src_prepare() { + default + + # 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 + DOCS=( "${WORKDIR}/gentoo/README.Gentoo" + src/afsd/CellServDB NEWS README ) + + # documentation package + if use doc ; then + DOCS+=( doc/{arch,examples,pdf,protocol,txt} ) + dohtml -r doc/xml/ + fi + + einstalldocs + + # 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 + systemd_install_serviced "${SYSTEMDDIR}"/openafs-client.service.conf + systemd_install_serviced "${SYSTEMDDIR}"/openafs-server.service.conf + + # 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" + elog + elog "Systemd users should run emerge --config ${CATEGORY}/${PN} before" + elog "first use and whenever ${EROOT}/etc/openafs/cacheinfo is edited." +} + +pkg_config() { + elog "Setting cache options for systemd." + + SERVICED_FILE="${EROOT}"/etc/systemd/system/openafs-client.service.d/00gentoo.conf + [ ! -e "${SERVICED_FILE}" ] && die "Systemd service.d file ${SERVICED_FILE} not found." + + CACHESIZE=$(cut -d ':' -f 3 "${EROOT}"/etc/openafs/cacheinfo) + [ -z ${CACHESIZE} ] && die "Failed to parse ${EROOT}/etc/openafs/cacheinfo." + + if [ ${CACHESIZE} -lt 131070 ]; then + AFSD_CACHE_ARGS="-stat 300 -dcache 100 -daemons 2 -volumes 50" + elif [ ${CACHESIZE} -lt 524288 ]; then + AFSD_CACHE_ARGS="-stat 2000 -dcache 800 -daemons 3 -volumes 70" + elif [ ${CACHESIZE} -lt 1048576 ]; then + AFSD_CACHE_ARGS="-stat 2800 -dcache 2400 -daemons 5 -volumes 128" + elif [ ${CACHESIZE} -lt 2209715 ]; then + AFSD_CACHE_ARGS="-stat 3600 -dcache 3600 -daemons 5 -volumes 196 -files 50000" + else + AFSD_CACHE_ARGS="-stat 4000 -dcache 4000 -daemons 6 -volumes 256 -files 50000" + fi + + # Replace existing env var if exists, else append line + grep -q "^Environment=\"AFSD_CACHE_ARGS=" "${SERVICED_FILE}" && \ + sed -i "s/^Environment=\"AFSD_CACHE_ARGS=.*/Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"/" "${SERVICED_FILE}" || \ + sed -i "$ a\Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"" "${SERVICED_FILE}" || \ + die "Updating ${SERVICED_FILE} failed." +} |