1 |
commit: b628e20fc4a845b1fb5b848cca7c93f0124464da |
2 |
Author: NP-Hardass <NP-Hardass <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Dec 11 19:15:24 2017 +0000 |
4 |
Commit: NP Hardass <np-hardass <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Dec 11 19:15:24 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b628e20f |
7 |
|
8 |
net-fs/openafs: Drop older versions |
9 |
|
10 |
Bug: https://bugs.gentoo.org/640536 |
11 |
Package-Manager: Portage-2.3.16, Repoman-2.3.6 |
12 |
|
13 |
net-fs/openafs/Manifest | 9 -- |
14 |
net-fs/openafs/openafs-1.6.20.1.ebuild | 222 ------------------------------ |
15 |
net-fs/openafs/openafs-1.6.20.2-r1.ebuild | 222 ------------------------------ |
16 |
net-fs/openafs/openafs-1.6.21-r1.ebuild | 222 ------------------------------ |
17 |
net-fs/openafs/openafs-1.6.21.1.ebuild | 222 ------------------------------ |
18 |
5 files changed, 897 deletions(-) |
19 |
|
20 |
diff --git a/net-fs/openafs/Manifest b/net-fs/openafs/Manifest |
21 |
index 89d0db3d5c1..70f619f99b4 100644 |
22 |
--- a/net-fs/openafs/Manifest |
23 |
+++ b/net-fs/openafs/Manifest |
24 |
@@ -1,12 +1,3 @@ |
25 |
-DIST openafs-1.6.20.1-doc.tar.bz2 3533007 BLAKE2B 9e98543277cc80dacb7f5145658fc629b8437e4e2f76375f94a82834780329bc413148e4b04b0736f88ff91d5c5bea2975360d568a559da0d69a1cfc238132ed SHA512 53d36ae28ce303fd397635f888ba5e7b1a74967072919bab44dc68858881e6b0586b1e2339dcfdfe1de3bf69591077e4c09ad0c0444eb1a1557a71b39b793da4 |
26 |
-DIST openafs-1.6.20.1-src.tar.bz2 14672548 BLAKE2B e558a43be0dc0098b726f5a969cf1cf0d64dafdc9405b605c9eea2ce6ed8c4fa3026b3ee5e7277609286e25bf9db69f2e10789fd78aef2693ac4d67ae4311bfe SHA512 cd6a0cd5d48fffaf37d143a9f8f7cd84c78ada6a645ac1a6cd3cf5b4a8a5af602e84133506c797e62ef2e61180a1c89915ea8657ac95bb872ada018b1baf0d59 |
27 |
-DIST openafs-1.6.20.2-doc.tar.bz2 3531309 BLAKE2B d91cb52ebdf65a70d2ef7424877181b7c29c2d8262ab40d87f8cff725c3406fad3a38438c04232228999f30100bd16940f8d976fd3e41f90127fe67d52b2e496 SHA512 ff22960ce35e459acb04ca22a247d8199f81061498e0c4c3b83090200561199e1ae80152ab5c6b148983978ffed730c9efad8346bce289a6c5128d17510db772 |
28 |
-DIST openafs-1.6.20.2-src.tar.bz2 14676861 BLAKE2B 538534c451e51e449d225772cfb38a119b2297aee82bf5758434a8d5784b08afb08996f7dd80d78e11c9da8a55165815aa138bdb4aba4bda86549a1d2e5ab8d4 SHA512 74c50fa71a98e7ad8bfed0610ab1dbf5c6669cdbd1e240c7b155f345fc511d9e51b4d9caa8d235223ad929b711577a192ca0841c92279bf16991cace8f19a575 |
29 |
-DIST openafs-1.6.21-doc.tar.bz2 3532948 BLAKE2B 03ad1a7ad0b81b7fde98a126c1bd629d5541556a5639cbbc712f9b45404c325208a2d20fcbee714849829c6e3e665614ce255d0aab7df9a7320ceed54febf056 SHA512 37ee9a140e9f34145a020ee2ba06c8635a27c3329836dc379af2fcda9928182637b4ab3da303b4a54d8dde6df463e50481b9a970b1d07d180a78f8a9e46e0d96 |
30 |
-DIST openafs-1.6.21-src.tar.bz2 14682997 BLAKE2B 304a1ad57528f933dcf12d40b30325a58cbee21edfae5d043098cdf77b620fb321bcab01d28300ecc380486d87bb1925e2f030d9bd23afb58432fd0d0782736a SHA512 451c38ed5031b8a962da3276bf5d0f1b74c5956c2d10cdb8bbd22ea633880ebf35cf5fc71feb5d2eca4306762f6c2376a46f4522150291acfc469f8be2da757f |
31 |
-DIST openafs-1.6.21.1-doc.tar.bz2 3532980 BLAKE2B a50b7bfb04ffa81034d2bc9b92c2eacae6157d7f9604785877d617c443271d04e236e4c79470174ab9df284860a2bbcf41cecb90474fae091d7e0737bf5e444d SHA512 97236d45153dd8f487caad2e5fff382dc63dd3c75270f58c8afd47145176255d1c7b454b366118543a168951066fd721c7dce506e123adf57d3db939129e6356 |
32 |
-DIST openafs-1.6.21.1-src.tar.bz2 14679991 BLAKE2B 7c18dccb638ed24b33d188f9e58447135a06aed4cf1f4ce8d5c985f1efcb418d891187b4492f2f50111994801852db080c6dec4d0c5629771dcea3393f90add5 SHA512 a8c496657a59ee00411717aac8b6c4ca64f7ffeef400ae84ff902c8b2d81d19a367f78fbe105512ec7ec7181e8b0158fc359565eb99e2beb39d6a93ed1b28f98 |
33 |
DIST openafs-1.6.22-doc.tar.bz2 3567926 BLAKE2B 49c20ba0cf28cf567bbdbdd9f34bce504bfc90fe87d74bc9a1f30250a51802239ff9ee1286da5961fed50e84c71d311df7b3c11e393a10f58f88e4dc57773ca1 SHA512 6ae43aa86744b1a7879e583faea96ecbdf4dd6f9c4eb39040ca58217c63ae5bbf565cd70e48cddf870b8cb7623e923260a31559d7d1e22b4ef86922601aedd62 |
34 |
DIST openafs-1.6.22-src.tar.bz2 14606745 BLAKE2B ee406ac0bc2f91862b916fe2c84bb5b1887b43bfb396a0d4b4d3349420b4af397344a2c4d585698fe6f3870fba2090df7b7da85431275b5d1c28b01168221557 SHA512 7a533462175e79aa48339c5105d2dbddde284e23e5d5bcff58a4893839fc7bcfdd779d1d65abfc5217b185624bf88fe1ef02d0c37d29b6ff96616e96f54a6d87 |
35 |
-DIST openafs-patches-20170212.tar.xz 11008 BLAKE2B 6a51a849a61dbc8486a78ba44ced693f76dcb79f1db0131e82e81d16f66bee658b9604064b7c828545dcc4984d4c0f25c5972cf2e61c2036d1d093662068d539 SHA512 13e525a3f612b43318ad2fefaa3edf15ad572153494e94826815400f90a253678d2ade44d6adae08b1cb0dc8f311f5407f5aa540ed0df7a2d2d6024695bd917f |
36 |
DIST openafs-patches-20170822.tar.xz 11036 BLAKE2B e53d9e01c5808ca9876fd22f729e0e82cb0f6bc7c1f4875ad0607ac9d547e216c61cc2c3506eaafb7c81318958cd038c177e9e5b2c3728997d7f44e13bbbded4 SHA512 f4b574287bfe54881a70f3ccd4d4901b2f8f9ecbec7b3a4975b59050d5ef27c6de3da25f820b7b2b10f1a38034bb28e5c01ee094fb38cae80e244eeb04b29d0a |
37 |
|
38 |
diff --git a/net-fs/openafs/openafs-1.6.20.1.ebuild b/net-fs/openafs/openafs-1.6.20.1.ebuild |
39 |
deleted file mode 100644 |
40 |
index 37fc178aa24..00000000000 |
41 |
--- a/net-fs/openafs/openafs-1.6.20.1.ebuild |
42 |
+++ /dev/null |
43 |
@@ -1,222 +0,0 @@ |
44 |
-# Copyright 1999-2017 Gentoo Foundation |
45 |
-# Distributed under the terms of the GNU General Public License v2 |
46 |
- |
47 |
-EAPI="6" |
48 |
- |
49 |
-inherit autotools eutils flag-o-matic multilib pam systemd toolchain-funcs versionator |
50 |
- |
51 |
-MY_PV=$(delete_version_separator '_') |
52 |
-MY_P="${PN}-${MY_PV}" |
53 |
-PVER="20170212" |
54 |
- |
55 |
-DESCRIPTION="The OpenAFS distributed file system" |
56 |
-HOMEPAGE="https://www.openafs.org/" |
57 |
-# We always d/l the doc tarball as man pages are not USE=doc material |
58 |
-[[ ${PV} == *_pre* ]] && MY_PRE="candidate/" || MY_PRE="" |
59 |
-SRC_URI=" |
60 |
- https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2 |
61 |
- https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-doc.tar.bz2 |
62 |
- https://dev.gentoo.org/~bircoph/afs/${PN}-patches-${PVER}.tar.xz |
63 |
-" |
64 |
- |
65 |
-LICENSE="IBM BSD openafs-krb5-a APSL-2" |
66 |
-SLOT="0" |
67 |
-KEYWORDS="amd64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" |
68 |
- |
69 |
-IUSE="bitmap-later debug doc fuse kerberos +modules ncurses pam pthreaded-ubik +supergroups" |
70 |
- |
71 |
-CDEPEND=" |
72 |
- virtual/libintl |
73 |
- fuse? ( sys-fs/fuse ) |
74 |
- kerberos? ( virtual/krb5 ) |
75 |
- ncurses? ( sys-libs/ncurses:0= ) |
76 |
- pam? ( virtual/pam )" |
77 |
- |
78 |
-DEPEND="${CDEPEND} |
79 |
- virtual/yacc |
80 |
- doc? ( |
81 |
- app-text/docbook-xsl-stylesheets |
82 |
- dev-libs/libxslt |
83 |
- )" |
84 |
- |
85 |
-RDEPEND="${CDEPEND} |
86 |
- modules? ( ~net-fs/openafs-kernel-${PV} )" |
87 |
- |
88 |
-S="${WORKDIR}/${MY_P}" |
89 |
- |
90 |
-PATCHES=( "${WORKDIR}/gentoo/patches" ) |
91 |
- |
92 |
-src_prepare() { |
93 |
- default |
94 |
- |
95 |
- # fixing 2-nd level makefiles to honor flags |
96 |
- sed -i -r 's/\<CFLAGS[[:space:]]*=/CFLAGS+=/; s/\<LDFLAGS[[:space:]]*=/LDFLAGS+=/' \ |
97 |
- src/*/Makefile.in || die '*/Makefile.in sed failed' |
98 |
- |
99 |
- # packaging is f-ed up, so we can't run eautoreconf |
100 |
- # run autotools commands based on what is listed in regen.sh |
101 |
- eaclocal -I src/cf |
102 |
- eautoconf |
103 |
- eautoconf -o configure-libafs configure-libafs.ac |
104 |
- eautoheader |
105 |
- einfo "Deleting autom4te.cache directory" |
106 |
- rm -rf autom4te.cache |
107 |
-} |
108 |
- |
109 |
-src_configure() { |
110 |
- local myconf |
111 |
- use debug && use pam && myconf="--enable-debug-pam" |
112 |
- |
113 |
- AFS_SYSKVERS=26 \ |
114 |
- econf \ |
115 |
- --disable-kernel-module \ |
116 |
- --disable-strip-binaries \ |
117 |
- $(use_enable bitmap-later) \ |
118 |
- $(use_enable debug) \ |
119 |
- $(use_enable debug debug-lwp) \ |
120 |
- $(use_enable fuse fuse-client) \ |
121 |
- $(use_enable ncurses gtx) \ |
122 |
- $(use_enable pam) \ |
123 |
- $(use_enable pthreaded-ubik) \ |
124 |
- $(use_enable supergroups) \ |
125 |
- $(use_with doc html-xsl /usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl) \ |
126 |
- $(use_with kerberos krb5) \ |
127 |
- "${myconf}" |
128 |
-} |
129 |
- |
130 |
-src_compile() { |
131 |
- emake all_nolibafs |
132 |
- local d |
133 |
- if use doc; then |
134 |
- for d in doc/xml/{AdminGuide,QuickStartUnix,UserGuide}; do |
135 |
- emake -C "${d}" html; |
136 |
- done |
137 |
- fi |
138 |
-} |
139 |
- |
140 |
-src_install() { |
141 |
- local OPENRCDIR="${WORKDIR}/gentoo/openrc" |
142 |
- local SYSTEMDDIR="${WORKDIR}/gentoo/systemd" |
143 |
- |
144 |
- emake DESTDIR="${ED}" install_nolibafs |
145 |
- |
146 |
- insinto /etc/openafs |
147 |
- doins src/afsd/CellServDB |
148 |
- echo "/afs:/var/cache/openafs:200000" > "${ED}"/etc/openafs/cacheinfo |
149 |
- echo "openafs.org" > "${ED}"/etc/openafs/ThisCell |
150 |
- |
151 |
- # pam_afs and pam_afs.krb have been installed in irregular locations, fix |
152 |
- if use pam ; then |
153 |
- dopammod "${ED}"/usr/$(get_libdir)/pam_afs* |
154 |
- fi |
155 |
- rm -f "${ED}"/usr/$(get_libdir)/pam_afs* || die |
156 |
- |
157 |
- # remove kdump stuff provided by kexec-tools #222455 |
158 |
- rm -rf "${ED}"/usr/sbin/kdump* |
159 |
- |
160 |
- # avoid collision with mit_krb5's version of kpasswd |
161 |
- mv "${ED}"/usr/bin/kpasswd{,_afs} || die |
162 |
- mv "${ED}"/usr/share/man/man1/kpasswd{,_afs}.1 || die |
163 |
- |
164 |
- # move lwp stuff around #200674 #330061 |
165 |
- mv "${ED}"/usr/include/{lwp,lock,timer}.h "${ED}"/usr/include/afs/ || die |
166 |
- mv "${ED}"/usr/$(get_libdir)/liblwp* "${ED}"/usr/$(get_libdir)/afs/ || die |
167 |
- # update paths to the relocated lwp headers |
168 |
- sed -ri \ |
169 |
- -e '/^#include <(lwp|lock|timer).h>/s:<([^>]*)>:<afs/\1>:' \ |
170 |
- "${ED}"/usr/include/*.h \ |
171 |
- "${ED}"/usr/include/*/*.h \ |
172 |
- || die |
173 |
- |
174 |
- # minimal documentation |
175 |
- use pam && doman src/pam/pam_afs.5 |
176 |
- DOCS=( "${WORKDIR}/gentoo/README.Gentoo" |
177 |
- src/afsd/CellServDB NEWS README ) |
178 |
- |
179 |
- # documentation package |
180 |
- if use doc ; then |
181 |
- DOCS+=( doc/{arch,examples,pdf,protocol,txt} ) |
182 |
- dohtml -r doc/xml/ |
183 |
- fi |
184 |
- |
185 |
- einstalldocs |
186 |
- |
187 |
- # Gentoo related scripts |
188 |
- newinitd "${OPENRCDIR}"/openafs-client.initd openafs-client |
189 |
- newconfd "${OPENRCDIR}"/openafs-client.confd openafs-client |
190 |
- newinitd "${OPENRCDIR}"/openafs-server.initd openafs-server |
191 |
- newconfd "${OPENRCDIR}"/openafs-server.confd openafs-server |
192 |
- systemd_dotmpfilesd "${SYSTEMDDIR}"/tmpfiles.d/openafs-client.conf |
193 |
- systemd_dounit "${SYSTEMDDIR}"/openafs-client.service |
194 |
- systemd_dounit "${SYSTEMDDIR}"/openafs-server.service |
195 |
- systemd_install_serviced "${SYSTEMDDIR}"/openafs-client.service.conf |
196 |
- systemd_install_serviced "${SYSTEMDDIR}"/openafs-server.service.conf |
197 |
- |
198 |
- # used directories: client |
199 |
- keepdir /etc/openafs |
200 |
- |
201 |
- # used directories: server |
202 |
- keepdir /etc/openafs/server |
203 |
- diropts -m0700 |
204 |
- keepdir /var/lib/openafs |
205 |
- keepdir /var/lib/openafs/db |
206 |
- diropts -m0755 |
207 |
- keepdir /var/lib/openafs/logs |
208 |
- |
209 |
- # link logfiles to /var/log |
210 |
- dosym ../lib/openafs/logs /var/log/openafs |
211 |
-} |
212 |
- |
213 |
-pkg_preinst() { |
214 |
- ## Somewhat intelligently install default configuration files |
215 |
- ## (when they are not present) |
216 |
- local x |
217 |
- for x in cacheinfo CellServDB ThisCell ; do |
218 |
- if [ -e "${EROOT}"/etc/openafs/${x} ] ; then |
219 |
- cp "${EROOT}"/etc/openafs/${x} "${ED}"/etc/openafs/ |
220 |
- fi |
221 |
- done |
222 |
-} |
223 |
- |
224 |
-pkg_postinst() { |
225 |
- elog "This installation should work out of the box (at least the" |
226 |
- elog "client part doing global afs-cell browsing, unless you had" |
227 |
- elog "a previous and different configuration). If you want to" |
228 |
- elog "set up your own cell or modify the standard config," |
229 |
- elog "please have a look at the Gentoo OpenAFS documentation" |
230 |
- elog "(warning: it is not yet up to date wrt the new file locations)" |
231 |
- elog |
232 |
- elog "The documentation can be found at:" |
233 |
- elog " https://wiki.gentoo.org/wiki/OpenAFS" |
234 |
- elog |
235 |
- elog "Systemd users should run emerge --config ${CATEGORY}/${PN} before" |
236 |
- elog "first use and whenever ${EROOT}/etc/openafs/cacheinfo is edited." |
237 |
-} |
238 |
- |
239 |
-pkg_config() { |
240 |
- elog "Setting cache options for systemd." |
241 |
- |
242 |
- SERVICED_FILE="${EROOT}"/etc/systemd/system/openafs-client.service.d/00gentoo.conf |
243 |
- [ ! -e "${SERVICED_FILE}" ] && die "Systemd service.d file ${SERVICED_FILE} not found." |
244 |
- |
245 |
- CACHESIZE=$(cut -d ':' -f 3 "${EROOT}"/etc/openafs/cacheinfo) |
246 |
- [ -z ${CACHESIZE} ] && die "Failed to parse ${EROOT}/etc/openafs/cacheinfo." |
247 |
- |
248 |
- if [ ${CACHESIZE} -lt 131070 ]; then |
249 |
- AFSD_CACHE_ARGS="-stat 300 -dcache 100 -daemons 2 -volumes 50" |
250 |
- elif [ ${CACHESIZE} -lt 524288 ]; then |
251 |
- AFSD_CACHE_ARGS="-stat 2000 -dcache 800 -daemons 3 -volumes 70" |
252 |
- elif [ ${CACHESIZE} -lt 1048576 ]; then |
253 |
- AFSD_CACHE_ARGS="-stat 2800 -dcache 2400 -daemons 5 -volumes 128" |
254 |
- elif [ ${CACHESIZE} -lt 2209715 ]; then |
255 |
- AFSD_CACHE_ARGS="-stat 3600 -dcache 3600 -daemons 5 -volumes 196 -files 50000" |
256 |
- else |
257 |
- AFSD_CACHE_ARGS="-stat 4000 -dcache 4000 -daemons 6 -volumes 256 -files 50000" |
258 |
- fi |
259 |
- |
260 |
- # Replace existing env var if exists, else append line |
261 |
- grep -q "^Environment=\"AFSD_CACHE_ARGS=" "${SERVICED_FILE}" && \ |
262 |
- sed -i "s/^Environment=\"AFSD_CACHE_ARGS=.*/Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"/" "${SERVICED_FILE}" || \ |
263 |
- sed -i "$ a\Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"" "${SERVICED_FILE}" || \ |
264 |
- die "Updating ${SERVICED_FILE} failed." |
265 |
-} |
266 |
|
267 |
diff --git a/net-fs/openafs/openafs-1.6.20.2-r1.ebuild b/net-fs/openafs/openafs-1.6.20.2-r1.ebuild |
268 |
deleted file mode 100644 |
269 |
index 4ecf063fc89..00000000000 |
270 |
--- a/net-fs/openafs/openafs-1.6.20.2-r1.ebuild |
271 |
+++ /dev/null |
272 |
@@ -1,222 +0,0 @@ |
273 |
-# Copyright 1999-2017 Gentoo Foundation |
274 |
-# Distributed under the terms of the GNU General Public License v2 |
275 |
- |
276 |
-EAPI="6" |
277 |
- |
278 |
-inherit autotools eutils flag-o-matic multilib pam systemd toolchain-funcs versionator |
279 |
- |
280 |
-MY_PV=$(delete_version_separator '_') |
281 |
-MY_P="${PN}-${MY_PV}" |
282 |
-PVER="20170822" |
283 |
- |
284 |
-DESCRIPTION="The OpenAFS distributed file system" |
285 |
-HOMEPAGE="https://www.openafs.org/" |
286 |
-# We always d/l the doc tarball as man pages are not USE=doc material |
287 |
-[[ ${PV} == *_pre* ]] && MY_PRE="candidate/" || MY_PRE="" |
288 |
-SRC_URI=" |
289 |
- https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2 |
290 |
- https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-doc.tar.bz2 |
291 |
- https://dev.gentoo.org/~bircoph/afs/${PN}-patches-${PVER}.tar.xz |
292 |
-" |
293 |
- |
294 |
-LICENSE="IBM BSD openafs-krb5-a APSL-2" |
295 |
-SLOT="0" |
296 |
-KEYWORDS="~amd64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" |
297 |
- |
298 |
-IUSE="bitmap-later debug doc fuse kerberos +modules ncurses pam pthreaded-ubik +supergroups" |
299 |
- |
300 |
-CDEPEND=" |
301 |
- virtual/libintl |
302 |
- fuse? ( sys-fs/fuse ) |
303 |
- kerberos? ( virtual/krb5 ) |
304 |
- ncurses? ( sys-libs/ncurses:0= ) |
305 |
- pam? ( virtual/pam )" |
306 |
- |
307 |
-DEPEND="${CDEPEND} |
308 |
- virtual/yacc |
309 |
- doc? ( |
310 |
- app-text/docbook-xsl-stylesheets |
311 |
- dev-libs/libxslt |
312 |
- )" |
313 |
- |
314 |
-RDEPEND="${CDEPEND} |
315 |
- modules? ( ~net-fs/openafs-kernel-${PV} )" |
316 |
- |
317 |
-S="${WORKDIR}/${MY_P}" |
318 |
- |
319 |
-PATCHES=( "${WORKDIR}/gentoo/patches" ) |
320 |
- |
321 |
-src_prepare() { |
322 |
- default |
323 |
- |
324 |
- # fixing 2-nd level makefiles to honor flags |
325 |
- sed -i -r 's/\<CFLAGS[[:space:]]*=/CFLAGS+=/; s/\<LDFLAGS[[:space:]]*=/LDFLAGS+=/' \ |
326 |
- src/*/Makefile.in || die '*/Makefile.in sed failed' |
327 |
- |
328 |
- # packaging is f-ed up, so we can't run eautoreconf |
329 |
- # run autotools commands based on what is listed in regen.sh |
330 |
- eaclocal -I src/cf |
331 |
- eautoconf |
332 |
- eautoconf -o configure-libafs configure-libafs.ac |
333 |
- eautoheader |
334 |
- einfo "Deleting autom4te.cache directory" |
335 |
- rm -rf autom4te.cache |
336 |
-} |
337 |
- |
338 |
-src_configure() { |
339 |
- local myconf |
340 |
- use debug && use pam && myconf="--enable-debug-pam" |
341 |
- |
342 |
- AFS_SYSKVERS=26 \ |
343 |
- econf \ |
344 |
- --disable-kernel-module \ |
345 |
- --disable-strip-binaries \ |
346 |
- $(use_enable bitmap-later) \ |
347 |
- $(use_enable debug) \ |
348 |
- $(use_enable debug debug-lwp) \ |
349 |
- $(use_enable fuse fuse-client) \ |
350 |
- $(use_enable ncurses gtx) \ |
351 |
- $(use_enable pam) \ |
352 |
- $(use_enable pthreaded-ubik) \ |
353 |
- $(use_enable supergroups) \ |
354 |
- $(use_with doc html-xsl /usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl) \ |
355 |
- $(use_with kerberos krb5) \ |
356 |
- "${myconf}" |
357 |
-} |
358 |
- |
359 |
-src_compile() { |
360 |
- emake all_nolibafs |
361 |
- local d |
362 |
- if use doc; then |
363 |
- for d in doc/xml/{AdminGuide,QuickStartUnix,UserGuide}; do |
364 |
- emake -C "${d}" html; |
365 |
- done |
366 |
- fi |
367 |
-} |
368 |
- |
369 |
-src_install() { |
370 |
- local OPENRCDIR="${WORKDIR}/gentoo/openrc" |
371 |
- local SYSTEMDDIR="${WORKDIR}/gentoo/systemd" |
372 |
- |
373 |
- emake DESTDIR="${ED}" install_nolibafs |
374 |
- |
375 |
- insinto /etc/openafs |
376 |
- doins src/afsd/CellServDB |
377 |
- echo "/afs:/var/cache/openafs:200000" > "${ED}"/etc/openafs/cacheinfo |
378 |
- echo "openafs.org" > "${ED}"/etc/openafs/ThisCell |
379 |
- |
380 |
- # pam_afs and pam_afs.krb have been installed in irregular locations, fix |
381 |
- if use pam ; then |
382 |
- dopammod "${ED}"/usr/$(get_libdir)/pam_afs* |
383 |
- fi |
384 |
- rm -f "${ED}"/usr/$(get_libdir)/pam_afs* || die |
385 |
- |
386 |
- # remove kdump stuff provided by kexec-tools #222455 |
387 |
- rm -rf "${ED}"/usr/sbin/kdump* |
388 |
- |
389 |
- # avoid collision with mit_krb5's version of kpasswd |
390 |
- mv "${ED}"/usr/bin/kpasswd{,_afs} || die |
391 |
- mv "${ED}"/usr/share/man/man1/kpasswd{,_afs}.1 || die |
392 |
- |
393 |
- # move lwp stuff around #200674 #330061 |
394 |
- mv "${ED}"/usr/include/{lwp,lock,timer}.h "${ED}"/usr/include/afs/ || die |
395 |
- mv "${ED}"/usr/$(get_libdir)/liblwp* "${ED}"/usr/$(get_libdir)/afs/ || die |
396 |
- # update paths to the relocated lwp headers |
397 |
- sed -ri \ |
398 |
- -e '/^#include <(lwp|lock|timer).h>/s:<([^>]*)>:<afs/\1>:' \ |
399 |
- "${ED}"/usr/include/*.h \ |
400 |
- "${ED}"/usr/include/*/*.h \ |
401 |
- || die |
402 |
- |
403 |
- # minimal documentation |
404 |
- use pam && doman src/pam/pam_afs.5 |
405 |
- DOCS=( "${WORKDIR}/gentoo/README.Gentoo" |
406 |
- src/afsd/CellServDB NEWS README ) |
407 |
- |
408 |
- # documentation package |
409 |
- if use doc ; then |
410 |
- DOCS+=( doc/{arch,examples,pdf,protocol,txt} ) |
411 |
- dohtml -r doc/xml/ |
412 |
- fi |
413 |
- |
414 |
- einstalldocs |
415 |
- |
416 |
- # Gentoo related scripts |
417 |
- newinitd "${OPENRCDIR}"/openafs-client.initd openafs-client |
418 |
- newconfd "${OPENRCDIR}"/openafs-client.confd openafs-client |
419 |
- newinitd "${OPENRCDIR}"/openafs-server.initd openafs-server |
420 |
- newconfd "${OPENRCDIR}"/openafs-server.confd openafs-server |
421 |
- systemd_dotmpfilesd "${SYSTEMDDIR}"/tmpfiles.d/openafs-client.conf |
422 |
- systemd_dounit "${SYSTEMDDIR}"/openafs-client.service |
423 |
- systemd_dounit "${SYSTEMDDIR}"/openafs-server.service |
424 |
- systemd_install_serviced "${SYSTEMDDIR}"/openafs-client.service.conf |
425 |
- systemd_install_serviced "${SYSTEMDDIR}"/openafs-server.service.conf |
426 |
- |
427 |
- # used directories: client |
428 |
- keepdir /etc/openafs |
429 |
- |
430 |
- # used directories: server |
431 |
- keepdir /etc/openafs/server |
432 |
- diropts -m0700 |
433 |
- keepdir /var/lib/openafs |
434 |
- keepdir /var/lib/openafs/db |
435 |
- diropts -m0755 |
436 |
- keepdir /var/lib/openafs/logs |
437 |
- |
438 |
- # link logfiles to /var/log |
439 |
- dosym ../lib/openafs/logs /var/log/openafs |
440 |
-} |
441 |
- |
442 |
-pkg_preinst() { |
443 |
- ## Somewhat intelligently install default configuration files |
444 |
- ## (when they are not present) |
445 |
- local x |
446 |
- for x in cacheinfo CellServDB ThisCell ; do |
447 |
- if [ -e "${EROOT}"/etc/openafs/${x} ] ; then |
448 |
- cp "${EROOT}"/etc/openafs/${x} "${ED}"/etc/openafs/ |
449 |
- fi |
450 |
- done |
451 |
-} |
452 |
- |
453 |
-pkg_postinst() { |
454 |
- elog "This installation should work out of the box (at least the" |
455 |
- elog "client part doing global afs-cell browsing, unless you had" |
456 |
- elog "a previous and different configuration). If you want to" |
457 |
- elog "set up your own cell or modify the standard config," |
458 |
- elog "please have a look at the Gentoo OpenAFS documentation" |
459 |
- elog "(warning: it is not yet up to date wrt the new file locations)" |
460 |
- elog |
461 |
- elog "The documentation can be found at:" |
462 |
- elog " https://wiki.gentoo.org/wiki/OpenAFS" |
463 |
- elog |
464 |
- elog "Systemd users should run emerge --config ${CATEGORY}/${PN} before" |
465 |
- elog "first use and whenever ${EROOT}/etc/openafs/cacheinfo is edited." |
466 |
-} |
467 |
- |
468 |
-pkg_config() { |
469 |
- elog "Setting cache options for systemd." |
470 |
- |
471 |
- SERVICED_FILE="${EROOT}"/etc/systemd/system/openafs-client.service.d/00gentoo.conf |
472 |
- [ ! -e "${SERVICED_FILE}" ] && die "Systemd service.d file ${SERVICED_FILE} not found." |
473 |
- |
474 |
- CACHESIZE=$(cut -d ':' -f 3 "${EROOT}"/etc/openafs/cacheinfo) |
475 |
- [ -z ${CACHESIZE} ] && die "Failed to parse ${EROOT}/etc/openafs/cacheinfo." |
476 |
- |
477 |
- if [ ${CACHESIZE} -lt 131070 ]; then |
478 |
- AFSD_CACHE_ARGS="-stat 300 -dcache 100 -daemons 2 -volumes 50" |
479 |
- elif [ ${CACHESIZE} -lt 524288 ]; then |
480 |
- AFSD_CACHE_ARGS="-stat 2000 -dcache 800 -daemons 3 -volumes 70" |
481 |
- elif [ ${CACHESIZE} -lt 1048576 ]; then |
482 |
- AFSD_CACHE_ARGS="-stat 2800 -dcache 2400 -daemons 5 -volumes 128" |
483 |
- elif [ ${CACHESIZE} -lt 2209715 ]; then |
484 |
- AFSD_CACHE_ARGS="-stat 3600 -dcache 3600 -daemons 5 -volumes 196 -files 50000" |
485 |
- else |
486 |
- AFSD_CACHE_ARGS="-stat 4000 -dcache 4000 -daemons 6 -volumes 256 -files 50000" |
487 |
- fi |
488 |
- |
489 |
- # Replace existing env var if exists, else append line |
490 |
- grep -q "^Environment=\"AFSD_CACHE_ARGS=" "${SERVICED_FILE}" && \ |
491 |
- sed -i "s/^Environment=\"AFSD_CACHE_ARGS=.*/Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"/" "${SERVICED_FILE}" || \ |
492 |
- sed -i "$ a\Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"" "${SERVICED_FILE}" || \ |
493 |
- die "Updating ${SERVICED_FILE} failed." |
494 |
-} |
495 |
|
496 |
diff --git a/net-fs/openafs/openafs-1.6.21-r1.ebuild b/net-fs/openafs/openafs-1.6.21-r1.ebuild |
497 |
deleted file mode 100644 |
498 |
index 3c3aa6efbac..00000000000 |
499 |
--- a/net-fs/openafs/openafs-1.6.21-r1.ebuild |
500 |
+++ /dev/null |
501 |
@@ -1,222 +0,0 @@ |
502 |
-# Copyright 1999-2017 Gentoo Foundation |
503 |
-# Distributed under the terms of the GNU General Public License v2 |
504 |
- |
505 |
-EAPI="6" |
506 |
- |
507 |
-inherit autotools eutils flag-o-matic multilib pam systemd toolchain-funcs versionator |
508 |
- |
509 |
-MY_PV=$(delete_version_separator '_') |
510 |
-MY_P="${PN}-${MY_PV}" |
511 |
-PVER="20170822" |
512 |
- |
513 |
-DESCRIPTION="The OpenAFS distributed file system" |
514 |
-HOMEPAGE="https://www.openafs.org/" |
515 |
-# We always d/l the doc tarball as man pages are not USE=doc material |
516 |
-[[ ${PV} == *_pre* ]] && MY_PRE="candidate/" || MY_PRE="" |
517 |
-SRC_URI=" |
518 |
- https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2 |
519 |
- https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-doc.tar.bz2 |
520 |
- https://dev.gentoo.org/~bircoph/afs/${PN}-patches-${PVER}.tar.xz |
521 |
-" |
522 |
- |
523 |
-LICENSE="IBM BSD openafs-krb5-a APSL-2" |
524 |
-SLOT="0" |
525 |
-KEYWORDS="amd64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" |
526 |
- |
527 |
-IUSE="bitmap-later debug doc fuse kerberos +modules ncurses pam pthreaded-ubik +supergroups" |
528 |
- |
529 |
-CDEPEND=" |
530 |
- virtual/libintl |
531 |
- fuse? ( sys-fs/fuse ) |
532 |
- kerberos? ( virtual/krb5 ) |
533 |
- ncurses? ( sys-libs/ncurses:0= ) |
534 |
- pam? ( virtual/pam )" |
535 |
- |
536 |
-DEPEND="${CDEPEND} |
537 |
- virtual/yacc |
538 |
- doc? ( |
539 |
- app-text/docbook-xsl-stylesheets |
540 |
- dev-libs/libxslt |
541 |
- )" |
542 |
- |
543 |
-RDEPEND="${CDEPEND} |
544 |
- modules? ( ~net-fs/openafs-kernel-${PV} )" |
545 |
- |
546 |
-S="${WORKDIR}/${MY_P}" |
547 |
- |
548 |
-PATCHES=( "${WORKDIR}/gentoo/patches" ) |
549 |
- |
550 |
-src_prepare() { |
551 |
- default |
552 |
- |
553 |
- # fixing 2-nd level makefiles to honor flags |
554 |
- sed -i -r 's/\<CFLAGS[[:space:]]*=/CFLAGS+=/; s/\<LDFLAGS[[:space:]]*=/LDFLAGS+=/' \ |
555 |
- src/*/Makefile.in || die '*/Makefile.in sed failed' |
556 |
- |
557 |
- # packaging is f-ed up, so we can't run eautoreconf |
558 |
- # run autotools commands based on what is listed in regen.sh |
559 |
- eaclocal -I src/cf |
560 |
- eautoconf |
561 |
- eautoconf -o configure-libafs configure-libafs.ac |
562 |
- eautoheader |
563 |
- einfo "Deleting autom4te.cache directory" |
564 |
- rm -rf autom4te.cache |
565 |
-} |
566 |
- |
567 |
-src_configure() { |
568 |
- local myconf |
569 |
- use debug && use pam && myconf="--enable-debug-pam" |
570 |
- |
571 |
- AFS_SYSKVERS=26 \ |
572 |
- econf \ |
573 |
- --disable-kernel-module \ |
574 |
- --disable-strip-binaries \ |
575 |
- $(use_enable bitmap-later) \ |
576 |
- $(use_enable debug) \ |
577 |
- $(use_enable debug debug-lwp) \ |
578 |
- $(use_enable fuse fuse-client) \ |
579 |
- $(use_enable ncurses gtx) \ |
580 |
- $(use_enable pam) \ |
581 |
- $(use_enable pthreaded-ubik) \ |
582 |
- $(use_enable supergroups) \ |
583 |
- $(use_with doc html-xsl /usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl) \ |
584 |
- $(use_with kerberos krb5) \ |
585 |
- "${myconf}" |
586 |
-} |
587 |
- |
588 |
-src_compile() { |
589 |
- emake all_nolibafs |
590 |
- local d |
591 |
- if use doc; then |
592 |
- for d in doc/xml/{AdminGuide,QuickStartUnix,UserGuide}; do |
593 |
- emake -C "${d}" html; |
594 |
- done |
595 |
- fi |
596 |
-} |
597 |
- |
598 |
-src_install() { |
599 |
- local OPENRCDIR="${WORKDIR}/gentoo/openrc" |
600 |
- local SYSTEMDDIR="${WORKDIR}/gentoo/systemd" |
601 |
- |
602 |
- emake DESTDIR="${ED}" install_nolibafs |
603 |
- |
604 |
- insinto /etc/openafs |
605 |
- doins src/afsd/CellServDB |
606 |
- echo "/afs:/var/cache/openafs:200000" > "${ED}"/etc/openafs/cacheinfo |
607 |
- echo "openafs.org" > "${ED}"/etc/openafs/ThisCell |
608 |
- |
609 |
- # pam_afs and pam_afs.krb have been installed in irregular locations, fix |
610 |
- if use pam ; then |
611 |
- dopammod "${ED}"/usr/$(get_libdir)/pam_afs* |
612 |
- fi |
613 |
- rm -f "${ED}"/usr/$(get_libdir)/pam_afs* || die |
614 |
- |
615 |
- # remove kdump stuff provided by kexec-tools #222455 |
616 |
- rm -rf "${ED}"/usr/sbin/kdump* |
617 |
- |
618 |
- # avoid collision with mit_krb5's version of kpasswd |
619 |
- mv "${ED}"/usr/bin/kpasswd{,_afs} || die |
620 |
- mv "${ED}"/usr/share/man/man1/kpasswd{,_afs}.1 || die |
621 |
- |
622 |
- # move lwp stuff around #200674 #330061 |
623 |
- mv "${ED}"/usr/include/{lwp,lock,timer}.h "${ED}"/usr/include/afs/ || die |
624 |
- mv "${ED}"/usr/$(get_libdir)/liblwp* "${ED}"/usr/$(get_libdir)/afs/ || die |
625 |
- # update paths to the relocated lwp headers |
626 |
- sed -ri \ |
627 |
- -e '/^#include <(lwp|lock|timer).h>/s:<([^>]*)>:<afs/\1>:' \ |
628 |
- "${ED}"/usr/include/*.h \ |
629 |
- "${ED}"/usr/include/*/*.h \ |
630 |
- || die |
631 |
- |
632 |
- # minimal documentation |
633 |
- use pam && doman src/pam/pam_afs.5 |
634 |
- DOCS=( "${WORKDIR}/gentoo/README.Gentoo" |
635 |
- src/afsd/CellServDB NEWS README ) |
636 |
- |
637 |
- # documentation package |
638 |
- if use doc ; then |
639 |
- DOCS+=( doc/{arch,examples,pdf,protocol,txt} ) |
640 |
- dohtml -r doc/xml/ |
641 |
- fi |
642 |
- |
643 |
- einstalldocs |
644 |
- |
645 |
- # Gentoo related scripts |
646 |
- newinitd "${OPENRCDIR}"/openafs-client.initd openafs-client |
647 |
- newconfd "${OPENRCDIR}"/openafs-client.confd openafs-client |
648 |
- newinitd "${OPENRCDIR}"/openafs-server.initd openafs-server |
649 |
- newconfd "${OPENRCDIR}"/openafs-server.confd openafs-server |
650 |
- systemd_dotmpfilesd "${SYSTEMDDIR}"/tmpfiles.d/openafs-client.conf |
651 |
- systemd_dounit "${SYSTEMDDIR}"/openafs-client.service |
652 |
- systemd_dounit "${SYSTEMDDIR}"/openafs-server.service |
653 |
- systemd_install_serviced "${SYSTEMDDIR}"/openafs-client.service.conf |
654 |
- systemd_install_serviced "${SYSTEMDDIR}"/openafs-server.service.conf |
655 |
- |
656 |
- # used directories: client |
657 |
- keepdir /etc/openafs |
658 |
- |
659 |
- # used directories: server |
660 |
- keepdir /etc/openafs/server |
661 |
- diropts -m0700 |
662 |
- keepdir /var/lib/openafs |
663 |
- keepdir /var/lib/openafs/db |
664 |
- diropts -m0755 |
665 |
- keepdir /var/lib/openafs/logs |
666 |
- |
667 |
- # link logfiles to /var/log |
668 |
- dosym ../lib/openafs/logs /var/log/openafs |
669 |
-} |
670 |
- |
671 |
-pkg_preinst() { |
672 |
- ## Somewhat intelligently install default configuration files |
673 |
- ## (when they are not present) |
674 |
- local x |
675 |
- for x in cacheinfo CellServDB ThisCell ; do |
676 |
- if [ -e "${EROOT}"/etc/openafs/${x} ] ; then |
677 |
- cp "${EROOT}"/etc/openafs/${x} "${ED}"/etc/openafs/ |
678 |
- fi |
679 |
- done |
680 |
-} |
681 |
- |
682 |
-pkg_postinst() { |
683 |
- elog "This installation should work out of the box (at least the" |
684 |
- elog "client part doing global afs-cell browsing, unless you had" |
685 |
- elog "a previous and different configuration). If you want to" |
686 |
- elog "set up your own cell or modify the standard config," |
687 |
- elog "please have a look at the Gentoo OpenAFS documentation" |
688 |
- elog "(warning: it is not yet up to date wrt the new file locations)" |
689 |
- elog |
690 |
- elog "The documentation can be found at:" |
691 |
- elog " https://wiki.gentoo.org/wiki/OpenAFS" |
692 |
- elog |
693 |
- elog "Systemd users should run emerge --config ${CATEGORY}/${PN} before" |
694 |
- elog "first use and whenever ${EROOT}/etc/openafs/cacheinfo is edited." |
695 |
-} |
696 |
- |
697 |
-pkg_config() { |
698 |
- elog "Setting cache options for systemd." |
699 |
- |
700 |
- SERVICED_FILE="${EROOT}"/etc/systemd/system/openafs-client.service.d/00gentoo.conf |
701 |
- [ ! -e "${SERVICED_FILE}" ] && die "Systemd service.d file ${SERVICED_FILE} not found." |
702 |
- |
703 |
- CACHESIZE=$(cut -d ':' -f 3 "${EROOT}"/etc/openafs/cacheinfo) |
704 |
- [ -z ${CACHESIZE} ] && die "Failed to parse ${EROOT}/etc/openafs/cacheinfo." |
705 |
- |
706 |
- if [ ${CACHESIZE} -lt 131070 ]; then |
707 |
- AFSD_CACHE_ARGS="-stat 300 -dcache 100 -daemons 2 -volumes 50" |
708 |
- elif [ ${CACHESIZE} -lt 524288 ]; then |
709 |
- AFSD_CACHE_ARGS="-stat 2000 -dcache 800 -daemons 3 -volumes 70" |
710 |
- elif [ ${CACHESIZE} -lt 1048576 ]; then |
711 |
- AFSD_CACHE_ARGS="-stat 2800 -dcache 2400 -daemons 5 -volumes 128" |
712 |
- elif [ ${CACHESIZE} -lt 2209715 ]; then |
713 |
- AFSD_CACHE_ARGS="-stat 3600 -dcache 3600 -daemons 5 -volumes 196 -files 50000" |
714 |
- else |
715 |
- AFSD_CACHE_ARGS="-stat 4000 -dcache 4000 -daemons 6 -volumes 256 -files 50000" |
716 |
- fi |
717 |
- |
718 |
- # Replace existing env var if exists, else append line |
719 |
- grep -q "^Environment=\"AFSD_CACHE_ARGS=" "${SERVICED_FILE}" && \ |
720 |
- sed -i "s/^Environment=\"AFSD_CACHE_ARGS=.*/Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"/" "${SERVICED_FILE}" || \ |
721 |
- sed -i "$ a\Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"" "${SERVICED_FILE}" || \ |
722 |
- die "Updating ${SERVICED_FILE} failed." |
723 |
-} |
724 |
|
725 |
diff --git a/net-fs/openafs/openafs-1.6.21.1.ebuild b/net-fs/openafs/openafs-1.6.21.1.ebuild |
726 |
deleted file mode 100644 |
727 |
index 4ecf063fc89..00000000000 |
728 |
--- a/net-fs/openafs/openafs-1.6.21.1.ebuild |
729 |
+++ /dev/null |
730 |
@@ -1,222 +0,0 @@ |
731 |
-# Copyright 1999-2017 Gentoo Foundation |
732 |
-# Distributed under the terms of the GNU General Public License v2 |
733 |
- |
734 |
-EAPI="6" |
735 |
- |
736 |
-inherit autotools eutils flag-o-matic multilib pam systemd toolchain-funcs versionator |
737 |
- |
738 |
-MY_PV=$(delete_version_separator '_') |
739 |
-MY_P="${PN}-${MY_PV}" |
740 |
-PVER="20170822" |
741 |
- |
742 |
-DESCRIPTION="The OpenAFS distributed file system" |
743 |
-HOMEPAGE="https://www.openafs.org/" |
744 |
-# We always d/l the doc tarball as man pages are not USE=doc material |
745 |
-[[ ${PV} == *_pre* ]] && MY_PRE="candidate/" || MY_PRE="" |
746 |
-SRC_URI=" |
747 |
- https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2 |
748 |
- https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-doc.tar.bz2 |
749 |
- https://dev.gentoo.org/~bircoph/afs/${PN}-patches-${PVER}.tar.xz |
750 |
-" |
751 |
- |
752 |
-LICENSE="IBM BSD openafs-krb5-a APSL-2" |
753 |
-SLOT="0" |
754 |
-KEYWORDS="~amd64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" |
755 |
- |
756 |
-IUSE="bitmap-later debug doc fuse kerberos +modules ncurses pam pthreaded-ubik +supergroups" |
757 |
- |
758 |
-CDEPEND=" |
759 |
- virtual/libintl |
760 |
- fuse? ( sys-fs/fuse ) |
761 |
- kerberos? ( virtual/krb5 ) |
762 |
- ncurses? ( sys-libs/ncurses:0= ) |
763 |
- pam? ( virtual/pam )" |
764 |
- |
765 |
-DEPEND="${CDEPEND} |
766 |
- virtual/yacc |
767 |
- doc? ( |
768 |
- app-text/docbook-xsl-stylesheets |
769 |
- dev-libs/libxslt |
770 |
- )" |
771 |
- |
772 |
-RDEPEND="${CDEPEND} |
773 |
- modules? ( ~net-fs/openafs-kernel-${PV} )" |
774 |
- |
775 |
-S="${WORKDIR}/${MY_P}" |
776 |
- |
777 |
-PATCHES=( "${WORKDIR}/gentoo/patches" ) |
778 |
- |
779 |
-src_prepare() { |
780 |
- default |
781 |
- |
782 |
- # fixing 2-nd level makefiles to honor flags |
783 |
- sed -i -r 's/\<CFLAGS[[:space:]]*=/CFLAGS+=/; s/\<LDFLAGS[[:space:]]*=/LDFLAGS+=/' \ |
784 |
- src/*/Makefile.in || die '*/Makefile.in sed failed' |
785 |
- |
786 |
- # packaging is f-ed up, so we can't run eautoreconf |
787 |
- # run autotools commands based on what is listed in regen.sh |
788 |
- eaclocal -I src/cf |
789 |
- eautoconf |
790 |
- eautoconf -o configure-libafs configure-libafs.ac |
791 |
- eautoheader |
792 |
- einfo "Deleting autom4te.cache directory" |
793 |
- rm -rf autom4te.cache |
794 |
-} |
795 |
- |
796 |
-src_configure() { |
797 |
- local myconf |
798 |
- use debug && use pam && myconf="--enable-debug-pam" |
799 |
- |
800 |
- AFS_SYSKVERS=26 \ |
801 |
- econf \ |
802 |
- --disable-kernel-module \ |
803 |
- --disable-strip-binaries \ |
804 |
- $(use_enable bitmap-later) \ |
805 |
- $(use_enable debug) \ |
806 |
- $(use_enable debug debug-lwp) \ |
807 |
- $(use_enable fuse fuse-client) \ |
808 |
- $(use_enable ncurses gtx) \ |
809 |
- $(use_enable pam) \ |
810 |
- $(use_enable pthreaded-ubik) \ |
811 |
- $(use_enable supergroups) \ |
812 |
- $(use_with doc html-xsl /usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl) \ |
813 |
- $(use_with kerberos krb5) \ |
814 |
- "${myconf}" |
815 |
-} |
816 |
- |
817 |
-src_compile() { |
818 |
- emake all_nolibafs |
819 |
- local d |
820 |
- if use doc; then |
821 |
- for d in doc/xml/{AdminGuide,QuickStartUnix,UserGuide}; do |
822 |
- emake -C "${d}" html; |
823 |
- done |
824 |
- fi |
825 |
-} |
826 |
- |
827 |
-src_install() { |
828 |
- local OPENRCDIR="${WORKDIR}/gentoo/openrc" |
829 |
- local SYSTEMDDIR="${WORKDIR}/gentoo/systemd" |
830 |
- |
831 |
- emake DESTDIR="${ED}" install_nolibafs |
832 |
- |
833 |
- insinto /etc/openafs |
834 |
- doins src/afsd/CellServDB |
835 |
- echo "/afs:/var/cache/openafs:200000" > "${ED}"/etc/openafs/cacheinfo |
836 |
- echo "openafs.org" > "${ED}"/etc/openafs/ThisCell |
837 |
- |
838 |
- # pam_afs and pam_afs.krb have been installed in irregular locations, fix |
839 |
- if use pam ; then |
840 |
- dopammod "${ED}"/usr/$(get_libdir)/pam_afs* |
841 |
- fi |
842 |
- rm -f "${ED}"/usr/$(get_libdir)/pam_afs* || die |
843 |
- |
844 |
- # remove kdump stuff provided by kexec-tools #222455 |
845 |
- rm -rf "${ED}"/usr/sbin/kdump* |
846 |
- |
847 |
- # avoid collision with mit_krb5's version of kpasswd |
848 |
- mv "${ED}"/usr/bin/kpasswd{,_afs} || die |
849 |
- mv "${ED}"/usr/share/man/man1/kpasswd{,_afs}.1 || die |
850 |
- |
851 |
- # move lwp stuff around #200674 #330061 |
852 |
- mv "${ED}"/usr/include/{lwp,lock,timer}.h "${ED}"/usr/include/afs/ || die |
853 |
- mv "${ED}"/usr/$(get_libdir)/liblwp* "${ED}"/usr/$(get_libdir)/afs/ || die |
854 |
- # update paths to the relocated lwp headers |
855 |
- sed -ri \ |
856 |
- -e '/^#include <(lwp|lock|timer).h>/s:<([^>]*)>:<afs/\1>:' \ |
857 |
- "${ED}"/usr/include/*.h \ |
858 |
- "${ED}"/usr/include/*/*.h \ |
859 |
- || die |
860 |
- |
861 |
- # minimal documentation |
862 |
- use pam && doman src/pam/pam_afs.5 |
863 |
- DOCS=( "${WORKDIR}/gentoo/README.Gentoo" |
864 |
- src/afsd/CellServDB NEWS README ) |
865 |
- |
866 |
- # documentation package |
867 |
- if use doc ; then |
868 |
- DOCS+=( doc/{arch,examples,pdf,protocol,txt} ) |
869 |
- dohtml -r doc/xml/ |
870 |
- fi |
871 |
- |
872 |
- einstalldocs |
873 |
- |
874 |
- # Gentoo related scripts |
875 |
- newinitd "${OPENRCDIR}"/openafs-client.initd openafs-client |
876 |
- newconfd "${OPENRCDIR}"/openafs-client.confd openafs-client |
877 |
- newinitd "${OPENRCDIR}"/openafs-server.initd openafs-server |
878 |
- newconfd "${OPENRCDIR}"/openafs-server.confd openafs-server |
879 |
- systemd_dotmpfilesd "${SYSTEMDDIR}"/tmpfiles.d/openafs-client.conf |
880 |
- systemd_dounit "${SYSTEMDDIR}"/openafs-client.service |
881 |
- systemd_dounit "${SYSTEMDDIR}"/openafs-server.service |
882 |
- systemd_install_serviced "${SYSTEMDDIR}"/openafs-client.service.conf |
883 |
- systemd_install_serviced "${SYSTEMDDIR}"/openafs-server.service.conf |
884 |
- |
885 |
- # used directories: client |
886 |
- keepdir /etc/openafs |
887 |
- |
888 |
- # used directories: server |
889 |
- keepdir /etc/openafs/server |
890 |
- diropts -m0700 |
891 |
- keepdir /var/lib/openafs |
892 |
- keepdir /var/lib/openafs/db |
893 |
- diropts -m0755 |
894 |
- keepdir /var/lib/openafs/logs |
895 |
- |
896 |
- # link logfiles to /var/log |
897 |
- dosym ../lib/openafs/logs /var/log/openafs |
898 |
-} |
899 |
- |
900 |
-pkg_preinst() { |
901 |
- ## Somewhat intelligently install default configuration files |
902 |
- ## (when they are not present) |
903 |
- local x |
904 |
- for x in cacheinfo CellServDB ThisCell ; do |
905 |
- if [ -e "${EROOT}"/etc/openafs/${x} ] ; then |
906 |
- cp "${EROOT}"/etc/openafs/${x} "${ED}"/etc/openafs/ |
907 |
- fi |
908 |
- done |
909 |
-} |
910 |
- |
911 |
-pkg_postinst() { |
912 |
- elog "This installation should work out of the box (at least the" |
913 |
- elog "client part doing global afs-cell browsing, unless you had" |
914 |
- elog "a previous and different configuration). If you want to" |
915 |
- elog "set up your own cell or modify the standard config," |
916 |
- elog "please have a look at the Gentoo OpenAFS documentation" |
917 |
- elog "(warning: it is not yet up to date wrt the new file locations)" |
918 |
- elog |
919 |
- elog "The documentation can be found at:" |
920 |
- elog " https://wiki.gentoo.org/wiki/OpenAFS" |
921 |
- elog |
922 |
- elog "Systemd users should run emerge --config ${CATEGORY}/${PN} before" |
923 |
- elog "first use and whenever ${EROOT}/etc/openafs/cacheinfo is edited." |
924 |
-} |
925 |
- |
926 |
-pkg_config() { |
927 |
- elog "Setting cache options for systemd." |
928 |
- |
929 |
- SERVICED_FILE="${EROOT}"/etc/systemd/system/openafs-client.service.d/00gentoo.conf |
930 |
- [ ! -e "${SERVICED_FILE}" ] && die "Systemd service.d file ${SERVICED_FILE} not found." |
931 |
- |
932 |
- CACHESIZE=$(cut -d ':' -f 3 "${EROOT}"/etc/openafs/cacheinfo) |
933 |
- [ -z ${CACHESIZE} ] && die "Failed to parse ${EROOT}/etc/openafs/cacheinfo." |
934 |
- |
935 |
- if [ ${CACHESIZE} -lt 131070 ]; then |
936 |
- AFSD_CACHE_ARGS="-stat 300 -dcache 100 -daemons 2 -volumes 50" |
937 |
- elif [ ${CACHESIZE} -lt 524288 ]; then |
938 |
- AFSD_CACHE_ARGS="-stat 2000 -dcache 800 -daemons 3 -volumes 70" |
939 |
- elif [ ${CACHESIZE} -lt 1048576 ]; then |
940 |
- AFSD_CACHE_ARGS="-stat 2800 -dcache 2400 -daemons 5 -volumes 128" |
941 |
- elif [ ${CACHESIZE} -lt 2209715 ]; then |
942 |
- AFSD_CACHE_ARGS="-stat 3600 -dcache 3600 -daemons 5 -volumes 196 -files 50000" |
943 |
- else |
944 |
- AFSD_CACHE_ARGS="-stat 4000 -dcache 4000 -daemons 6 -volumes 256 -files 50000" |
945 |
- fi |
946 |
- |
947 |
- # Replace existing env var if exists, else append line |
948 |
- grep -q "^Environment=\"AFSD_CACHE_ARGS=" "${SERVICED_FILE}" && \ |
949 |
- sed -i "s/^Environment=\"AFSD_CACHE_ARGS=.*/Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"/" "${SERVICED_FILE}" || \ |
950 |
- sed -i "$ a\Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"" "${SERVICED_FILE}" || \ |
951 |
- die "Updating ${SERVICED_FILE} failed." |
952 |
-} |