1 |
commit: 02de47a7e1ba20c3fa1ff9ca056c4733fcb2da76 |
2 |
Author: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 6 23:58:37 2019 +0000 |
4 |
Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 7 00:34:08 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02de47a7 |
7 |
|
8 |
net-fs/openafs: remove old |
9 |
|
10 |
Package-Manager: Portage-2.3.54, Repoman-2.3.12 |
11 |
Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org> |
12 |
|
13 |
net-fs/openafs/openafs-1.8.2.ebuild | 339 ------------------------------------ |
14 |
1 file changed, 339 deletions(-) |
15 |
|
16 |
diff --git a/net-fs/openafs/openafs-1.8.2.ebuild b/net-fs/openafs/openafs-1.8.2.ebuild |
17 |
deleted file mode 100644 |
18 |
index 014a155941d..00000000000 |
19 |
--- a/net-fs/openafs/openafs-1.8.2.ebuild |
20 |
+++ /dev/null |
21 |
@@ -1,339 +0,0 @@ |
22 |
-# Copyright 1999-2019 Gentoo Authors |
23 |
-# Distributed under the terms of the GNU General Public License v2 |
24 |
- |
25 |
-EAPI=7 |
26 |
- |
27 |
-inherit autotools linux-mod flag-o-matic pam systemd toolchain-funcs |
28 |
- |
29 |
-MY_PV=${PV/_/} |
30 |
-MY_P="${PN}-${MY_PV}" |
31 |
-PVER=20190106 |
32 |
-KERNEL_LIMIT=4.21 |
33 |
- |
34 |
-DESCRIPTION="The OpenAFS distributed file system" |
35 |
-HOMEPAGE="https://www.openafs.org/" |
36 |
-# We always d/l the doc tarball as man pages are not USE=doc material |
37 |
-[[ ${PV} == *_pre* ]] && MY_PRE="candidate/" || MY_PRE="" |
38 |
-SRC_URI=" |
39 |
- https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2 |
40 |
- https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-doc.tar.bz2 |
41 |
- https://dev.gentoo.org/~bircoph/afs/${PN}-patches-${PVER}.tar.xz |
42 |
-" |
43 |
- |
44 |
-LICENSE="IBM BSD openafs-krb5-a APSL-2" |
45 |
-SLOT="0" |
46 |
-KEYWORDS="~amd64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" |
47 |
- |
48 |
-IUSE="api bitmap-later debug doc fuse kauth kerberos +modules +namei |
49 |
-ncurses perl +pthreaded-ubik +supergroups tsm ubik-read-while-write" |
50 |
- |
51 |
-BDEPEND=" |
52 |
- dev-lang/perl |
53 |
- sys-devel/flex |
54 |
- virtual/yacc |
55 |
- api? ( |
56 |
- app-doc/doxygen |
57 |
- media-gfx/graphviz |
58 |
- ) |
59 |
- doc? ( |
60 |
- app-text/docbook-xsl-stylesheets |
61 |
- app-text/docbook-xml-dtd |
62 |
- dev-libs/libxslt |
63 |
- || ( |
64 |
- dev-java/fop |
65 |
- app-text/dblatex |
66 |
- app-text/docbook-sgml-utils[jadetex] |
67 |
- ) |
68 |
- ) |
69 |
- perl? ( dev-lang/swig )" |
70 |
-DEPEND=" |
71 |
- !net-fs/openafs-kernel |
72 |
- virtual/libintl |
73 |
- amd64? ( tsm? ( app-backup/tsm ) ) |
74 |
- fuse? ( sys-fs/fuse:0= ) |
75 |
- kauth? ( virtual/pam ) |
76 |
- kerberos? ( virtual/krb5 ) |
77 |
- ncurses? ( sys-libs/ncurses:0= )" |
78 |
-DEPEND="${RDEPEND}" |
79 |
- |
80 |
-S="${WORKDIR}/${MY_P}" |
81 |
- |
82 |
-PATCHES=( "${WORKDIR}/gentoo/patches" ) |
83 |
- |
84 |
-CONFIG_CHECK="~!AFS_FS KEYS" |
85 |
-ERROR_AFS_FS="OpenAFS conflicts with the in-kernel AFS-support. Make sure not to load both at the same time!" |
86 |
-ERROR_KEYS="OpenAFS needs CONFIG_KEYS option enabled" |
87 |
-MODULES_OPTIONAL_USE="modules" |
88 |
- |
89 |
-QA_TEXTRELS_x86_fbsd="/boot/modules/libafs.ko" |
90 |
-QA_TEXTRELS_amd64_fbsd="/boot/modules/libafs.ko" |
91 |
- |
92 |
-pkg_pretend() { |
93 |
- if use modules && use kernel_linux && kernel_is -ge ${KERNEL_LIMIT/\./ } ; then |
94 |
- ewarn "Gentoo supports kernels which are supported by OpenAFS" |
95 |
- ewarn "which are limited to the kernel versions: < ${KERNEL_LIMIT}" |
96 |
- ewarn "" |
97 |
- ewarn "You are free to utilize epatch_user to provide whatever" |
98 |
- ewarn "support you feel is appropriate, but will not receive" |
99 |
- ewarn "support as a result of those changes." |
100 |
- ewarn "" |
101 |
- ewarn "Please do not file a bug report about this." |
102 |
- ewarn "" |
103 |
- ewarn "Alternatively, you may:" |
104 |
- ewarn "1. Use OpenAFS FUSE client, build OpenAFS with USE=fuse to enable it." |
105 |
- ewarn "2. Use native kernel AFS client: configure your kernel with CONFIG_AFS_FS." |
106 |
- ewarn "net-fs/openafs is not required in this case, but client's functionality will be limited." |
107 |
- fi |
108 |
-} |
109 |
- |
110 |
-pkg_setup() { |
111 |
- use kernel_linux && linux-mod_pkg_setup |
112 |
-} |
113 |
- |
114 |
-src_prepare() { |
115 |
- default |
116 |
- |
117 |
- # fixing 2-nd level makefiles to honor flags |
118 |
- sed -i -r 's/\<CFLAGS[[:space:]]*=/CFLAGS+=/; s/\<LDFLAGS[[:space:]]*=/LDFLAGS+=/' \ |
119 |
- src/*/Makefile.in || die '*/Makefile.in sed failed' |
120 |
- # fix xml docs to use local dtd files |
121 |
- sed -i 's|http://www.oasis-open.org/docbook/xml/4.3|/usr/share/sgml/docbook/xml-dtd-4.3|' \ |
122 |
- doc/xml/*/*000.xml || die |
123 |
- |
124 |
- # packaging is f-ed up, so we can't run eautoreconf |
125 |
- # run autotools commands based on what is listed in regen.sh |
126 |
- eaclocal -I src/cf -I src/external/rra-c-util/m4 |
127 |
- eautoconf |
128 |
- eautoconf -o configure-libafs configure-libafs.ac |
129 |
- eautoheader |
130 |
- einfo "Deleting autom4te.cache directory" |
131 |
- rm -rf autom4te.cache || die |
132 |
-} |
133 |
- |
134 |
-src_configure() { |
135 |
- local -a myconf |
136 |
- |
137 |
- if use debug; then |
138 |
- use kauth && myconf+=( --enable-debug-pam ) |
139 |
- use modules && myconf+=( --enable-debug-kernel ) |
140 |
- fi |
141 |
- |
142 |
- if use modules; then |
143 |
- if use kernel_linux; then |
144 |
- if kernel_is -ge 3 17 && kernel_is -le 3 17 2; then |
145 |
- myconf+=( --enable-linux-d_splice_alias-extra-iput ) |
146 |
- fi |
147 |
- myconf+=( --with-linux-kernel-headers="${KV_DIR}" \ |
148 |
- --with-linux-kernel-build="${KV_OUT_DIR}" ) |
149 |
- elif use kernel_FreeBSD; then |
150 |
- myconf+=( --with-bsd-kernel-build="${BSD_BUILD_DIR}" ) |
151 |
- fi |
152 |
- fi |
153 |
- |
154 |
- use amd64 && use tsm && myconf+=( --enable-tivoli-tsm ) |
155 |
- |
156 |
- local ARCH="$(tc-arch-kernel)" |
157 |
- local MY_ARCH="$(tc-arch)" |
158 |
- local BSD_BUILD_DIR="/usr/src/sys/${MY_ARCH}/compile/GENERIC" |
159 |
- |
160 |
- AFS_SYSKVERS=26 \ |
161 |
- econf \ |
162 |
- --disable-strip-binaries \ |
163 |
- $(use_enable bitmap-later) \ |
164 |
- $(use_enable debug) \ |
165 |
- $(use_enable debug debug-locks) \ |
166 |
- $(use_enable debug debug-lwp) \ |
167 |
- $(use_enable fuse fuse-client) \ |
168 |
- $(use_enable kauth) \ |
169 |
- $(use_enable modules kernel-module) \ |
170 |
- $(use_enable namei namei-fileserver) \ |
171 |
- $(use_enable ncurses gtx) \ |
172 |
- $(use_enable pthreaded-ubik) \ |
173 |
- $(use_enable supergroups) \ |
174 |
- $(use_enable ubik-read-while-write) \ |
175 |
- $(use_with api dot) \ |
176 |
- $(use_with doc docbook-stylesheets /usr/share/sgml/docbook/xsl-stylesheets) \ |
177 |
- $(use_with kerberos krb5) \ |
178 |
- $(use_with kerberos gssapi) \ |
179 |
- $(use_with perl swig) \ |
180 |
- "${myconf[@]}" |
181 |
-} |
182 |
- |
183 |
-src_compile() { |
184 |
- ARCH="$(tc-arch-kernel)" AR="$(tc-getAR)" emake V=1 |
185 |
- local d |
186 |
- if use doc; then |
187 |
- emake -C doc/xml/AdminGuide auagd000.pdf |
188 |
- emake -C doc/xml/AdminRef auarf000.pdf |
189 |
- emake -C doc/xml/QuickStartUnix auqbg000.pdf |
190 |
- emake -C doc/xml/UserGuide auusg000.pdf |
191 |
- fi |
192 |
- use api && doxygen doc/doxygen/Doxyfile |
193 |
-} |
194 |
- |
195 |
-src_install() { |
196 |
- local OPENRCDIR="${WORKDIR}/gentoo/openrc" |
197 |
- local SYSTEMDDIR="${WORKDIR}/gentoo/systemd" |
198 |
- |
199 |
- emake DESTDIR="${ED}" install_nolibafs |
200 |
- |
201 |
- if use modules; then |
202 |
- if use kernel_linux; then |
203 |
- local srcdir=$(expr "${S}"/src/libafs/MODLOAD-*) |
204 |
- [[ -f ${srcdir}/libafs.${KV_OBJ} ]] || die "Couldn't find compiled kernel module" |
205 |
- |
206 |
- MODULE_NAMES="libafs(fs/openafs:${srcdir})" |
207 |
- |
208 |
- linux-mod_src_install |
209 |
- elif use kernel_FreeBSD; then |
210 |
- insinto /boot/modules |
211 |
- doins "${S}"/src/libafs/MODLOAD/libafs.ko |
212 |
- fi |
213 |
- fi |
214 |
- |
215 |
- insinto /etc/openafs |
216 |
- doins src/afsd/CellServDB |
217 |
- echo "/afs:/var/cache/openafs:200000" > "${ED}"/etc/openafs/cacheinfo |
218 |
- echo "openafs.org" > "${ED}"/etc/openafs/ThisCell |
219 |
- |
220 |
- # pam_afs and pam_afs.krb have been installed in irregular locations, fix |
221 |
- if use kauth; then |
222 |
- dopammod "${ED}"/usr/$(get_libdir)/pam_afs* |
223 |
- fi |
224 |
- rm -f "${ED}"/usr/$(get_libdir)/pam_afs* || die |
225 |
- |
226 |
- # remove kdump stuff provided by kexec-tools #222455 |
227 |
- rm -rf "${ED}"/usr/sbin/kdump* || die |
228 |
- |
229 |
- # avoid collision with mit_krb5's version of kpasswd |
230 |
- if use kauth; then |
231 |
- mv "${ED}"/usr/bin/kpasswd{,_afs} || die |
232 |
- mv "${ED}"/usr/share/man/man1/kpasswd{,_afs}.1 || die |
233 |
- fi |
234 |
- |
235 |
- # avoid collision with heimdal's pagsh |
236 |
- if has_version app-crypt/heimdal; then |
237 |
- mv "${ED}"/usr/bin/pagsh{,_afs} || die |
238 |
- mv "${ED}"/usr/share/man/man1/pagsh{,_afs}.1 || die |
239 |
- fi |
240 |
- |
241 |
- # move lwp stuff around #200674 #330061 |
242 |
- mv "${ED}"/usr/include/{lwp,lock,timer}.h "${ED}"/usr/include/afs/ || die |
243 |
- mv "${ED}"/usr/$(get_libdir)/liblwp* "${ED}"/usr/$(get_libdir)/afs/ || die |
244 |
- # update paths to the relocated lwp headers |
245 |
- sed -ri \ |
246 |
- -e '/^#include <(lwp|lock|timer).h>/s:<([^>]*)>:<afs/\1>:' \ |
247 |
- "${ED}"/usr/include/*.h \ |
248 |
- "${ED}"/usr/include/*/*.h \ |
249 |
- || die |
250 |
- |
251 |
- # minimal documentation |
252 |
- use kauth && doman src/pam/pam_afs.5 |
253 |
- DOCS=( "${WORKDIR}/gentoo/README.Gentoo" |
254 |
- src/afsd/CellServDB NEWS README ) |
255 |
- |
256 |
- # documentation package |
257 |
- rm -rf doc/txt/winnotes || die # unneeded docs |
258 |
- if use doc; then |
259 |
- DOCS+=( doc/{pdf,protocol,txt} CODING CONTRIBUTING ) |
260 |
- newdoc doc/xml/AdminGuide/auagd000.pdf AdminGuide.pdf |
261 |
- newdoc doc/xml/AdminRef/auarf000.pdf AdminRef.pdf |
262 |
- newdoc doc/xml/QuickStartUnix/auqbg000.pdf QuickStartUnix.pdf |
263 |
- newdoc doc/xml/UserGuide/auusg000.pdf UserGuide.pdf |
264 |
- fi |
265 |
- use api && DOCS+=( doc/doxygen/output/html ) |
266 |
- einstalldocs |
267 |
- |
268 |
- # Gentoo related scripts |
269 |
- newinitd "${OPENRCDIR}"/openafs-client.initd openafs-client |
270 |
- newconfd "${OPENRCDIR}"/openafs-client.confd openafs-client |
271 |
- newinitd "${OPENRCDIR}"/openafs-server.initd openafs-server |
272 |
- newconfd "${OPENRCDIR}"/openafs-server.confd openafs-server |
273 |
- systemd_dotmpfilesd "${SYSTEMDDIR}"/tmpfiles.d/openafs-client.conf |
274 |
- systemd_dounit "${SYSTEMDDIR}"/openafs-client.service |
275 |
- systemd_dounit "${SYSTEMDDIR}"/openafs-server.service |
276 |
- systemd_install_serviced "${SYSTEMDDIR}"/openafs-client.service.conf |
277 |
- systemd_install_serviced "${SYSTEMDDIR}"/openafs-server.service.conf |
278 |
- |
279 |
- # used directories: client |
280 |
- keepdir /etc/openafs |
281 |
- |
282 |
- # used directories: server |
283 |
- keepdir /etc/openafs/server |
284 |
- diropts -m0700 |
285 |
- keepdir /var/lib/openafs |
286 |
- keepdir /var/lib/openafs/db |
287 |
- diropts -m0755 |
288 |
- keepdir /var/lib/openafs/logs |
289 |
- |
290 |
- # link logfiles to /var/log |
291 |
- dosym ../lib/openafs/logs /var/log/openafs |
292 |
-} |
293 |
- |
294 |
-pkg_preinst() { |
295 |
- ## Somewhat intelligently install default configuration files |
296 |
- ## (when they are not present) |
297 |
- local x |
298 |
- for x in cacheinfo CellServDB ThisCell ; do |
299 |
- if [ -e "${EROOT}"/etc/openafs/${x} ] ; then |
300 |
- cp "${EROOT}"/etc/openafs/${x} "${ED}"/etc/openafs/ |
301 |
- fi |
302 |
- done |
303 |
-} |
304 |
- |
305 |
-pkg_postinst() { |
306 |
- if use modules; then |
307 |
- # Update linker.hints file |
308 |
- use kernel_FreeBSD && /usr/sbin/kldxref "${EPREFIX}/boot/modules" |
309 |
- use kernel_linux && linux-mod_pkg_postinst |
310 |
- fi |
311 |
- |
312 |
- elog "This installation should work out of the box (at least the" |
313 |
- elog "client part doing global afs-cell browsing, unless you had" |
314 |
- elog "a previous and different configuration). If you want to" |
315 |
- elog "set up your own cell or modify the standard config," |
316 |
- elog "please have a look at the Gentoo OpenAFS documentation" |
317 |
- elog "(warning: it is not yet up to date wrt the new file locations)" |
318 |
- elog |
319 |
- elog "The documentation can be found at:" |
320 |
- elog " https://wiki.gentoo.org/wiki/OpenAFS" |
321 |
- elog |
322 |
- elog "Systemd users should run emerge --config ${CATEGORY}/${PN} before" |
323 |
- elog "first use and whenever ${EROOT}/etc/openafs/cacheinfo is edited." |
324 |
-} |
325 |
- |
326 |
-pkg_postrm() { |
327 |
- if use modules; then |
328 |
- # Update linker.hints file |
329 |
- use kernel_FreeBSD && /usr/sbin/kldxref "${EPREFIX}/boot/modules" |
330 |
- use kernel_linux && linux-mod_pkg_postrm |
331 |
- fi |
332 |
-} |
333 |
- |
334 |
-pkg_config() { |
335 |
- elog "Setting cache options for systemd." |
336 |
- |
337 |
- SERVICED_FILE="${EROOT}"/etc/systemd/system/openafs-client.service.d/00gentoo.conf |
338 |
- [ ! -e "${SERVICED_FILE}" ] && die "Systemd service.d file ${SERVICED_FILE} not found." |
339 |
- |
340 |
- CACHESIZE=$(cut -d ':' -f 3 "${EROOT}"/etc/openafs/cacheinfo) |
341 |
- [ -z ${CACHESIZE} ] && die "Failed to parse ${EROOT}/etc/openafs/cacheinfo." |
342 |
- |
343 |
- if [ ${CACHESIZE} -lt 131070 ]; then |
344 |
- AFSD_CACHE_ARGS="-stat 300 -dcache 100 -daemons 2 -volumes 50" |
345 |
- elif [ ${CACHESIZE} -lt 524288 ]; then |
346 |
- AFSD_CACHE_ARGS="-stat 2000 -dcache 800 -daemons 3 -volumes 70" |
347 |
- elif [ ${CACHESIZE} -lt 1048576 ]; then |
348 |
- AFSD_CACHE_ARGS="-stat 2800 -dcache 2400 -daemons 5 -volumes 128" |
349 |
- elif [ ${CACHESIZE} -lt 2209715 ]; then |
350 |
- AFSD_CACHE_ARGS="-stat 3600 -dcache 3600 -daemons 5 -volumes 196 -files 50000" |
351 |
- else |
352 |
- AFSD_CACHE_ARGS="-stat 4000 -dcache 4000 -daemons 6 -volumes 256 -files 50000" |
353 |
- fi |
354 |
- |
355 |
- # Replace existing env var if exists, else append line |
356 |
- grep -q "^Environment=\"AFSD_CACHE_ARGS=" "${SERVICED_FILE}" && \ |
357 |
- sed -i "s/^Environment=\"AFSD_CACHE_ARGS=.*/Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"/" "${SERVICED_FILE}" || \ |
358 |
- sed -i "$ a\Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"" "${SERVICED_FILE}" || \ |
359 |
- die "Updating ${SERVICED_FILE} failed." |
360 |
-} |