Gentoo Archives: gentoo-commits

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