1 |
commit: 7023b762d44f62443f41a8d4b9a88bd92352d28a |
2 |
Author: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 30 13:59:21 2016 +0000 |
4 |
Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 30 14:05:10 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7023b762 |
7 |
|
8 |
net-fs/openafs-kernel: version bump |
9 |
|
10 |
- kernels up to 4.4.x are supported |
11 |
- add optional debugging support |
12 |
|
13 |
Package-Manager: portage-2.2.28 |
14 |
Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org> |
15 |
|
16 |
net-fs/openafs-kernel/Manifest | 1 + |
17 |
net-fs/openafs-kernel/openafs-kernel-1.6.18.ebuild | 123 +++++++++++++++++++++ |
18 |
2 files changed, 124 insertions(+) |
19 |
|
20 |
diff --git a/net-fs/openafs-kernel/Manifest b/net-fs/openafs-kernel/Manifest |
21 |
index 05a06cb..8e07865 100644 |
22 |
--- a/net-fs/openafs-kernel/Manifest |
23 |
+++ b/net-fs/openafs-kernel/Manifest |
24 |
@@ -1,2 +1,3 @@ |
25 |
DIST openafs-1.6.17-src.tar.bz2 14607107 SHA256 96413a2dbffdc9170cc5dde6aa5ad0ae2383c6106994285ed8f186928813a398 SHA512 3ca61a7731c9bd9bae7da2f7b3900438fcc9f75c95b354574389c2203af2ec0a7b4dcaaf13a437743477fcad8a46c3bbb8c68255a976b9a9917b8f0a0cdf028f WHIRLPOOL 92de51878836a721e6fadbe2f6c7a8069ecf622a08fd05e3a01d8fef376bd2e18e9f3b4715d42a26e8d5f1d665f91924520ed6928ed1f460bac49b1bc906e129 |
26 |
+DIST openafs-1.6.18-src.tar.bz2 14645551 SHA256 b3c35e7be6b6c86b91e7c699fd015f53c87bc19d1ae8ec3ec9cda6b97327d3b6 SHA512 e4c9afe857bed240ba2c8fdb0b22e680c10d3bed4cde8966c314610982c5fa6e6ead81bcf869a3cc9d41b8bbcefaaf2d165e8ae6dd6606ebcb5b986fc1aecee8 WHIRLPOOL 62cc93f6a3a549dae4ad111cdaaba907502c75329cbfd0052d4026df29323e35782e4cd9f073c71ac7df42258c5f4a18ba8e0820dbf2dce44a1627ed107b91dc |
27 |
DIST openafs-patches-20160321.tar.xz 10940 SHA256 b8919d4db7ac962922f797b5f6a855de27f019f43163d4362946ae9b80d73278 SHA512 581f2248cd9926e79d9b2d30d5e9e3349794e8751e0382fd47c59d5d131f7d814744ed9926f008525466afa9c783e59b2f10d3def5d37966aad98c04873cf4c5 WHIRLPOOL 6da7619158dccb5fcc86e73d9d2f0c83f16fdf2dee8bf51e860db307e96262f5e669e2f3d34b166f0b5cd83f9b5b36018efc4de8e45e1265964919b24ac85b1a |
28 |
|
29 |
diff --git a/net-fs/openafs-kernel/openafs-kernel-1.6.18.ebuild b/net-fs/openafs-kernel/openafs-kernel-1.6.18.ebuild |
30 |
new file mode 100644 |
31 |
index 0000000..b0dbe75 |
32 |
--- /dev/null |
33 |
+++ b/net-fs/openafs-kernel/openafs-kernel-1.6.18.ebuild |
34 |
@@ -0,0 +1,123 @@ |
35 |
+# Copyright 1999-2016 Gentoo Foundation |
36 |
+# Distributed under the terms of the GNU General Public License v2 |
37 |
+# $Id$ |
38 |
+ |
39 |
+EAPI="6" |
40 |
+ |
41 |
+inherit autotools linux-mod multilib toolchain-funcs versionator |
42 |
+ |
43 |
+MY_PV=$(delete_version_separator '_') |
44 |
+MY_PN="${PN/-kernel}" |
45 |
+MY_P="${MY_PN}-${MY_PV}" |
46 |
+PVER="20160321" |
47 |
+ |
48 |
+DESCRIPTION="The OpenAFS distributed file system kernel module" |
49 |
+HOMEPAGE="https://www.openafs.org/" |
50 |
+# We always d/l the doc tarball as man pages are not USE=doc material |
51 |
+[[ ${PV} == *_pre* ]] && MY_PRE="candidate/" || MY_PRE="" |
52 |
+SRC_URI=" |
53 |
+ https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2 |
54 |
+ https://dev.gentoo.org/~bircoph/afs/${MY_PN}-patches-${PVER}.tar.xz |
55 |
+" |
56 |
+ |
57 |
+LICENSE="IBM BSD openafs-krb5-a APSL-2" |
58 |
+SLOT="0" |
59 |
+KEYWORDS="~amd64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" |
60 |
+IUSE="debug" |
61 |
+ |
62 |
+S=${WORKDIR}/${MY_P} |
63 |
+ |
64 |
+CONFIG_CHECK="!DEBUG_RODATA ~!AFS_FS KEYS" |
65 |
+ERROR_DEBUG_RODATA="OpenAFS is incompatible with linux' CONFIG_DEBUG_RODATA option" |
66 |
+ERROR_AFS_FS="OpenAFS conflicts with the in-kernel AFS-support. Make sure not to load both at the same time!" |
67 |
+ERROR_KEYS="OpenAFS needs CONFIG_KEYS option enabled" |
68 |
+ |
69 |
+QA_TEXTRELS_x86_fbsd="/boot/modules/libafs.ko" |
70 |
+QA_TEXTRELS_amd64_fbsd="/boot/modules/libafs.ko" |
71 |
+ |
72 |
+PATCHES=( "${WORKDIR}/gentoo/patches" ) |
73 |
+ |
74 |
+pkg_pretend() { |
75 |
+ if use kernel_linux && kernel_is ge 4 5 ; then |
76 |
+ ewarn "Gentoo supports kernels which are supported by OpenAFS" |
77 |
+ ewarn "which are limited to the kernel versions: < 4.5" |
78 |
+ ewarn "" |
79 |
+ ewarn "You are free to utilize epatch_user to provide whatever" |
80 |
+ ewarn "support you feel is appropriate, but will not receive" |
81 |
+ ewarn "support as a result of those changes." |
82 |
+ ewarn "" |
83 |
+ ewarn "Please do not file a bug report about this." |
84 |
+ fi |
85 |
+} |
86 |
+ |
87 |
+pkg_setup() { |
88 |
+ if use kernel_linux; then |
89 |
+ linux-mod_pkg_setup |
90 |
+ fi |
91 |
+} |
92 |
+ |
93 |
+src_prepare() { |
94 |
+ default |
95 |
+ |
96 |
+ # packaging is f-ed up, so we can't run eautoreconf |
97 |
+ # run autotools commands based on what is listed in regen.sh |
98 |
+ eaclocal -I src/cf |
99 |
+ eautoconf |
100 |
+ eautoconf -o configure-libafs configure-libafs.ac |
101 |
+ eautoheader |
102 |
+ einfo "Deleting autom4te.cache directory" |
103 |
+ rm -rf autom4te.cache |
104 |
+} |
105 |
+ |
106 |
+src_configure() { |
107 |
+ local myconf="" |
108 |
+ # OpenAFS 1.6.11 has a bug with kernels 3.17-3.17.2 that requires a config option |
109 |
+ if use kernel_linux && kernel_is -ge 3 17 && kernel_is -le 3 17 2; then |
110 |
+ myconf="--enable-linux-d_splice_alias-extra-iput" |
111 |
+ fi |
112 |
+ |
113 |
+ local ARCH="$(tc-arch-kernel)" |
114 |
+ local MY_ARCH="$(tc-arch)" |
115 |
+ local BSD_BUILD_DIR="/usr/src/sys/${MY_ARCH}/compile/GENERIC" |
116 |
+ |
117 |
+ if use kernel_linux; then |
118 |
+ myconf+=( --with-linux-kernel-headers="${KV_DIR}" \ |
119 |
+ --with-linux-kernel-build="${KV_OUT_DIR}" |
120 |
+ ) |
121 |
+ elif use kernel_FreeBSD; then |
122 |
+ myconf+=( --with-bsd-kernel-build="${BSD_BUILD_DIR}" ) |
123 |
+ fi |
124 |
+ econf \ |
125 |
+ $(use_enable debug debug-kernel) \ |
126 |
+ "${myconf[@]}" |
127 |
+} |
128 |
+ |
129 |
+src_compile() { |
130 |
+ ARCH="$(tc-arch-kernel)" AR="$(tc-getAR)" emake V=1 -j1 only_libafs |
131 |
+} |
132 |
+ |
133 |
+src_install() { |
134 |
+ if use kernel_linux; then |
135 |
+ local srcdir=$(expr "${S}"/src/libafs/MODLOAD-*) |
136 |
+ [[ -f ${srcdir}/libafs.${KV_OBJ} ]] || die "Couldn't find compiled kernel module" |
137 |
+ |
138 |
+ MODULE_NAMES="libafs(fs/openafs:${srcdir})" |
139 |
+ |
140 |
+ linux-mod_src_install |
141 |
+ elif use kernel_FreeBSD; then |
142 |
+ insinto /boot/modules |
143 |
+ doins "${S}"/src/libafs/MODLOAD/libafs.ko |
144 |
+ fi |
145 |
+} |
146 |
+ |
147 |
+pkg_postinst() { |
148 |
+ # Update linker.hints file |
149 |
+ use kernel_FreeBSD && /usr/sbin/kldxref "${EPREFIX}/boot/modules" |
150 |
+ use kernel_linux && linux-mod_pkg_postinst |
151 |
+} |
152 |
+ |
153 |
+pkg_postrm() { |
154 |
+ # Update linker.hints file |
155 |
+ use kernel_FreeBSD && /usr/sbin/kldxref "${EPREFIX}/boot/modules" |
156 |
+ use kernel_linux && linux-mod_pkg_postrm |
157 |
+} |