1 |
commit: bc284abb40fa5babc26fd80e590fcc565766e7ab |
2 |
Author: Daniele Rondina <geaaru <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Mar 8 18:11:57 2019 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Mar 10 23:01:54 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc284abb |
7 |
|
8 |
net-dialup/freeradius: version bump to v.3.0.18. |
9 |
|
10 |
Signed-off-by: Daniele Rondina <geaaru <AT> gmail.com> |
11 |
Package-Manager: Portage-2.3.51, Repoman-2.3.12 |
12 |
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org> |
13 |
|
14 |
net-dialup/freeradius/Manifest | 1 + |
15 |
net-dialup/freeradius/freeradius-3.0.18.ebuild | 239 +++++++++++++++++++++++++ |
16 |
2 files changed, 240 insertions(+) |
17 |
|
18 |
diff --git a/net-dialup/freeradius/Manifest b/net-dialup/freeradius/Manifest |
19 |
index bbff14070c2..51e5d37febc 100644 |
20 |
--- a/net-dialup/freeradius/Manifest |
21 |
+++ b/net-dialup/freeradius/Manifest |
22 |
@@ -1 +1,2 @@ |
23 |
DIST freeradius-server-3.0.17.tar.gz 4843020 BLAKE2B 9e1f54a9f5ad8ede471881ffe4ec987c3ac655a3c39fcd920094760c006102be02f3b7f25b14379a0bac876ac0944e8698c2781bbd804cd22d8b915b6c13a693 SHA512 381222e452288c56a1bf68953be57379a5568f0c92de022abc3004cc6a15078d46535b867b31801de3eb096ba7af92e745e79decfa7cc8151a1ffb371b1aea79 |
24 |
+DIST freeradius-server-3.0.18.tar.gz 4884192 BLAKE2B 21df490f5eba4e0eca42127181fa02a9451abf5fc2b0d7c5e6d0c5c287eda739585500a31f480dccc618c3bbb4096fbe9258c1b2d3a2047951abf85d68784862 SHA512 b81c40cd22170adb1126b9dde6dd84411dfafce33e27da6c4665cb4fc524aab854a7cd4c80757db50899604d7980aec7216e1c53b8184af482c7113692a26458 |
25 |
|
26 |
diff --git a/net-dialup/freeradius/freeradius-3.0.18.ebuild b/net-dialup/freeradius/freeradius-3.0.18.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..c512a5894ee |
29 |
--- /dev/null |
30 |
+++ b/net-dialup/freeradius/freeradius-3.0.18.ebuild |
31 |
@@ -0,0 +1,239 @@ |
32 |
+# Copyright 1999-2019 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=6 |
36 |
+ |
37 |
+PYTHON_COMPAT=( python{2_7,3_5,3_6} ) |
38 |
+inherit autotools pam python-single-r1 systemd user |
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 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" |
50 |
+LICENSE="GPL-2" |
51 |
+SLOT="0" |
52 |
+ |
53 |
+IUSE=" |
54 |
+ debug firebird iodbc kerberos ldap libressl memcached mysql odbc oracle pam |
55 |
+ pcap postgres python readline rest samba sqlite ssl redis |
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) |
62 |
+RDEPEND="!net-dialup/cistronradius |
63 |
+ !net-dialup/gnuradius |
64 |
+ dev-lang/perl:= |
65 |
+ sys-libs/gdbm:= |
66 |
+ sys-libs/talloc |
67 |
+ python? ( ${PYTHON_DEPS} ) |
68 |
+ readline? ( sys-libs/readline:0= ) |
69 |
+ pcap? ( net-libs/libpcap ) |
70 |
+ memcached? ( dev-libs/libmemcached ) |
71 |
+ mysql? ( dev-db/mysql-connector-c ) |
72 |
+ postgres? ( dev-db/postgresql:= ) |
73 |
+ firebird? ( dev-db/firebird ) |
74 |
+ pam? ( virtual/pam ) |
75 |
+ rest? ( dev-libs/json-c:= ) |
76 |
+ samba? ( net-fs/samba ) |
77 |
+ redis? ( dev-libs/hiredis:= ) |
78 |
+ ssl? ( |
79 |
+ !libressl? ( dev-libs/openssl:0=[-bindist] ) |
80 |
+ libressl? ( dev-libs/libressl:0= ) |
81 |
+ ) |
82 |
+ ldap? ( net-nds/openldap ) |
83 |
+ kerberos? ( virtual/krb5 ) |
84 |
+ sqlite? ( dev-db/sqlite:3 ) |
85 |
+ odbc? ( dev-db/unixODBC ) |
86 |
+ iodbc? ( dev-db/libiodbc ) |
87 |
+ oracle? ( dev-db/oracle-instantclient-basic )" |
88 |
+DEPEND="${RDEPEND}" |
89 |
+ |
90 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
91 |
+ |
92 |
+S="${WORKDIR}/${MY_P}" |
93 |
+ |
94 |
+pkg_setup() { |
95 |
+ enewgroup radius |
96 |
+ enewuser radius -1 -1 /var/log/radius radius |
97 |
+ |
98 |
+ if use python ; then |
99 |
+ python-single-r1_pkg_setup |
100 |
+ export PYTHONBIN="${EPYTHON}" |
101 |
+ fi |
102 |
+} |
103 |
+ |
104 |
+src_prepare() { |
105 |
+ # most of the configuration options do not appear as ./configure |
106 |
+ # switches. Instead it identifies the directories that are available |
107 |
+ # and run through them. These might check for the presence of |
108 |
+ # various libraries, in which case they are not built. To avoid |
109 |
+ # automagic dependencies, we just remove all the modules that we're |
110 |
+ # not interested in using. |
111 |
+ |
112 |
+ use ssl || { rm -r src/modules/rlm_eap/types/rlm_eap_{tls,ttls,peap} || die ; } |
113 |
+ use ldap || { rm -r src/modules/rlm_ldap || die ; } |
114 |
+ use kerberos || { rm -r src/modules/rlm_krb5 || die ; } |
115 |
+ use memcached || { rm -r src/modules/rlm_cache/drivers/rlm_cache_memcached || die ; } |
116 |
+ use pam || { rm -r src/modules/rlm_pam || die ; } |
117 |
+ use python || { rm -r src/modules/rlm_python || die ; } |
118 |
+ use rest || { rm -r src/modules/rlm_rest || die ; } |
119 |
+ use redis || { rm -r src/modules/rlm_redis{,who} || die ; } |
120 |
+ # can't just nuke rlm_mschap because many modules rely on smbdes.h |
121 |
+ use samba || { rm -r src/modules/rlm_mschap/{configure,*.mk} || die ; } |
122 |
+ # Do not install ruby rlm module, bug #483108 |
123 |
+ rm -r src/modules/rlm_ruby || die |
124 |
+ |
125 |
+ # these are all things we don't have in portage/I don't want to deal |
126 |
+ # with myself |
127 |
+ rm -r src/modules/rlm_eap/types/rlm_eap_tnc || die # requires TNCS library |
128 |
+ rm -r src/modules/rlm_eap/types/rlm_eap_ikev2 || die # requires libeap-ikev2 |
129 |
+ rm -r src/modules/rlm_opendirectory || die # requires some membership.h |
130 |
+ rm -r src/modules/rlm_sql/drivers/rlm_sql_{db2,freetds} || die |
131 |
+ |
132 |
+ # sql drivers that are not part of experimental are loaded from a |
133 |
+ # file, so we have to remove them from the file itself when we |
134 |
+ # remove them. |
135 |
+ usesqldriver() { |
136 |
+ local flag=$1 |
137 |
+ local driver=rlm_sql_${2:-${flag}} |
138 |
+ |
139 |
+ if ! use ${flag}; then |
140 |
+ rm -r src/modules/rlm_sql/drivers/${driver} || die |
141 |
+ sed -i -e /${driver}/d src/modules/rlm_sql/stable || die |
142 |
+ fi |
143 |
+ } |
144 |
+ |
145 |
+ sed -i \ |
146 |
+ -e 's:^#\tuser = :\tuser = :g' \ |
147 |
+ -e 's:^#\tgroup = :\tgroup = :g' \ |
148 |
+ -e 's:/var/run/radiusd:/run/radiusd:g' \ |
149 |
+ -e '/^run_dir/s:${localstatedir}::g' \ |
150 |
+ raddb/radiusd.conf.in || die |
151 |
+ |
152 |
+ # verbosity |
153 |
+ # build shared libraries using jlibtool --shared |
154 |
+ sed -i \ |
155 |
+ -e '/$(LIBTOOL)/s|--quiet ||g' \ |
156 |
+ -e 's:--mode=\(compile\|link\):& --shared:g' \ |
157 |
+ Make.inc.in || die |
158 |
+ |
159 |
+ sed -i \ |
160 |
+ -e 's|--silent ||g' \ |
161 |
+ -e 's:--mode=\(compile\|link\):& --shared:g' \ |
162 |
+ scripts/libtool.mk || die |
163 |
+ |
164 |
+ # crude measure to stop jlibtool from running ranlib and ar |
165 |
+ sed -i \ |
166 |
+ -e '/LIBRARIAN/s|".*"|"true"|g' \ |
167 |
+ -e '/RANLIB/s|".*"|"true"|g' \ |
168 |
+ scripts/jlibtool.c || die |
169 |
+ |
170 |
+ usesqldriver mysql |
171 |
+ usesqldriver postgres postgresql |
172 |
+ usesqldriver firebird |
173 |
+ usesqldriver iodbc |
174 |
+ usesqldriver odbc unixodbc |
175 |
+ usesqldriver oracle |
176 |
+ usesqldriver sqlite |
177 |
+ |
178 |
+ default |
179 |
+ |
180 |
+ eautoreconf |
181 |
+} |
182 |
+ |
183 |
+src_configure() { |
184 |
+ # do not try to enable static with static-libs; upstream is a |
185 |
+ # massacre of libtool best practices so you also have to make sure |
186 |
+ # to --enable-shared explicitly. |
187 |
+ local myeconfargs=( |
188 |
+ --enable-shared |
189 |
+ --disable-static |
190 |
+ --disable-ltdl-install |
191 |
+ --with-system-libtool |
192 |
+ --with-system-libltdl |
193 |
+ --with-ascend-binary |
194 |
+ --with-udpfromto |
195 |
+ --with-dhcp |
196 |
+ --with-iodbc-include-dir=/usr/include/iodbc |
197 |
+ --with-experimental-modules |
198 |
+ --with-docdir=/usr/share/doc/${PF} |
199 |
+ --with-logdir=/var/log/radius |
200 |
+ $(use_enable debug developer) |
201 |
+ $(use_with ldap edir) |
202 |
+ $(use_with ssl openssl) |
203 |
+ ) |
204 |
+ # fix bug #77613 |
205 |
+ if has_version app-crypt/heimdal; then |
206 |
+ myeconfargs+=( --enable-heimdal-krb5 ) |
207 |
+ fi |
208 |
+ |
209 |
+ use readline || export ac_cv_lib_readline=no |
210 |
+ use pcap || export ac_cv_lib_pcap_pcap_open_live=no |
211 |
+ |
212 |
+ econf "${myeconfargs[@]}" |
213 |
+} |
214 |
+ |
215 |
+src_compile() { |
216 |
+ # verbose, do not generate certificates |
217 |
+ emake \ |
218 |
+ Q='' ECHO=true \ |
219 |
+ LOCAL_CERT_PRODUCTS='' |
220 |
+} |
221 |
+ |
222 |
+src_install() { |
223 |
+ dodoc CREDITS |
224 |
+ |
225 |
+ rm "${D}/usr/sbin/rc.radiusd" || die |
226 |
+ |
227 |
+ systemd_newtmpfilesd "${FILESDIR}"/freeradius.tmpfiles freeradius.conf |
228 |
+ systemd_dounit "${FILESDIR}"/freeradius.service |
229 |
+ |
230 |
+ dodir /etc |
231 |
+ diropts -m0750 -o root -g radius |
232 |
+ dodir /etc/raddb |
233 |
+ diropts -m0750 -o radius -g radius |
234 |
+ dodir /var/log/radius |
235 |
+ keepdir /var/log/radius/radacct |
236 |
+ diropts |
237 |
+ |
238 |
+ # verbose, do not install certificates |
239 |
+ # Parallel install fails (#509498) |
240 |
+ emake -j1 \ |
241 |
+ Q='' ECHO=true \ |
242 |
+ LOCAL_CERT_PRODUCTS='' \ |
243 |
+ R="${D}" \ |
244 |
+ install |
245 |
+ |
246 |
+ fowners -R root:radius /etc/raddb |
247 |
+ fowners -R radius:radius /var/log/radius |
248 |
+ |
249 |
+ pamd_mimic_system radiusd auth account password session |
250 |
+ |
251 |
+ newinitd "${FILESDIR}/radius.init-r3" radiusd |
252 |
+ newconfd "${FILESDIR}/radius.conf-r4" radiusd |
253 |
+ |
254 |
+ prune_libtool_files |
255 |
+} |
256 |
+ |
257 |
+pkg_config() { |
258 |
+ if use ssl; then |
259 |
+ cd "${ROOT}"/etc/raddb/certs || die |
260 |
+ ./bootstrap || die "Error while running ./bootstrap script." |
261 |
+ fowners -R root:radius "${ROOT}"/etc/raddb/certs |
262 |
+ fi |
263 |
+} |
264 |
+ |
265 |
+pkg_preinst() { |
266 |
+ if ! has_version ${CATEGORY}/${PN} && use ssl; then |
267 |
+ elog "You have to run \`emerge --config =${CATEGORY}/${PF}\` to be able" |
268 |
+ elog "to start the radiusd service." |
269 |
+ fi |
270 |
+} |