1 |
commit: b4c542201cff236f67aac6eaa0ca86863d34df80 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 29 08:38:06 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 29 08:38:06 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4c54220 |
7 |
|
8 |
www-apache/mod_auth_kerb: add Debian patch for krb5 ABI break |
9 |
|
10 |
Was using an internal API. |
11 |
|
12 |
Closes: https://bugs.gentoo.org/830208 |
13 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
14 |
|
15 |
.../files/mod_auth_kerb-5.4-api-change-krb5.patch | 51 ++++++++++++++++++ |
16 |
.../mod_auth_kerb/mod_auth_kerb-5.4-r4.ebuild | 63 ++++++++++++++++++++++ |
17 |
2 files changed, 114 insertions(+) |
18 |
|
19 |
diff --git a/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-api-change-krb5.patch b/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-api-change-krb5.patch |
20 |
new file mode 100644 |
21 |
index 000000000000..d0421a0eb6ea |
22 |
--- /dev/null |
23 |
+++ b/www-apache/mod_auth_kerb/files/mod_auth_kerb-5.4-api-change-krb5.patch |
24 |
@@ -0,0 +1,51 @@ |
25 |
+https://sources.debian.org/data/main/liba/libapache-mod-auth-kerb/5.4-2.5/debian/patches/0011-Always-use-NONE-replay-cache-type.patch |
26 |
+https://bugs.gentoo.org/830208 |
27 |
+--- a/src/mod_auth_kerb.c |
28 |
++++ b/src/mod_auth_kerb.c |
29 |
+@@ -2061,28 +2061,6 @@ |
30 |
+ return ret; |
31 |
+ } |
32 |
+ |
33 |
+-static int |
34 |
+-have_rcache_type(const char *type) |
35 |
+-{ |
36 |
+- krb5_error_code ret; |
37 |
+- krb5_context context; |
38 |
+- krb5_rcache id = NULL; |
39 |
+- int found; |
40 |
+- |
41 |
+- ret = krb5_init_context(&context); |
42 |
+- if (ret) |
43 |
+- return 0; |
44 |
+- |
45 |
+- ret = krb5_rc_resolve_full(context, &id, "none:"); |
46 |
+- found = (ret == 0); |
47 |
+- |
48 |
+- if (ret == 0) |
49 |
+- krb5_rc_destroy(context, id); |
50 |
+- krb5_free_context(context); |
51 |
+- |
52 |
+- return found; |
53 |
+-} |
54 |
+- |
55 |
+ /*************************************************************************** |
56 |
+ Module Setup/Configuration |
57 |
+ ***************************************************************************/ |
58 |
+@@ -2143,7 +2121,7 @@ |
59 |
+ #ifndef HEIMDAL |
60 |
+ /* Suppress the MIT replay cache. Requires MIT Kerberos 1.4.0 or later. |
61 |
+ 1.3.x are covered by the hack overiding the replay calls */ |
62 |
+- if (getenv("KRB5RCACHETYPE") == NULL && have_rcache_type("none")) |
63 |
++ if (getenv("KRB5RCACHETYPE") == NULL) |
64 |
+ putenv(strdup("KRB5RCACHETYPE=none")); |
65 |
+ #endif |
66 |
+ } |
67 |
+@@ -2185,7 +2163,7 @@ |
68 |
+ #ifndef HEIMDAL |
69 |
+ /* Suppress the MIT replay cache. Requires MIT Kerberos 1.4.0 or later. |
70 |
+ 1.3.x are covered by the hack overiding the replay calls */ |
71 |
+- if (getenv("KRB5RCACHETYPE") == NULL && have_rcache_type("none")) |
72 |
++ if (getenv("KRB5RCACHETYPE") == NULL) |
73 |
+ putenv(strdup("KRB5RCACHETYPE=none")); |
74 |
+ #endif |
75 |
+ #ifdef STANDARD20_MODULE_STUFF |
76 |
|
77 |
diff --git a/www-apache/mod_auth_kerb/mod_auth_kerb-5.4-r4.ebuild b/www-apache/mod_auth_kerb/mod_auth_kerb-5.4-r4.ebuild |
78 |
new file mode 100644 |
79 |
index 000000000000..c8e1b13352e1 |
80 |
--- /dev/null |
81 |
+++ b/www-apache/mod_auth_kerb/mod_auth_kerb-5.4-r4.ebuild |
82 |
@@ -0,0 +1,63 @@ |
83 |
+# Copyright 1999-2021 Gentoo Authors |
84 |
+# Distributed under the terms of the GNU General Public License v2 |
85 |
+ |
86 |
+EAPI=7 |
87 |
+ |
88 |
+inherit apache-module depend.apache tmpfiles |
89 |
+ |
90 |
+DESCRIPTION="An Apache authentication module using Kerberos" |
91 |
+HOMEPAGE="http://modauthkerb.sourceforge.net/" |
92 |
+SRC_URI="mirror://sourceforge/project/modauthkerb/${PN}/${P}/${P}.tar.gz |
93 |
+ https://dev.gentoo.org/~mgorny/dist/${P}-gentoo-patchset.tar.bz2" |
94 |
+ |
95 |
+LICENSE="BSD openafs-krb5-a HPND" |
96 |
+SLOT="0" |
97 |
+KEYWORDS="~amd64 ~x86" |
98 |
+ |
99 |
+DEPEND="virtual/krb5" |
100 |
+RDEPEND="${DEPEND}" |
101 |
+ |
102 |
+APACHE2_MOD_CONF="11_${PN}" |
103 |
+APACHE2_MOD_DEFINE="AUTH_KERB" |
104 |
+ |
105 |
+DOCFILES="INSTALL README" |
106 |
+ |
107 |
+need_apache2 |
108 |
+ |
109 |
+PATCHES=( |
110 |
+ "${WORKDIR}/${P}-gentoo-patchset"/${P}-rcopshack.patch |
111 |
+ "${WORKDIR}/${P}-gentoo-patchset"/${P}-fixes.patch |
112 |
+ "${WORKDIR}/${P}-gentoo-patchset"/${P}-s4u2proxy.patch |
113 |
+ "${WORKDIR}/${P}-gentoo-patchset"/${P}-httpd24.patch |
114 |
+ "${WORKDIR}/${P}-gentoo-patchset"/${P}-delegation.patch |
115 |
+ "${WORKDIR}/${P}-gentoo-patchset"/${P}-cachedir.patch |
116 |
+ "${WORKDIR}/${P}-gentoo-patchset"/${P}-longuser.patch |
117 |
+ "${WORKDIR}/${P}-gentoo-patchset"/${P}-handle-continue.patch |
118 |
+ "${WORKDIR}/${P}-gentoo-patchset"/${P}-heimdal.patch |
119 |
+ |
120 |
+ # bug #830208 |
121 |
+ "${FILESDIR}"/${P}-api-change-krb5.patch |
122 |
+) |
123 |
+ |
124 |
+# Work around Bug #616612 |
125 |
+pkg_setup() { |
126 |
+ _init_apache2 |
127 |
+ _init_apache2_late |
128 |
+} |
129 |
+ |
130 |
+src_configure() { |
131 |
+ CFLAGS="" APXS="${APXS}" econf --with-krb5=/usr --without-krb4 |
132 |
+} |
133 |
+ |
134 |
+src_compile() { |
135 |
+ emake |
136 |
+} |
137 |
+ |
138 |
+src_install() { |
139 |
+ apache-module_src_install |
140 |
+ dotmpfiles "${FILESDIR}/${PN}.conf" |
141 |
+} |
142 |
+ |
143 |
+pkg_postinst() { |
144 |
+ tmpfiles_process ${PN}.conf |
145 |
+} |