1 |
commit: 5921dd829647c67b900a994522325dc2e0fcb1ed |
2 |
Author: Tomáš Mózes <hydrapolic <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Dec 23 12:16:17 2021 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 30 20:52:25 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5921dd82 |
7 |
|
8 |
net-dialup/freeradius: bump to 3.0.25 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/719984 |
11 |
Closes: https://bugs.gentoo.org/721040 |
12 |
Closes: https://bugs.gentoo.org/784143 |
13 |
Closes: https://bugs.gentoo.org/816972 |
14 |
Closes: https://bugs.gentoo.org/818205 |
15 |
Closes: https://github.com/gentoo/gentoo/pull/23479 |
16 |
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com> |
17 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
18 |
|
19 |
net-dialup/freeradius/Manifest | 1 + |
20 |
net-dialup/freeradius/files/radius.conf-r6 | 22 ++ |
21 |
net-dialup/freeradius/freeradius-3.0.25.ebuild | 267 +++++++++++++++++++++++++ |
22 |
3 files changed, 290 insertions(+) |
23 |
|
24 |
diff --git a/net-dialup/freeradius/Manifest b/net-dialup/freeradius/Manifest |
25 |
index b3bca2a66368..9c312f87501d 100644 |
26 |
--- a/net-dialup/freeradius/Manifest |
27 |
+++ b/net-dialup/freeradius/Manifest |
28 |
@@ -1,3 +1,4 @@ |
29 |
+DIST freeradius-3.0.25.tar.gz 5300245 BLAKE2B bf8908aa7bfabb9e15fa841457f176a4f2697bdec7994485516ef338908b46f2168260b7acf1a7120a687e543f0381bb787567bb4d564b9d14a3eb464a0e9ed6 SHA512 13382a53e6a1a4495c6f53e662ce21b80d73b6134a72f099f05495b64c56ae1a6c1cd1281311f1c3695d8532207fe5bd3d2026ed2c45f3cb5adb1011f1505ee7 |
30 |
DIST freeradius-server-3.0.20.tar.gz 5002727 BLAKE2B f481ad22105694a4af3f0f0c1b4f6e395e8da0fe65274e32ebeed07e3c9b1869029e6ffbc655cfa41d5de2a1dcba54acee33a7a10d28bfbfce791b7ccd0fc57a SHA512 513ed0a5d9e6b9a8d89a9b02c86ff528a9ff14d928f4c1040ca44702465abd711588fe6afa35554cb2c8e8bd7f19dd5be3dbc78445c62c7b00bf5cbc4c621312 |
31 |
DIST freeradius-server-3.0.21.tar.gz 5028506 BLAKE2B 3ccf9704a1f8b1ec5f6f066a475083fe7cefa793e8f53ecd287866fc505a832bf8031a4d07c2e07f79da6c6fb82e6a3435b0154d1f135167ebddfc9b8d401544 SHA512 85af1c305e99a56400b04be5c966900e7df8beb7b54626d6aa0cb300dc124817e43b424f9b27d86966bb76cca87dce741812ed8d681a568c7d7b63b3b53a9dfa |
32 |
DIST freeradius-server-3.0.22.tar.gz 5248422 BLAKE2B b48170a02a354562dc2dd27230476d2ce0823fa2f577dde3f3947ee14653d912a562eb480c2d2ed53b0ff536f63ce4482b24f2777b4a41ff2ed4aba88f4c196e SHA512 8ee05350b1a5e811a51030a3ef0c511c58275407171f0ce41775e3695f3e9a4477e2fc288541015d314be5457154201d4e95f4c45cf7f503bc8829909c2551a8 |
33 |
|
34 |
diff --git a/net-dialup/freeradius/files/radius.conf-r6 b/net-dialup/freeradius/files/radius.conf-r6 |
35 |
new file mode 100644 |
36 |
index 000000000000..50d2a1ce1f14 |
37 |
--- /dev/null |
38 |
+++ b/net-dialup/freeradius/files/radius.conf-r6 |
39 |
@@ -0,0 +1,22 @@ |
40 |
+# Config file for /etc/init.d/radiusd |
41 |
+ |
42 |
+# see man pages for radiusd run `radiusd -h` |
43 |
+# for valid cmdline options |
44 |
+#RADIUSD_OPTS="" |
45 |
+ |
46 |
+# Change this value if you change it in /etc/raddb/radiusd.conf |
47 |
+pidfile=/run/radiusd/radiusd.pid |
48 |
+ |
49 |
+# Change these values if you change them in /etc/raddb/radiusd.conf |
50 |
+RADIUSD_USER=radius |
51 |
+RADIUSD_GROUP=radius |
52 |
+ |
53 |
+RADIUSD_LOGPATH=/var/log/radius |
54 |
+ |
55 |
+# If you set up logging to syslog in /etc/raddb/radiusd.conf, you want |
56 |
+# to uncomment the following line. |
57 |
+#rc_use="logger" |
58 |
+ |
59 |
+# If you use ldap, start the ldap server prior to FreeRADIUS to avoid |
60 |
+# startup crashes. |
61 |
+#rc_use="ldap" |
62 |
|
63 |
diff --git a/net-dialup/freeradius/freeradius-3.0.25.ebuild b/net-dialup/freeradius/freeradius-3.0.25.ebuild |
64 |
new file mode 100644 |
65 |
index 000000000000..9479f1209c3d |
66 |
--- /dev/null |
67 |
+++ b/net-dialup/freeradius/freeradius-3.0.25.ebuild |
68 |
@@ -0,0 +1,267 @@ |
69 |
+# Copyright 1999-2021 Gentoo Authors |
70 |
+# Distributed under the terms of the GNU General Public License v2 |
71 |
+ |
72 |
+EAPI=7 |
73 |
+ |
74 |
+PYTHON_COMPAT=( python3_{8..10} ) |
75 |
+inherit autotools pam python-single-r1 systemd |
76 |
+ |
77 |
+MY_PV=$(ver_rs 1- "_") |
78 |
+ |
79 |
+DESCRIPTION="Highly configurable free RADIUS server" |
80 |
+HOMEPAGE="https://freeradius.org/" |
81 |
+SRC_URI="https://github.com/FreeRADIUS/freeradius-server/archive/release_${MY_PV}.tar.gz -> ${P}.tar.gz" |
82 |
+S="${WORKDIR}/freeradius-server-release_${MY_PV}" |
83 |
+ |
84 |
+LICENSE="GPL-2" |
85 |
+SLOT="0" |
86 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86" |
87 |
+ |
88 |
+IUSE=" |
89 |
+ debug firebird iodbc kerberos ldap memcached mysql mongodb odbc oracle pam |
90 |
+ pcap postgres python readline redis rest samba sqlite ssl systemd |
91 |
+" |
92 |
+ |
93 |
+RESTRICT="test firebird? ( bindist )" |
94 |
+ |
95 |
+# NOTE: Temporary freeradius doesn't support linking with mariadb client |
96 |
+# libs also if code is compliant, will be available in the next release. |
97 |
+# (http://lists.freeradius.org/pipermail/freeradius-devel/2018-October/013228.html)a |
98 |
+ |
99 |
+# TODO: rlm_mschap works with both samba library or without. I need to avoid |
100 |
+# linking of samba library if -samba is used. |
101 |
+RDEPEND="acct-group/radius |
102 |
+ acct-user/radius |
103 |
+ !net-dialup/cistronradius |
104 |
+ dev-lang/perl:= |
105 |
+ sys-libs/gdbm:= |
106 |
+ sys-libs/talloc |
107 |
+ virtual/libcrypt:= |
108 |
+ firebird? ( dev-db/firebird ) |
109 |
+ iodbc? ( dev-db/libiodbc ) |
110 |
+ kerberos? ( virtual/krb5 ) |
111 |
+ ldap? ( net-nds/openldap ) |
112 |
+ memcached? ( dev-libs/libmemcached ) |
113 |
+ mysql? ( dev-db/mysql-connector-c ) |
114 |
+ mongodb? ( >=dev-libs/mongo-c-driver-1.13.0-r1 ) |
115 |
+ odbc? ( dev-db/unixODBC ) |
116 |
+ oracle? ( dev-db/oracle-instantclient-basic ) |
117 |
+ pam? ( sys-libs/pam ) |
118 |
+ pcap? ( net-libs/libpcap ) |
119 |
+ postgres? ( dev-db/postgresql:= ) |
120 |
+ python? ( ${PYTHON_DEPS} ) |
121 |
+ readline? ( sys-libs/readline:0= ) |
122 |
+ redis? ( dev-libs/hiredis:= ) |
123 |
+ rest? ( dev-libs/json-c:= ) |
124 |
+ samba? ( net-fs/samba ) |
125 |
+ sqlite? ( dev-db/sqlite:3 ) |
126 |
+ ssl? ( |
127 |
+ dev-libs/openssl:0=[-bindist(-)] |
128 |
+ ) |
129 |
+ systemd? ( sys-apps/systemd )" |
130 |
+DEPEND="${RDEPEND}" |
131 |
+ |
132 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
133 |
+ |
134 |
+# 721040 |
135 |
+QA_SONAME="usr/lib.*/libfreeradius-.*.so" |
136 |
+ |
137 |
+PATCHES=( |
138 |
+ "${FILESDIR}"/${PN}-3.0.20-systemd-service.patch |
139 |
+) |
140 |
+ |
141 |
+pkg_setup() { |
142 |
+ if use python ; then |
143 |
+ python-single-r1_pkg_setup |
144 |
+ export PYTHONBIN="${EPYTHON}" |
145 |
+ fi |
146 |
+} |
147 |
+ |
148 |
+src_prepare() { |
149 |
+ # most of the configuration options do not appear as ./configure |
150 |
+ # switches. Instead it identifies the directories that are available |
151 |
+ # and run through them. These might check for the presence of |
152 |
+ # various libraries, in which case they are not built. To avoid |
153 |
+ # automagic dependencies, we just remove all the modules that we're |
154 |
+ # not interested in using. |
155 |
+ |
156 |
+ eapply_user |
157 |
+ default |
158 |
+ |
159 |
+ use ssl || { rm -r src/modules/rlm_eap/types/rlm_eap_{tls,ttls,peap} || die ; } |
160 |
+ use ldap || { rm -r src/modules/rlm_ldap || die ; } |
161 |
+ use kerberos || { rm -r src/modules/rlm_krb5 || die ; } |
162 |
+ use memcached || { rm -r src/modules/rlm_cache/drivers/rlm_cache_memcached || die ; } |
163 |
+ use pam || { rm -r src/modules/rlm_pam || die ; } |
164 |
+ # Drop support of python2 |
165 |
+ rm -r src/modules/rlm_python || die |
166 |
+ use python || { rm -r src/modules/rlm_python3 || die ; } |
167 |
+ use rest || { rm -r src/modules/rlm_rest || die ; } |
168 |
+ use redis || { rm -r src/modules/rlm_redis{,who} || die ; } |
169 |
+ # Do not install ruby rlm module, bug #483108 |
170 |
+ rm -r src/modules/rlm_ruby || die |
171 |
+ |
172 |
+ # these are all things we don't have in portage/I don't want to deal |
173 |
+ # with myself |
174 |
+ rm -r src/modules/rlm_eap/types/rlm_eap_tnc || die # requires TNCS library |
175 |
+ rm -r src/modules/rlm_eap/types/rlm_eap_ikev2 || die # requires libeap-ikev2 |
176 |
+ rm -r src/modules/rlm_opendirectory || die # requires some membership.h |
177 |
+ rm -r src/modules/rlm_sql/drivers/rlm_sql_{db2,freetds} || die |
178 |
+ |
179 |
+ # sql drivers that are not part of experimental are loaded from a |
180 |
+ # file, so we have to remove them from the file itself when we |
181 |
+ # remove them. |
182 |
+ usesqldriver() { |
183 |
+ local flag=$1 |
184 |
+ local driver=rlm_sql_${2:-${flag}} |
185 |
+ |
186 |
+ if ! use ${flag}; then |
187 |
+ rm -r src/modules/rlm_sql/drivers/${driver} || die |
188 |
+ sed -i -e /${driver}/d src/modules/rlm_sql/stable || die |
189 |
+ fi |
190 |
+ } |
191 |
+ |
192 |
+ sed -i \ |
193 |
+ -e 's:^#\tuser = :\tuser = :g' \ |
194 |
+ -e 's:^#\tgroup = :\tgroup = :g' \ |
195 |
+ -e 's:/var/run/radiusd:/run/radiusd:g' \ |
196 |
+ -e '/^run_dir/s:${localstatedir}::g' \ |
197 |
+ raddb/radiusd.conf.in || die |
198 |
+ |
199 |
+ # verbosity |
200 |
+ # build shared libraries using jlibtool --shared |
201 |
+ sed -i \ |
202 |
+ -e '/$(LIBTOOL)/s|--quiet ||g' \ |
203 |
+ -e 's:--mode=\(compile\|link\):& --shared:g' \ |
204 |
+ Make.inc.in || die |
205 |
+ |
206 |
+ sed -i \ |
207 |
+ -e 's|--silent ||g' \ |
208 |
+ -e 's:--mode=\(compile\|link\):& --shared:g' \ |
209 |
+ scripts/libtool.mk || die |
210 |
+ |
211 |
+ # crude measure to stop jlibtool from running ranlib and ar |
212 |
+ sed -i \ |
213 |
+ -e '/LIBRARIAN/s|".*"|"true"|g' \ |
214 |
+ -e '/RANLIB/s|".*"|"true"|g' \ |
215 |
+ scripts/jlibtool.c || die |
216 |
+ |
217 |
+ usesqldriver mysql |
218 |
+ usesqldriver postgres postgresql |
219 |
+ usesqldriver firebird |
220 |
+ usesqldriver iodbc |
221 |
+ usesqldriver odbc unixodbc |
222 |
+ usesqldriver oracle |
223 |
+ usesqldriver sqlite |
224 |
+ usesqldriver mongodb mongo |
225 |
+ |
226 |
+ eautoreconf |
227 |
+} |
228 |
+ |
229 |
+src_configure() { |
230 |
+ # do not try to enable static with static-libs; upstream is a |
231 |
+ # massacre of libtool best practices so you also have to make sure |
232 |
+ # to --enable-shared explicitly. |
233 |
+ local myeconfargs=( |
234 |
+ --enable-shared |
235 |
+ --disable-static |
236 |
+ --disable-ltdl-install |
237 |
+ --with-system-libtool |
238 |
+ --with-system-libltdl |
239 |
+ --with-ascend-binary |
240 |
+ --with-udpfromto |
241 |
+ --with-dhcp |
242 |
+ --with-iodbc-include-dir=/usr/include/iodbc |
243 |
+ --with-experimental-modules |
244 |
+ --with-docdir=/usr/share/doc/${PF} |
245 |
+ --with-logdir=/var/log/radius |
246 |
+ $(use_enable debug developer) |
247 |
+ $(use_with ldap edir) |
248 |
+ $(use_with ssl openssl) |
249 |
+ $(use_with systemd systemd) |
250 |
+ ) |
251 |
+ # fix bug #77613 |
252 |
+ if has_version app-crypt/heimdal; then |
253 |
+ myeconfargs+=( --enable-heimdal-krb5 ) |
254 |
+ fi |
255 |
+ |
256 |
+ if use python ; then |
257 |
+ myeconfargs+=( |
258 |
+ --with-rlm-python3-bin=${EPYTHON} |
259 |
+ --with-rlm-python3-config-bin=${EPYTHON}-config |
260 |
+ ) |
261 |
+ fi |
262 |
+ |
263 |
+ use readline || export ac_cv_lib_readline=no |
264 |
+ use pcap || export ac_cv_lib_pcap_pcap_open_live=no |
265 |
+ |
266 |
+ econf "${myeconfargs[@]}" |
267 |
+} |
268 |
+ |
269 |
+src_compile() { |
270 |
+ # verbose, do not generate certificates |
271 |
+ emake \ |
272 |
+ Q='' ECHO=true \ |
273 |
+ LOCAL_CERT_PRODUCTS='' |
274 |
+} |
275 |
+ |
276 |
+src_install() { |
277 |
+ dodir /etc |
278 |
+ diropts -m0750 -o root -g radius |
279 |
+ dodir /etc/raddb |
280 |
+ diropts -m0750 -o radius -g radius |
281 |
+ dodir /var/log/radius |
282 |
+ keepdir /var/log/radius/radacct |
283 |
+ diropts |
284 |
+ |
285 |
+ # verbose, do not install certificates |
286 |
+ # Parallel install fails (#509498) |
287 |
+ emake -j1 \ |
288 |
+ Q='' ECHO=true \ |
289 |
+ LOCAL_CERT_PRODUCTS='' \ |
290 |
+ R="${D}" \ |
291 |
+ install |
292 |
+ |
293 |
+ if use pam; then |
294 |
+ pamd_mimic_system radiusd auth account password session |
295 |
+ fi |
296 |
+ |
297 |
+ # fix #711756 |
298 |
+ fowners -R radius:radius /etc/raddb |
299 |
+ fowners -R radius:radius /var/log/radius |
300 |
+ |
301 |
+ dodoc CREDITS |
302 |
+ |
303 |
+ rm "${ED}/usr/sbin/rc.radiusd" || die |
304 |
+ |
305 |
+ newinitd "${FILESDIR}/radius.init-r4" radiusd |
306 |
+ newconfd "${FILESDIR}/radius.conf-r6" radiusd |
307 |
+ |
308 |
+ if ! use systemd ; then |
309 |
+ # If systemd builtin is not enabled we need use Type=Simple |
310 |
+ # as systemd .service |
311 |
+ sed -i -e 's:^Type=.*::g' \ |
312 |
+ -e 's:^WatchdogSec=.*::g' -e 's:^NotifyAccess=all.*::g' \ |
313 |
+ "${S}"/debian/freeradius.service |
314 |
+ fi |
315 |
+ systemd_dounit "${S}"/debian/freeradius.service |
316 |
+ |
317 |
+ find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die |
318 |
+} |
319 |
+ |
320 |
+pkg_config() { |
321 |
+ if use ssl; then |
322 |
+ cd "${ROOT}"/etc/raddb/certs || die |
323 |
+ ./bootstrap || die "Error while running ./bootstrap script." |
324 |
+ chown root:radius "${ROOT}"/etc/raddb/certs || die |
325 |
+ chown root:radius "${ROOT}"/etc/raddb/certs/ca.pem || die |
326 |
+ chown root:radius "${ROOT}"/etc/raddb/certs/server.{key,crt,pem} || die |
327 |
+ fi |
328 |
+} |
329 |
+ |
330 |
+pkg_preinst() { |
331 |
+ if ! has_version ${CATEGORY}/${PN} && use ssl; then |
332 |
+ elog "You have to run \`emerge --config =${CATEGORY}/${PF}\` to be able" |
333 |
+ elog "to start the radiusd service." |
334 |
+ fi |
335 |
+} |