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