From d2bcdab82e5f5f38a8ab54026e8aa94edb1b77a6 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 21 Dec 2024 06:30:52 +0000 Subject: gentoo auto-resync : 21:12:2024 - 06:30:51 --- net-fs/Manifest.gz | Bin 3361 -> 3354 bytes net-fs/openafs/Manifest | 6 +- net-fs/openafs/openafs-1.8.13-r1.ebuild | 339 +++++++++++++++++++++++++++++++ net-fs/openafs/openafs-1.8.13.ebuild | 339 ------------------------------- net-fs/openafs/openafs-1.8.7-r1.ebuild | 338 ++++++++++++++++++++++++++++++ net-fs/openafs/openafs-1.8.7.ebuild | 338 ------------------------------ net-fs/openafs/openafs-1.8.8.1-r1.ebuild | 337 ------------------------------ net-fs/openafs/openafs-1.8.8.1-r2.ebuild | 337 ++++++++++++++++++++++++++++++ 8 files changed, 1017 insertions(+), 1017 deletions(-) create mode 100644 net-fs/openafs/openafs-1.8.13-r1.ebuild delete mode 100644 net-fs/openafs/openafs-1.8.13.ebuild create mode 100644 net-fs/openafs/openafs-1.8.7-r1.ebuild delete mode 100644 net-fs/openafs/openafs-1.8.7.ebuild delete mode 100644 net-fs/openafs/openafs-1.8.8.1-r1.ebuild create mode 100644 net-fs/openafs/openafs-1.8.8.1-r2.ebuild (limited to 'net-fs') diff --git a/net-fs/Manifest.gz b/net-fs/Manifest.gz index 56c772e55ecc..0dff26411465 100644 Binary files a/net-fs/Manifest.gz and b/net-fs/Manifest.gz differ diff --git a/net-fs/openafs/Manifest b/net-fs/openafs/Manifest index d30c4d568de4..e7f10ad03ff9 100644 --- a/net-fs/openafs/Manifest +++ b/net-fs/openafs/Manifest @@ -31,7 +31,7 @@ DIST openafs-1.8.8.1-doc.tar.bz2 3770278 BLAKE2B 4d10c96f05190a71b8d7aa89557946d DIST openafs-1.8.8.1-src.tar.bz2 14866119 BLAKE2B ae58a1d30fc8d72b4487700203c03e62fc15d0034a03516d4ea5b52c33970e8d9954e6b3c812a4633910c512d283c11431abbcb3868569d8d5ced1a69585263e SHA512 fb181e0989e9bae714af26de916a96946eea20f98b47154f2de7b5e296cb4f42af5df037ef7b603073e97eafe52d7c401666f03130c1e0c9a6ae1a6c2707c384 DIST openafs-patches-20210116.tar.xz 67300 BLAKE2B aaafa197d1be1e9d89685fe5193a4682ea9e5e5c1c3227963a97ca7a98e6ab5e855ee65d615a31162559b30ae5867fde6ceeec1055af1a375e73b9fa25654de5 SHA512 06e9e1b65fceda34a197556aba1a05eabb630723fc17c5060d5e2a054e60ab8c5195d5c80eff3d3444bcdca40b7115da9143f5b8100659061446038ad4a79007 DIST openafs-patches-20211212.tar.xz 13892 BLAKE2B 64582135ff3b81725cf0510d1157785b112f76197b8f50a947d22a82b8b55bebd163f2288b19d68a994f22c78bd90b6bfdad5f75383df1cac06d40feb72e8de8 SHA512 40a1a0d126ae194609da8a264c26b278b6081d95020bcbdb3a809952a70535fa551d1983e811e4ab9deaec06f061075906c2bbaf91e4354bff3520584e3fd336 -EBUILD openafs-1.8.13.ebuild 10783 BLAKE2B 06de2d90cba8abca4c90598fd1aafadb4a52d00f81efcdeb27aa8b1ec891a2c8f65d37bb0be30c52b0b5ac4a79b6551f1f8d230523f5e906a9bfd10d975f5424 SHA512 9efa215f68ddb2526869b543b8eb2318f0a8ef010536753ea82dfa328f6f4fd00bbba69555524203b699b1e0f070bcbee29f1c44832992b8448fe59e2e7c80f5 -EBUILD openafs-1.8.7.ebuild 10613 BLAKE2B 243cf09efb3b53f74ac96c9b15a9f26ca84a3a76866e334594942ac23f450b3ae7b38c64aa784346dcb7035223a83a2260a3bcc94a07811fbae125a06e7b372a SHA512 486d21e1b917475a4cbd4b210be0d985203fdea1360cf3b0fe47d3bc2309791e7c980192ccf2359d0c699286a8b101fd318ae4d1f7a01c66a6b05d0a1965ed96 -EBUILD openafs-1.8.8.1-r1.ebuild 10507 BLAKE2B 1ab828bdc461825f568a88eaec29e0f0b73d4bfaf82c33139387f95543b8f0e7bf6b877429d9977ecea9c9a236e372d41b3d46dddaf45c4ecac16a4cd095dcf5 SHA512 0fe5be63c36eeb4e1ff9569e67c18e2cf2aef378256920851a83e22fde799c9d4328cc3dccbe58450e58d1807e111e62248143b11811f4d97fa4cf6c0ccba89d +EBUILD openafs-1.8.13-r1.ebuild 10795 BLAKE2B 3e784d72661abec3e260542a890002dd3ccd51f6334da4a0505da2d3fdeadc6c8463eb759d18cfe1c2a5a90341059a541f94d526d012a4ea95001b915ce4c856 SHA512 f48242cc8bfe4761b999f072b60d6535b3cf64ea4516e3d8a550fc64a7a2749e559e235cc8e5cec5d1880aae4f368193012ba760c4e692b452e6b5948c735a6b +EBUILD openafs-1.8.7-r1.ebuild 10625 BLAKE2B 0b7dcd22683f5738d8325c948d96b502b865b893bde490b4b60a3f961ddde91a8f0cafbd3e0be7f91763ebe46676da7546faba9e5ef704274f942a585b92115b SHA512 c38318db3dc7ffd63065de47ed2c340fc1d29d70f4f367e1d62bc9c346ee54ad6de5a608078ce6ecf55079fcb467097ecbca06fe5156819cf27a5839d6f2ee3d +EBUILD openafs-1.8.8.1-r2.ebuild 10519 BLAKE2B 4f0450b95ea50cf0572b5b5d4f0daf1d75ffbebbb2ef2509c6352a28bdb1cec1574acc631c0f05b9aea8365c91e7e5d1006b4f42f18c192afbae740c048ee3dc SHA512 26807f3d614dcf22d93756fa8374d72a1bbefb84dcd6e3c43a4b5dca9a888e62e06794485fdb60059b1c3ef0543b9473a30747845dc1be1b04246df821c369bc MISC metadata.xml 1276 BLAKE2B 64acb1928c14c6129ebba32dd004021a472bbcb9a00625fec7ac06a3f12d8a0d084e43f2deeabd72c0bb3f73b853cb7c133318b50d86b7bbc81be72ffe200f91 SHA512 d8ebcfb8df0eb80ade7bf55170fdc9a20062981fd82793a60984b6eaa04639e6bc86cb8a9f7cc2ab2d18fc6da70f2570ddd535b64a6754d322f055c01144afc8 diff --git a/net-fs/openafs/openafs-1.8.13-r1.ebuild b/net-fs/openafs/openafs-1.8.13-r1.ebuild new file mode 100644 index 000000000000..bf20909094ac --- /dev/null +++ b/net-fs/openafs/openafs-1.8.13-r1.ebuild @@ -0,0 +1,339 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MODULES_OPTIONAL_IUSE="modules" +inherit autotools linux-mod-r1 flag-o-matic pam systemd tmpfiles toolchain-funcs + +MY_PV=${PV/_/} +MY_P="${PN}-${MY_PV}" +KERNEL_LIMIT=6.11 + +DESCRIPTION="The OpenAFS distributed file system" +HOMEPAGE="https://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=" + https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2 + https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-doc.tar.bz2 +" + +S="${WORKDIR}/${MY_P}" + +LICENSE="IBM BSD openafs-krb5-a APSL-2" +SLOT="0" +KEYWORDS="amd64 -riscv ~sparc x86 ~amd64-linux ~x86-linux" + +IUSE="apidoc bitmap-later debug doc fuse kauth kerberos +modules +namei +ncurses perl +pthreaded-ubik selinux +supergroups tsm ubik-read-while-write" + +BDEPEND=" + dev-lang/perl + app-alternatives/lex + app-alternatives/yacc + apidoc? ( + app-text/doxygen[dot] + media-gfx/graphviz + ) + doc? ( + dev-libs/libxslt + || ( + >=dev-java/fop-2.10-r1:0 + app-text/dblatex + app-text/docbook-sgml-utils[jadetex] + ) + ) + perl? ( dev-lang/swig )" +DEPEND=" + virtual/libcrypt:= + virtual/libintl + amd64? ( tsm? ( app-backup/tsm ) ) + doc? ( + app-text/docbook-xsl-stylesheets + app-text/docbook-xml-dtd:4.3 + ) + fuse? ( sys-fs/fuse:0= ) + kauth? ( sys-libs/pam ) + kerberos? ( virtual/krb5 ) + ncurses? ( sys-libs/ncurses:0= )" +RDEPEND=" + ${DEPEND} + selinux? ( sec-policy/selinux-afs )" + +PATCHES=( + "${FILESDIR}"/0001-autoconf-use-AC_CHECK_TOOL-for-as-and-ld.patch + "${FILESDIR}"/0002-pam-paths.patch + "${FILESDIR}"/0003-fbsd.patch + "${FILESDIR}"/0004-sparc.patch + "${FILESDIR}"/0005-uname.patch + "${FILESDIR}"/0006-resolv.patch + "${FILESDIR}"/0007-afsauthent-symbols.patch + "${FILESDIR}"/0008-flags.patch + "${FILESDIR}"/0009-docbook2pdf.patch + "${FILESDIR}"/0010-libperl.patch + "${FILESDIR}"/0011-xbsa.patch + "${FILESDIR}"/0012-xml-dtd.patch + "${FILESDIR}"/0013-kernel-cc-ld.patch +) +CONFIG_CHECK="~!AFS_FS KEYS" +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" + +pkg_pretend() { + if use modules && use kernel_linux && kernel_is -ge ${KERNEL_LIMIT/\./ } ; then + ewarn "Gentoo supports kernels which are supported by OpenAFS" + ewarn "which are limited to the kernel versions: < ${KERNEL_LIMIT}" + ewarn "" + ewarn "You are free to utilize eapply_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." + ewarn "" + ewarn "Alternatively, you may:" + ewarn "1. Use OpenAFS FUSE client, build OpenAFS with USE=fuse to enable it." + ewarn "2. Use native kernel AFS client: configure your kernel with CONFIG_AFS_FS." + ewarn "net-fs/openafs is not required in this case, but client's functionality will be limited." + fi +} + +pkg_setup() { + use kernel_linux && linux-mod-r1_pkg_setup +} + +src_prepare() { + default + + # fixing 2-nd level makefiles to honor flags + sed -i -r 's/\/s:<([^>]*)>::' \ + "${ED}"/usr/include/*.h \ + "${ED}"/usr/include/*/*.h \ + || die + + # minimal documentation + use kauth && doman src/pam/pam_afs.5 + DOCS=( "${FILESDIR}/README.Gentoo" src/afsd/CellServDB NEWS README ) + + # documentation package + rm -rf doc/txt/winnotes || die # unneeded docs + if use doc; then + DOCS+=( doc/{pdf,protocol,txt} CODING CONTRIBUTING ) + newdoc doc/xml/AdminGuide/auagd000.pdf AdminGuide.pdf + newdoc doc/xml/AdminRef/auarf000.pdf AdminRef.pdf + newdoc doc/xml/QuickStartUnix/auqbg000.pdf QuickStartUnix.pdf + newdoc doc/xml/UserGuide/auusg000.pdf UserGuide.pdf + fi + use apidoc && DOCS+=( doc/doxygen/output/html ) + 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 + dotmpfiles "${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() { + use kernel_linux && linux-mod-r1_pkg_postinst + + tmpfiles_process openafs-client.conf + + 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." +} diff --git a/net-fs/openafs/openafs-1.8.13.ebuild b/net-fs/openafs/openafs-1.8.13.ebuild deleted file mode 100644 index 4bd2ca38310f..000000000000 --- a/net-fs/openafs/openafs-1.8.13.ebuild +++ /dev/null @@ -1,339 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -MODULES_OPTIONAL_IUSE="modules" -inherit autotools linux-mod-r1 flag-o-matic pam systemd tmpfiles toolchain-funcs - -MY_PV=${PV/_/} -MY_P="${PN}-${MY_PV}" -KERNEL_LIMIT=6.11 - -DESCRIPTION="The OpenAFS distributed file system" -HOMEPAGE="https://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=" - https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2 - https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-doc.tar.bz2 -" - -S="${WORKDIR}/${MY_P}" - -LICENSE="IBM BSD openafs-krb5-a APSL-2" -SLOT="0" -KEYWORDS="amd64 -riscv ~sparc x86 ~amd64-linux ~x86-linux" - -IUSE="apidoc bitmap-later debug doc fuse kauth kerberos +modules +namei -ncurses perl +pthreaded-ubik selinux +supergroups tsm ubik-read-while-write" - -BDEPEND=" - dev-lang/perl - app-alternatives/lex - app-alternatives/yacc - apidoc? ( - app-text/doxygen[dot] - media-gfx/graphviz - ) - doc? ( - dev-libs/libxslt - || ( - dev-java/fop - app-text/dblatex - app-text/docbook-sgml-utils[jadetex] - ) - ) - perl? ( dev-lang/swig )" -DEPEND=" - virtual/libcrypt:= - virtual/libintl - amd64? ( tsm? ( app-backup/tsm ) ) - doc? ( - app-text/docbook-xsl-stylesheets - app-text/docbook-xml-dtd:4.3 - ) - fuse? ( sys-fs/fuse:0= ) - kauth? ( sys-libs/pam ) - kerberos? ( virtual/krb5 ) - ncurses? ( sys-libs/ncurses:0= )" -RDEPEND=" - ${DEPEND} - selinux? ( sec-policy/selinux-afs )" - -PATCHES=( - "${FILESDIR}"/0001-autoconf-use-AC_CHECK_TOOL-for-as-and-ld.patch - "${FILESDIR}"/0002-pam-paths.patch - "${FILESDIR}"/0003-fbsd.patch - "${FILESDIR}"/0004-sparc.patch - "${FILESDIR}"/0005-uname.patch - "${FILESDIR}"/0006-resolv.patch - "${FILESDIR}"/0007-afsauthent-symbols.patch - "${FILESDIR}"/0008-flags.patch - "${FILESDIR}"/0009-docbook2pdf.patch - "${FILESDIR}"/0010-libperl.patch - "${FILESDIR}"/0011-xbsa.patch - "${FILESDIR}"/0012-xml-dtd.patch - "${FILESDIR}"/0013-kernel-cc-ld.patch -) -CONFIG_CHECK="~!AFS_FS KEYS" -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" - -pkg_pretend() { - if use modules && use kernel_linux && kernel_is -ge ${KERNEL_LIMIT/\./ } ; then - ewarn "Gentoo supports kernels which are supported by OpenAFS" - ewarn "which are limited to the kernel versions: < ${KERNEL_LIMIT}" - ewarn "" - ewarn "You are free to utilize eapply_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." - ewarn "" - ewarn "Alternatively, you may:" - ewarn "1. Use OpenAFS FUSE client, build OpenAFS with USE=fuse to enable it." - ewarn "2. Use native kernel AFS client: configure your kernel with CONFIG_AFS_FS." - ewarn "net-fs/openafs is not required in this case, but client's functionality will be limited." - fi -} - -pkg_setup() { - use kernel_linux && linux-mod-r1_pkg_setup -} - -src_prepare() { - default - - # fixing 2-nd level makefiles to honor flags - sed -i -r 's/\/s:<([^>]*)>::' \ - "${ED}"/usr/include/*.h \ - "${ED}"/usr/include/*/*.h \ - || die - - # minimal documentation - use kauth && doman src/pam/pam_afs.5 - DOCS=( "${FILESDIR}/README.Gentoo" src/afsd/CellServDB NEWS README ) - - # documentation package - rm -rf doc/txt/winnotes || die # unneeded docs - if use doc; then - DOCS+=( doc/{pdf,protocol,txt} CODING CONTRIBUTING ) - newdoc doc/xml/AdminGuide/auagd000.pdf AdminGuide.pdf - newdoc doc/xml/AdminRef/auarf000.pdf AdminRef.pdf - newdoc doc/xml/QuickStartUnix/auqbg000.pdf QuickStartUnix.pdf - newdoc doc/xml/UserGuide/auusg000.pdf UserGuide.pdf - fi - use apidoc && DOCS+=( doc/doxygen/output/html ) - 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 - dotmpfiles "${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() { - use kernel_linux && linux-mod-r1_pkg_postinst - - tmpfiles_process openafs-client.conf - - 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." -} diff --git a/net-fs/openafs/openafs-1.8.7-r1.ebuild b/net-fs/openafs/openafs-1.8.7-r1.ebuild new file mode 100644 index 000000000000..4ece01979b10 --- /dev/null +++ b/net-fs/openafs/openafs-1.8.7-r1.ebuild @@ -0,0 +1,338 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MODULES_OPTIONAL_USE="modules" +inherit autotools linux-mod flag-o-matic pam systemd tmpfiles toolchain-funcs + +MY_PV=${PV/_/} +MY_P="${PN}-${MY_PV}" +PVER=20210116 +KERNEL_LIMIT=5.11 + +DESCRIPTION="The OpenAFS distributed file system" +HOMEPAGE="https://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=" + https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2 + https://openafs.org/dl/openafs/${MY_PRE}${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 -riscv ~sparc x86 ~amd64-linux ~x86-linux" + +IUSE="apidoc bitmap-later debug doc fuse kauth kerberos +modules +namei +ncurses perl +pthreaded-ubik selinux +supergroups tsm ubik-read-while-write" + +BDEPEND=" + dev-lang/perl + app-alternatives/lex + app-alternatives/yacc + apidoc? ( + app-text/doxygen[dot] + media-gfx/graphviz + ) + doc? ( + dev-libs/libxslt + || ( + >=dev-java/fop-2.10-r1:0 + app-text/dblatex + app-text/docbook-sgml-utils[jadetex] + ) + ) + perl? ( dev-lang/swig )" +DEPEND=" + !net-fs/openafs-kernel + virtual/libintl + amd64? ( tsm? ( app-backup/tsm ) ) + doc? ( + app-text/docbook-xsl-stylesheets + app-text/docbook-xml-dtd:4.3 + ) + fuse? ( sys-fs/fuse:0= ) + kauth? ( sys-libs/pam ) + kerberos? ( virtual/krb5 ) + ncurses? ( sys-libs/ncurses:0= )" +RDEPEND=" + ${DEPEND} + selinux? ( sec-policy/selinux-afs )" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( "${WORKDIR}/gentoo/patches" ) + +CONFIG_CHECK="~!AFS_FS KEYS" +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" + +pkg_pretend() { + if use modules && use kernel_linux && kernel_is -ge ${KERNEL_LIMIT/\./ } ; then + ewarn "Gentoo supports kernels which are supported by OpenAFS" + ewarn "which are limited to the kernel versions: < ${KERNEL_LIMIT}" + ewarn "" + ewarn "You are free to utilize eapply_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." + ewarn "" + ewarn "Alternatively, you may:" + ewarn "1. Use OpenAFS FUSE client, build OpenAFS with USE=fuse to enable it." + ewarn "2. Use native kernel AFS client: configure your kernel with CONFIG_AFS_FS." + ewarn "net-fs/openafs is not required in this case, but client's functionality will be limited." + fi +} + +pkg_setup() { + use kernel_linux && linux-mod_pkg_setup +} + +src_prepare() { + default + + # fixing 2-nd level makefiles to honor flags + sed -i -r 's/\ "${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 kauth; 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* || die + + # avoid collision with mit_krb5's version of kpasswd + if use kauth; then + mv "${ED}"/usr/bin/kpasswd{,_afs} || die + mv "${ED}"/usr/share/man/man1/kpasswd{,_afs}.1 || die + fi + + # avoid collision with heimdal's pagsh + if has_version app-crypt/heimdal; then + mv "${ED}"/usr/bin/pagsh{,_afs} || die + mv "${ED}"/usr/share/man/man1/pagsh{,_afs}.1 || die + fi + + # 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:<([^>]*)>::' \ + "${ED}"/usr/include/*.h \ + "${ED}"/usr/include/*/*.h \ + || die + + # minimal documentation + use kauth && doman src/pam/pam_afs.5 + DOCS=( "${WORKDIR}/gentoo/README.Gentoo" + src/afsd/CellServDB NEWS README ) + + # documentation package + rm -rf doc/txt/winnotes || die # unneeded docs + if use doc; then + DOCS+=( doc/{pdf,protocol,txt} CODING CONTRIBUTING ) + newdoc doc/xml/AdminGuide/auagd000.pdf AdminGuide.pdf + newdoc doc/xml/AdminRef/auarf000.pdf AdminRef.pdf + newdoc doc/xml/QuickStartUnix/auqbg000.pdf QuickStartUnix.pdf + newdoc doc/xml/UserGuide/auusg000.pdf UserGuide.pdf + fi + use apidoc && DOCS+=( doc/doxygen/output/html ) + 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 + dotmpfiles "${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() { + if use modules; then + # Update linker.hints file + use kernel_linux && linux-mod_pkg_postinst + fi + + tmpfiles_process openafs-client.conf + + 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_postrm() { + if use modules; then + # Update linker.hints file + use kernel_linux && linux-mod_pkg_postrm + fi +} + +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." +} diff --git a/net-fs/openafs/openafs-1.8.7.ebuild b/net-fs/openafs/openafs-1.8.7.ebuild deleted file mode 100644 index 14fcf5679111..000000000000 --- a/net-fs/openafs/openafs-1.8.7.ebuild +++ /dev/null @@ -1,338 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -MODULES_OPTIONAL_USE="modules" -inherit autotools linux-mod flag-o-matic pam systemd tmpfiles toolchain-funcs - -MY_PV=${PV/_/} -MY_P="${PN}-${MY_PV}" -PVER=20210116 -KERNEL_LIMIT=5.11 - -DESCRIPTION="The OpenAFS distributed file system" -HOMEPAGE="https://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=" - https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2 - https://openafs.org/dl/openafs/${MY_PRE}${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 -riscv ~sparc x86 ~amd64-linux ~x86-linux" - -IUSE="apidoc bitmap-later debug doc fuse kauth kerberos +modules +namei -ncurses perl +pthreaded-ubik selinux +supergroups tsm ubik-read-while-write" - -BDEPEND=" - dev-lang/perl - app-alternatives/lex - app-alternatives/yacc - apidoc? ( - app-text/doxygen[dot] - media-gfx/graphviz - ) - doc? ( - dev-libs/libxslt - || ( - dev-java/fop - app-text/dblatex - app-text/docbook-sgml-utils[jadetex] - ) - ) - perl? ( dev-lang/swig )" -DEPEND=" - !net-fs/openafs-kernel - virtual/libintl - amd64? ( tsm? ( app-backup/tsm ) ) - doc? ( - app-text/docbook-xsl-stylesheets - app-text/docbook-xml-dtd:4.3 - ) - fuse? ( sys-fs/fuse:0= ) - kauth? ( sys-libs/pam ) - kerberos? ( virtual/krb5 ) - ncurses? ( sys-libs/ncurses:0= )" -RDEPEND=" - ${DEPEND} - selinux? ( sec-policy/selinux-afs )" - -S="${WORKDIR}/${MY_P}" - -PATCHES=( "${WORKDIR}/gentoo/patches" ) - -CONFIG_CHECK="~!AFS_FS KEYS" -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" - -pkg_pretend() { - if use modules && use kernel_linux && kernel_is -ge ${KERNEL_LIMIT/\./ } ; then - ewarn "Gentoo supports kernels which are supported by OpenAFS" - ewarn "which are limited to the kernel versions: < ${KERNEL_LIMIT}" - ewarn "" - ewarn "You are free to utilize eapply_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." - ewarn "" - ewarn "Alternatively, you may:" - ewarn "1. Use OpenAFS FUSE client, build OpenAFS with USE=fuse to enable it." - ewarn "2. Use native kernel AFS client: configure your kernel with CONFIG_AFS_FS." - ewarn "net-fs/openafs is not required in this case, but client's functionality will be limited." - fi -} - -pkg_setup() { - use kernel_linux && linux-mod_pkg_setup -} - -src_prepare() { - default - - # fixing 2-nd level makefiles to honor flags - sed -i -r 's/\ "${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 kauth; 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* || die - - # avoid collision with mit_krb5's version of kpasswd - if use kauth; then - mv "${ED}"/usr/bin/kpasswd{,_afs} || die - mv "${ED}"/usr/share/man/man1/kpasswd{,_afs}.1 || die - fi - - # avoid collision with heimdal's pagsh - if has_version app-crypt/heimdal; then - mv "${ED}"/usr/bin/pagsh{,_afs} || die - mv "${ED}"/usr/share/man/man1/pagsh{,_afs}.1 || die - fi - - # 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:<([^>]*)>::' \ - "${ED}"/usr/include/*.h \ - "${ED}"/usr/include/*/*.h \ - || die - - # minimal documentation - use kauth && doman src/pam/pam_afs.5 - DOCS=( "${WORKDIR}/gentoo/README.Gentoo" - src/afsd/CellServDB NEWS README ) - - # documentation package - rm -rf doc/txt/winnotes || die # unneeded docs - if use doc; then - DOCS+=( doc/{pdf,protocol,txt} CODING CONTRIBUTING ) - newdoc doc/xml/AdminGuide/auagd000.pdf AdminGuide.pdf - newdoc doc/xml/AdminRef/auarf000.pdf AdminRef.pdf - newdoc doc/xml/QuickStartUnix/auqbg000.pdf QuickStartUnix.pdf - newdoc doc/xml/UserGuide/auusg000.pdf UserGuide.pdf - fi - use apidoc && DOCS+=( doc/doxygen/output/html ) - 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 - dotmpfiles "${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() { - if use modules; then - # Update linker.hints file - use kernel_linux && linux-mod_pkg_postinst - fi - - tmpfiles_process openafs-client.conf - - 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_postrm() { - if use modules; then - # Update linker.hints file - use kernel_linux && linux-mod_pkg_postrm - fi -} - -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." -} diff --git a/net-fs/openafs/openafs-1.8.8.1-r1.ebuild b/net-fs/openafs/openafs-1.8.8.1-r1.ebuild deleted file mode 100644 index 6dc1e1a99ab7..000000000000 --- a/net-fs/openafs/openafs-1.8.8.1-r1.ebuild +++ /dev/null @@ -1,337 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -MODULES_OPTIONAL_USE="modules" -inherit autotools linux-mod flag-o-matic pam systemd tmpfiles toolchain-funcs - -MY_PV=${PV/_/} -MY_P="${PN}-${MY_PV}" -PVER=20211212 -KERNEL_LIMIT=5.17 - -DESCRIPTION="The OpenAFS distributed file system" -HOMEPAGE="https://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=" - https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2 - https://openafs.org/dl/openafs/${MY_PRE}${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 -riscv ~sparc ~x86 ~amd64-linux ~x86-linux" - -IUSE="apidoc bitmap-later debug doc fuse kauth kerberos +modules +namei -ncurses perl +pthreaded-ubik selinux +supergroups tsm ubik-read-while-write" - -BDEPEND=" - dev-lang/perl - app-alternatives/lex - app-alternatives/yacc - apidoc? ( - app-text/doxygen[dot] - media-gfx/graphviz - ) - doc? ( - dev-libs/libxslt - || ( - dev-java/fop - app-text/dblatex - app-text/docbook-sgml-utils[jadetex] - ) - ) - perl? ( dev-lang/swig )" -DEPEND=" - !net-fs/openafs-kernel - virtual/libcrypt:= - virtual/libintl - amd64? ( tsm? ( app-backup/tsm ) ) - doc? ( - app-text/docbook-xsl-stylesheets - app-text/docbook-xml-dtd:4.3 - ) - fuse? ( sys-fs/fuse:0= ) - kauth? ( sys-libs/pam ) - kerberos? ( virtual/krb5 ) - ncurses? ( sys-libs/ncurses:0= )" -RDEPEND=" - ${DEPEND} - selinux? ( sec-policy/selinux-afs )" - -S="${WORKDIR}/${MY_P}" - -PATCHES=( "${WORKDIR}/gentoo/patches" ) - -CONFIG_CHECK="~!AFS_FS KEYS" -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" - -pkg_pretend() { - if use modules && use kernel_linux && kernel_is -ge ${KERNEL_LIMIT/\./ } ; then - ewarn "Gentoo supports kernels which are supported by OpenAFS" - ewarn "which are limited to the kernel versions: < ${KERNEL_LIMIT}" - ewarn "" - ewarn "You are free to utilize eapply_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." - ewarn "" - ewarn "Alternatively, you may:" - ewarn "1. Use OpenAFS FUSE client, build OpenAFS with USE=fuse to enable it." - ewarn "2. Use native kernel AFS client: configure your kernel with CONFIG_AFS_FS." - ewarn "net-fs/openafs is not required in this case, but client's functionality will be limited." - fi -} - -pkg_setup() { - use kernel_linux && linux-mod_pkg_setup -} - -src_prepare() { - default - - # fixing 2-nd level makefiles to honor flags - sed -i -r 's/\ "${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 kauth; 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* || die - - # avoid collision with mit_krb5's version of kpasswd - if use kauth; then - mv "${ED}"/usr/bin/kpasswd{,_afs} || die - mv "${ED}"/usr/share/man/man1/kpasswd{,_afs}.1 || die - fi - - # avoid collision with heimdal's pagsh - if has_version app-crypt/heimdal; then - mv "${ED}"/usr/bin/pagsh{,_afs} || die - mv "${ED}"/usr/share/man/man1/pagsh{,_afs}.1 || die - fi - - # 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:<([^>]*)>::' \ - "${ED}"/usr/include/*.h \ - "${ED}"/usr/include/*/*.h \ - || die - - # minimal documentation - use kauth && doman src/pam/pam_afs.5 - DOCS=( "${WORKDIR}/gentoo/README.Gentoo" - src/afsd/CellServDB NEWS README ) - - # documentation package - rm -rf doc/txt/winnotes || die # unneeded docs - if use doc; then - DOCS+=( doc/{pdf,protocol,txt} CODING CONTRIBUTING ) - newdoc doc/xml/AdminGuide/auagd000.pdf AdminGuide.pdf - newdoc doc/xml/AdminRef/auarf000.pdf AdminRef.pdf - newdoc doc/xml/QuickStartUnix/auqbg000.pdf QuickStartUnix.pdf - newdoc doc/xml/UserGuide/auusg000.pdf UserGuide.pdf - fi - use apidoc && DOCS+=( doc/doxygen/output/html ) - 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 - dotmpfiles "${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() { - if use modules; then - # Update linker.hints file - use kernel_linux && linux-mod_pkg_postinst - fi - - tmpfiles_process openafs-client.conf - - 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_postrm() { - if use modules; then - # Update linker.hints file - use kernel_linux && linux-mod_pkg_postrm - fi -} - -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." -} diff --git a/net-fs/openafs/openafs-1.8.8.1-r2.ebuild b/net-fs/openafs/openafs-1.8.8.1-r2.ebuild new file mode 100644 index 000000000000..e6033dd205cd --- /dev/null +++ b/net-fs/openafs/openafs-1.8.8.1-r2.ebuild @@ -0,0 +1,337 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MODULES_OPTIONAL_USE="modules" +inherit autotools linux-mod flag-o-matic pam systemd tmpfiles toolchain-funcs + +MY_PV=${PV/_/} +MY_P="${PN}-${MY_PV}" +PVER=20211212 +KERNEL_LIMIT=5.17 + +DESCRIPTION="The OpenAFS distributed file system" +HOMEPAGE="https://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=" + https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2 + https://openafs.org/dl/openafs/${MY_PRE}${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 -riscv ~sparc ~x86 ~amd64-linux ~x86-linux" + +IUSE="apidoc bitmap-later debug doc fuse kauth kerberos +modules +namei +ncurses perl +pthreaded-ubik selinux +supergroups tsm ubik-read-while-write" + +BDEPEND=" + dev-lang/perl + app-alternatives/lex + app-alternatives/yacc + apidoc? ( + app-text/doxygen[dot] + media-gfx/graphviz + ) + doc? ( + dev-libs/libxslt + || ( + >=dev-java/fop-2.10-r1:0 + app-text/dblatex + app-text/docbook-sgml-utils[jadetex] + ) + ) + perl? ( dev-lang/swig )" +DEPEND=" + !net-fs/openafs-kernel + virtual/libcrypt:= + virtual/libintl + amd64? ( tsm? ( app-backup/tsm ) ) + doc? ( + app-text/docbook-xsl-stylesheets + app-text/docbook-xml-dtd:4.3 + ) + fuse? ( sys-fs/fuse:0= ) + kauth? ( sys-libs/pam ) + kerberos? ( virtual/krb5 ) + ncurses? ( sys-libs/ncurses:0= )" +RDEPEND=" + ${DEPEND} + selinux? ( sec-policy/selinux-afs )" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( "${WORKDIR}/gentoo/patches" ) + +CONFIG_CHECK="~!AFS_FS KEYS" +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" + +pkg_pretend() { + if use modules && use kernel_linux && kernel_is -ge ${KERNEL_LIMIT/\./ } ; then + ewarn "Gentoo supports kernels which are supported by OpenAFS" + ewarn "which are limited to the kernel versions: < ${KERNEL_LIMIT}" + ewarn "" + ewarn "You are free to utilize eapply_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." + ewarn "" + ewarn "Alternatively, you may:" + ewarn "1. Use OpenAFS FUSE client, build OpenAFS with USE=fuse to enable it." + ewarn "2. Use native kernel AFS client: configure your kernel with CONFIG_AFS_FS." + ewarn "net-fs/openafs is not required in this case, but client's functionality will be limited." + fi +} + +pkg_setup() { + use kernel_linux && linux-mod_pkg_setup +} + +src_prepare() { + default + + # fixing 2-nd level makefiles to honor flags + sed -i -r 's/\ "${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 kauth; 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* || die + + # avoid collision with mit_krb5's version of kpasswd + if use kauth; then + mv "${ED}"/usr/bin/kpasswd{,_afs} || die + mv "${ED}"/usr/share/man/man1/kpasswd{,_afs}.1 || die + fi + + # avoid collision with heimdal's pagsh + if has_version app-crypt/heimdal; then + mv "${ED}"/usr/bin/pagsh{,_afs} || die + mv "${ED}"/usr/share/man/man1/pagsh{,_afs}.1 || die + fi + + # 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:<([^>]*)>::' \ + "${ED}"/usr/include/*.h \ + "${ED}"/usr/include/*/*.h \ + || die + + # minimal documentation + use kauth && doman src/pam/pam_afs.5 + DOCS=( "${WORKDIR}/gentoo/README.Gentoo" + src/afsd/CellServDB NEWS README ) + + # documentation package + rm -rf doc/txt/winnotes || die # unneeded docs + if use doc; then + DOCS+=( doc/{pdf,protocol,txt} CODING CONTRIBUTING ) + newdoc doc/xml/AdminGuide/auagd000.pdf AdminGuide.pdf + newdoc doc/xml/AdminRef/auarf000.pdf AdminRef.pdf + newdoc doc/xml/QuickStartUnix/auqbg000.pdf QuickStartUnix.pdf + newdoc doc/xml/UserGuide/auusg000.pdf UserGuide.pdf + fi + use apidoc && DOCS+=( doc/doxygen/output/html ) + 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 + dotmpfiles "${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() { + if use modules; then + # Update linker.hints file + use kernel_linux && linux-mod_pkg_postinst + fi + + tmpfiles_process openafs-client.conf + + 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_postrm() { + if use modules; then + # Update linker.hints file + use kernel_linux && linux-mod_pkg_postrm + fi +} + +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." +} -- cgit v1.2.3