diff options
author | Stuart Shelton <stuart@shelton.me> | 2015-09-10 23:23:50 +0059 |
---|---|---|
committer | Stuart Shelton <stuart@shelton.me> | 2015-09-10 23:23:50 +0059 |
commit | 223c427d950e7e1e7b7970bbff48d5d8cd60ea54 (patch) | |
tree | 0f84b3b61c753b03f6d0d1b4e581f6b47a6a86c5 /net-dialup | |
parent | Update media-libs/raspberrypi-userland-9999 (diff) | |
download | srcshelton-223c427d950e7e1e7b7970bbff48d5d8cd60ea54.tar.gz srcshelton-223c427d950e7e1e7b7970bbff48d5d8cd60ea54.tar.bz2 srcshelton-223c427d950e7e1e7b7970bbff48d5d8cd60ea54.zip |
Add net-dialup/freeradius-2.2.5, update README.md
Diffstat (limited to 'net-dialup')
-rw-r--r-- | net-dialup/freeradius/Manifest | 6 | ||||
-rw-r--r-- | net-dialup/freeradius/files/freeradius-2.2.5-gentoo.patch | 104 | ||||
-rw-r--r-- | net-dialup/freeradius/files/radius.conf-r3 | 16 | ||||
-rw-r--r-- | net-dialup/freeradius/files/radius.init-r3 | 31 | ||||
-rw-r--r-- | net-dialup/freeradius/freeradius-2.2.5.ebuild | 191 |
5 files changed, 348 insertions, 0 deletions
diff --git a/net-dialup/freeradius/Manifest b/net-dialup/freeradius/Manifest new file mode 100644 index 00000000..3e351be5 --- /dev/null +++ b/net-dialup/freeradius/Manifest @@ -0,0 +1,6 @@ +AUX freeradius-2.2.5-gentoo.patch 3459 SHA256 73dc67b4a59f93b70750c6dff3c92ffca6dd737e151c632dbee50badf2810b11 SHA512 eb51c40828b1f423755f0cf69dbb0df920ee01321ba90b0c02ad1b73a40e0dd56a47ee3bb7b9644fe2488df6384668d2f0e284fc450cc3f84e3b4db262b53d12 WHIRLPOOL ab077890ad747083a9d5cf3de303aab48fd6f2384750f1c5ba977a15c6a9ae7fa5f6ccb40534f766fc2541cc836b6aef02afec6260231f9da8b25935ff3d06f5 +AUX radius.conf-r3 467 SHA256 f76dd3c55117611d636f7fb645e98c58ae733f33cd9ba54a54075368625ddaae SHA512 b28bf4c22e72a3074aba79f7edeb48b69cc0e7671f7023e8888846dec6db4a428c6d1a0803b714fd9b9b3f45bbc1bad93cfa7911d716a856505da043c1f9c6d5 WHIRLPOOL d6e6847fa3aa45e8cb9ba370eaa8f1df33e3b29e121392369e251a71543c21413940fae2bca5d75553d0d91bc06541f00df301171ad9b3a6dc20f481d87e9e99 +AUX radius.init-r3 741 SHA256 22b742e3a240323930355d19734f89db34d9ff9587cfd0fdfd6de2ebd4fc2fa6 SHA512 697f64e2c7decb47539dc9b0a7f2794f8203098a4b7e5807bb5252f6260b273652c61516d740dc1e80316e7af89627f6c042855115ab3a402c6050323d7e42cf WHIRLPOOL 99a67e0530ef915f796ff24bf496019cf6dc7542c7b34203145e624786fd1bbbdd575347072ce7bac2e6d05e7435b7f529f76f0f7f5a725d368ce4805c58d2d7 +DIST freeradius-2.2.0-patches-4.tar.xz 3140 SHA256 9fd7b6f7e1501d63a073e6279b20eb6d8154e7898d81c85a5c548543ab33c1af SHA512 38ebd65d9ad8ce8f513f2f5c7fd9ff43b81cf468038a49f9eb7f4a54d13783e88866c3031e7abc0fc8b65d2aec4f347efa358b9e7e2aadb2d15567ce7e125d1d WHIRLPOOL a532444f6bfebe260a6b4bf43157fa1624ce9920a86635172ac94e0f757263904bac6ca6a472e12df73e32a8d25d6f7b094272bd743d13c566f23bfcbff6df27 +DIST freeradius-server-2.2.5.tar.gz 4415950 SHA256 8c4c2a0b600a8d85d2235589a5e80d4fefd1f52317e9daf8193731566fa9d012 SHA512 511599b4f4f5906441d0cda61946341f2226b9aae69b6f68b03a19898b6385499a8221933c191232d50f736cab93f0f6f271e4defe4552e7738cb21e2415f053 WHIRLPOOL 629ac42749b736a7cd606c97fb149ea6f3b11d0e77bc5fc69785e4c7956f073131eb16420f276de5664e977a37a6784d0bbff08a15c1c23389f5369320a4cb12 +EBUILD freeradius-2.2.5.ebuild 4947 SHA256 75e31a66a3343eede94756ae1690f14cbf71bc245e1190c9308566453d8f4a2a SHA512 7d49f71d469087b3eb3cd48b1294ac0336a1b6af67dfb8e213ff055ef5d0decce3fd10127ac33259eb75e1d5087c052befa6b7ec8d1d667764687d623ff88570 WHIRLPOOL 2d1a0b72042075ee195fd37fff3f794afc49debb3cdad1078097c3947762fc9465acbaec5f25927b903529307456c2434dd33f1ea8d61858f806178b31a87867 diff --git a/net-dialup/freeradius/files/freeradius-2.2.5-gentoo.patch b/net-dialup/freeradius/files/freeradius-2.2.5-gentoo.patch new file mode 100644 index 00000000..c51597cb --- /dev/null +++ b/net-dialup/freeradius/files/freeradius-2.2.5-gentoo.patch @@ -0,0 +1,104 @@ +--- a/raddb/radiusd.conf.in ++++ b/raddb/radiusd.conf.in +@@ -103,7 +103,7 @@ + # make + # make install + # +-libdir = @libdir@ ++libdir = @libdir@/freeradius + + # pidfile: Where to place the PID of the RADIUS server. + # +--- a/src/modules/Makefile ++++ b/src/modules/Makefile +@@ -12,7 +12,7 @@ + @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common + + install: +- $(INSTALL) -d -m 755 $(R)$(libdir) ++ $(INSTALL) -d -m 755 $(R)$(pkglibdir) + @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common + + clean: +--- a/src/modules/rules.mak ++++ b/src/modules/rules.mak +@@ -122,7 +122,7 @@ + $(TARGET).la: $(RLM_SUBDIRS) $(LT_OBJS) + $(LIBTOOL) --mode=link --tag=CC $(CC) -release $(RADIUSD_VERSION_STRING) \ + -module $(LINK_MODE) $(LDFLAGS) $(RLM_LDFLAGS) -o $@ \ +- -rpath $(libdir) $^ $(LIBRADIUS) $(RLM_LIBS) $(LIBS) ++ -rpath $(pkglibdir) $^ $(LIBRADIUS) $(RLM_LIBS) $(LIBS) + + ####################################################################### + # +@@ -163,13 +163,11 @@ + # Do any module-specific installation. + # + # If there isn't a TARGET defined, then don't do anything. +-# Otherwise, install the libraries into $(libdir) ++# Otherwise, install the libraries into $(pkglibdir) + # + install: + @[ "x$(RLM_INSTALL)" = "x" ] || $(MAKE) $(MFLAGS) $(RLM_INSTALL) + if [ "x$(TARGET)" != "x" ]; then \ + $(LIBTOOL) --mode=install $(INSTALL) -c \ +- $(TARGET).la $(R)$(libdir)/$(TARGET).la || exit $$?; \ +- rm -f $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION_STRING).la; \ +- ln -s $(TARGET).la $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION_STRING).la || exit $$?; \ ++ $(TARGET).la $(R)$(pkglibdir)/$(TARGET).la || exit $$?; \ + fi +--- a/src/modules/rlm_sql/drivers/rules.mak ++++ b/src/modules/rlm_sql/drivers/rules.mak +@@ -103,7 +103,7 @@ + $(TARGET).la: $(LT_OBJS) + $(LIBTOOL) --mode=link --tag=CC $(CC) -release $(RADIUSD_VERSION_STRING) \ + -module $(LINK_MODE) $(LDFLAGS) $(RLM_SQL_LDFLAGS) -o $@ \ +- -rpath $(libdir) $^ $(RLM_SQL_LIBS) ++ -rpath $(pkglibdir) $^ $(RLM_SQL_LIBS) + + ####################################################################### + # +@@ -141,12 +141,10 @@ + # Do any module-specific installation. + # + # If there isn't a TARGET defined, then don't do anything. +-# Otherwise, install the libraries into $(libdir) ++# Otherwise, install the libraries into $(pkglibdir) + # + install: + if [ "x$(TARGET)" != "x" ]; then \ + $(LIBTOOL) --mode=install $(INSTALL) -c \ +- $(TARGET).la $(R)$(libdir)/$(TARGET).la || exit $$?; \ +- rm -f $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION_STRING).la; \ +- ln -s $(TARGET).la $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION_STRING).la || exit $$?; \ ++ $(TARGET).la $(R)$(pkglibdir)/$(TARGET).la || exit $$?; \ + fi +--- a/src/lib/Makefile ++++ b/src/lib/Makefile +@@ -42,7 +42,7 @@ + + $(TARGET).la: $(LT_OBJS) + $(LIBTOOL) --mode=link --tag=CC $(CC) -release $(RADIUSD_VERSION) \ +- $(LDFLAGS) $(LINK_MODE) -o $@ -rpath $(libdir) $^ ++ $(LDFLAGS) $(LINK_MODE) -o $@ -rpath $(libdir) $^ $(LIBS) + + $(LT_OBJS): $(INCLUDES) + +@@ -54,7 +54,5 @@ + $(INSTALL) -d -m 755 $(R)$(libdir) + $(LIBTOOL) --mode=install $(INSTALL) -c $(TARGET).la \ + $(R)$(libdir)/$(TARGET).la +- rm -f $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la; +- ln -s $(TARGET).la $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la + + reconfig: +--- a/Make.inc.in ++++ b/Make.inc.in +@@ -10,6 +10,7 @@ + sysconfdir = @sysconfdir@ + localstatedir = @localstatedir@ + libdir = @libdir@ ++pkglibdir = @libdir@/freeradius + bindir = @bindir@ + sbindir = @sbindir@ + docdir = @docdir@ diff --git a/net-dialup/freeradius/files/radius.conf-r3 b/net-dialup/freeradius/files/radius.conf-r3 new file mode 100644 index 00000000..3c1bf322 --- /dev/null +++ b/net-dialup/freeradius/files/radius.conf-r3 @@ -0,0 +1,16 @@ +# Config file for /etc/init.d/radiusd + +# see man pages for radiusd run `radiusd -h` +# for valid cmdline options +#RADIUSD_OPTS="" + +# Change this value if you change it in /etc/raddb/radiusd.conf +pidfile=/var/run/radiusd/radiusd.pid + +# Change these values if you change them in /etc/raddb/radiusd.conf +#RADIUSD_USER=radius +#RADIUSD_GROUP=radius + +# If you set up logging to syslog in /etc/raddb/radiusd.conf, you want +# to uncomment the following line. +#rc_use="logger" diff --git a/net-dialup/freeradius/files/radius.init-r3 b/net-dialup/freeradius/files/radius.init-r3 new file mode 100644 index 00000000..70a657f4 --- /dev/null +++ b/net-dialup/freeradius/files/radius.init-r3 @@ -0,0 +1,31 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command=/usr/sbin/radiusd +command_args="${RADIUSD_OPTS}" +pidfile="${pidfile:-/var/run/radiusd/radiusd.pid}" +extra_started_commands="reload" + +depend() { + need localmount + use dns +} + +start_pre() { + if [ ! -f /etc/raddb/radiusd.conf ] ; then + eerror "No /etc/raddb/radiusd.conf file exists!" + return 1 + fi + + checkpath -m0750 -o "${RADIUSD_USER:-root}:${RADIUSD_GROUP:-root}" -d \ + $(dirname ${pidfile}) /var/log/radius + checkpath -m0750 -o "${RADIUSD_USER:-root}:${RADIUSD_GROUP:-root}" -d \ + $(dirname ${pidfile}) /var/run/radiusd +} + +reload() { + ebegin "Reloading radiusd" + kill -HUP $(cat ${pidfile}) + eend $? +} diff --git a/net-dialup/freeradius/freeradius-2.2.5.ebuild b/net-dialup/freeradius/freeradius-2.2.5.ebuild new file mode 100644 index 00000000..d1d920aa --- /dev/null +++ b/net-dialup/freeradius/freeradius-2.2.5.ebuild @@ -0,0 +1,191 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id: a41b000e511b285c5ad77edea4c63888a07bb2eb $ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) +inherit autotools eutils pam python-any-r1 user + +PATCHSET=4 + +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 + https://dev.gentoo.org/~flameeyes/${PN}/${PN}-2.2.0-patches-${PATCHSET}.tar.xz + +" +HOMEPAGE="http://www.freeradius.org/" + +KEYWORDS="amd64 ~ppc ~ppc64 ~sparc x86 ~x86-fbsd" +LICENSE="GPL-2" +SLOT="0" + +IUSE=" + debug firebird iodbc kerberos ldap mysql odbc oracle pam pcap + postgres python readline sqlite ssl +" +RESTRICT="firebird? ( bindist )" + +RDEPEND="!net-dialup/cistronradius + !net-dialup/gnuradius + sys-devel/libtool + dev-lang/perl + sys-libs/gdbm + python? ( ${PYTHON_DEPS} ) + readline? ( sys-libs/readline ) + pcap? ( net-libs/libpcap ) + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql ) + firebird? ( dev-db/firebird ) + pam? ( virtual/pam ) + ssl? ( dev-libs/openssl ) + ldap? ( net-nds/openldap ) + kerberos? ( virtual/krb5 ) + sqlite? ( dev-db/sqlite:3 ) + odbc? ( dev-db/unixODBC ) + iodbc? ( dev-db/libiodbc ) + oracle? ( dev-db/oracle-instantclient-basic )" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + enewgroup radius + enewuser radius -1 -1 /var/log/radius radius + + python-any-r1_pkg_setup + export PYTHONBIN="${EPYTHON}" +} + +src_prepare() { + epatch \ + "${WORKDIR}"/patches/0002*patch \ + "${WORKDIR}"/patches/0004*patch \ + "${FILESDIR}"/${P}-gentoo.patch + + # 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. + + use ssl || rm -r src/modules/rlm_eap/types/rlm_eap_{tls,ttls,peap} + use ldap || rm -r src/modules/rlm_ldap + use kerberos || rm -r src/modules/rlm_krb5 + use pam || rm -r src/modules/rlm_pam + use python || rm -r src/modules/rlm_python + # Do not install ruby rlm module, bug #483108 + rm -r src/modules/rlm_ruby + + # 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 # requires TNCS library + rm -r src/modules/rlm_eap/types/rlm_eap_ikev2 # requires libeap-ikev2 + rm -r src/modules/rlm_opendirectory # requires some membership.h + rm -r src/modules/rlm_redis{,who} # requires redis + rm -r src/modules/rlm_sql/drivers/rlm_sql_{db2,freetds,sybase} + + # 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 + } + + usesqldriver mysql + usesqldriver postgres postgresql + usesqldriver firebird + usesqldriver iodbc + usesqldriver odbc unixodbc + usesqldriver oracle + usesqldriver sqlite + + # remove bundled ltdl to avoid conflicts + rm -r libltdl + + epatch_user + + eautoreconf +} + +src_configure() { + # fix bug #77613 + if has_version app-crypt/heimdal; then + myconf="${myconf} --enable-heimdal-krb5" + fi + + use readline || export ac_cv_lib_readline=no + use pcap || export ac_cv_lib_pcap_pcap_open_live=no + + # 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. + econf \ + --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) \ + ${myconf} +} + +src_compile() { + emake LIBTOOL=libtool +} + +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 + + emake LIBTOOL=libtool R="${D}" install + + fowners -R root:radius /etc/raddb + + pamd_mimic_system radiusd auth account password session + + dodoc CREDITS + + rm "${D}/usr/sbin/rc.radiusd" + + newinitd "${FILESDIR}/radius.init-r3" radiusd + newconfd "${FILESDIR}/radius.conf-r3" radiusd +} + +pkg_config() { + if use ssl; then + cd "${ROOT}"/etc/raddb/certs + ./bootstrap + 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 +} |