aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-10-17 05:57:31 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-10-17 06:08:05 +0000
commita2039cacbd8cf3a9f73e72b68b867f4bdcf3ecc3 (patch)
tree539833673a2473cde8b48cd41f1e8ad77873f3b8 /main
parent10f550c471adec9b04d66ceb81eddf88f95c7598 (diff)
downloadaports-a2039cacbd8cf3a9f73e72b68b867f4bdcf3ecc3.tar.gz
aports-a2039cacbd8cf3a9f73e72b68b867f4bdcf3ecc3.tar.bz2
aports-a2039cacbd8cf3a9f73e72b68b867f4bdcf3ecc3.tar.xz
main/freeradius: fix configure check for TLS
Fix the configure script to correctly detect if TLS is available. TLS is needed for rlm_unix to work without segfaulting. (cherry picked from commit d698c183c3183ce3772c4b833c0c4971394942fd)
Diffstat (limited to 'main')
-rw-r--r--main/freeradius/APKBUILD6
-rw-r--r--main/freeradius/fix-tls-test.patch51
2 files changed, 56 insertions, 1 deletions
diff --git a/main/freeradius/APKBUILD b/main/freeradius/APKBUILD
index dcb1c75713..f42fb435fb 100644
--- a/main/freeradius/APKBUILD
+++ b/main/freeradius/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=freeradius
pkgver=2.2.5
-pkgrel=2
+pkgrel=3
pkgdesc="RADIUS (Remote Authentication Dial-In User Service) server"
url="http://freeradius.org/"
arch="all"
@@ -21,6 +21,7 @@ subpackages="$pkgname-doc $pkgname-dev $pkgname-dbg $pkgname-ldap $pkgname-lib
source="ftp://ftp.freeradius.org/pub/freeradius/$pkgname-server-$pkgver.tar.gz
freeradius-fix-openssl-version-check.patch
0001-Use-threadsafe-wrapper-for-getpwnam-getgrnam.patch
+ fix-tls-test.patch
freeradius.confd
freeradius.initd
"
@@ -246,15 +247,18 @@ webif() {
md5sums="da77eb23b4c5e2f9fc55119025a91b61 freeradius-server-2.2.5.tar.gz
fde9be89b76ed262db1198dfbeb237c6 freeradius-fix-openssl-version-check.patch
f28735060b63d88875783817bcd95586 0001-Use-threadsafe-wrapper-for-getpwnam-getgrnam.patch
+b6bcdba16c65503be4265126cf4d2eee fix-tls-test.patch
fc6693f3df5a0694610110287a28568a freeradius.confd
b3eefdfc466d80c241cd1bb11face405 freeradius.initd"
sha256sums="8c4c2a0b600a8d85d2235589a5e80d4fefd1f52317e9daf8193731566fa9d012 freeradius-server-2.2.5.tar.gz
c0f15867924ae73511cd009cb3c53cbd7eda298ff708a54f02d1900da5ebfc06 freeradius-fix-openssl-version-check.patch
115ae559fc5c8a638c5ebb510cb58478df66ceeb61a6768584e592e4a1fbc9d4 0001-Use-threadsafe-wrapper-for-getpwnam-getgrnam.patch
+38455012b9fc322a7bfdec66e4f8aafeb679d0142eddfba31114aadfd8195b41 fix-tls-test.patch
2d5b3e1af1299373182f2c8021bdf45c29db5d82b0a077b965a16ded32cb6292 freeradius.confd
719bbe4a44df60e76f68d327f7ee70d4dfd6a95e51f9cb01f850cd4ed153f9de freeradius.initd"
sha512sums="511599b4f4f5906441d0cda61946341f2226b9aae69b6f68b03a19898b6385499a8221933c191232d50f736cab93f0f6f271e4defe4552e7738cb21e2415f053 freeradius-server-2.2.5.tar.gz
77ec50125b38e05ee784b4cf724a31074844ea9c935c0d28aa51bd71e3e8a5399ba5194958f65f8c7f6c501b67ea6560da3869917f661178afbe602062a6fdc6 freeradius-fix-openssl-version-check.patch
4fb99b6a0f22cb844382139d448e24cc1b698452e30c1b0f06674a6fbd21463bcece2f2f4121618f9c7c57c8eb882eee35511b4dcea6e2a0904e27e5f2a6a679 0001-Use-threadsafe-wrapper-for-getpwnam-getgrnam.patch
+77ee33a3c2059fb07841255fefc577f4e04680f4a1968d320a17f1d2769ddb671c36639dadbba0a1b1faaa31b1fb0c900313c375a209e67c41d75ebf9bef9d8f fix-tls-test.patch
e248159c0a44f722e405c51c8015d9ad672e42ad0d38ca28f8a051ff911aa4d3e630b9bd4543e9d610940bc4ae50c022594e219ce341b36abe85c572acad418b freeradius.confd
57f12f06ef9112817204dec4ab2591bcd4baf3c8a033afadb2376e115911f76045c70b7a2c80b294a83dac4e05b1ff22335a3bcc9af1c0760682622ab2cdbd31 freeradius.initd"
diff --git a/main/freeradius/fix-tls-test.patch b/main/freeradius/fix-tls-test.patch
new file mode 100644
index 0000000000..237aec4a10
--- /dev/null
+++ b/main/freeradius/fix-tls-test.patch
@@ -0,0 +1,51 @@
+TLS test is broken
+
+also include a hunk from
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index 3fd2c89..07480d8 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -330,12 +330,21 @@ 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(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])
+- fi
++ AC_MSG_CHECKING(for __thread support in compiler)
++ AC_RUN_IFELSE(
++ [AC_LANG_SOURCE(
++ [[
++ static __thread int val;
++ int main(int argc, char **argv) {
++ val = 0;
++ return val;
++ }
++ ]])
++ ],[have_tls=yes],[have_tls=no],[have_tls=no])
++ AC_MSG_RESULT($have_tls)
++ if test "x$have_tls" = "xyes"; then
++ AC_DEFINE([HAVE_THREAD_TLS],[1],[Define if the compiler supports __thread])
++ fi
+ ])
+
+
+diff --git a/confifgure.in b/configure.in
+index 3fd2c89..07480d8 100644
+--- a/configure.in
++++ b/configure.in
+@@ -547,6 +561,10 @@ else
+ )
+ fi
+
++if test "x$WITH_THREADS" = "xyes"; then
++ AC_DEFINE(WITH_THREADS, [1], [define if you want thread support])
++fi
++
+ dnl Check if we need -lsocket
+ AC_CHECK_LIB(dl, dlopen)
+