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