From 401101f9c8077911929d3f2b60a37098460a5d89 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 24 Mar 2022 23:59:54 +0000 Subject: gentoo resync : 25.03.2022 --- net-dialup/Manifest.gz | Bin 5229 -> 5226 bytes net-dialup/freeradius/Manifest | 8 +- net-dialup/freeradius/freeradius-3.0.20-r4.ebuild | 271 ---------------------- net-dialup/freeradius/freeradius-3.0.20-r5.ebuild | 271 ++++++++++++++++++++++ net-dialup/freeradius/freeradius-3.0.21-r4.ebuild | 267 --------------------- net-dialup/freeradius/freeradius-3.0.21-r5.ebuild | 267 +++++++++++++++++++++ net-dialup/freeradius/freeradius-3.0.22-r3.ebuild | 267 --------------------- net-dialup/freeradius/freeradius-3.0.22-r4.ebuild | 267 +++++++++++++++++++++ net-dialup/freeradius/freeradius-3.0.25-r1.ebuild | 267 --------------------- net-dialup/freeradius/freeradius-3.0.25-r2.ebuild | 267 +++++++++++++++++++++ 10 files changed, 1076 insertions(+), 1076 deletions(-) delete mode 100644 net-dialup/freeradius/freeradius-3.0.20-r4.ebuild create mode 100644 net-dialup/freeradius/freeradius-3.0.20-r5.ebuild delete mode 100644 net-dialup/freeradius/freeradius-3.0.21-r4.ebuild create mode 100644 net-dialup/freeradius/freeradius-3.0.21-r5.ebuild delete mode 100644 net-dialup/freeradius/freeradius-3.0.22-r3.ebuild create mode 100644 net-dialup/freeradius/freeradius-3.0.22-r4.ebuild delete mode 100644 net-dialup/freeradius/freeradius-3.0.25-r1.ebuild create mode 100644 net-dialup/freeradius/freeradius-3.0.25-r2.ebuild (limited to 'net-dialup') diff --git a/net-dialup/Manifest.gz b/net-dialup/Manifest.gz index 9bbfe27a60a4..c0f46ca0cf1e 100644 Binary files a/net-dialup/Manifest.gz and b/net-dialup/Manifest.gz differ diff --git a/net-dialup/freeradius/Manifest b/net-dialup/freeradius/Manifest index 3561399905ec..6efc172ab941 100644 --- a/net-dialup/freeradius/Manifest +++ b/net-dialup/freeradius/Manifest @@ -9,8 +9,8 @@ DIST freeradius-3.0.25.tar.gz 5300245 BLAKE2B bf8908aa7bfabb9e15fa841457f176a4f2 DIST freeradius-server-3.0.20.tar.gz 5002727 BLAKE2B f481ad22105694a4af3f0f0c1b4f6e395e8da0fe65274e32ebeed07e3c9b1869029e6ffbc655cfa41d5de2a1dcba54acee33a7a10d28bfbfce791b7ccd0fc57a SHA512 513ed0a5d9e6b9a8d89a9b02c86ff528a9ff14d928f4c1040ca44702465abd711588fe6afa35554cb2c8e8bd7f19dd5be3dbc78445c62c7b00bf5cbc4c621312 DIST freeradius-server-3.0.21.tar.gz 5028506 BLAKE2B 3ccf9704a1f8b1ec5f6f066a475083fe7cefa793e8f53ecd287866fc505a832bf8031a4d07c2e07f79da6c6fb82e6a3435b0154d1f135167ebddfc9b8d401544 SHA512 85af1c305e99a56400b04be5c966900e7df8beb7b54626d6aa0cb300dc124817e43b424f9b27d86966bb76cca87dce741812ed8d681a568c7d7b63b3b53a9dfa DIST freeradius-server-3.0.22.tar.gz 5248422 BLAKE2B b48170a02a354562dc2dd27230476d2ce0823fa2f577dde3f3947ee14653d912a562eb480c2d2ed53b0ff536f63ce4482b24f2777b4a41ff2ed4aba88f4c196e SHA512 8ee05350b1a5e811a51030a3ef0c511c58275407171f0ce41775e3695f3e9a4477e2fc288541015d314be5457154201d4e95f4c45cf7f503bc8829909c2551a8 -EBUILD freeradius-3.0.20-r4.ebuild 7544 BLAKE2B e48ab035bd1460d453a04429730061d104d237396e5a9ec1eb298183d19e8ddd6e200d70d348d6939b6e67427257b3ec579e69bf393920f646ee376ce38bec2a SHA512 ab94e84dcc958fea500a5a7c914ba000fb4c634a001c69d3383de90b241ba2ff77b60faea1cd955aed93209b1fc1a6b4610070f1e9907e8e3eed7ab2b74813b4 -EBUILD freeradius-3.0.21-r4.ebuild 7441 BLAKE2B bfefbef42cfa88bc18be744ee2f572abb27307d8f1fc01b214a71d6977b1c4ace1e3f90542657af4a3cbd3fac86101c7f03bf12f5c56a11991e0330cfcd6c89b SHA512 cbcc4aa3c371655c4fed0cb3104b56198f8c763f3bea4e085eb0aff8fef5c11d5088b95fa616de292b5228ddb6fc4d86fc857d6b071beff6645b6b3783106fd2 -EBUILD freeradius-3.0.22-r3.ebuild 7444 BLAKE2B e718bc5ece2cff1986af8ab8367326adaaec632db2f79c1198428e57ff40b2c3f1e745c699ca92972e4ed474661ac43174a84e92391a4f7bdca36bbcfb00b052 SHA512 04824858ccdbd44165b315a5ab71c121a44ded889a97bc692b2dadec70c31112e01cfc5e115b01bb73350ec4ef99a8d6cb00b565779218c4e807ba2931899173 -EBUILD freeradius-3.0.25-r1.ebuild 7514 BLAKE2B 382d4ccecf2ad1508fdeed6abcf6d701d55419771c77d61516e9ad8a579d2d7e1850841ec4b81cdd7a60d5c4a348a58554e26e1efd4998111b21b0ff531ce1e2 SHA512 11f9aae4627858399f7fbbc0a8f1f66a8b391dfe77afa07843c4d3c8755abe9387b5eec52f06607cb387ea3495b7c2b9084e5f29fb64ffc7833ca1352d0fbf8a +EBUILD freeradius-3.0.20-r5.ebuild 7548 BLAKE2B 820b94e6639b22478d3e603fd2f85c98cbf727c841811c57eaf26f22ae9fb536424aa6b63fa969b46491293aa592a46d56832bd41457fac41c84c8143bdc0b8a SHA512 8a7814fa663bc205f2cb26a5562d6d36df648ad4f2ce7ed2e975c4bfbac71d278a8cf754df1d152edafd00dd81684e207f06b1b69e4b11b80d32e082d21489c1 +EBUILD freeradius-3.0.21-r5.ebuild 7445 BLAKE2B 3a315a69bd5e4fcc7df715e7541c3937aac6a7a769f4b6b737b78062f74d1b5b92b31937f6e8c49aa6c05a74a02f4413af234fa3ee9c4e1aabfb1eb9281ed102 SHA512 1a3c9fc215553675e93c1018c4ca8916f8d463a37df435af705afccebfa52897bb540ce885b1852a17d0b81076869c0c24f9c9fe9eb6c9bacece2b024f693db4 +EBUILD freeradius-3.0.22-r4.ebuild 7448 BLAKE2B 6296c54de4f3a36e5ddab9c818ab37fea97f15ac2f8a28d6303c760864176a5811125d4901c666edf49837580740131d31dabdc67802cab1cdfd1f6935cc3537 SHA512 61cedbe4bfba93b823a2d2424a40b920cc334cc8cfce67c58988addcf6fd223375edef571de10f5acbd72efd15cfcf7e4311150d7f51fe9484d50ab05953a246 +EBUILD freeradius-3.0.25-r2.ebuild 7518 BLAKE2B d75e01897134bf13679d3d4e8f5dc17ad11584505bf46afe3c71537a620a2a2001ea4f87edccd97ba3d6753ef1cc2f4e0dbc234245dd104122267cfa49fb78a5 SHA512 75196ef597a6d73314b7d192487a3ed22f2e009d1971e3f77543d979b13f55450a41c6f1cc6c45ac7f73a72f1c79473eb72f82b3c36eb4e7793d5ade5fb37903 MISC metadata.xml 657 BLAKE2B 4ae124b2f8a4e2230ff696f06056c4d9ca2a03b989362b6465ba42b9a1d730f1f35776b3de8a455f40956d7d2e0746ddfeb304d13fa44f69347f88e97443a72a SHA512 21137127c400a99a024012defe01c3546178492ef608428e673008ae3e7d677f97a2b33bd6efbd6737b60144e0697cacb583e7d9b477187a109b3e7482d899b1 diff --git a/net-dialup/freeradius/freeradius-3.0.20-r4.ebuild b/net-dialup/freeradius/freeradius-3.0.20-r4.ebuild deleted file mode 100644 index be87dbf9966f..000000000000 --- a/net-dialup/freeradius/freeradius-3.0.20-r4.ebuild +++ /dev/null @@ -1,271 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7,8} ) -inherit autotools pam python-single-r1 systemd - -MY_P="${PN}-server-${PV}" - -DESCRIPTION="Highly configurable free RADIUS server" -SRC_URI=" - ftp://ftp.freeradius.org/pub/radius/${MY_P}.tar.gz - ftp://ftp.freeradius.org/pub/radius/old/${MY_P}.tar.gz -" -HOMEPAGE="http://www.freeradius.org/" - -KEYWORDS="amd64 ~arm arm64 ~ppc ~ppc64 ~sparc x86" -LICENSE="GPL-2" -SLOT="0" - -IUSE=" - debug firebird iodbc kerberos ldap memcached mysql mongodb odbc oracle pam - pcap postgres python readline redis rest samba sqlite ssl systemd -" -RESTRICT="test firebird? ( bindist )" - -# NOTE: Temporary freeradius doesn't support linking with mariadb client -# libs also if code is compliant, will be available in the next release. -# (http://lists.freeradius.org/pipermail/freeradius-devel/2018-October/013228.html)a - -# TODO: rlm_mschap works with both samba library or without. I need to avoid -# linking of samba library if -samba is used. -RDEPEND="acct-group/radius - acct-user/radius - !net-dialup/cistronradius - dev-lang/perl:= - sys-libs/gdbm:= - sys-libs/talloc - virtual/libcrypt:= - firebird? ( dev-db/firebird ) - iodbc? ( dev-db/libiodbc ) - kerberos? ( virtual/krb5 ) - ldap? ( net-nds/openldap ) - memcached? ( dev-libs/libmemcached ) - mysql? ( dev-db/mysql-connector-c ) - mongodb? ( >=dev-libs/mongo-c-driver-1.13.0-r1 ) - odbc? ( dev-db/unixODBC ) - oracle? ( dev-db/oracle-instantclient[sdk] ) - pam? ( sys-libs/pam ) - pcap? ( net-libs/libpcap ) - postgres? ( dev-db/postgresql:= ) - python? ( ${PYTHON_DEPS} ) - readline? ( sys-libs/readline:0= ) - redis? ( dev-libs/hiredis:= ) - rest? ( dev-libs/json-c:= ) - samba? ( net-fs/samba ) - sqlite? ( dev-db/sqlite:3 ) - ssl? ( - dev-libs/openssl:0=[-bindist(-)] - ) - systemd? ( sys-apps/systemd )" -DEPEND="${RDEPEND}" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -S="${WORKDIR}/${MY_P}" - -PATCHES=( - "${FILESDIR}"/${P}-systemd-service.patch - # Fix rlm_python3 build - # Backport from rlm_python changes to rlm_python3 - "${FILESDIR}"/${P}-py3-fixes.patch -) - -pkg_setup() { - if use python ; then - python-single-r1_pkg_setup - export PYTHONBIN="${EPYTHON}" - fi -} - -src_prepare() { - # most of the configuration options do not appear as ./configure - # switches. Instead it identifies the directories that are available - # and run through them. These might check for the presence of - # various libraries, in which case they are not built. To avoid - # automagic dependencies, we just remove all the modules that we're - # not interested in using. - - eapply_user - default - - use ssl || { rm -r src/modules/rlm_eap/types/rlm_eap_{tls,ttls,peap} || die ; } - use ldap || { rm -r src/modules/rlm_ldap || die ; } - use kerberos || { rm -r src/modules/rlm_krb5 || die ; } - use memcached || { rm -r src/modules/rlm_cache/drivers/rlm_cache_memcached || die ; } - use pam || { rm -r src/modules/rlm_pam || die ; } - # Drop support of python2 - rm -r src/modules/rlm_python || die - use python || { rm -r src/modules/rlm_python3 || die ; } - use rest || { rm -r src/modules/rlm_rest || die ; } - use redis || { rm -r src/modules/rlm_redis{,who} || die ; } - # Do not install ruby rlm module, bug #483108 - rm -r src/modules/rlm_ruby || die - - # these are all things we don't have in portage/I don't want to deal - # with myself - rm -r src/modules/rlm_eap/types/rlm_eap_tnc || die # requires TNCS library - rm -r src/modules/rlm_eap/types/rlm_eap_ikev2 || die # requires libeap-ikev2 - rm -r src/modules/rlm_opendirectory || die # requires some membership.h - rm -r src/modules/rlm_sql/drivers/rlm_sql_{db2,freetds} || die - - # sql drivers that are not part of experimental are loaded from a - # file, so we have to remove them from the file itself when we - # remove them. - usesqldriver() { - local flag=$1 - local driver=rlm_sql_${2:-${flag}} - - if ! use ${flag}; then - rm -r src/modules/rlm_sql/drivers/${driver} || die - sed -i -e /${driver}/d src/modules/rlm_sql/stable || die - fi - } - - sed -i \ - -e 's:^#\tuser = :\tuser = :g' \ - -e 's:^#\tgroup = :\tgroup = :g' \ - -e 's:/var/run/radiusd:/run/radiusd:g' \ - -e '/^run_dir/s:${localstatedir}::g' \ - raddb/radiusd.conf.in || die - - # verbosity - # build shared libraries using jlibtool --shared - sed -i \ - -e '/$(LIBTOOL)/s|--quiet ||g' \ - -e 's:--mode=\(compile\|link\):& --shared:g' \ - Make.inc.in || die - - sed -i \ - -e 's|--silent ||g' \ - -e 's:--mode=\(compile\|link\):& --shared:g' \ - scripts/libtool.mk || die - - # crude measure to stop jlibtool from running ranlib and ar - sed -i \ - -e '/LIBRARIAN/s|".*"|"true"|g' \ - -e '/RANLIB/s|".*"|"true"|g' \ - scripts/jlibtool.c || die - - usesqldriver mysql - usesqldriver postgres postgresql - usesqldriver firebird - usesqldriver iodbc - usesqldriver odbc unixodbc - usesqldriver oracle - usesqldriver sqlite - usesqldriver mongodb mongo - - eautoreconf -} - -src_configure() { - # do not try to enable static with static-libs; upstream is a - # massacre of libtool best practices so you also have to make sure - # to --enable-shared explicitly. - local myeconfargs=( - --enable-shared - --disable-static - --disable-ltdl-install - --with-system-libtool - --with-system-libltdl - --with-ascend-binary - --with-udpfromto - --with-dhcp - --with-iodbc-include-dir=/usr/include/iodbc - --with-experimental-modules - --with-docdir=/usr/share/doc/${PF} - --with-logdir=/var/log/radius - $(use_enable debug developer) - $(use_with ldap edir) - $(use_with ssl openssl) - $(use_with systemd systemd) - ) - # fix bug #77613 - if has_version app-crypt/heimdal; then - myeconfargs+=( --enable-heimdal-krb5 ) - fi - - if use python ; then - myeconfargs+=( - --with-rlm-python3-bin=${EPYTHON} - --with-rlm-python3-config-bin=${EPYTHON}-config - ) - fi - - use readline || export ac_cv_lib_readline=no - use pcap || export ac_cv_lib_pcap_pcap_open_live=no - - econf "${myeconfargs[@]}" -} - -src_compile() { - # verbose, do not generate certificates - emake \ - Q='' ECHO=true \ - LOCAL_CERT_PRODUCTS='' -} - -src_install() { - dodir /etc - diropts -m0750 -o root -g radius - dodir /etc/raddb - diropts -m0750 -o radius -g radius - dodir /var/log/radius - keepdir /var/log/radius/radacct - diropts - - # verbose, do not install certificates - # Parallel install fails (#509498) - emake -j1 \ - Q='' ECHO=true \ - LOCAL_CERT_PRODUCTS='' \ - R="${D}" \ - install - - if use pam; then - pamd_mimic_system radiusd auth account password session - fi - - # fix #711756 - fowners -R radius:radius /etc/raddb - fowners -R radius:radius /var/log/radius - - dodoc CREDITS - - rm "${ED}/usr/sbin/rc.radiusd" || die - - newinitd "${FILESDIR}/radius.init-r3" radiusd - newconfd "${FILESDIR}/radius.conf-r4" radiusd - - if ! use systemd ; then - # If systemd builtin is not enabled we need use Type=Simple - # as systemd .service - sed -i -e 's:^Type=.*::g' \ - -e 's:^WatchdogSec=.*::g' -e 's:^NotifyAccess=all.*::g' \ - "${S}"/debian/freeradius.service - fi - systemd_dounit "${S}"/debian/freeradius.service - - find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die - -} - -pkg_config() { - if use ssl; then - cd "${ROOT}"/etc/raddb/certs || die - ./bootstrap || die "Error while running ./bootstrap script." - fowners root:radius "${ROOT}"/etc/raddb/certs - fowners root:radius "${ROOT}"/etc/raddb/certs/ca.pem - fowners root:radius "${ROOT}"/etc/raddb/certs/server.{key,crt,pem} - fi -} - -pkg_preinst() { - if ! has_version ${CATEGORY}/${PN} && use ssl; then - elog "You have to run \`emerge --config =${CATEGORY}/${PF}\` to be able" - elog "to start the radiusd service." - fi -} diff --git a/net-dialup/freeradius/freeradius-3.0.20-r5.ebuild b/net-dialup/freeradius/freeradius-3.0.20-r5.ebuild new file mode 100644 index 000000000000..e1d17f101601 --- /dev/null +++ b/net-dialup/freeradius/freeradius-3.0.20-r5.ebuild @@ -0,0 +1,271 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7,8} ) +inherit autotools pam python-single-r1 systemd + +MY_P="${PN}-server-${PV}" + +DESCRIPTION="Highly configurable free RADIUS server" +SRC_URI=" + ftp://ftp.freeradius.org/pub/radius/${MY_P}.tar.gz + ftp://ftp.freeradius.org/pub/radius/old/${MY_P}.tar.gz +" +HOMEPAGE="http://www.freeradius.org/" + +KEYWORDS="amd64 ~arm arm64 ~ppc ~ppc64 ~sparc x86" +LICENSE="GPL-2" +SLOT="0" + +IUSE=" + debug firebird iodbc kerberos ldap memcached mysql mongodb odbc oracle pam + pcap postgres python readline redis rest samba sqlite ssl systemd +" +RESTRICT="test firebird? ( bindist )" + +# NOTE: Temporary freeradius doesn't support linking with mariadb client +# libs also if code is compliant, will be available in the next release. +# (http://lists.freeradius.org/pipermail/freeradius-devel/2018-October/013228.html)a + +# TODO: rlm_mschap works with both samba library or without. I need to avoid +# linking of samba library if -samba is used. +RDEPEND="acct-group/radius + acct-user/radius + !net-dialup/cistronradius + dev-lang/perl:= + sys-libs/gdbm:= + sys-libs/talloc + virtual/libcrypt:= + firebird? ( dev-db/firebird ) + iodbc? ( dev-db/libiodbc ) + kerberos? ( virtual/krb5 ) + ldap? ( net-nds/openldap:= ) + memcached? ( dev-libs/libmemcached ) + mysql? ( dev-db/mysql-connector-c:= ) + mongodb? ( >=dev-libs/mongo-c-driver-1.13.0-r1 ) + odbc? ( dev-db/unixODBC ) + oracle? ( dev-db/oracle-instantclient[sdk] ) + pam? ( sys-libs/pam ) + pcap? ( net-libs/libpcap ) + postgres? ( dev-db/postgresql:= ) + python? ( ${PYTHON_DEPS} ) + readline? ( sys-libs/readline:0= ) + redis? ( dev-libs/hiredis:= ) + rest? ( dev-libs/json-c:= ) + samba? ( net-fs/samba ) + sqlite? ( dev-db/sqlite:3 ) + ssl? ( + dev-libs/openssl:0=[-bindist(-)] + ) + systemd? ( sys-apps/systemd )" +DEPEND="${RDEPEND}" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}"/${P}-systemd-service.patch + # Fix rlm_python3 build + # Backport from rlm_python changes to rlm_python3 + "${FILESDIR}"/${P}-py3-fixes.patch +) + +pkg_setup() { + if use python ; then + python-single-r1_pkg_setup + export PYTHONBIN="${EPYTHON}" + fi +} + +src_prepare() { + # most of the configuration options do not appear as ./configure + # switches. Instead it identifies the directories that are available + # and run through them. These might check for the presence of + # various libraries, in which case they are not built. To avoid + # automagic dependencies, we just remove all the modules that we're + # not interested in using. + + eapply_user + default + + use ssl || { rm -r src/modules/rlm_eap/types/rlm_eap_{tls,ttls,peap} || die ; } + use ldap || { rm -r src/modules/rlm_ldap || die ; } + use kerberos || { rm -r src/modules/rlm_krb5 || die ; } + use memcached || { rm -r src/modules/rlm_cache/drivers/rlm_cache_memcached || die ; } + use pam || { rm -r src/modules/rlm_pam || die ; } + # Drop support of python2 + rm -r src/modules/rlm_python || die + use python || { rm -r src/modules/rlm_python3 || die ; } + use rest || { rm -r src/modules/rlm_rest || die ; } + use redis || { rm -r src/modules/rlm_redis{,who} || die ; } + # Do not install ruby rlm module, bug #483108 + rm -r src/modules/rlm_ruby || die + + # these are all things we don't have in portage/I don't want to deal + # with myself + rm -r src/modules/rlm_eap/types/rlm_eap_tnc || die # requires TNCS library + rm -r src/modules/rlm_eap/types/rlm_eap_ikev2 || die # requires libeap-ikev2 + rm -r src/modules/rlm_opendirectory || die # requires some membership.h + rm -r src/modules/rlm_sql/drivers/rlm_sql_{db2,freetds} || die + + # sql drivers that are not part of experimental are loaded from a + # file, so we have to remove them from the file itself when we + # remove them. + usesqldriver() { + local flag=$1 + local driver=rlm_sql_${2:-${flag}} + + if ! use ${flag}; then + rm -r src/modules/rlm_sql/drivers/${driver} || die + sed -i -e /${driver}/d src/modules/rlm_sql/stable || die + fi + } + + sed -i \ + -e 's:^#\tuser = :\tuser = :g' \ + -e 's:^#\tgroup = :\tgroup = :g' \ + -e 's:/var/run/radiusd:/run/radiusd:g' \ + -e '/^run_dir/s:${localstatedir}::g' \ + raddb/radiusd.conf.in || die + + # verbosity + # build shared libraries using jlibtool --shared + sed -i \ + -e '/$(LIBTOOL)/s|--quiet ||g' \ + -e 's:--mode=\(compile\|link\):& --shared:g' \ + Make.inc.in || die + + sed -i \ + -e 's|--silent ||g' \ + -e 's:--mode=\(compile\|link\):& --shared:g' \ + scripts/libtool.mk || die + + # crude measure to stop jlibtool from running ranlib and ar + sed -i \ + -e '/LIBRARIAN/s|".*"|"true"|g' \ + -e '/RANLIB/s|".*"|"true"|g' \ + scripts/jlibtool.c || die + + usesqldriver mysql + usesqldriver postgres postgresql + usesqldriver firebird + usesqldriver iodbc + usesqldriver odbc unixodbc + usesqldriver oracle + usesqldriver sqlite + usesqldriver mongodb mongo + + eautoreconf +} + +src_configure() { + # do not try to enable static with static-libs; upstream is a + # massacre of libtool best practices so you also have to make sure + # to --enable-shared explicitly. + local myeconfargs=( + --enable-shared + --disable-static + --disable-ltdl-install + --with-system-libtool + --with-system-libltdl + --with-ascend-binary + --with-udpfromto + --with-dhcp + --with-iodbc-include-dir=/usr/include/iodbc + --with-experimental-modules + --with-docdir=/usr/share/doc/${PF} + --with-logdir=/var/log/radius + $(use_enable debug developer) + $(use_with ldap edir) + $(use_with ssl openssl) + $(use_with systemd systemd) + ) + # fix bug #77613 + if has_version app-crypt/heimdal; then + myeconfargs+=( --enable-heimdal-krb5 ) + fi + + if use python ; then + myeconfargs+=( + --with-rlm-python3-bin=${EPYTHON} + --with-rlm-python3-config-bin=${EPYTHON}-config + ) + fi + + use readline || export ac_cv_lib_readline=no + use pcap || export ac_cv_lib_pcap_pcap_open_live=no + + econf "${myeconfargs[@]}" +} + +src_compile() { + # verbose, do not generate certificates + emake \ + Q='' ECHO=true \ + LOCAL_CERT_PRODUCTS='' +} + +src_install() { + dodir /etc + diropts -m0750 -o root -g radius + dodir /etc/raddb + diropts -m0750 -o radius -g radius + dodir /var/log/radius + keepdir /var/log/radius/radacct + diropts + + # verbose, do not install certificates + # Parallel install fails (#509498) + emake -j1 \ + Q='' ECHO=true \ + LOCAL_CERT_PRODUCTS='' \ + R="${D}" \ + install + + if use pam; then + pamd_mimic_system radiusd auth account password session + fi + + # fix #711756 + fowners -R radius:radius /etc/raddb + fowners -R radius:radius /var/log/radius + + dodoc CREDITS + + rm "${ED}/usr/sbin/rc.radiusd" || die + + newinitd "${FILESDIR}/radius.init-r3" radiusd + newconfd "${FILESDIR}/radius.conf-r4" radiusd + + if ! use systemd ; then + # If systemd builtin is not enabled we need use Type=Simple + # as systemd .service + sed -i -e 's:^Type=.*::g' \ + -e 's:^WatchdogSec=.*::g' -e 's:^NotifyAccess=all.*::g' \ + "${S}"/debian/freeradius.service + fi + systemd_dounit "${S}"/debian/freeradius.service + + find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die + +} + +pkg_config() { + if use ssl; then + cd "${ROOT}"/etc/raddb/certs || die + ./bootstrap || die "Error while running ./bootstrap script." + fowners root:radius "${ROOT}"/etc/raddb/certs + fowners root:radius "${ROOT}"/etc/raddb/certs/ca.pem + fowners root:radius "${ROOT}"/etc/raddb/certs/server.{key,crt,pem} + fi +} + +pkg_preinst() { + if ! has_version ${CATEGORY}/${PN} && use ssl; then + elog "You have to run \`emerge --config =${CATEGORY}/${PF}\` to be able" + elog "to start the radiusd service." + fi +} diff --git a/net-dialup/freeradius/freeradius-3.0.21-r4.ebuild b/net-dialup/freeradius/freeradius-3.0.21-r4.ebuild deleted file mode 100644 index 896766f075a7..000000000000 --- a/net-dialup/freeradius/freeradius-3.0.21-r4.ebuild +++ /dev/null @@ -1,267 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7,8,9} ) -inherit autotools pam python-single-r1 systemd - -MY_P="${PN}-server-${PV}" - -DESCRIPTION="Highly configurable free RADIUS server" -SRC_URI=" - ftp://ftp.freeradius.org/pub/radius/${MY_P}.tar.gz - ftp://ftp.freeradius.org/pub/radius/old/${MY_P}.tar.gz -" -HOMEPAGE="http://www.freeradius.org/" - -KEYWORDS="amd64 ~arm arm64 ~ppc ~ppc64 ~sparc x86" -LICENSE="GPL-2" -SLOT="0" - -IUSE=" - debug firebird iodbc kerberos ldap memcached mysql mongodb odbc oracle pam - pcap postgres python readline redis rest samba sqlite ssl systemd -" -RESTRICT="test firebird? ( bindist )" - -# NOTE: Temporary freeradius doesn't support linking with mariadb client -# libs also if code is compliant, will be available in the next release. -# (http://lists.freeradius.org/pipermail/freeradius-devel/2018-October/013228.html)a - -# TODO: rlm_mschap works with both samba library or without. I need to avoid -# linking of samba library if -samba is used. -RDEPEND="acct-group/radius - acct-user/radius - !net-dialup/cistronradius - dev-lang/perl:= - sys-libs/gdbm:= - sys-libs/talloc - virtual/libcrypt:= - firebird? ( dev-db/firebird ) - iodbc? ( dev-db/libiodbc ) - kerberos? ( virtual/krb5 ) - ldap? ( net-nds/openldap ) - memcached? ( dev-libs/libmemcached ) - mysql? ( dev-db/mysql-connector-c ) - mongodb? ( >=dev-libs/mongo-c-driver-1.13.0-r1 ) - odbc? ( dev-db/unixODBC ) - oracle? ( dev-db/oracle-instantclient[sdk] ) - pam? ( sys-libs/pam ) - pcap? ( net-libs/libpcap ) - postgres? ( dev-db/postgresql:= ) - python? ( ${PYTHON_DEPS} ) - readline? ( sys-libs/readline:0= ) - redis? ( dev-libs/hiredis:= ) - rest? ( dev-libs/json-c:= ) - samba? ( net-fs/samba ) - sqlite? ( dev-db/sqlite:3 ) - ssl? ( - dev-libs/openssl:0=[-bindist(-)] - ) - systemd? ( sys-apps/systemd )" -DEPEND="${RDEPEND}" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -S="${WORKDIR}/${MY_P}" - -PATCHES=( - "${FILESDIR}"/${PN}-3.0.20-systemd-service.patch -) - -pkg_setup() { - if use python ; then - python-single-r1_pkg_setup - export PYTHONBIN="${EPYTHON}" - fi -} - -src_prepare() { - # most of the configuration options do not appear as ./configure - # switches. Instead it identifies the directories that are available - # and run through them. These might check for the presence of - # various libraries, in which case they are not built. To avoid - # automagic dependencies, we just remove all the modules that we're - # not interested in using. - - eapply_user - default - - use ssl || { rm -r src/modules/rlm_eap/types/rlm_eap_{tls,ttls,peap} || die ; } - use ldap || { rm -r src/modules/rlm_ldap || die ; } - use kerberos || { rm -r src/modules/rlm_krb5 || die ; } - use memcached || { rm -r src/modules/rlm_cache/drivers/rlm_cache_memcached || die ; } - use pam || { rm -r src/modules/rlm_pam || die ; } - # Drop support of python2 - rm -r src/modules/rlm_python || die - use python || { rm -r src/modules/rlm_python3 || die ; } - use rest || { rm -r src/modules/rlm_rest || die ; } - use redis || { rm -r src/modules/rlm_redis{,who} || die ; } - # Do not install ruby rlm module, bug #483108 - rm -r src/modules/rlm_ruby || die - - # these are all things we don't have in portage/I don't want to deal - # with myself - rm -r src/modules/rlm_eap/types/rlm_eap_tnc || die # requires TNCS library - rm -r src/modules/rlm_eap/types/rlm_eap_ikev2 || die # requires libeap-ikev2 - rm -r src/modules/rlm_opendirectory || die # requires some membership.h - rm -r src/modules/rlm_sql/drivers/rlm_sql_{db2,freetds} || die - - # sql drivers that are not part of experimental are loaded from a - # file, so we have to remove them from the file itself when we - # remove them. - usesqldriver() { - local flag=$1 - local driver=rlm_sql_${2:-${flag}} - - if ! use ${flag}; then - rm -r src/modules/rlm_sql/drivers/${driver} || die - sed -i -e /${driver}/d src/modules/rlm_sql/stable || die - fi - } - - sed -i \ - -e 's:^#\tuser = :\tuser = :g' \ - -e 's:^#\tgroup = :\tgroup = :g' \ - -e 's:/var/run/radiusd:/run/radiusd:g' \ - -e '/^run_dir/s:${localstatedir}::g' \ - raddb/radiusd.conf.in || die - - # verbosity - # build shared libraries using jlibtool --shared - sed -i \ - -e '/$(LIBTOOL)/s|--quiet ||g' \ - -e 's:--mode=\(compile\|link\):& --shared:g' \ - Make.inc.in || die - - sed -i \ - -e 's|--silent ||g' \ - -e 's:--mode=\(compile\|link\):& --shared:g' \ - scripts/libtool.mk || die - - # crude measure to stop jlibtool from running ranlib and ar - sed -i \ - -e '/LIBRARIAN/s|".*"|"true"|g' \ - -e '/RANLIB/s|".*"|"true"|g' \ - scripts/jlibtool.c || die - - usesqldriver mysql - usesqldriver postgres postgresql - usesqldriver firebird - usesqldriver iodbc - usesqldriver odbc unixodbc - usesqldriver oracle - usesqldriver sqlite - usesqldriver mongodb mongo - - eautoreconf -} - -src_configure() { - # do not try to enable static with static-libs; upstream is a - # massacre of libtool best practices so you also have to make sure - # to --enable-shared explicitly. - local myeconfargs=( - --enable-shared - --disable-static - --disable-ltdl-install - --with-system-libtool - --with-system-libltdl - --with-ascend-binary - --with-udpfromto - --with-dhcp - --with-iodbc-include-dir=/usr/include/iodbc - --with-experimental-modules - --with-docdir=/usr/share/doc/${PF} - --with-logdir=/var/log/radius - $(use_enable debug developer) - $(use_with ldap edir) - $(use_with ssl openssl) - $(use_with systemd systemd) - ) - # fix bug #77613 - if has_version app-crypt/heimdal; then - myeconfargs+=( --enable-heimdal-krb5 ) - fi - - if use python ; then - myeconfargs+=( - --with-rlm-python3-bin=${EPYTHON} - --with-rlm-python3-config-bin=${EPYTHON}-config - ) - fi - - use readline || export ac_cv_lib_readline=no - use pcap || export ac_cv_lib_pcap_pcap_open_live=no - - econf "${myeconfargs[@]}" -} - -src_compile() { - # verbose, do not generate certificates - emake \ - Q='' ECHO=true \ - LOCAL_CERT_PRODUCTS='' -} - -src_install() { - dodir /etc - diropts -m0750 -o root -g radius - dodir /etc/raddb - diropts -m0750 -o radius -g radius - dodir /var/log/radius - keepdir /var/log/radius/radacct - diropts - - # verbose, do not install certificates - # Parallel install fails (#509498) - emake -j1 \ - Q='' ECHO=true \ - LOCAL_CERT_PRODUCTS='' \ - R="${D}" \ - install - - if use pam; then - pamd_mimic_system radiusd auth account password session - fi - - # fix #711756 - fowners -R radius:radius /etc/raddb - fowners -R radius:radius /var/log/radius - - dodoc CREDITS - - rm "${ED}/usr/sbin/rc.radiusd" || die - - newinitd "${FILESDIR}/radius.init-r4" radiusd - newconfd "${FILESDIR}/radius.conf-r5" radiusd - - if ! use systemd ; then - # If systemd builtin is not enabled we need use Type=Simple - # as systemd .service - sed -i -e 's:^Type=.*::g' \ - -e 's:^WatchdogSec=.*::g' -e 's:^NotifyAccess=all.*::g' \ - "${S}"/debian/freeradius.service - fi - systemd_dounit "${S}"/debian/freeradius.service - - find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die -} - -pkg_config() { - if use ssl; then - cd "${ROOT}"/etc/raddb/certs || die - ./bootstrap || die "Error while running ./bootstrap script." - fowners root:radius "${ROOT}"/etc/raddb/certs - fowners root:radius "${ROOT}"/etc/raddb/certs/ca.pem - fowners root:radius "${ROOT}"/etc/raddb/certs/server.{key,crt,pem} - fi -} - -pkg_preinst() { - if ! has_version ${CATEGORY}/${PN} && use ssl; then - elog "You have to run \`emerge --config =${CATEGORY}/${PF}\` to be able" - elog "to start the radiusd service." - fi -} diff --git a/net-dialup/freeradius/freeradius-3.0.21-r5.ebuild b/net-dialup/freeradius/freeradius-3.0.21-r5.ebuild new file mode 100644 index 000000000000..0446eb5f201c --- /dev/null +++ b/net-dialup/freeradius/freeradius-3.0.21-r5.ebuild @@ -0,0 +1,267 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7,8,9} ) +inherit autotools pam python-single-r1 systemd + +MY_P="${PN}-server-${PV}" + +DESCRIPTION="Highly configurable free RADIUS server" +SRC_URI=" + ftp://ftp.freeradius.org/pub/radius/${MY_P}.tar.gz + ftp://ftp.freeradius.org/pub/radius/old/${MY_P}.tar.gz +" +HOMEPAGE="http://www.freeradius.org/" + +KEYWORDS="amd64 ~arm arm64 ~ppc ~ppc64 ~sparc x86" +LICENSE="GPL-2" +SLOT="0" + +IUSE=" + debug firebird iodbc kerberos ldap memcached mysql mongodb odbc oracle pam + pcap postgres python readline redis rest samba sqlite ssl systemd +" +RESTRICT="test firebird? ( bindist )" + +# NOTE: Temporary freeradius doesn't support linking with mariadb client +# libs also if code is compliant, will be available in the next release. +# (http://lists.freeradius.org/pipermail/freeradius-devel/2018-October/013228.html)a + +# TODO: rlm_mschap works with both samba library or without. I need to avoid +# linking of samba library if -samba is used. +RDEPEND="acct-group/radius + acct-user/radius + !net-dialup/cistronradius + dev-lang/perl:= + sys-libs/gdbm:= + sys-libs/talloc + virtual/libcrypt:= + firebird? ( dev-db/firebird ) + iodbc? ( dev-db/libiodbc ) + kerberos? ( virtual/krb5 ) + ldap? ( net-nds/openldap:= ) + memcached? ( dev-libs/libmemcached ) + mysql? ( dev-db/mysql-connector-c:= ) + mongodb? ( >=dev-libs/mongo-c-driver-1.13.0-r1 ) + odbc? ( dev-db/unixODBC ) + oracle? ( dev-db/oracle-instantclient[sdk] ) + pam? ( sys-libs/pam ) + pcap? ( net-libs/libpcap ) + postgres? ( dev-db/postgresql:= ) + python? ( ${PYTHON_DEPS} ) + readline? ( sys-libs/readline:0= ) + redis? ( dev-libs/hiredis:= ) + rest? ( dev-libs/json-c:= ) + samba? ( net-fs/samba ) + sqlite? ( dev-db/sqlite:3 ) + ssl? ( + dev-libs/openssl:0=[-bindist(-)] + ) + systemd? ( sys-apps/systemd )" +DEPEND="${RDEPEND}" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}"/${PN}-3.0.20-systemd-service.patch +) + +pkg_setup() { + if use python ; then + python-single-r1_pkg_setup + export PYTHONBIN="${EPYTHON}" + fi +} + +src_prepare() { + # most of the configuration options do not appear as ./configure + # switches. Instead it identifies the directories that are available + # and run through them. These might check for the presence of + # various libraries, in which case they are not built. To avoid + # automagic dependencies, we just remove all the modules that we're + # not interested in using. + + eapply_user + default + + use ssl || { rm -r src/modules/rlm_eap/types/rlm_eap_{tls,ttls,peap} || die ; } + use ldap || { rm -r src/modules/rlm_ldap || die ; } + use kerberos || { rm -r src/modules/rlm_krb5 || die ; } + use memcached || { rm -r src/modules/rlm_cache/drivers/rlm_cache_memcached || die ; } + use pam || { rm -r src/modules/rlm_pam || die ; } + # Drop support of python2 + rm -r src/modules/rlm_python || die + use python || { rm -r src/modules/rlm_python3 || die ; } + use rest || { rm -r src/modules/rlm_rest || die ; } + use redis || { rm -r src/modules/rlm_redis{,who} || die ; } + # Do not install ruby rlm module, bug #483108 + rm -r src/modules/rlm_ruby || die + + # these are all things we don't have in portage/I don't want to deal + # with myself + rm -r src/modules/rlm_eap/types/rlm_eap_tnc || die # requires TNCS library + rm -r src/modules/rlm_eap/types/rlm_eap_ikev2 || die # requires libeap-ikev2 + rm -r src/modules/rlm_opendirectory || die # requires some membership.h + rm -r src/modules/rlm_sql/drivers/rlm_sql_{db2,freetds} || die + + # sql drivers that are not part of experimental are loaded from a + # file, so we have to remove them from the file itself when we + # remove them. + usesqldriver() { + local flag=$1 + local driver=rlm_sql_${2:-${flag}} + + if ! use ${flag}; then + rm -r src/modules/rlm_sql/drivers/${driver} || die + sed -i -e /${driver}/d src/modules/rlm_sql/stable || die + fi + } + + sed -i \ + -e 's:^#\tuser = :\tuser = :g' \ + -e 's:^#\tgroup = :\tgroup = :g' \ + -e 's:/var/run/radiusd:/run/radiusd:g' \ + -e '/^run_dir/s:${localstatedir}::g' \ + raddb/radiusd.conf.in || die + + # verbosity + # build shared libraries using jlibtool --shared + sed -i \ + -e '/$(LIBTOOL)/s|--quiet ||g' \ + -e 's:--mode=\(compile\|link\):& --shared:g' \ + Make.inc.in || die + + sed -i \ + -e 's|--silent ||g' \ + -e 's:--mode=\(compile\|link\):& --shared:g' \ + scripts/libtool.mk || die + + # crude measure to stop jlibtool from running ranlib and ar + sed -i \ + -e '/LIBRARIAN/s|".*"|"true"|g' \ + -e '/RANLIB/s|".*"|"true"|g' \ + scripts/jlibtool.c || die + + usesqldriver mysql + usesqldriver postgres postgresql + usesqldriver firebird + usesqldriver iodbc + usesqldriver odbc unixodbc + usesqldriver oracle + usesqldriver sqlite + usesqldriver mongodb mongo + + eautoreconf +} + +src_configure() { + # do not try to enable static with static-libs; upstream is a + # massacre of libtool best practices so you also have to make sure + # to --enable-shared explicitly. + local myeconfargs=( + --enable-shared + --disable-static + --disable-ltdl-install + --with-system-libtool + --with-system-libltdl + --with-ascend-binary + --with-udpfromto + --with-dhcp + --with-iodbc-include-dir=/usr/include/iodbc + --with-experimental-modules + --with-docdir=/usr/share/doc/${PF} + --with-logdir=/var/log/radius + $(use_enable debug developer) + $(use_with ldap edir) + $(use_with ssl openssl) + $(use_with systemd systemd) + ) + # fix bug #77613 + if has_version app-crypt/heimdal; then + myeconfargs+=( --enable-heimdal-krb5 ) + fi + + if use python ; then + myeconfargs+=( + --with-rlm-python3-bin=${EPYTHON} + --with-rlm-python3-config-bin=${EPYTHON}-config + ) + fi + + use readline || export ac_cv_lib_readline=no + use pcap || export ac_cv_lib_pcap_pcap_open_live=no + + econf "${myeconfargs[@]}" +} + +src_compile() { + # verbose, do not generate certificates + emake \ + Q='' ECHO=true \ + LOCAL_CERT_PRODUCTS='' +} + +src_install() { + dodir /etc + diropts -m0750 -o root -g radius + dodir /etc/raddb + diropts -m0750 -o radius -g radius + dodir /var/log/radius + keepdir /var/log/radius/radacct + diropts + + # verbose, do not install certificates + # Parallel install fails (#509498) + emake -j1 \ + Q='' ECHO=true \ + LOCAL_CERT_PRODUCTS='' \ + R="${D}" \ + install + + if use pam; then + pamd_mimic_system radiusd auth account password session + fi + + # fix #711756 + fowners -R radius:radius /etc/raddb + fowners -R radius:radius /var/log/radius + + dodoc CREDITS + + rm "${ED}/usr/sbin/rc.radiusd" || die + + newinitd "${FILESDIR}/radius.init-r4" radiusd + newconfd "${FILESDIR}/radius.conf-r5" radiusd + + if ! use systemd ; then + # If systemd builtin is not enabled we need use Type=Simple + # as systemd .service + sed -i -e 's:^Type=.*::g' \ + -e 's:^WatchdogSec=.*::g' -e 's:^NotifyAccess=all.*::g' \ + "${S}"/debian/freeradius.service + fi + systemd_dounit "${S}"/debian/freeradius.service + + find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die +} + +pkg_config() { + if use ssl; then + cd "${ROOT}"/etc/raddb/certs || die + ./bootstrap || die "Error while running ./bootstrap script." + fowners root:radius "${ROOT}"/etc/raddb/certs + fowners root:radius "${ROOT}"/etc/raddb/certs/ca.pem + fowners root:radius "${ROOT}"/etc/raddb/certs/server.{key,crt,pem} + fi +} + +pkg_preinst() { + if ! has_version ${CATEGORY}/${PN} && use ssl; then + elog "You have to run \`emerge --config =${CATEGORY}/${PF}\` to be able" + elog "to start the radiusd service." + fi +} diff --git a/net-dialup/freeradius/freeradius-3.0.22-r3.ebuild b/net-dialup/freeradius/freeradius-3.0.22-r3.ebuild deleted file mode 100644 index 06341165e705..000000000000 --- a/net-dialup/freeradius/freeradius-3.0.22-r3.ebuild +++ /dev/null @@ -1,267 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7,8,9} ) -inherit autotools pam python-single-r1 systemd - -MY_P="${PN}-server-${PV}" - -DESCRIPTION="Highly configurable free RADIUS server" -SRC_URI=" - ftp://ftp.freeradius.org/pub/radius/${MY_P}.tar.gz - ftp://ftp.freeradius.org/pub/radius/old/${MY_P}.tar.gz -" -HOMEPAGE="http://www.freeradius.org/" - -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86" -LICENSE="GPL-2" -SLOT="0" - -IUSE=" - debug firebird iodbc kerberos ldap memcached mysql mongodb odbc oracle pam - pcap postgres python readline redis rest samba sqlite ssl systemd -" -RESTRICT="test firebird? ( bindist )" - -# NOTE: Temporary freeradius doesn't support linking with mariadb client -# libs also if code is compliant, will be available in the next release. -# (http://lists.freeradius.org/pipermail/freeradius-devel/2018-October/013228.html)a - -# TODO: rlm_mschap works with both samba library or without. I need to avoid -# linking of samba library if -samba is used. -RDEPEND="acct-group/radius - acct-user/radius - !net-dialup/cistronradius - dev-lang/perl:= - sys-libs/gdbm:= - sys-libs/talloc - virtual/libcrypt:= - firebird? ( dev-db/firebird ) - iodbc? ( dev-db/libiodbc ) - kerberos? ( virtual/krb5 ) - ldap? ( net-nds/openldap ) - memcached? ( dev-libs/libmemcached ) - mysql? ( dev-db/mysql-connector-c ) - mongodb? ( >=dev-libs/mongo-c-driver-1.13.0-r1 ) - odbc? ( dev-db/unixODBC ) - oracle? ( dev-db/oracle-instantclient[sdk] ) - pam? ( sys-libs/pam ) - pcap? ( net-libs/libpcap ) - postgres? ( dev-db/postgresql:= ) - python? ( ${PYTHON_DEPS} ) - readline? ( sys-libs/readline:0= ) - redis? ( dev-libs/hiredis:= ) - rest? ( dev-libs/json-c:= ) - samba? ( net-fs/samba ) - sqlite? ( dev-db/sqlite:3 ) - ssl? ( - dev-libs/openssl:0=[-bindist(-)] - ) - systemd? ( sys-apps/systemd )" -DEPEND="${RDEPEND}" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -S="${WORKDIR}/${MY_P}" - -PATCHES=( - "${FILESDIR}"/${PN}-3.0.20-systemd-service.patch -) - -pkg_setup() { - if use python ; then - python-single-r1_pkg_setup - export PYTHONBIN="${EPYTHON}" - fi -} - -src_prepare() { - # most of the configuration options do not appear as ./configure - # switches. Instead it identifies the directories that are available - # and run through them. These might check for the presence of - # various libraries, in which case they are not built. To avoid - # automagic dependencies, we just remove all the modules that we're - # not interested in using. - - eapply_user - default - - use ssl || { rm -r src/modules/rlm_eap/types/rlm_eap_{tls,ttls,peap} || die ; } - use ldap || { rm -r src/modules/rlm_ldap || die ; } - use kerberos || { rm -r src/modules/rlm_krb5 || die ; } - use memcached || { rm -r src/modules/rlm_cache/drivers/rlm_cache_memcached || die ; } - use pam || { rm -r src/modules/rlm_pam || die ; } - # Drop support of python2 - rm -r src/modules/rlm_python || die - use python || { rm -r src/modules/rlm_python3 || die ; } - use rest || { rm -r src/modules/rlm_rest || die ; } - use redis || { rm -r src/modules/rlm_redis{,who} || die ; } - # Do not install ruby rlm module, bug #483108 - rm -r src/modules/rlm_ruby || die - - # these are all things we don't have in portage/I don't want to deal - # with myself - rm -r src/modules/rlm_eap/types/rlm_eap_tnc || die # requires TNCS library - rm -r src/modules/rlm_eap/types/rlm_eap_ikev2 || die # requires libeap-ikev2 - rm -r src/modules/rlm_opendirectory || die # requires some membership.h - rm -r src/modules/rlm_sql/drivers/rlm_sql_{db2,freetds} || die - - # sql drivers that are not part of experimental are loaded from a - # file, so we have to remove them from the file itself when we - # remove them. - usesqldriver() { - local flag=$1 - local driver=rlm_sql_${2:-${flag}} - - if ! use ${flag}; then - rm -r src/modules/rlm_sql/drivers/${driver} || die - sed -i -e /${driver}/d src/modules/rlm_sql/stable || die - fi - } - - sed -i \ - -e 's:^#\tuser = :\tuser = :g' \ - -e 's:^#\tgroup = :\tgroup = :g' \ - -e 's:/var/run/radiusd:/run/radiusd:g' \ - -e '/^run_dir/s:${localstatedir}::g' \ - raddb/radiusd.conf.in || die - - # verbosity - # build shared libraries using jlibtool --shared - sed -i \ - -e '/$(LIBTOOL)/s|--quiet ||g' \ - -e 's:--mode=\(compile\|link\):& --shared:g' \ - Make.inc.in || die - - sed -i \ - -e 's|--silent ||g' \ - -e 's:--mode=\(compile\|link\):& --shared:g' \ - scripts/libtool.mk || die - - # crude measure to stop jlibtool from running ranlib and ar - sed -i \ - -e '/LIBRARIAN/s|".*"|"true"|g' \ - -e '/RANLIB/s|".*"|"true"|g' \ - scripts/jlibtool.c || die - - usesqldriver mysql - usesqldriver postgres postgresql - usesqldriver firebird - usesqldriver iodbc - usesqldriver odbc unixodbc - usesqldriver oracle - usesqldriver sqlite - usesqldriver mongodb mongo - - eautoreconf -} - -src_configure() { - # do not try to enable static with static-libs; upstream is a - # massacre of libtool best practices so you also have to make sure - # to --enable-shared explicitly. - local myeconfargs=( - --enable-shared - --disable-static - --disable-ltdl-install - --with-system-libtool - --with-system-libltdl - --with-ascend-binary - --with-udpfromto - --with-dhcp - --with-iodbc-include-dir=/usr/include/iodbc - --with-experimental-modules - --with-docdir=/usr/share/doc/${PF} - --with-logdir=/var/log/radius - $(use_enable debug developer) - $(use_with ldap edir) - $(use_with ssl openssl) - $(use_with systemd systemd) - ) - # fix bug #77613 - if has_version app-crypt/heimdal; then - myeconfargs+=( --enable-heimdal-krb5 ) - fi - - if use python ; then - myeconfargs+=( - --with-rlm-python3-bin=${EPYTHON} - --with-rlm-python3-config-bin=${EPYTHON}-config - ) - fi - - use readline || export ac_cv_lib_readline=no - use pcap || export ac_cv_lib_pcap_pcap_open_live=no - - econf "${myeconfargs[@]}" -} - -src_compile() { - # verbose, do not generate certificates - emake \ - Q='' ECHO=true \ - LOCAL_CERT_PRODUCTS='' -} - -src_install() { - dodir /etc - diropts -m0750 -o root -g radius - dodir /etc/raddb - diropts -m0750 -o radius -g radius - dodir /var/log/radius - keepdir /var/log/radius/radacct - diropts - - # verbose, do not install certificates - # Parallel install fails (#509498) - emake -j1 \ - Q='' ECHO=true \ - LOCAL_CERT_PRODUCTS='' \ - R="${D}" \ - install - - if use pam; then - pamd_mimic_system radiusd auth account password session - fi - - # fix #711756 - fowners -R radius:radius /etc/raddb - fowners -R radius:radius /var/log/radius - - dodoc CREDITS - - rm "${ED}/usr/sbin/rc.radiusd" || die - - newinitd "${FILESDIR}/radius.init-r4" radiusd - newconfd "${FILESDIR}/radius.conf-r5" radiusd - - if ! use systemd ; then - # If systemd builtin is not enabled we need use Type=Simple - # as systemd .service - sed -i -e 's:^Type=.*::g' \ - -e 's:^WatchdogSec=.*::g' -e 's:^NotifyAccess=all.*::g' \ - "${S}"/debian/freeradius.service - fi - systemd_dounit "${S}"/debian/freeradius.service - - find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die -} - -pkg_config() { - if use ssl; then - cd "${ROOT}"/etc/raddb/certs || die - ./bootstrap || die "Error while running ./bootstrap script." - fowners root:radius "${ROOT}"/etc/raddb/certs - fowners root:radius "${ROOT}"/etc/raddb/certs/ca.pem - fowners root:radius "${ROOT}"/etc/raddb/certs/server.{key,crt,pem} - fi -} - -pkg_preinst() { - if ! has_version ${CATEGORY}/${PN} && use ssl; then - elog "You have to run \`emerge --config =${CATEGORY}/${PF}\` to be able" - elog "to start the radiusd service." - fi -} diff --git a/net-dialup/freeradius/freeradius-3.0.22-r4.ebuild b/net-dialup/freeradius/freeradius-3.0.22-r4.ebuild new file mode 100644 index 000000000000..1f36dfb9b760 --- /dev/null +++ b/net-dialup/freeradius/freeradius-3.0.22-r4.ebuild @@ -0,0 +1,267 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7,8,9} ) +inherit autotools pam python-single-r1 systemd + +MY_P="${PN}-server-${PV}" + +DESCRIPTION="Highly configurable free RADIUS server" +SRC_URI=" + ftp://ftp.freeradius.org/pub/radius/${MY_P}.tar.gz + ftp://ftp.freeradius.org/pub/radius/old/${MY_P}.tar.gz +" +HOMEPAGE="http://www.freeradius.org/" + +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86" +LICENSE="GPL-2" +SLOT="0" + +IUSE=" + debug firebird iodbc kerberos ldap memcached mysql mongodb odbc oracle pam + pcap postgres python readline redis rest samba sqlite ssl systemd +" +RESTRICT="test firebird? ( bindist )" + +# NOTE: Temporary freeradius doesn't support linking with mariadb client +# libs also if code is compliant, will be available in the next release. +# (http://lists.freeradius.org/pipermail/freeradius-devel/2018-October/013228.html)a + +# TODO: rlm_mschap works with both samba library or without. I need to avoid +# linking of samba library if -samba is used. +RDEPEND="acct-group/radius + acct-user/radius + !net-dialup/cistronradius + dev-lang/perl:= + sys-libs/gdbm:= + sys-libs/talloc + virtual/libcrypt:= + firebird? ( dev-db/firebird ) + iodbc? ( dev-db/libiodbc ) + kerberos? ( virtual/krb5 ) + ldap? ( net-nds/openldap:= ) + memcached? ( dev-libs/libmemcached ) + mysql? ( dev-db/mysql-connector-c:= ) + mongodb? ( >=dev-libs/mongo-c-driver-1.13.0-r1 ) + odbc? ( dev-db/unixODBC ) + oracle? ( dev-db/oracle-instantclient[sdk] ) + pam? ( sys-libs/pam ) + pcap? ( net-libs/libpcap ) + postgres? ( dev-db/postgresql:= ) + python? ( ${PYTHON_DEPS} ) + readline? ( sys-libs/readline:0= ) + redis? ( dev-libs/hiredis:= ) + rest? ( dev-libs/json-c:= ) + samba? ( net-fs/samba ) + sqlite? ( dev-db/sqlite:3 ) + ssl? ( + dev-libs/openssl:0=[-bindist(-)] + ) + systemd? ( sys-apps/systemd )" +DEPEND="${RDEPEND}" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}"/${PN}-3.0.20-systemd-service.patch +) + +pkg_setup() { + if use python ; then + python-single-r1_pkg_setup + export PYTHONBIN="${EPYTHON}" + fi +} + +src_prepare() { + # most of the configuration options do not appear as ./configure + # switches. Instead it identifies the directories that are available + # and run through them. These might check for the presence of + # various libraries, in which case they are not built. To avoid + # automagic dependencies, we just remove all the modules that we're + # not interested in using. + + eapply_user + default + + use ssl || { rm -r src/modules/rlm_eap/types/rlm_eap_{tls,ttls,peap} || die ; } + use ldap || { rm -r src/modules/rlm_ldap || die ; } + use kerberos || { rm -r src/modules/rlm_krb5 || die ; } + use memcached || { rm -r src/modules/rlm_cache/drivers/rlm_cache_memcached || die ; } + use pam || { rm -r src/modules/rlm_pam || die ; } + # Drop support of python2 + rm -r src/modules/rlm_python || die + use python || { rm -r src/modules/rlm_python3 || die ; } + use rest || { rm -r src/modules/rlm_rest || die ; } + use redis || { rm -r src/modules/rlm_redis{,who} || die ; } + # Do not install ruby rlm module, bug #483108 + rm -r src/modules/rlm_ruby || die + + # these are all things we don't have in portage/I don't want to deal + # with myself + rm -r src/modules/rlm_eap/types/rlm_eap_tnc || die # requires TNCS library + rm -r src/modules/rlm_eap/types/rlm_eap_ikev2 || die # requires libeap-ikev2 + rm -r src/modules/rlm_opendirectory || die # requires some membership.h + rm -r src/modules/rlm_sql/drivers/rlm_sql_{db2,freetds} || die + + # sql drivers that are not part of experimental are loaded from a + # file, so we have to remove them from the file itself when we + # remove them. + usesqldriver() { + local flag=$1 + local driver=rlm_sql_${2:-${flag}} + + if ! use ${flag}; then + rm -r src/modules/rlm_sql/drivers/${driver} || die + sed -i -e /${driver}/d src/modules/rlm_sql/stable || die + fi + } + + sed -i \ + -e 's:^#\tuser = :\tuser = :g' \ + -e 's:^#\tgroup = :\tgroup = :g' \ + -e 's:/var/run/radiusd:/run/radiusd:g' \ + -e '/^run_dir/s:${localstatedir}::g' \ + raddb/radiusd.conf.in || die + + # verbosity + # build shared libraries using jlibtool --shared + sed -i \ + -e '/$(LIBTOOL)/s|--quiet ||g' \ + -e 's:--mode=\(compile\|link\):& --shared:g' \ + Make.inc.in || die + + sed -i \ + -e 's|--silent ||g' \ + -e 's:--mode=\(compile\|link\):& --shared:g' \ + scripts/libtool.mk || die + + # crude measure to stop jlibtool from running ranlib and ar + sed -i \ + -e '/LIBRARIAN/s|".*"|"true"|g' \ + -e '/RANLIB/s|".*"|"true"|g' \ + scripts/jlibtool.c || die + + usesqldriver mysql + usesqldriver postgres postgresql + usesqldriver firebird + usesqldriver iodbc + usesqldriver odbc unixodbc + usesqldriver oracle + usesqldriver sqlite + usesqldriver mongodb mongo + + eautoreconf +} + +src_configure() { + # do not try to enable static with static-libs; upstream is a + # massacre of libtool best practices so you also have to make sure + # to --enable-shared explicitly. + local myeconfargs=( + --enable-shared + --disable-static + --disable-ltdl-install + --with-system-libtool + --with-system-libltdl + --with-ascend-binary + --with-udpfromto + --with-dhcp + --with-iodbc-include-dir=/usr/include/iodbc + --with-experimental-modules + --with-docdir=/usr/share/doc/${PF} + --with-logdir=/var/log/radius + $(use_enable debug developer) + $(use_with ldap edir) + $(use_with ssl openssl) + $(use_with systemd systemd) + ) + # fix bug #77613 + if has_version app-crypt/heimdal; then + myeconfargs+=( --enable-heimdal-krb5 ) + fi + + if use python ; then + myeconfargs+=( + --with-rlm-python3-bin=${EPYTHON} + --with-rlm-python3-config-bin=${EPYTHON}-config + ) + fi + + use readline || export ac_cv_lib_readline=no + use pcap || export ac_cv_lib_pcap_pcap_open_live=no + + econf "${myeconfargs[@]}" +} + +src_compile() { + # verbose, do not generate certificates + emake \ + Q='' ECHO=true \ + LOCAL_CERT_PRODUCTS='' +} + +src_install() { + dodir /etc + diropts -m0750 -o root -g radius + dodir /etc/raddb + diropts -m0750 -o radius -g radius + dodir /var/log/radius + keepdir /var/log/radius/radacct + diropts + + # verbose, do not install certificates + # Parallel install fails (#509498) + emake -j1 \ + Q='' ECHO=true \ + LOCAL_CERT_PRODUCTS='' \ + R="${D}" \ + install + + if use pam; then + pamd_mimic_system radiusd auth account password session + fi + + # fix #711756 + fowners -R radius:radius /etc/raddb + fowners -R radius:radius /var/log/radius + + dodoc CREDITS + + rm "${ED}/usr/sbin/rc.radiusd" || die + + newinitd "${FILESDIR}/radius.init-r4" radiusd + newconfd "${FILESDIR}/radius.conf-r5" radiusd + + if ! use systemd ; then + # If systemd builtin is not enabled we need use Type=Simple + # as systemd .service + sed -i -e 's:^Type=.*::g' \ + -e 's:^WatchdogSec=.*::g' -e 's:^NotifyAccess=all.*::g' \ + "${S}"/debian/freeradius.service + fi + systemd_dounit "${S}"/debian/freeradius.service + + find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die +} + +pkg_config() { + if use ssl; then + cd "${ROOT}"/etc/raddb/certs || die + ./bootstrap || die "Error while running ./bootstrap script." + fowners root:radius "${ROOT}"/etc/raddb/certs + fowners root:radius "${ROOT}"/etc/raddb/certs/ca.pem + fowners root:radius "${ROOT}"/etc/raddb/certs/server.{key,crt,pem} + fi +} + +pkg_preinst() { + if ! has_version ${CATEGORY}/${PN} && use ssl; then + elog "You have to run \`emerge --config =${CATEGORY}/${PF}\` to be able" + elog "to start the radiusd service." + fi +} diff --git a/net-dialup/freeradius/freeradius-3.0.25-r1.ebuild b/net-dialup/freeradius/freeradius-3.0.25-r1.ebuild deleted file mode 100644 index 47033376634e..000000000000 --- a/net-dialup/freeradius/freeradius-3.0.25-r1.ebuild +++ /dev/null @@ -1,267 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{8..10} ) -inherit autotools pam python-single-r1 systemd - -MY_PV=$(ver_rs 1- "_") - -DESCRIPTION="Highly configurable free RADIUS server" -HOMEPAGE="https://freeradius.org/" -SRC_URI="https://github.com/FreeRADIUS/freeradius-server/archive/release_${MY_PV}.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}/freeradius-server-release_${MY_PV}" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 ~arm arm64 ~ppc ~ppc64 ~sparc x86" - -IUSE=" - debug firebird iodbc kerberos ldap memcached mysql mongodb odbc oracle pam - pcap postgres python readline redis rest samba sqlite ssl systemd -" - -RESTRICT="test firebird? ( bindist )" - -# NOTE: Temporary freeradius doesn't support linking with mariadb client -# libs also if code is compliant, will be available in the next release. -# (http://lists.freeradius.org/pipermail/freeradius-devel/2018-October/013228.html)a - -# TODO: rlm_mschap works with both samba library or without. I need to avoid -# linking of samba library if -samba is used. -RDEPEND="acct-group/radius - acct-user/radius - !net-dialup/cistronradius - dev-lang/perl:= - sys-libs/gdbm:= - sys-libs/talloc - virtual/libcrypt:= - firebird? ( dev-db/firebird ) - iodbc? ( dev-db/libiodbc ) - kerberos? ( virtual/krb5 ) - ldap? ( net-nds/openldap ) - memcached? ( dev-libs/libmemcached ) - mysql? ( dev-db/mysql-connector-c ) - mongodb? ( >=dev-libs/mongo-c-driver-1.13.0-r1 ) - odbc? ( dev-db/unixODBC ) - oracle? ( dev-db/oracle-instantclient[sdk] ) - pam? ( sys-libs/pam ) - pcap? ( net-libs/libpcap ) - postgres? ( dev-db/postgresql:= ) - python? ( ${PYTHON_DEPS} ) - readline? ( sys-libs/readline:0= ) - redis? ( dev-libs/hiredis:= ) - rest? ( dev-libs/json-c:= ) - samba? ( net-fs/samba ) - sqlite? ( dev-db/sqlite:3 ) - ssl? ( - dev-libs/openssl:0=[-bindist(-)] - ) - systemd? ( sys-apps/systemd )" -DEPEND="${RDEPEND}" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -# 721040 -QA_SONAME="usr/lib.*/libfreeradius-.*.so" - -PATCHES=( - "${FILESDIR}"/${PN}-3.0.20-systemd-service.patch -) - -pkg_setup() { - if use python ; then - python-single-r1_pkg_setup - export PYTHONBIN="${EPYTHON}" - fi -} - -src_prepare() { - # most of the configuration options do not appear as ./configure - # switches. Instead it identifies the directories that are available - # and run through them. These might check for the presence of - # various libraries, in which case they are not built. To avoid - # automagic dependencies, we just remove all the modules that we're - # not interested in using. - - eapply_user - default - - use ssl || { rm -r src/modules/rlm_eap/types/rlm_eap_{tls,ttls,peap} || die ; } - use ldap || { rm -r src/modules/rlm_ldap || die ; } - use kerberos || { rm -r src/modules/rlm_krb5 || die ; } - use memcached || { rm -r src/modules/rlm_cache/drivers/rlm_cache_memcached || die ; } - use pam || { rm -r src/modules/rlm_pam || die ; } - # Drop support of python2 - rm -r src/modules/rlm_python || die - use python || { rm -r src/modules/rlm_python3 || die ; } - use rest || { rm -r src/modules/rlm_rest || die ; } - use redis || { rm -r src/modules/rlm_redis{,who} || die ; } - # Do not install ruby rlm module, bug #483108 - rm -r src/modules/rlm_ruby || die - - # these are all things we don't have in portage/I don't want to deal - # with myself - rm -r src/modules/rlm_eap/types/rlm_eap_tnc || die # requires TNCS library - rm -r src/modules/rlm_eap/types/rlm_eap_ikev2 || die # requires libeap-ikev2 - rm -r src/modules/rlm_opendirectory || die # requires some membership.h - rm -r src/modules/rlm_sql/drivers/rlm_sql_{db2,freetds} || die - - # sql drivers that are not part of experimental are loaded from a - # file, so we have to remove them from the file itself when we - # remove them. - usesqldriver() { - local flag=$1 - local driver=rlm_sql_${2:-${flag}} - - if ! use ${flag}; then - rm -r src/modules/rlm_sql/drivers/${driver} || die - sed -i -e /${driver}/d src/modules/rlm_sql/stable || die - fi - } - - sed -i \ - -e 's:^#\tuser = :\tuser = :g' \ - -e 's:^#\tgroup = :\tgroup = :g' \ - -e 's:/var/run/radiusd:/run/radiusd:g' \ - -e '/^run_dir/s:${localstatedir}::g' \ - raddb/radiusd.conf.in || die - - # verbosity - # build shared libraries using jlibtool --shared - sed -i \ - -e '/$(LIBTOOL)/s|--quiet ||g' \ - -e 's:--mode=\(compile\|link\):& --shared:g' \ - Make.inc.in || die - - sed -i \ - -e 's|--silent ||g' \ - -e 's:--mode=\(compile\|link\):& --shared:g' \ - scripts/libtool.mk || die - - # crude measure to stop jlibtool from running ranlib and ar - sed -i \ - -e '/LIBRARIAN/s|".*"|"true"|g' \ - -e '/RANLIB/s|".*"|"true"|g' \ - scripts/jlibtool.c || die - - usesqldriver mysql - usesqldriver postgres postgresql - usesqldriver firebird - usesqldriver iodbc - usesqldriver odbc unixodbc - usesqldriver oracle - usesqldriver sqlite - usesqldriver mongodb mongo - - eautoreconf -} - -src_configure() { - # do not try to enable static with static-libs; upstream is a - # massacre of libtool best practices so you also have to make sure - # to --enable-shared explicitly. - local myeconfargs=( - --enable-shared - --disable-static - --disable-ltdl-install - --with-system-libtool - --with-system-libltdl - --with-ascend-binary - --with-udpfromto - --with-dhcp - --with-iodbc-include-dir=/usr/include/iodbc - --with-experimental-modules - --with-docdir=/usr/share/doc/${PF} - --with-logdir=/var/log/radius - $(use_enable debug developer) - $(use_with ldap edir) - $(use_with ssl openssl) - $(use_with systemd systemd) - ) - # fix bug #77613 - if has_version app-crypt/heimdal; then - myeconfargs+=( --enable-heimdal-krb5 ) - fi - - if use python ; then - myeconfargs+=( - --with-rlm-python3-bin=${EPYTHON} - --with-rlm-python3-config-bin=${EPYTHON}-config - ) - fi - - use readline || export ac_cv_lib_readline=no - use pcap || export ac_cv_lib_pcap_pcap_open_live=no - - econf "${myeconfargs[@]}" -} - -src_compile() { - # verbose, do not generate certificates - emake \ - Q='' ECHO=true \ - LOCAL_CERT_PRODUCTS='' -} - -src_install() { - dodir /etc - diropts -m0750 -o root -g radius - dodir /etc/raddb - diropts -m0750 -o radius -g radius - dodir /var/log/radius - keepdir /var/log/radius/radacct - diropts - - # verbose, do not install certificates - # Parallel install fails (#509498) - emake -j1 \ - Q='' ECHO=true \ - LOCAL_CERT_PRODUCTS='' \ - R="${D}" \ - install - - if use pam; then - pamd_mimic_system radiusd auth account password session - fi - - # fix #711756 - fowners -R radius:radius /etc/raddb - fowners -R radius:radius /var/log/radius - - dodoc CREDITS - - rm "${ED}/usr/sbin/rc.radiusd" || die - - newinitd "${FILESDIR}/radius.init-r4" radiusd - newconfd "${FILESDIR}/radius.conf-r6" radiusd - - if ! use systemd ; then - # If systemd builtin is not enabled we need use Type=Simple - # as systemd .service - sed -i -e 's:^Type=.*::g' \ - -e 's:^WatchdogSec=.*::g' -e 's:^NotifyAccess=all.*::g' \ - "${S}"/debian/freeradius.service - fi - systemd_dounit "${S}"/debian/freeradius.service - - find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die -} - -pkg_config() { - if use ssl; then - cd "${ROOT}"/etc/raddb/certs || die - ./bootstrap || die "Error while running ./bootstrap script." - chown root:radius "${ROOT}"/etc/raddb/certs || die - chown root:radius "${ROOT}"/etc/raddb/certs/ca.pem || die - chown root:radius "${ROOT}"/etc/raddb/certs/server.{key,crt,pem} || die - fi -} - -pkg_preinst() { - if ! has_version ${CATEGORY}/${PN} && use ssl; then - elog "You have to run \`emerge --config =${CATEGORY}/${PF}\` to be able" - elog "to start the radiusd service." - fi -} diff --git a/net-dialup/freeradius/freeradius-3.0.25-r2.ebuild b/net-dialup/freeradius/freeradius-3.0.25-r2.ebuild new file mode 100644 index 000000000000..1577a0e55c8a --- /dev/null +++ b/net-dialup/freeradius/freeradius-3.0.25-r2.ebuild @@ -0,0 +1,267 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8..10} ) +inherit autotools pam python-single-r1 systemd + +MY_PV=$(ver_rs 1- "_") + +DESCRIPTION="Highly configurable free RADIUS server" +HOMEPAGE="https://freeradius.org/" +SRC_URI="https://github.com/FreeRADIUS/freeradius-server/archive/release_${MY_PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/freeradius-server-release_${MY_PV}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm arm64 ~ppc ~ppc64 ~sparc x86" + +IUSE=" + debug firebird iodbc kerberos ldap memcached mysql mongodb odbc oracle pam + pcap postgres python readline redis rest samba sqlite ssl systemd +" + +RESTRICT="test firebird? ( bindist )" + +# NOTE: Temporary freeradius doesn't support linking with mariadb client +# libs also if code is compliant, will be available in the next release. +# (http://lists.freeradius.org/pipermail/freeradius-devel/2018-October/013228.html)a + +# TODO: rlm_mschap works with both samba library or without. I need to avoid +# linking of samba library if -samba is used. +RDEPEND="acct-group/radius + acct-user/radius + !net-dialup/cistronradius + dev-lang/perl:= + sys-libs/gdbm:= + sys-libs/talloc + virtual/libcrypt:= + firebird? ( dev-db/firebird ) + iodbc? ( dev-db/libiodbc ) + kerberos? ( virtual/krb5 ) + ldap? ( net-nds/openldap:= ) + memcached? ( dev-libs/libmemcached ) + mysql? ( dev-db/mysql-connector-c:= ) + mongodb? ( >=dev-libs/mongo-c-driver-1.13.0-r1 ) + odbc? ( dev-db/unixODBC ) + oracle? ( dev-db/oracle-instantclient[sdk] ) + pam? ( sys-libs/pam ) + pcap? ( net-libs/libpcap ) + postgres? ( dev-db/postgresql:= ) + python? ( ${PYTHON_DEPS} ) + readline? ( sys-libs/readline:0= ) + redis? ( dev-libs/hiredis:= ) + rest? ( dev-libs/json-c:= ) + samba? ( net-fs/samba ) + sqlite? ( dev-db/sqlite:3 ) + ssl? ( + dev-libs/openssl:0=[-bindist(-)] + ) + systemd? ( sys-apps/systemd )" +DEPEND="${RDEPEND}" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +# 721040 +QA_SONAME="usr/lib.*/libfreeradius-.*.so" + +PATCHES=( + "${FILESDIR}"/${PN}-3.0.20-systemd-service.patch +) + +pkg_setup() { + if use python ; then + python-single-r1_pkg_setup + export PYTHONBIN="${EPYTHON}" + fi +} + +src_prepare() { + # most of the configuration options do not appear as ./configure + # switches. Instead it identifies the directories that are available + # and run through them. These might check for the presence of + # various libraries, in which case they are not built. To avoid + # automagic dependencies, we just remove all the modules that we're + # not interested in using. + + eapply_user + default + + use ssl || { rm -r src/modules/rlm_eap/types/rlm_eap_{tls,ttls,peap} || die ; } + use ldap || { rm -r src/modules/rlm_ldap || die ; } + use kerberos || { rm -r src/modules/rlm_krb5 || die ; } + use memcached || { rm -r src/modules/rlm_cache/drivers/rlm_cache_memcached || die ; } + use pam || { rm -r src/modules/rlm_pam || die ; } + # Drop support of python2 + rm -r src/modules/rlm_python || die + use python || { rm -r src/modules/rlm_python3 || die ; } + use rest || { rm -r src/modules/rlm_rest || die ; } + use redis || { rm -r src/modules/rlm_redis{,who} || die ; } + # Do not install ruby rlm module, bug #483108 + rm -r src/modules/rlm_ruby || die + + # these are all things we don't have in portage/I don't want to deal + # with myself + rm -r src/modules/rlm_eap/types/rlm_eap_tnc || die # requires TNCS library + rm -r src/modules/rlm_eap/types/rlm_eap_ikev2 || die # requires libeap-ikev2 + rm -r src/modules/rlm_opendirectory || die # requires some membership.h + rm -r src/modules/rlm_sql/drivers/rlm_sql_{db2,freetds} || die + + # sql drivers that are not part of experimental are loaded from a + # file, so we have to remove them from the file itself when we + # remove them. + usesqldriver() { + local flag=$1 + local driver=rlm_sql_${2:-${flag}} + + if ! use ${flag}; then + rm -r src/modules/rlm_sql/drivers/${driver} || die + sed -i -e /${driver}/d src/modules/rlm_sql/stable || die + fi + } + + sed -i \ + -e 's:^#\tuser = :\tuser = :g' \ + -e 's:^#\tgroup = :\tgroup = :g' \ + -e 's:/var/run/radiusd:/run/radiusd:g' \ + -e '/^run_dir/s:${localstatedir}::g' \ + raddb/radiusd.conf.in || die + + # verbosity + # build shared libraries using jlibtool --shared + sed -i \ + -e '/$(LIBTOOL)/s|--quiet ||g' \ + -e 's:--mode=\(compile\|link\):& --shared:g' \ + Make.inc.in || die + + sed -i \ + -e 's|--silent ||g' \ + -e 's:--mode=\(compile\|link\):& --shared:g' \ + scripts/libtool.mk || die + + # crude measure to stop jlibtool from running ranlib and ar + sed -i \ + -e '/LIBRARIAN/s|".*"|"true"|g' \ + -e '/RANLIB/s|".*"|"true"|g' \ + scripts/jlibtool.c || die + + usesqldriver mysql + usesqldriver postgres postgresql + usesqldriver firebird + usesqldriver iodbc + usesqldriver odbc unixodbc + usesqldriver oracle + usesqldriver sqlite + usesqldriver mongodb mongo + + eautoreconf +} + +src_configure() { + # do not try to enable static with static-libs; upstream is a + # massacre of libtool best practices so you also have to make sure + # to --enable-shared explicitly. + local myeconfargs=( + --enable-shared + --disable-static + --disable-ltdl-install + --with-system-libtool + --with-system-libltdl + --with-ascend-binary + --with-udpfromto + --with-dhcp + --with-iodbc-include-dir=/usr/include/iodbc + --with-experimental-modules + --with-docdir=/usr/share/doc/${PF} + --with-logdir=/var/log/radius + $(use_enable debug developer) + $(use_with ldap edir) + $(use_with ssl openssl) + $(use_with systemd systemd) + ) + # fix bug #77613 + if has_version app-crypt/heimdal; then + myeconfargs+=( --enable-heimdal-krb5 ) + fi + + if use python ; then + myeconfargs+=( + --with-rlm-python3-bin=${EPYTHON} + --with-rlm-python3-config-bin=${EPYTHON}-config + ) + fi + + use readline || export ac_cv_lib_readline=no + use pcap || export ac_cv_lib_pcap_pcap_open_live=no + + econf "${myeconfargs[@]}" +} + +src_compile() { + # verbose, do not generate certificates + emake \ + Q='' ECHO=true \ + LOCAL_CERT_PRODUCTS='' +} + +src_install() { + dodir /etc + diropts -m0750 -o root -g radius + dodir /etc/raddb + diropts -m0750 -o radius -g radius + dodir /var/log/radius + keepdir /var/log/radius/radacct + diropts + + # verbose, do not install certificates + # Parallel install fails (#509498) + emake -j1 \ + Q='' ECHO=true \ + LOCAL_CERT_PRODUCTS='' \ + R="${D}" \ + install + + if use pam; then + pamd_mimic_system radiusd auth account password session + fi + + # fix #711756 + fowners -R radius:radius /etc/raddb + fowners -R radius:radius /var/log/radius + + dodoc CREDITS + + rm "${ED}/usr/sbin/rc.radiusd" || die + + newinitd "${FILESDIR}/radius.init-r4" radiusd + newconfd "${FILESDIR}/radius.conf-r6" radiusd + + if ! use systemd ; then + # If systemd builtin is not enabled we need use Type=Simple + # as systemd .service + sed -i -e 's:^Type=.*::g' \ + -e 's:^WatchdogSec=.*::g' -e 's:^NotifyAccess=all.*::g' \ + "${S}"/debian/freeradius.service + fi + systemd_dounit "${S}"/debian/freeradius.service + + find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die +} + +pkg_config() { + if use ssl; then + cd "${ROOT}"/etc/raddb/certs || die + ./bootstrap || die "Error while running ./bootstrap script." + chown root:radius "${ROOT}"/etc/raddb/certs || die + chown root:radius "${ROOT}"/etc/raddb/certs/ca.pem || die + chown root:radius "${ROOT}"/etc/raddb/certs/server.{key,crt,pem} || die + fi +} + +pkg_preinst() { + if ! has_version ${CATEGORY}/${PN} && use ssl; then + elog "You have to run \`emerge --config =${CATEGORY}/${PF}\` to be able" + elog "to start the radiusd service." + fi +} -- cgit v1.2.3