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