1 |
commit: c13a871446d8632c473fc7eed27fd33862895e54 |
2 |
Author: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Nov 29 18:47:00 2020 +0000 |
4 |
Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Nov 29 19:14:07 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c13a8714 |
7 |
|
8 |
net-fs/openafs: remove old versions |
9 |
|
10 |
Bug: https://bugs.gentoo.org/719136 |
11 |
Closes: https://bugs.gentoo.org/642542 |
12 |
Package-Manager: Portage-3.0.10, Repoman-3.0.2 |
13 |
Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org> |
14 |
|
15 |
net-fs/openafs/Manifest | 5 - |
16 |
net-fs/openafs/openafs-1.6.22.1.ebuild | 222 --------------------------------- |
17 |
net-fs/openafs/openafs-1.6.22.2.ebuild | 222 --------------------------------- |
18 |
3 files changed, 449 deletions(-) |
19 |
|
20 |
diff --git a/net-fs/openafs/Manifest b/net-fs/openafs/Manifest |
21 |
index f0d76e99bc7..d37d811001a 100644 |
22 |
--- a/net-fs/openafs/Manifest |
23 |
+++ b/net-fs/openafs/Manifest |
24 |
@@ -1,8 +1,3 @@ |
25 |
-DIST openafs-1.6.22.1-doc.tar.bz2 3534064 BLAKE2B e9f67fb42b6c4e6c2092e713e801db5479beccb1e3dc6d48c16e655151dcf91693497c4ee57c47c98c52cba6eb0ad271698ed450487bdb462111a9276cb1eb74 SHA512 1c9481507824a450d6610dbbb427bdbccb3373e12bae0bf603ec121023ee7bbb05fef366f5eec793736b0643d0f6e8f611bc55473c71a831e3b31970420ec44c |
26 |
-DIST openafs-1.6.22.1-src.tar.bz2 14682183 BLAKE2B a01e08f30f28dda9484407bbe0568df7b517e587b6e2475d669269e09745050bee955438dfeab9d86564dbc22821bc2fb417c15f8add0aae6acdde266c080df0 SHA512 901959051f60f7ffa2db8a253a16f9460713e3637a53f0b6b05e72247e08b633951116dc28b19db9c7448d8ebc7a20a8a851d5356c52f16c28f5c89209f8190e |
27 |
-DIST openafs-1.6.22.2-doc.tar.bz2 3533975 BLAKE2B a44b39291ece3d4b1f9f9e722b35f48698063e4daecb94745b5a8ead00412b9e8e7baef0c1264c6289de45cab66b4b83ed3cfe83a60072480c848c14bb61016c SHA512 e8405ad2f5c3ad24d37789fdf71961ed3f1af4467b9385a87f70f8ffc39dfccf1db35a492360811cf62bb3959cdb7f6eee08991aaafa24961b24815f908172c1 |
28 |
-DIST openafs-1.6.22.2-src.tar.bz2 14673379 BLAKE2B 06408ad98a1812608b14ee89ffa40ccbbf6aa7d41dc0741c9c7b9e2c59a3f88c1f6676aa2f996b888cb7f50c04f0c8fe2da15c3f3647e3998f70c973c18ea7d3 SHA512 e4f2ce326a1d04ec20b1fa4115509bf35f73d937ff77e6e017e851ce871542d935e5ae8a597efd14027c385869657cf538cffa2674878bd4d4da37f20626172c |
29 |
DIST openafs-1.8.6-doc.tar.bz2 3769160 BLAKE2B c5fe08fbb2cdab48dd691a7e228cc590644e05b22c87afef24a5fb35aa12e379d8d49d4b920cb84dd23b4e1f1a04512078f3018808531cdc7180778885bdc466 SHA512 7525325a5ef6e1ceada7075f489a03e1d250d3cbd8b8e83a25c8e40d506d50cbf10c2b28b682f2f9663a8cd450cb70891a04e6dbc296347945ee2454b138d971 |
30 |
DIST openafs-1.8.6-src.tar.bz2 14874336 BLAKE2B a83f5bfe543b3797fa6d80ebc96cacb1a15f58cf5495d1c693593bc6d24a9f08678693080b3920a97afebe937689dd0ad08bbca95c996af0d2c83935974d3613 SHA512 0800c3825d4e0384b43cb801fc898e9255a0fa0d0baf1f231fbf383317919cc30f68526eeec803d2dc21fc7a6b55155ea4cb23197604c70e89ecf4d520b85ec1 |
31 |
-DIST openafs-patches-20170822.tar.xz 11036 BLAKE2B e53d9e01c5808ca9876fd22f729e0e82cb0f6bc7c1f4875ad0607ac9d547e216c61cc2c3506eaafb7c81318958cd038c177e9e5b2c3728997d7f44e13bbbded4 SHA512 f4b574287bfe54881a70f3ccd4d4901b2f8f9ecbec7b3a4975b59050d5ef27c6de3da25f820b7b2b10f1a38034bb28e5c01ee094fb38cae80e244eeb04b29d0a |
32 |
DIST openafs-patches-20200913.tar.xz 28392 BLAKE2B 5e8b8f2554453abdb0a84dd45d8e719cc60127224ee6ebeaca4fcddba3d38309d7e5070c43659d10301ab9eaf371ba7dcbcf12950166626a7d359d2a39c922c6 SHA512 ec0aa800b945de2fe70d949259c89a97660bdbfee3c3e43d886a5c2f6b7c530252a53ff8f196f6e80a9a657bb81f26a6937a1bec3fafbd2c70322b313a712820 |
33 |
|
34 |
diff --git a/net-fs/openafs/openafs-1.6.22.1.ebuild b/net-fs/openafs/openafs-1.6.22.1.ebuild |
35 |
deleted file mode 100644 |
36 |
index 79daf3d59cf..00000000000 |
37 |
--- a/net-fs/openafs/openafs-1.6.22.1.ebuild |
38 |
+++ /dev/null |
39 |
@@ -1,222 +0,0 @@ |
40 |
-# Copyright 1999-2019 Gentoo Authors |
41 |
-# Distributed under the terms of the GNU General Public License v2 |
42 |
- |
43 |
-EAPI="6" |
44 |
- |
45 |
-inherit autotools eutils flag-o-matic multilib pam systemd toolchain-funcs |
46 |
- |
47 |
-MY_PV=${PV/_/} |
48 |
-MY_P="${PN}-${MY_PV}" |
49 |
-PVER="20170822" |
50 |
- |
51 |
-DESCRIPTION="The OpenAFS distributed file system" |
52 |
-HOMEPAGE="https://www.openafs.org/" |
53 |
-# We always d/l the doc tarball as man pages are not USE=doc material |
54 |
-[[ ${PV} == *_pre* ]] && MY_PRE="candidate/" || MY_PRE="" |
55 |
-SRC_URI=" |
56 |
- https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2 |
57 |
- https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-doc.tar.bz2 |
58 |
- https://dev.gentoo.org/~bircoph/afs/${PN}-patches-${PVER}.tar.xz |
59 |
-" |
60 |
- |
61 |
-LICENSE="IBM BSD openafs-krb5-a APSL-2" |
62 |
-SLOT="0" |
63 |
-KEYWORDS="amd64 ~sparc x86 ~amd64-linux ~x86-linux" |
64 |
- |
65 |
-IUSE="bitmap-later debug doc fuse kerberos +modules ncurses pam pthreaded-ubik +supergroups" |
66 |
- |
67 |
-CDEPEND=" |
68 |
- virtual/libintl |
69 |
- fuse? ( sys-fs/fuse:0= ) |
70 |
- kerberos? ( virtual/krb5 ) |
71 |
- ncurses? ( sys-libs/ncurses:0= ) |
72 |
- pam? ( sys-libs/pam )" |
73 |
- |
74 |
-DEPEND="${CDEPEND} |
75 |
- virtual/yacc |
76 |
- doc? ( |
77 |
- app-text/docbook-xsl-stylesheets |
78 |
- dev-libs/libxslt |
79 |
- )" |
80 |
- |
81 |
-RDEPEND="${CDEPEND} |
82 |
- modules? ( ~net-fs/openafs-kernel-${PV} )" |
83 |
- |
84 |
-S="${WORKDIR}/${MY_P}" |
85 |
- |
86 |
-PATCHES=( "${WORKDIR}/gentoo/patches" ) |
87 |
- |
88 |
-src_prepare() { |
89 |
- default |
90 |
- |
91 |
- # fixing 2-nd level makefiles to honor flags |
92 |
- sed -i -r 's/\<CFLAGS[[:space:]]*=/CFLAGS+=/; s/\<LDFLAGS[[:space:]]*=/LDFLAGS+=/' \ |
93 |
- src/*/Makefile.in || die '*/Makefile.in sed failed' |
94 |
- |
95 |
- # packaging is f-ed up, so we can't run eautoreconf |
96 |
- # run autotools commands based on what is listed in regen.sh |
97 |
- eaclocal -I src/cf |
98 |
- eautoconf |
99 |
- eautoconf -o configure-libafs configure-libafs.ac |
100 |
- eautoheader |
101 |
- einfo "Deleting autom4te.cache directory" |
102 |
- rm -rf autom4te.cache |
103 |
-} |
104 |
- |
105 |
-src_configure() { |
106 |
- local myconf |
107 |
- use debug && use pam && myconf="--enable-debug-pam" |
108 |
- |
109 |
- AFS_SYSKVERS=26 \ |
110 |
- econf \ |
111 |
- --disable-kernel-module \ |
112 |
- --disable-strip-binaries \ |
113 |
- $(use_enable bitmap-later) \ |
114 |
- $(use_enable debug) \ |
115 |
- $(use_enable debug debug-lwp) \ |
116 |
- $(use_enable fuse fuse-client) \ |
117 |
- $(use_enable ncurses gtx) \ |
118 |
- $(use_enable pam) \ |
119 |
- $(use_enable pthreaded-ubik) \ |
120 |
- $(use_enable supergroups) \ |
121 |
- $(use_with doc html-xsl /usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl) \ |
122 |
- $(use_with kerberos krb5) \ |
123 |
- "${myconf}" |
124 |
-} |
125 |
- |
126 |
-src_compile() { |
127 |
- emake all_nolibafs |
128 |
- local d |
129 |
- if use doc; then |
130 |
- for d in doc/xml/{AdminGuide,QuickStartUnix,UserGuide}; do |
131 |
- emake -C "${d}" html; |
132 |
- done |
133 |
- fi |
134 |
-} |
135 |
- |
136 |
-src_install() { |
137 |
- local OPENRCDIR="${WORKDIR}/gentoo/openrc" |
138 |
- local SYSTEMDDIR="${WORKDIR}/gentoo/systemd" |
139 |
- |
140 |
- emake DESTDIR="${ED}" install_nolibafs |
141 |
- |
142 |
- insinto /etc/openafs |
143 |
- doins src/afsd/CellServDB |
144 |
- echo "/afs:/var/cache/openafs:200000" > "${ED}"/etc/openafs/cacheinfo |
145 |
- echo "openafs.org" > "${ED}"/etc/openafs/ThisCell |
146 |
- |
147 |
- # pam_afs and pam_afs.krb have been installed in irregular locations, fix |
148 |
- if use pam ; then |
149 |
- dopammod "${ED}"/usr/$(get_libdir)/pam_afs* |
150 |
- fi |
151 |
- rm -f "${ED}"/usr/$(get_libdir)/pam_afs* || die |
152 |
- |
153 |
- # remove kdump stuff provided by kexec-tools #222455 |
154 |
- rm -rf "${ED}"/usr/sbin/kdump* |
155 |
- |
156 |
- # avoid collision with mit_krb5's version of kpasswd |
157 |
- mv "${ED}"/usr/bin/kpasswd{,_afs} || die |
158 |
- mv "${ED}"/usr/share/man/man1/kpasswd{,_afs}.1 || die |
159 |
- |
160 |
- # move lwp stuff around #200674 #330061 |
161 |
- mv "${ED}"/usr/include/{lwp,lock,timer}.h "${ED}"/usr/include/afs/ || die |
162 |
- mv "${ED}"/usr/$(get_libdir)/liblwp* "${ED}"/usr/$(get_libdir)/afs/ || die |
163 |
- # update paths to the relocated lwp headers |
164 |
- sed -ri \ |
165 |
- -e '/^#include <(lwp|lock|timer).h>/s:<([^>]*)>:<afs/\1>:' \ |
166 |
- "${ED}"/usr/include/*.h \ |
167 |
- "${ED}"/usr/include/*/*.h \ |
168 |
- || die |
169 |
- |
170 |
- # minimal documentation |
171 |
- use pam && doman src/pam/pam_afs.5 |
172 |
- DOCS=( "${WORKDIR}/gentoo/README.Gentoo" |
173 |
- src/afsd/CellServDB NEWS README ) |
174 |
- |
175 |
- # documentation package |
176 |
- if use doc ; then |
177 |
- DOCS+=( doc/{arch,examples,pdf,protocol,txt} ) |
178 |
- dohtml -r doc/xml/ |
179 |
- fi |
180 |
- |
181 |
- einstalldocs |
182 |
- |
183 |
- # Gentoo related scripts |
184 |
- newinitd "${OPENRCDIR}"/openafs-client.initd openafs-client |
185 |
- newconfd "${OPENRCDIR}"/openafs-client.confd openafs-client |
186 |
- newinitd "${OPENRCDIR}"/openafs-server.initd openafs-server |
187 |
- newconfd "${OPENRCDIR}"/openafs-server.confd openafs-server |
188 |
- systemd_dotmpfilesd "${SYSTEMDDIR}"/tmpfiles.d/openafs-client.conf |
189 |
- systemd_dounit "${SYSTEMDDIR}"/openafs-client.service |
190 |
- systemd_dounit "${SYSTEMDDIR}"/openafs-server.service |
191 |
- systemd_install_serviced "${SYSTEMDDIR}"/openafs-client.service.conf |
192 |
- systemd_install_serviced "${SYSTEMDDIR}"/openafs-server.service.conf |
193 |
- |
194 |
- # used directories: client |
195 |
- keepdir /etc/openafs |
196 |
- |
197 |
- # used directories: server |
198 |
- keepdir /etc/openafs/server |
199 |
- diropts -m0700 |
200 |
- keepdir /var/lib/openafs |
201 |
- keepdir /var/lib/openafs/db |
202 |
- diropts -m0755 |
203 |
- keepdir /var/lib/openafs/logs |
204 |
- |
205 |
- # link logfiles to /var/log |
206 |
- dosym ../lib/openafs/logs /var/log/openafs |
207 |
-} |
208 |
- |
209 |
-pkg_preinst() { |
210 |
- ## Somewhat intelligently install default configuration files |
211 |
- ## (when they are not present) |
212 |
- local x |
213 |
- for x in cacheinfo CellServDB ThisCell ; do |
214 |
- if [ -e "${EROOT}"/etc/openafs/${x} ] ; then |
215 |
- cp "${EROOT}"/etc/openafs/${x} "${ED}"/etc/openafs/ |
216 |
- fi |
217 |
- done |
218 |
-} |
219 |
- |
220 |
-pkg_postinst() { |
221 |
- elog "This installation should work out of the box (at least the" |
222 |
- elog "client part doing global afs-cell browsing, unless you had" |
223 |
- elog "a previous and different configuration). If you want to" |
224 |
- elog "set up your own cell or modify the standard config," |
225 |
- elog "please have a look at the Gentoo OpenAFS documentation" |
226 |
- elog "(warning: it is not yet up to date wrt the new file locations)" |
227 |
- elog |
228 |
- elog "The documentation can be found at:" |
229 |
- elog " https://wiki.gentoo.org/wiki/OpenAFS" |
230 |
- elog |
231 |
- elog "Systemd users should run emerge --config ${CATEGORY}/${PN} before" |
232 |
- elog "first use and whenever ${EROOT}/etc/openafs/cacheinfo is edited." |
233 |
-} |
234 |
- |
235 |
-pkg_config() { |
236 |
- elog "Setting cache options for systemd." |
237 |
- |
238 |
- SERVICED_FILE="${EROOT}"/etc/systemd/system/openafs-client.service.d/00gentoo.conf |
239 |
- [ ! -e "${SERVICED_FILE}" ] && die "Systemd service.d file ${SERVICED_FILE} not found." |
240 |
- |
241 |
- CACHESIZE=$(cut -d ':' -f 3 "${EROOT}"/etc/openafs/cacheinfo) |
242 |
- [ -z ${CACHESIZE} ] && die "Failed to parse ${EROOT}/etc/openafs/cacheinfo." |
243 |
- |
244 |
- if [ ${CACHESIZE} -lt 131070 ]; then |
245 |
- AFSD_CACHE_ARGS="-stat 300 -dcache 100 -daemons 2 -volumes 50" |
246 |
- elif [ ${CACHESIZE} -lt 524288 ]; then |
247 |
- AFSD_CACHE_ARGS="-stat 2000 -dcache 800 -daemons 3 -volumes 70" |
248 |
- elif [ ${CACHESIZE} -lt 1048576 ]; then |
249 |
- AFSD_CACHE_ARGS="-stat 2800 -dcache 2400 -daemons 5 -volumes 128" |
250 |
- elif [ ${CACHESIZE} -lt 2209715 ]; then |
251 |
- AFSD_CACHE_ARGS="-stat 3600 -dcache 3600 -daemons 5 -volumes 196 -files 50000" |
252 |
- else |
253 |
- AFSD_CACHE_ARGS="-stat 4000 -dcache 4000 -daemons 6 -volumes 256 -files 50000" |
254 |
- fi |
255 |
- |
256 |
- # Replace existing env var if exists, else append line |
257 |
- grep -q "^Environment=\"AFSD_CACHE_ARGS=" "${SERVICED_FILE}" && \ |
258 |
- sed -i "s/^Environment=\"AFSD_CACHE_ARGS=.*/Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"/" "${SERVICED_FILE}" || \ |
259 |
- sed -i "$ a\Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"" "${SERVICED_FILE}" || \ |
260 |
- die "Updating ${SERVICED_FILE} failed." |
261 |
-} |
262 |
|
263 |
diff --git a/net-fs/openafs/openafs-1.6.22.2.ebuild b/net-fs/openafs/openafs-1.6.22.2.ebuild |
264 |
deleted file mode 100644 |
265 |
index 394f4fe7771..00000000000 |
266 |
--- a/net-fs/openafs/openafs-1.6.22.2.ebuild |
267 |
+++ /dev/null |
268 |
@@ -1,222 +0,0 @@ |
269 |
-# Copyright 1999-2019 Gentoo Authors |
270 |
-# Distributed under the terms of the GNU General Public License v2 |
271 |
- |
272 |
-EAPI="6" |
273 |
- |
274 |
-inherit autotools eutils flag-o-matic multilib pam systemd toolchain-funcs |
275 |
- |
276 |
-MY_PV=${PV/_/} |
277 |
-MY_P="${PN}-${MY_PV}" |
278 |
-PVER="20170822" |
279 |
- |
280 |
-DESCRIPTION="The OpenAFS distributed file system" |
281 |
-HOMEPAGE="https://www.openafs.org/" |
282 |
-# We always d/l the doc tarball as man pages are not USE=doc material |
283 |
-[[ ${PV} == *_pre* ]] && MY_PRE="candidate/" || MY_PRE="" |
284 |
-SRC_URI=" |
285 |
- https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2 |
286 |
- https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-doc.tar.bz2 |
287 |
- https://dev.gentoo.org/~bircoph/afs/${PN}-patches-${PVER}.tar.xz |
288 |
-" |
289 |
- |
290 |
-LICENSE="IBM BSD openafs-krb5-a APSL-2" |
291 |
-SLOT="0" |
292 |
-KEYWORDS="~amd64 ~sparc ~x86 ~amd64-linux ~x86-linux" |
293 |
- |
294 |
-IUSE="bitmap-later debug doc fuse kerberos +modules ncurses pam pthreaded-ubik +supergroups" |
295 |
- |
296 |
-CDEPEND=" |
297 |
- virtual/libintl |
298 |
- fuse? ( sys-fs/fuse:0= ) |
299 |
- kerberos? ( virtual/krb5 ) |
300 |
- ncurses? ( sys-libs/ncurses:0= ) |
301 |
- pam? ( sys-libs/pam )" |
302 |
- |
303 |
-DEPEND="${CDEPEND} |
304 |
- virtual/yacc |
305 |
- doc? ( |
306 |
- app-text/docbook-xsl-stylesheets |
307 |
- dev-libs/libxslt |
308 |
- )" |
309 |
- |
310 |
-RDEPEND="${CDEPEND} |
311 |
- modules? ( ~net-fs/openafs-kernel-${PV} )" |
312 |
- |
313 |
-S="${WORKDIR}/${MY_P}" |
314 |
- |
315 |
-PATCHES=( "${WORKDIR}/gentoo/patches" ) |
316 |
- |
317 |
-src_prepare() { |
318 |
- default |
319 |
- |
320 |
- # fixing 2-nd level makefiles to honor flags |
321 |
- sed -i -r 's/\<CFLAGS[[:space:]]*=/CFLAGS+=/; s/\<LDFLAGS[[:space:]]*=/LDFLAGS+=/' \ |
322 |
- src/*/Makefile.in || die '*/Makefile.in sed failed' |
323 |
- |
324 |
- # packaging is f-ed up, so we can't run eautoreconf |
325 |
- # run autotools commands based on what is listed in regen.sh |
326 |
- eaclocal -I src/cf |
327 |
- eautoconf |
328 |
- eautoconf -o configure-libafs configure-libafs.ac |
329 |
- eautoheader |
330 |
- einfo "Deleting autom4te.cache directory" |
331 |
- rm -rf autom4te.cache |
332 |
-} |
333 |
- |
334 |
-src_configure() { |
335 |
- local myconf |
336 |
- use debug && use pam && myconf="--enable-debug-pam" |
337 |
- |
338 |
- AFS_SYSKVERS=26 \ |
339 |
- econf \ |
340 |
- --disable-kernel-module \ |
341 |
- --disable-strip-binaries \ |
342 |
- $(use_enable bitmap-later) \ |
343 |
- $(use_enable debug) \ |
344 |
- $(use_enable debug debug-lwp) \ |
345 |
- $(use_enable fuse fuse-client) \ |
346 |
- $(use_enable ncurses gtx) \ |
347 |
- $(use_enable pam) \ |
348 |
- $(use_enable pthreaded-ubik) \ |
349 |
- $(use_enable supergroups) \ |
350 |
- $(use_with doc html-xsl /usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl) \ |
351 |
- $(use_with kerberos krb5) \ |
352 |
- "${myconf}" |
353 |
-} |
354 |
- |
355 |
-src_compile() { |
356 |
- emake all_nolibafs |
357 |
- local d |
358 |
- if use doc; then |
359 |
- for d in doc/xml/{AdminGuide,QuickStartUnix,UserGuide}; do |
360 |
- emake -C "${d}" html; |
361 |
- done |
362 |
- fi |
363 |
-} |
364 |
- |
365 |
-src_install() { |
366 |
- local OPENRCDIR="${WORKDIR}/gentoo/openrc" |
367 |
- local SYSTEMDDIR="${WORKDIR}/gentoo/systemd" |
368 |
- |
369 |
- emake DESTDIR="${ED}" install_nolibafs |
370 |
- |
371 |
- insinto /etc/openafs |
372 |
- doins src/afsd/CellServDB |
373 |
- echo "/afs:/var/cache/openafs:200000" > "${ED}"/etc/openafs/cacheinfo |
374 |
- echo "openafs.org" > "${ED}"/etc/openafs/ThisCell |
375 |
- |
376 |
- # pam_afs and pam_afs.krb have been installed in irregular locations, fix |
377 |
- if use pam ; then |
378 |
- dopammod "${ED}"/usr/$(get_libdir)/pam_afs* |
379 |
- fi |
380 |
- rm -f "${ED}"/usr/$(get_libdir)/pam_afs* || die |
381 |
- |
382 |
- # remove kdump stuff provided by kexec-tools #222455 |
383 |
- rm -rf "${ED}"/usr/sbin/kdump* |
384 |
- |
385 |
- # avoid collision with mit_krb5's version of kpasswd |
386 |
- mv "${ED}"/usr/bin/kpasswd{,_afs} || die |
387 |
- mv "${ED}"/usr/share/man/man1/kpasswd{,_afs}.1 || die |
388 |
- |
389 |
- # move lwp stuff around #200674 #330061 |
390 |
- mv "${ED}"/usr/include/{lwp,lock,timer}.h "${ED}"/usr/include/afs/ || die |
391 |
- mv "${ED}"/usr/$(get_libdir)/liblwp* "${ED}"/usr/$(get_libdir)/afs/ || die |
392 |
- # update paths to the relocated lwp headers |
393 |
- sed -ri \ |
394 |
- -e '/^#include <(lwp|lock|timer).h>/s:<([^>]*)>:<afs/\1>:' \ |
395 |
- "${ED}"/usr/include/*.h \ |
396 |
- "${ED}"/usr/include/*/*.h \ |
397 |
- || die |
398 |
- |
399 |
- # minimal documentation |
400 |
- use pam && doman src/pam/pam_afs.5 |
401 |
- DOCS=( "${WORKDIR}/gentoo/README.Gentoo" |
402 |
- src/afsd/CellServDB NEWS README ) |
403 |
- |
404 |
- # documentation package |
405 |
- if use doc ; then |
406 |
- DOCS+=( doc/{arch,examples,pdf,protocol,txt} ) |
407 |
- dohtml -r doc/xml/ |
408 |
- fi |
409 |
- |
410 |
- einstalldocs |
411 |
- |
412 |
- # Gentoo related scripts |
413 |
- newinitd "${OPENRCDIR}"/openafs-client.initd openafs-client |
414 |
- newconfd "${OPENRCDIR}"/openafs-client.confd openafs-client |
415 |
- newinitd "${OPENRCDIR}"/openafs-server.initd openafs-server |
416 |
- newconfd "${OPENRCDIR}"/openafs-server.confd openafs-server |
417 |
- systemd_dotmpfilesd "${SYSTEMDDIR}"/tmpfiles.d/openafs-client.conf |
418 |
- systemd_dounit "${SYSTEMDDIR}"/openafs-client.service |
419 |
- systemd_dounit "${SYSTEMDDIR}"/openafs-server.service |
420 |
- systemd_install_serviced "${SYSTEMDDIR}"/openafs-client.service.conf |
421 |
- systemd_install_serviced "${SYSTEMDDIR}"/openafs-server.service.conf |
422 |
- |
423 |
- # used directories: client |
424 |
- keepdir /etc/openafs |
425 |
- |
426 |
- # used directories: server |
427 |
- keepdir /etc/openafs/server |
428 |
- diropts -m0700 |
429 |
- keepdir /var/lib/openafs |
430 |
- keepdir /var/lib/openafs/db |
431 |
- diropts -m0755 |
432 |
- keepdir /var/lib/openafs/logs |
433 |
- |
434 |
- # link logfiles to /var/log |
435 |
- dosym ../lib/openafs/logs /var/log/openafs |
436 |
-} |
437 |
- |
438 |
-pkg_preinst() { |
439 |
- ## Somewhat intelligently install default configuration files |
440 |
- ## (when they are not present) |
441 |
- local x |
442 |
- for x in cacheinfo CellServDB ThisCell ; do |
443 |
- if [ -e "${EROOT}"/etc/openafs/${x} ] ; then |
444 |
- cp "${EROOT}"/etc/openafs/${x} "${ED}"/etc/openafs/ |
445 |
- fi |
446 |
- done |
447 |
-} |
448 |
- |
449 |
-pkg_postinst() { |
450 |
- elog "This installation should work out of the box (at least the" |
451 |
- elog "client part doing global afs-cell browsing, unless you had" |
452 |
- elog "a previous and different configuration). If you want to" |
453 |
- elog "set up your own cell or modify the standard config," |
454 |
- elog "please have a look at the Gentoo OpenAFS documentation" |
455 |
- elog "(warning: it is not yet up to date wrt the new file locations)" |
456 |
- elog |
457 |
- elog "The documentation can be found at:" |
458 |
- elog " https://wiki.gentoo.org/wiki/OpenAFS" |
459 |
- elog |
460 |
- elog "Systemd users should run emerge --config ${CATEGORY}/${PN} before" |
461 |
- elog "first use and whenever ${EROOT}/etc/openafs/cacheinfo is edited." |
462 |
-} |
463 |
- |
464 |
-pkg_config() { |
465 |
- elog "Setting cache options for systemd." |
466 |
- |
467 |
- SERVICED_FILE="${EROOT}"/etc/systemd/system/openafs-client.service.d/00gentoo.conf |
468 |
- [ ! -e "${SERVICED_FILE}" ] && die "Systemd service.d file ${SERVICED_FILE} not found." |
469 |
- |
470 |
- CACHESIZE=$(cut -d ':' -f 3 "${EROOT}"/etc/openafs/cacheinfo) |
471 |
- [ -z ${CACHESIZE} ] && die "Failed to parse ${EROOT}/etc/openafs/cacheinfo." |
472 |
- |
473 |
- if [ ${CACHESIZE} -lt 131070 ]; then |
474 |
- AFSD_CACHE_ARGS="-stat 300 -dcache 100 -daemons 2 -volumes 50" |
475 |
- elif [ ${CACHESIZE} -lt 524288 ]; then |
476 |
- AFSD_CACHE_ARGS="-stat 2000 -dcache 800 -daemons 3 -volumes 70" |
477 |
- elif [ ${CACHESIZE} -lt 1048576 ]; then |
478 |
- AFSD_CACHE_ARGS="-stat 2800 -dcache 2400 -daemons 5 -volumes 128" |
479 |
- elif [ ${CACHESIZE} -lt 2209715 ]; then |
480 |
- AFSD_CACHE_ARGS="-stat 3600 -dcache 3600 -daemons 5 -volumes 196 -files 50000" |
481 |
- else |
482 |
- AFSD_CACHE_ARGS="-stat 4000 -dcache 4000 -daemons 6 -volumes 256 -files 50000" |
483 |
- fi |
484 |
- |
485 |
- # Replace existing env var if exists, else append line |
486 |
- grep -q "^Environment=\"AFSD_CACHE_ARGS=" "${SERVICED_FILE}" && \ |
487 |
- sed -i "s/^Environment=\"AFSD_CACHE_ARGS=.*/Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"/" "${SERVICED_FILE}" || \ |
488 |
- sed -i "$ a\Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"" "${SERVICED_FILE}" || \ |
489 |
- die "Updating ${SERVICED_FILE} failed." |
490 |
-} |