diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-10-13 14:07:23 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-10-13 14:07:23 +0000 |
commit | f7712d880d1957876a7a33e63ae75f288c37ca05 (patch) | |
tree | a634d9db83977eea7cf8929e7a43b6efd950736f | |
parent | 19c14941f5b586b27853092cc04ce4480062c9b3 (diff) | |
download | aports-f7712d880d1957876a7a33e63ae75f288c37ca05.tar.bz2 aports-f7712d880d1957876a7a33e63ae75f288c37ca05.tar.xz |
testing/freeradius: new aport (moved from unstable)
RADIUS (Remote Authentication Dial-In User Service) server
http://freeradius.org/
-rw-r--r-- | testing/freeradius/0001-Fix-detection-of-TLS-for-uClibc.patch | 33 | ||||
-rw-r--r-- | testing/freeradius/APKBUILD | 68 | ||||
-rw-r--r-- | testing/freeradius/freeradius-2.1.6-nothreads.patch | 13 | ||||
-rw-r--r-- | testing/freeradius/freeradius-2.1.7-pkglibdir.patch | 63 | ||||
-rw-r--r-- | testing/freeradius/freeradius.confd (renamed from unstable/freeradius/freeradius.confd) | 0 | ||||
-rw-r--r-- | testing/freeradius/freeradius.initd (renamed from unstable/freeradius/freeradius.initd) | 0 | ||||
-rw-r--r-- | testing/freeradius/freeradius.pre-install (renamed from unstable/freeradius/freeradius.pre-install) | 0 | ||||
-rw-r--r-- | unstable/freeradius/APKBUILD | 36 |
8 files changed, 177 insertions, 36 deletions
diff --git a/testing/freeradius/0001-Fix-detection-of-TLS-for-uClibc.patch b/testing/freeradius/0001-Fix-detection-of-TLS-for-uClibc.patch new file mode 100644 index 000000000..e76571a21 --- /dev/null +++ b/testing/freeradius/0001-Fix-detection-of-TLS-for-uClibc.patch @@ -0,0 +1,33 @@ +From 51cb058c6a9472585622582d16e01c5540627c25 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Tue, 13 Oct 2009 12:53:38 +0000 +Subject: [PATCH] Fix detection of TLS for uClibc + +On uClibc the configure script will wrongly detect that TLS is +available. This happends becuase the variable val in the test program +is optimized away and missing during link time. + +This patch make sure that the variable val is not optimized away so +configure correctly will detect that TLS is missing on uClibc. + +Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> +--- + acinclude.m4 | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/acinclude.m4 b/acinclude.m4 +index 6025474..100e5b0 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -382,7 +382,7 @@ m4_pushdef([AC_OUTPUT], + AC_DEFUN([FR_TLS], + [ + AC_MSG_CHECKING(for TLS) +- AC_RUN_IFELSE([AC_LANG_SOURCE([[ static __thread int val; int main() { return 0; } ]])],[have_tls=yes],[have_tls=no],[have_tls=no ]) ++ AC_RUN_IFELSE([AC_LANG_SOURCE([[ static __thread int val; int main(int argc, char *argv[]) { return val = argc; } ]])],[have_tls=yes],[have_tls=no],[have_tls=no ]) + AC_MSG_RESULT($have_tls) + if test "$have_tls" = "yes"; then + AC_DEFINE([HAVE_THREAD_TLS],[1],[Define if the compiler supports __thread]) +-- +1.6.4.4 + diff --git a/testing/freeradius/APKBUILD b/testing/freeradius/APKBUILD new file mode 100644 index 000000000..516335910 --- /dev/null +++ b/testing/freeradius/APKBUILD @@ -0,0 +1,68 @@ +# Contributor: +# Maintainer: +pkgname=freeradius +pkgver=2.1.7 +pkgrel=0 +pkgdesc="RADIUS (Remote Authentication Dial-In User Service) server" +url="http://freeradius.org/" +license="GPL" +depends= +makedepends="openssl-dev pth-dev mysql-dev postgresql-dev gdbm-dev readline-dev + bash libtool autoconf automake + " +pkggroups="radiusd" +pkgusers="radiusd" +install="freeradius.pre-install" +subpackages="$pkgname-doc $pkgname-dev" +source="ftp://ftp.freeradius.org/pub/freeradius/$pkgname-server-$pkgver.tar.gz + freeradius.confd + freeradius.initd + 0001-Fix-detection-of-TLS-for-uClibc.patch + freeradius-2.1.6-nothreads.patch + freeradius-2.1.7-pkglibdir.patch + " + +build() { + cd "$srcdir/$pkgname-server-$pkgver" + for i in ../*.patch; do + msg "Applying $i" + patch -p1 -i $i || return 1 + done + + aclocal && ./autogen.sh || return 1 + + export CONFIG_SHELL=/bin/bash + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + --disable-static \ + || return 1 + +# # the configure script fails to detect that we dont have TLS +# sed -i -e '/^\#define HAVE_THREAD_TLS/d' src/include/autoconf.h \ +# || return 1 + + make -j1 || return 1 + install -d -m0750 -o root -g radiusd "$pkgdir"/etc/raddb + install -d -m0750 -o root -g radiusd "$pkgdir"/var/run/radius + install -d -m0750 -o root -g radiusd "$pkgdir"/var/log/radius + install -d -m0750 -o root -g radiusd "$pkgdir"/var/log/radius/radacct + + make -j1 R="$pkgdir" install + sed -i -e 's:^#user *= *nobody:user = radiusd:;s:^#group *= *nobody:group = radiusd:' \ + "$pkgdir"/etc/raddb/radiusd.conf + chown -R root:radiusd "$pkgdir"/etc/raddb/* + rm -f "$pkgdir/usr/sbin/rc.radiusd" + install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname + install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname + +} + +md5sums="b1f77c5e3116bcb0ac0aa9080a06ebf1 freeradius-server-2.1.7.tar.gz +fc6693f3df5a0694610110287a28568a freeradius.confd +b22092fcdcb61d7f0b8e13a007c444c5 freeradius.initd +2e39f10c814bc7e1172c4cb2d178b39b 0001-Fix-detection-of-TLS-for-uClibc.patch +1e04786d3f626200999f53471c19ac47 freeradius-2.1.6-nothreads.patch +4c8af50e174d392c0210cbf494cd15cd freeradius-2.1.7-pkglibdir.patch" diff --git a/testing/freeradius/freeradius-2.1.6-nothreads.patch b/testing/freeradius/freeradius-2.1.6-nothreads.patch new file mode 100644 index 000000000..41a41c8d6 --- /dev/null +++ b/testing/freeradius/freeradius-2.1.6-nothreads.patch @@ -0,0 +1,13 @@ +diff -Nru freeradius-server-2.1.6.orig/src/main/event.c freeradius-server-2.1.6/src/main/event.c +--- freeradius-server-2.1.6.orig/src/main/event.c 2009-05-18 13:13:55.000000000 +0200 ++++ freeradius-server-2.1.6/src/main/event.c 2009-09-05 07:52:42.000000000 +0200 +@@ -1667,7 +1667,9 @@ + */ + request->num_proxied_requests = 1; + request->num_proxied_responses = 0; ++#ifdef HAVE_PTHREAD_H + request->child_pid = NO_SUCH_CHILD_PID; ++#endif + + update_event_timestamp(request->proxy, request->proxy_when.tv_sec); + diff --git a/testing/freeradius/freeradius-2.1.7-pkglibdir.patch b/testing/freeradius/freeradius-2.1.7-pkglibdir.patch new file mode 100644 index 000000000..d5767fbd0 --- /dev/null +++ b/testing/freeradius/freeradius-2.1.7-pkglibdir.patch @@ -0,0 +1,63 @@ +diff -ru freeradius-server-2.1.7.orig/Make.inc.in freeradius-server-2.1.7/Make.inc.in +--- freeradius-server-2.1.7.orig/Make.inc.in 2009-10-09 08:38:58.000000000 +0000 ++++ freeradius-server-2.1.7/Make.inc.in 2009-10-09 08:39:15.000000000 +0000 +@@ -10,6 +10,7 @@ + sysconfdir = @sysconfdir@ + localstatedir = @localstatedir@ + libdir = @libdir@ ++pkglibdir = @libdir@/freeradius + bindir = @bindir@ + sbindir = @sbindir@ + docdir = @docdir@ +diff -ru freeradius-server-2.1.7.orig/raddb/radiusd.conf.in freeradius-server-2.1.7/raddb/radiusd.conf.in +--- freeradius-server-2.1.7.orig/raddb/radiusd.conf.in 2009-10-09 08:38:58.000000000 +0000 ++++ freeradius-server-2.1.7/raddb/radiusd.conf.in 2009-10-09 08:39:15.000000000 +0000 +@@ -103,7 +103,7 @@ + # make + # make install + # +-libdir = @libdir@ ++libdir = @libdir@/freeradius + + # pidfile: Where to place the PID of the RADIUS server. + # +diff -ru freeradius-server-2.1.7.orig/src/modules/Makefile freeradius-server-2.1.7/src/modules/Makefile +--- freeradius-server-2.1.7.orig/src/modules/Makefile 2009-10-09 08:38:58.000000000 +0000 ++++ freeradius-server-2.1.7/src/modules/Makefile 2009-10-09 08:39:15.000000000 +0000 +@@ -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: +diff -ru freeradius-server-2.1.7.orig/src/modules/rules.mak freeradius-server-2.1.7/src/modules/rules.mak +--- freeradius-server-2.1.7.orig/src/modules/rules.mak 2009-10-09 08:38:58.000000000 +0000 ++++ freeradius-server-2.1.7/src/modules/rules.mak 2009-10-09 08:40:56.000000000 +0000 +@@ -123,7 +123,7 @@ + $(TARGET).la: $(LT_OBJS) + $(LIBTOOL) --mode=link $(CC) -release $(RADIUSD_VERSION) \ + -module $(LINK_MODE) $(LDFLAGS) $(RLM_LDFLAGS) -o $@ \ +- -rpath $(libdir) $^ $(LIBRADIUS) $(RLM_LIBS) $(LIBS) ++ -rpath $(pkglibdir) $^ $(LIBRADIUS) $(RLM_LIBS) $(LIBS) + + ####################################################################### + # +@@ -164,13 +164,13 @@ + # 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 $$?; \ ++ $(TARGET).la $(R)$(pkglibdir)/$(TARGET).la || exit $$?; \ + rm -f $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la; \ + ln -s $(TARGET).la $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la || exit $$?; \ + fi diff --git a/unstable/freeradius/freeradius.confd b/testing/freeradius/freeradius.confd index 9811289ba..9811289ba 100644 --- a/unstable/freeradius/freeradius.confd +++ b/testing/freeradius/freeradius.confd diff --git a/unstable/freeradius/freeradius.initd b/testing/freeradius/freeradius.initd index 86909adef..86909adef 100644 --- a/unstable/freeradius/freeradius.initd +++ b/testing/freeradius/freeradius.initd diff --git a/unstable/freeradius/freeradius.pre-install b/testing/freeradius/freeradius.pre-install index 875022745..875022745 100644 --- a/unstable/freeradius/freeradius.pre-install +++ b/testing/freeradius/freeradius.pre-install diff --git a/unstable/freeradius/APKBUILD b/unstable/freeradius/APKBUILD deleted file mode 100644 index f6a527390..000000000 --- a/unstable/freeradius/APKBUILD +++ /dev/null @@ -1,36 +0,0 @@ -# Contributor: -# Maintainer: -pkgname=freeradius -pkgver=2.1.3 -pkgrel=1 -pkgdesc="RADIUS (Remote Authentication Dial-In User Service) server" -url="http://freeradius.org/" -license="GPL" -depends= -makedepends="openssl-dev pth-dev mysql-dev postgresql-dev gdbm-dev" -install="freeradius.pre-install" -subpackages="$pkgname-doc $pkgname-dev" -source="ftp://ftp.freeradius.org/pub/freeradius/$pkgname-server-$pkgver.tar.gz - freeradius.confd - freeradius.initd - " - -build() { - cd "$srcdir/$pkgname-server-$pkgver" - - ./configure --prefix=/usr \ - --sysconfdir=/etc \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - --without-threads \ - --disable-tls - make -j1 || return 1 - make -j1 DESTDIR="$pkgdir" install - - install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname - install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname -} - -md5sums="017ebe7dd2e261caee448c64ccd4584d freeradius-server-2.1.3.tar.gz -fc6693f3df5a0694610110287a28568a freeradius.confd -b22092fcdcb61d7f0b8e13a007c444c5 freeradius.initd" |