Debian 1.0.4-1 import debian_1_0_4_1
authorphampson <phampson>
Sat, 2 Jul 2005 05:47:37 +0000 (05:47 +0000)
committerphampson <phampson>
Sat, 2 Jul 2005 05:47:37 +0000 (05:47 +0000)
debian/changelog
debian/control
debian/freeradius.examples
debian/patches/00list [new file with mode: 0644]
debian/patches/01_NET-SNMP_build_support.dpatch [new file with mode: 0755]
debian/patches/02_EAP-SIM_doesnt_need_openssl.dpatch [new file with mode: 0755]
debian/patches/03_X99_is_not_stable.dpatch [new file with mode: 0755]
debian/rules

index 3d884ad..a9f7f88 100644 (file)
@@ -1,3 +1,23 @@
+freeradius (1.0.4-1) unstable; urgency=low
+  * ReDeianise upstream tarball:
+    - Deleted RFCs: 2243 2289 2433 2548 2618 2619 2620 2621 2716 2759 2809 2865
+                    2866 2867 2868 2869 2882 2924 3162 3575 3576 3579 3580
+                    draft-kamath-pppext-eap-mschapv2-00
+  * Convert to dpatch, dpatch-2-style interface.
+    - New build-dependancy on dpatch (>= 2)
+    - Created 01_NET-SNMP_build_support
+    - Created 02_EAP-SIM_doesnt_need_openssl
+    - Created 03_X99_is_not_stable
+  * Assemble the freeradius-dialupadmin in the binary-indep make target
+    Closes: #313173 (Thanks to Santiago Vila for spotting this)
+  * Include the example scripts in /usr/share/doc/freeradius/examples/scripts
+    except those three which are installed into the binary by the Makefile.
+    Closes: #314253 (Thanks to Michael Langer for spotting this)
+  * Suggest libdate-manip-perl for freeradius-dialupadmin
+    Closes: #306007 (Thanks to Feng Sian)
+
+ -- Paul Hampson <Paul.Hampson@anu.edu.au>  Wed, 22 Jun 2005 16:03:27 +1000
+
 freeradius (1.0.4-0) unstable; urgency=medium
 
   * New upstream release, fixing build problems.
@@ -15,6 +35,57 @@ freeradius (1.0.3-0) unstable; urgency=high
 
  -- Alan DeKok <aland@ox.org>  Fri,  3 Jun 2005 11:29:34 -0700
 
+freeradius (1.0.2-4) unstable; urgency=high
+
+  * Security fix stolen from CVS release_1_0 branch:
+   - Always use sql_escape_func when calling radius_xlat
+   - Add a test in sql_escape_func() to check buffer bound when
+     input character needs escaping.
+   - Urgency high as these are (theoretical) security issues.
+     Closes: #307720 (Thanks to Primoz Bratanic and Nicolas Baradakis)
+
+ -- Paul Hampson <Paul.Hampson@anu.edu.au>  Mon, 23 May 2005 18:53:51 +1000
+
+freeradius (1.0.2-3) unstable; urgency=medium
+
+  * Fixes stolen from CVS release_1_0 branch:
+   - Fix missed SIGCHLD when waiting for external programs
+     when threaded. (Medium urgency as this can easily livelock
+     FreeRADIUS, which is an authentication server.)
+
+ -- Paul Hampson <Paul.Hampson@anu.edu.au>  Mon, 18 Apr 2005 23:46:41 +1000
+
+freeradius (1.0.2-2) unstable; urgency=medium
+
+  * Get rid of extraneous '%' at the start of every reference to
+    /etc/freeradius-dialupadmin in freeradius-dialupadmin's configuration.
+     Closes: #299749
+  * Fixes stolen from CVS release_1_0 branch:
+   - Fix checkrad call for NAS ports > 9999999. (sprintf integer overrun,
+     reason for urgency medium.)
+   - Fix inverted test causing crash with pthreads and crypt
+     Closes: #300219 (Thanks Manuel Menal)
+
+ -- Paul Hampson <Paul.Hampson@anu.edu.au>  Wed,  6 Apr 2005 12:33:05 +1000
+
+freeradius (1.0.2-1) unstable; urgency=low
+
+  * ReDebianise upstream tarball:
+    - Deleted RFCs: 2243 2289 2433 2548 2618 2619 2620 2621 2716 2759 2809 2865
+                    2866 2867 2868 2869 2882 2924 3162 3575 3576 3579 3580
+  * Allow rlm_eap_sim to build without OpenSSL
+  * Make init script return 1 if reloading kills the server
+    (Thanks to Nicolas Baradakis)
+     Closes: #292170
+  * Enable Novell eDirectory integration
+  * Enable udpfromto code so that replies come from the same address as
+    the request arrived at
+  * Build-depend on libmysqlclient12-dev as libmysqlclient10 has problems
+    accessing 4.0 series mySQL servers, and libmysqlclient12 can access
+    4.1 series mySQL servers.
+  
+ -- Paul Hampson <Paul.Hampson@anu.edu.au>  Fri,  4 Mar 2005 09:30:40 +1100
+
 freeradius (1.0.2-0) unstable; urgency=low
 
   * New upstream release
@@ -35,6 +106,44 @@ freeradius (1.0.2-0) unstable; urgency=low
 
  -- Paul Hampson <Paul.Hampson@anu.edu.au>  Wed, 29 Dec 2004 20:12:52 +1100
 
+freeradius (1.0.1-2) unstable; urgency=high
+
+  * freeradius-dialupadmin Suggests php4-mysql | php4-pgsql
+     Closes: #279419
+  * Added a two-second pause to restart in init.d script
+     Closes: #262635
+  * FreeRADIUS module packages now depend on the same source
+    version of the main FreeRADIUS package.
+     Closes: #284353
+  * FreeRADIUS-dialupadmin's default paths in admin.conf are
+    now correct.
+     Closes: #280942
+  * FreeRADIUS-dialupadmin's help.php3 can now find README.
+     Closes: #280941
+  * Fixes stolen from 1.0.2 CVS:
+    - Bug fix to make udpfromto code work
+    - radrelay shouldn't dump core if it can't read a VP from the
+      detail file.
+    - Only initialize the random pool once.
+    - In rlm_sql, don't escape characters twice.
+    - In rlm_ldap, only claim Auth-Type if a plain text password is present.
+    - Locking fixes in threading code
+    - Fix building on gcc-4.0 by not trying to access static auth_port from
+      other files.
+
+ -- Paul Hampson <Paul.Hampson@anu.edu.au>  Wed, 29 Dec 2004 20:19:42 +1100
+
+freeradius (1.0.1-1) unstable; urgency=high
+
+  * ReDebianise upstream tarball:
+    - Deleted RFCs: 2243 2289 2433 2548 2618 2619 2620 2621 2716 2759 2809 2865
+                    2866 2867 2868 2869 2882 2924 3162 3575 3576 3579 3580
+    - Remove CVS directories.
+  * Urgency high for security fix from 1.0.1-0 (CAN-2004-0938,
+    closes: #275136).
+
+ -- Paul Hampson <Paul.Hampson@anu.edu.au>  Thu, 23 Sep 2004 22:28:11 +1000
+
 freeradius (1.0.1-0) unstable; urgency=high
 
   * New upstream release
@@ -44,6 +153,25 @@ freeradius (1.0.1-0) unstable; urgency=high
 
  -- Paul Hampson <Paul.Hampson@anu.edu.au>  Thu,  2 Sep 2004 17:12:23 +1000
 
+freeradius (1.0.0-1) unstable; urgency=low
+
+  * ReDebianise upstream tarball:
+    - Deleted RFCs: 2243 2289 2433 2548 2618 2619 2620 2621 2716 2759 2809 2865
+                    2866 2867 2868 2869 2882 2924 3162 3575 3576 3579 3580
+  * Support building with libsnmp5's UCD-SNMP compatiblity mode.
+    - libsnmp{4.2,5} still depend on OpenSSL, so SNMP's still disabled.
+  * Update for Debian Policy 3.6.11
+    - Change test for invoke-rc.d as per Policy 9.3.3.2
+  * Disable rlm_eap types PEAP, TLS and TTLS as they depend on OpenSSL.
+  * Disable rlm_sql driver PostgreSQL as it depends on OpenSSL.
+  * Disable rlm_x99_token as it depends on OpenSSL.
+  * Finally, -v is documented in radius(8).
+    - Closes: #151266
+  * Reword a sentence in radwatch(8) by removing the personal pronoun.
+    - Closes: #264522
+
+ -- Paul Hampson <Paul.Hampson@anu.edu.au>  Tue, 17 Aug 2004 17:42:40 +1000
+
 freeradius (1.0.0-0) unstable; urgency=low
 
   * New upstream release
index e1278e3..061f61a 100644 (file)
@@ -1,5 +1,6 @@
 Source: freeradius
-Build-Depends: debhelper (>= 4.1.68), libltdl3-dev, libpam0g-dev, libpq-dev | postgresql-dev, libmysqlclient12-dev | libmysqlclient-dev, libgdbm-dev | libgdbmg1-dev, libldap2-dev, libsasl2-dev, libsnmp4.2-dev, libiodbc2-dev, libkrb5-dev, libssl-dev, libtool1.4 | libtool (< 1.5), snmp, autotools-dev
+Build-Depends: debhelper (>= 4.1.68), libltdl3-dev, libpam0g-dev, libmysqlclient12-dev, libgdbm-dev, libldap2-dev, libsasl2-dev, libiodbc2-dev, libkrb5-dev, libtool1.4 | libtool (< 1.5), autotools-dev, dpatch (>= 2)
+Build-Conflicts: libssl-dev
 Section: net
 Priority: optional
 Maintainer: Paul Hampson <Paul.Hampson@anu.edu.au>
@@ -9,7 +10,7 @@ Package: freeradius
 Architecture: any
 Depends: ${shlibs:Depends}
 Provides: radius-server
-Suggests: freeradius-ldap, freeradius-postgresql, freeradius-mysql, freeradius-krb5
+Suggests: freeradius-ldap, freeradius-mysql, freeradius-krb5
 Conflicts: radiusd-freeradius, radiusd-freeradius-krb5, radiusd-freeradius-ldap, radiusd-freeradius-postgresql, radiusd-freeradius-mysql
 Replaces: radiusd-freeradius
 Description: a high-performance and highly configurable RADIUS server
@@ -40,15 +41,6 @@ Description: LDAP module for FreeRADIUS server
  The FreeRADIUS server can use LDAP to authenticate users, and this module
  is necessary for that.
 
-Package: freeradius-postgresql
-Architecture: any
-Conflicts: radiusd-freeradius-postgresql
-Replaces: radiusd-freeradius-postgresql
-Depends: freeradius (= ${Source-Version}), ${shlibs:Depends}
-Description: PostgreSQL module for FreeRADIUS server
- The FreeRADIUS server can use PostgreSQL to authenticate users and do
- accounting, and this module is necessary for that.
-
 Package: freeradius-mysql
 Architecture: any
 Conflicts: radiusd-freeradius-mysql
@@ -68,7 +60,7 @@ Description: iODBC module for FreeRADIUS server
 Package: freeradius-dialupadmin
 Architecture: all
 Depends: apache | httpd, php4 | php4-cgi
-Suggests: php4-mysql | php4-pgsql
+Suggests: php4-mysql | php4-pgsql, libdate-manip-perl
 Recommends: ${perl:Depends}
 Description: set of PHP scripts for administering a FreeRADIUS server
  These scripts provide a web-based interface for administering a FreeRADIUS
diff --git a/debian/patches/00list b/debian/patches/00list
new file mode 100644 (file)
index 0000000..f90d4d1
--- /dev/null
@@ -0,0 +1,3 @@
+01_NET-SNMP_build_support
+02_EAP-SIM_doesnt_need_openssl
+03_X99_is_not_stable
diff --git a/debian/patches/01_NET-SNMP_build_support.dpatch b/debian/patches/01_NET-SNMP_build_support.dpatch
new file mode 100755 (executable)
index 0000000..a0ddc1a
--- /dev/null
@@ -0,0 +1,368 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_NET-SNMP_build_support.dpatch by  <tbble@keitarou>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Support building against net-snmp in ucd-snmp compatibility mode
+
+@DPATCH@
+
+--- freeradius-1.0.2.orig/aclocal.m4
++++ freeradius-1.0.2/aclocal.m4
+@@ -3770,6 +3770,7 @@
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
++#include <ucd-snmp/ucd-snmp-config.h>
+ #include <ucd-snmp/asn1.h>
+ #include <ucd-snmp/snmp.h>
+ #include <ucd-snmp/snmp_impl.h>],
+@@ -3800,6 +3801,7 @@
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
++#include <ucd-snmp/ucd-snmp-config.h>
+ #include <ucd-snmp/asn1.h>
+ #include <ucd-snmp/snmp.h>
+ #include <ucd-snmp/snmp_impl.h>],
+--- freeradius-1.0.2.orig/configure
++++ freeradius-1.0.2/configure
+@@ -8353,6 +8353,7 @@
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
++#include <ucd-snmp/ucd-snmp-config.h>
+ #include <ucd-snmp/asn1.h>
+ #include <ucd-snmp/snmp.h>
+ #include <ucd-snmp/snmp_impl.h>
+@@ -8360,7 +8361,7 @@
+  int a = 1;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:8365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   SNMP_INCLUDE="";ucdsnmp=yes
+ else
+@@ -8376,7 +8377,7 @@
+   for try in /usr/include /usr/local/include $with_snmp_include_dir; do
+     CFLAGS="$old_CFLAGS -I$try"
+     cat > conftest.$ac_ext <<EOF
+-#line 8380 "configure"
++#line 8381 "configure"
+ #include "confdefs.h"
+ #ifdef HAVE_SYS_TYPES_H
+@@ -8394,6 +8395,7 @@
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
++#include <ucd-snmp/ucd-snmp-config.h>
+ #include <ucd-snmp/asn1.h>
+ #include <ucd-snmp/snmp.h>
+ #include <ucd-snmp/snmp_impl.h>
+@@ -8401,7 +8403,7 @@
+  int a = 1;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:8407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   SNMP_INCLUDE="-I$try";ucdsnmp=yes
+ else
+@@ -8423,7 +8425,7 @@
+   for try in /usr/include/ucd-snmp /usr/local/include/ucd-snmp $with_snmp_include_dir; do
+     CFLAGS="$old_CFLAGS -I$try"
+ cat > conftest.$ac_ext <<EOF
+-#line 8427 "configure"
++#line 8429 "configure"
+ #include "confdefs.h"
+ #ifdef HAVE_SYS_TYPES_H
+@@ -8448,7 +8450,7 @@
+  int a = 1;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:8454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   SNMP_INCLUDE="";ucdsnmp=no
+ else
+@@ -8470,7 +8472,7 @@
+   for try in /usr/include/ucd-snmp /usr/local/include/ucd-snmp $with_snmp_include_dir; do
+     CFLAGS="$old_CFLAGS -I$try"
+     cat > conftest.$ac_ext <<EOF
+-#line 8474 "configure"
++#line 8476 "configure"
+ #include "confdefs.h"
+ #ifdef HAVE_SYS_TYPES_H
+@@ -8495,7 +8497,7 @@
+  int a = 1;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:8501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   SNMP_INCLUDE="-I$try";ucdsnmp=no
+ else
+@@ -8529,19 +8531,19 @@
+   fi
+   echo $ac_n "checking for snmp_build_var_op in -lsnmp""... $ac_c" 1>&6
+-echo "configure:8533: checking for snmp_build_var_op in -lsnmp" >&5
++echo "configure:8535: checking for snmp_build_var_op in -lsnmp" >&5
+   old_LIBS="$LIBS"
+   LIBS="$old_LIBS -lsnmp"
+   cat > conftest.$ac_ext <<EOF
+-#line 8538 "configure"
++#line 8540 "configure"
+ #include "confdefs.h"
+ extern char snmp_build_var_op();
+ int main() {
+  snmp_build_var_op()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:8547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   SNMP_LIBS="-lsnmp"
+ else
+@@ -8556,14 +8558,14 @@
+     for try in /usr/lib /usr/local/lib /usr/local/snmp/lib $with_snmp_lib_dir; do
+       LIBS="$old_LIBS -L$try -lsnmp"
+       cat > conftest.$ac_ext <<EOF
+-#line 8560 "configure"
++#line 8562 "configure"
+ #include "confdefs.h"
+ extern char snmp_build_var_op();
+ int main() {
+  snmp_build_var_op()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:8569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   SNMP_LIBS="-L$try -lsnmp"
+ else
+@@ -8578,14 +8580,14 @@
+       fi
+       LIBS="$old_LIBS -L$try -lsnmp -lcrypto"
+       cat > conftest.$ac_ext <<EOF
+-#line 8582 "configure"
++#line 8584 "configure"
+ #include "confdefs.h"
+ extern char snmp_build_var_op();
+ int main() {
+  snmp_build_var_op()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:8591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   SNMP_LIBS="-L$try -lsnmp -lcrypto"
+ else
+@@ -8600,14 +8602,14 @@
+       fi
+       LIBS="$old_LIBS -L$try -lsnmp -lcrypto -lkstat"
+       cat > conftest.$ac_ext <<EOF
+-#line 8604 "configure"
++#line 8606 "configure"
+ #include "confdefs.h"
+ extern char snmp_build_var_op();
+ int main() {
+  snmp_build_var_op()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:8613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   SNMP_LIBS="-L$try -lsnmp -lcrypto -lkstat"
+ else
+@@ -8645,7 +8647,7 @@
+ gethostbyaddrrstyle=""
+ echo $ac_n "checking gethostbyaddr_r() syntax""... $ac_c" 1>&6
+-echo "configure:8649: checking gethostbyaddr_r() syntax" >&5
++echo "configure:8651: checking gethostbyaddr_r() syntax" >&5
+ case "$host" in
+ *-freebsd*)
+       cat >> confdefs.h <<\EOF
+@@ -8658,7 +8660,7 @@
+ esac
+ if test "x$gethostbyaddrrstyle" = "x"; then
+       cat > conftest.$ac_ext <<EOF
+-#line 8662 "configure"
++#line 8664 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+@@ -8668,7 +8670,7 @@
+  gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL, NULL) 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:8674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   
+       cat >> confdefs.h <<\EOF
+@@ -8685,7 +8687,7 @@
+ fi
+ if test "x$gethostbyaddrrstyle" = "x"; then
+       cat > conftest.$ac_ext <<EOF
+-#line 8689 "configure"
++#line 8691 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+@@ -8695,7 +8697,7 @@
+  gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL)  
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:8701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   
+               cat >> confdefs.h <<\EOF
+@@ -8712,7 +8714,7 @@
+ fi
+ if test "x$gethostbyaddrrstyle" = "x"; then
+       cat > conftest.$ac_ext <<EOF
+-#line 8716 "configure"
++#line 8718 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+@@ -8722,7 +8724,7 @@
+  gethostbyaddr(NULL, 0, 0)  
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:8728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   
+               cat >> confdefs.h <<\EOF
+@@ -8750,9 +8752,9 @@
+ gethostbynamerstyle=""
+ echo $ac_n "checking gethostbyname_r() syntax""... $ac_c" 1>&6
+-echo "configure:8754: checking gethostbyname_r() syntax" >&5
++echo "configure:8756: checking gethostbyname_r() syntax" >&5
+ cat > conftest.$ac_ext <<EOF
+-#line 8756 "configure"
++#line 8758 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+@@ -8762,7 +8764,7 @@
+  gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL) 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:8768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   
+       cat >> confdefs.h <<\EOF
+@@ -8778,7 +8780,7 @@
+ rm -f conftest*
+ if test "x$gethostbynamerstyle" = "x"; then
+       cat > conftest.$ac_ext <<EOF
+-#line 8782 "configure"
++#line 8784 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+@@ -8788,7 +8790,7 @@
+  gethostbyname_r(NULL, NULL, NULL, 0, NULL)  
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:8794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   
+               cat >> confdefs.h <<\EOF
+@@ -8805,7 +8807,7 @@
+ fi
+ if test "x$gethostbynamerstyle" = "x"; then
+       cat > conftest.$ac_ext <<EOF
+-#line 8809 "configure"
++#line 8811 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+@@ -8815,7 +8817,7 @@
+  gethostbyname(NULL)  
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:8821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   
+               cat >> confdefs.h <<\EOF
+@@ -8843,9 +8845,9 @@
+ ctimerstyle=""
+ echo $ac_n "checking ctime_r() syntax""... $ac_c" 1>&6
+-echo "configure:8847: checking ctime_r() syntax" >&5
++echo "configure:8849: checking ctime_r() syntax" >&5
+ cat > conftest.$ac_ext <<EOF
+-#line 8849 "configure"
++#line 8851 "configure"
+ #include "confdefs.h"
+ #include <time.h>
+@@ -8854,7 +8856,7 @@
+  ctime_r(NULL, NULL, 0) 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:8860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   
+       cat >> confdefs.h <<\EOF
+@@ -8870,7 +8872,7 @@
+ rm -f conftest*
+ if test "x$ctimerstyle" = "x"; then
+       cat > conftest.$ac_ext <<EOF
+-#line 8874 "configure"
++#line 8876 "configure"
+ #include "confdefs.h"
+ #include <time.h>
+@@ -8879,7 +8881,7 @@
+  ctime_r(NULL, NULL) 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:8885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   
+               cat >> confdefs.h <<\EOF
+@@ -8904,7 +8906,7 @@
+ if test x"$rad_enable_largefiles" = xyes ; then
+     echo $ac_n "checking for largefile linkage""... $ac_c" 1>&6
+-echo "configure:8908: checking for largefile linkage" >&5
++echo "configure:8910: checking for largefile linkage" >&5
+     case "$host" in
+     *-aix4.01*)
+         echo "$ac_t""no" 1>&6
+@@ -8941,7 +8943,7 @@
+         # Extract the first word of "getconf", so it can be a program name with args.
+ set dummy getconf; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:8945: checking for $ac_word" >&5
++echo "configure:8947: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_path_GETCONF'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+--- freeradius-1.0.2.orig/src/include/radius_snmp.h
++++ freeradius-1.0.2/src/include/radius_snmp.h
+@@ -11,6 +11,7 @@
+ #include      <snmp_impl.h>
+ #else
+ #ifdef HAVE_UCD_SNMP_ASN1_SNMP_SNMPIMPL_H
++#include      <ucd-snmp/ucd-snmp-config.h>
+ #include      <ucd-snmp/asn1.h>
+ #include      <ucd-snmp/snmp.h>
+ #include      <ucd-snmp/snmp_impl.h>
diff --git a/debian/patches/02_EAP-SIM_doesnt_need_openssl.dpatch b/debian/patches/02_EAP-SIM_doesnt_need_openssl.dpatch
new file mode 100755 (executable)
index 0000000..f78e31f
--- /dev/null
@@ -0,0 +1,679 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02_EAP-SIM_doesnt_need_openssl.dpatch by  <tbble@keitarou>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: EAP-SIM does not require openssl to build
+
+@DPATCH@
+
+--- freeradius-1.0.2.orig/src/modules/rlm_eap/types/rlm_eap_sim/configure
++++ freeradius-1.0.2/src/modules/rlm_eap/types/rlm_eap_sim/configure
+@@ -11,10 +11,6 @@
+ ac_help=
+ ac_default_prefix=/usr/local
+ # Any additions from configure.in:
+-ac_help="$ac_help
+-  --with-openssl-includes=DIR       Directory to look for OpenSSL include files"
+-ac_help="$ac_help
+-  --with-openssl-libraries=DIR      Directory to look for OpenSSL library files"
+ # Initialize some variables set by options.
+ # The variables have the same names as the options, with
+@@ -536,7 +532,7 @@
+       # Extract the first word of "gcc", so it can be a program name with args.
+ set dummy gcc; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:540: checking for $ac_word" >&5
++echo "configure:536: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -566,7 +562,7 @@
+   # Extract the first word of "cc", so it can be a program name with args.
+ set dummy cc; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:570: checking for $ac_word" >&5
++echo "configure:566: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -617,7 +613,7 @@
+       # Extract the first word of "cl", so it can be a program name with args.
+ set dummy cl; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:621: checking for $ac_word" >&5
++echo "configure:617: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -649,7 +645,7 @@
+ fi
+ echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+-echo "configure:653: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
++echo "configure:649: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+ ac_ext=c
+ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+@@ -660,12 +656,12 @@
+ cat > conftest.$ac_ext << EOF
+-#line 664 "configure"
++#line 660 "configure"
+ #include "confdefs.h"
+ main(){return(0);}
+ EOF
+-if { (eval echo configure:669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   ac_cv_prog_cc_works=yes
+   # If we can't run a trivial program, we are probably using a cross compiler.
+   if (./conftest; exit) 2>/dev/null; then
+@@ -691,12 +687,12 @@
+   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+ fi
+ echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+-echo "configure:695: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
++echo "configure:691: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+ echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+ cross_compiling=$ac_cv_prog_cc_cross
+ echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+-echo "configure:700: checking whether we are using GNU C" >&5
++echo "configure:696: checking whether we are using GNU C" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -705,7 +701,7 @@
+   yes;
+ #endif
+ EOF
+-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
++if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+   ac_cv_prog_gcc=yes
+ else
+   ac_cv_prog_gcc=no
+@@ -724,7 +720,7 @@
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS=
+ echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+-echo "configure:728: checking whether ${CC-cc} accepts -g" >&5
++echo "configure:724: checking whether ${CC-cc} accepts -g" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -756,508 +752,6 @@
+ fi
+-                              # Check whether --with-openssl-includes or --without-openssl-includes was given.
+-if test "${with_openssl_includes+set}" = set; then
+-  withval="$with_openssl_includes"
+-   case "$withval" in
+-          *)
+-              rlm_eap_peap_inc_dir="$rlm_eap_peap_inc_dir $withval"
+-              SMART_CFLAGS="$SMART_CFLAGS -I$withval"
+-              ;;
+-        esac 
+-      
+-fi
+-
+-
+-                              # Check whether --with-openssl-libraries or --without-openssl-libraries was given.
+-if test "${with_openssl_libraries+set}" = set; then
+-  withval="$with_openssl_libraries"
+-   case "$withval" in
+-          *)
+-              rlm_eap_peap_lib_dir="$rlm_eap_peap_lib_dir $withval"
+-              SMART_LIBS="$SMART_LIBS -L$withval"
+-              ;;
+-        esac 
+-      
+-fi
+-
+-
+-      smart_try_dir=$rlm_eap_peap_inc_dir
+-      
+-
+-ac_safe=`echo "openssl/ssl.h" | sed 'y%./+-%__pm%'`
+-echo $ac_n "checking for openssl/ssl.h""... $ac_c" 1>&6
+-echo "configure:791: checking for openssl/ssl.h" >&5
+-
+-smart_include=
+-smart_include_dir=
+-
+-  old_CFLAGS="$CFLAGS"
+-  cat > conftest.$ac_ext <<EOF
+-#line 798 "configure"
+-#include "confdefs.h"
+-
+-                #include <openssl/ssl.h>
+-int main() {
+- int a = 1;
+-; return 0; }
+-EOF
+-if { (eval echo configure:806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+-  rm -rf conftest*
+-  smart_include=" "
+-else
+-  echo "configure: failed program was:" >&5
+-  cat conftest.$ac_ext >&5
+-  rm -rf conftest*
+-  smart_include=
+-fi
+-rm -f conftest*
+-
+-  if test "x$smart_include" = "x"; then
+-    
+-
+-if test "x$LOCATE" != "x"; then
+-        DIRS=
+-  file=openssl/ssl.h
+-
+-  for x in `${LOCATE} $file 2>/dev/null`; do
+-                                        base=`echo $x | sed "s%/${file}%%"`
+-    if test "x$x" = "x$base"; then
+-      continue;
+-    fi
+-
+-    dir=`${DIRNAME} $x 2>/dev/null`
+-                exclude=`echo ${dir} | ${GREP} /home`
+-    if test "x$exclude" != "x"; then
+-      continue
+-    fi
+-
+-                    already=`echo \$smart_include_dir ${DIRS} | ${GREP} ${dir}`
+-    if test "x$already" = "x"; then
+-      DIRS="$DIRS $dir"
+-    fi
+-  done
+-fi
+-
+-eval "smart_include_dir=\"\$smart_include_dir $DIRS\""
+-
+-
+-    for try in $smart_try_dir $smart_include_dir /usr/local/include/ /opt/include; do
+-      CFLAGS="$old_CFLAGS -I$try"
+-
+-      cat > conftest.$ac_ext <<EOF
+-#line 850 "configure"
+-#include "confdefs.h"
+-
+-                     #include <openssl/ssl.h>
+-int main() {
+- int a = 1;
+-; return 0; }
+-EOF
+-if { (eval echo configure:858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+-  rm -rf conftest*
+-  smart_include="-I$try"
+-else
+-  echo "configure: failed program was:" >&5
+-  cat conftest.$ac_ext >&5
+-  rm -rf conftest*
+-  smart_include=
+-fi
+-rm -f conftest*
+-
+-      if test "x$smart_include" != "x"; then
+-        break;
+-      fi
+-    done
+-    CFLAGS="$old_CFLAGS"
+-  fi
+-
+-        if test "x$smart_include" != "x"; then
+-    echo "$ac_t""yes" 1>&6
+-    eval "ac_cv_header_$ac_safe=yes"
+-    CFLAGS="$old_CFLAGS $smart_include"
+-    SMART_CFLAGS="$SMART_CFLAGS $smart_include"
+-  else
+-    echo "$ac_t""no" 1>&6 
+-fi
+-
+-      if test "x$ac_cv_header_openssl_ssl_h" != "xyes"; then
+-              fail="$fail (openssl/ssl.h)"
+-      fi
+-
+-      smart_try_dir=$rlm_eap_peap_lib_dir
+-      
+-
+-sm_lib_safe=`echo "crypto" | sed 'y%./+-%__p_%'`
+-sm_func_safe=`echo "DH_new" | sed 'y%./+-%__p_%'`
+-echo $ac_n "checking for DH_new in -lcrypto""... $ac_c" 1>&6
+-echo "configure:895: checking for DH_new in -lcrypto" >&5
+-
+-smart_lib=
+-smart_lib_dir=
+-
+-  old_LIBS="$LIBS"
+-  LIBS="$LIBS -lcrypto"
+-  cat > conftest.$ac_ext <<EOF
+-#line 903 "configure"
+-#include "confdefs.h"
+-extern char DH_new();
+-int main() {
+- DH_new()
+-; return 0; }
+-EOF
+-if { (eval echo configure:910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+-  rm -rf conftest*
+-  smart_lib="-lcrypto"
+-else
+-  echo "configure: failed program was:" >&5
+-  cat conftest.$ac_ext >&5
+-fi
+-rm -f conftest*
+-
+-  if test "x$smart_lib" = "x"; then
+-    
+-
+-if test "x$LOCATE" != "x"; then
+-        DIRS=
+-  file=libcrypto${libltdl_cv_shlibext}
+-
+-  for x in `${LOCATE} $file 2>/dev/null`; do
+-                                        base=`echo $x | sed "s%/${file}%%"`
+-    if test "x$x" = "x$base"; then
+-      continue;
+-    fi
+-
+-    dir=`${DIRNAME} $x 2>/dev/null`
+-                exclude=`echo ${dir} | ${GREP} /home`
+-    if test "x$exclude" != "x"; then
+-      continue
+-    fi
+-
+-                    already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
+-    if test "x$already" = "x"; then
+-      DIRS="$DIRS $dir"
+-    fi
+-  done
+-fi
+-
+-eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
+-
+-    
+-
+-if test "x$LOCATE" != "x"; then
+-        DIRS=
+-  file=libcrypto.a
+-
+-  for x in `${LOCATE} $file 2>/dev/null`; do
+-                                        base=`echo $x | sed "s%/${file}%%"`
+-    if test "x$x" = "x$base"; then
+-      continue;
+-    fi
+-
+-    dir=`${DIRNAME} $x 2>/dev/null`
+-                exclude=`echo ${dir} | ${GREP} /home`
+-    if test "x$exclude" != "x"; then
+-      continue
+-    fi
+-
+-                    already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
+-    if test "x$already" = "x"; then
+-      DIRS="$DIRS $dir"
+-    fi
+-  done
+-fi
+-
+-eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
+-
+-
+-    for try in $smart_try_dir $smart_lib_dir /usr/local/lib/ /opt/lib; do
+-      LIBS="$old_LIBS -L$try -lcrypto"
+-
+-      cat > conftest.$ac_ext <<EOF
+-#line 979 "configure"
+-#include "confdefs.h"
+-extern char DH_new();
+-int main() {
+- DH_new()
+-; return 0; }
+-EOF
+-if { (eval echo configure:986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+-  rm -rf conftest*
+-  smart_lib="-L$try -lcrypto"
+-else
+-  echo "configure: failed program was:" >&5
+-  cat conftest.$ac_ext >&5
+-fi
+-rm -f conftest*
+-      if test "x$smart_lib" != "x"; then
+-        break;
+-      fi
+-    done
+-    LIBS="$old_LIBS"
+-  fi
+-
+-        if test "x$smart_lib" != "x"; then
+-    echo "$ac_t""yes" 1>&6
+-    eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
+-    LIBS="$old_LIBS $smart_lib"
+-    SMART_LIBS="$SMART_LIBS $smart_lib"
+-  else
+-    echo "$ac_t""no" 1>&6 
+-fi
+-
+-    if test "x$ac_cv_lib_crypto_DH_new" != "xyes"; then
+-          fail="$fail libcrypto"
+-    fi
+-
+-      
+-
+-sm_lib_safe=`echo "ssl" | sed 'y%./+-%__p_%'`
+-sm_func_safe=`echo "SSL_new" | sed 'y%./+-%__p_%'`
+-echo $ac_n "checking for SSL_new in -lssl""... $ac_c" 1>&6
+-echo "configure:1019: checking for SSL_new in -lssl" >&5
+-
+-smart_lib=
+-smart_lib_dir=
+-
+-  old_LIBS="$LIBS"
+-  LIBS="$LIBS -lssl"
+-  cat > conftest.$ac_ext <<EOF
+-#line 1027 "configure"
+-#include "confdefs.h"
+-extern char SSL_new();
+-int main() {
+- SSL_new()
+-; return 0; }
+-EOF
+-if { (eval echo configure:1034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+-  rm -rf conftest*
+-  smart_lib="-lssl"
+-else
+-  echo "configure: failed program was:" >&5
+-  cat conftest.$ac_ext >&5
+-fi
+-rm -f conftest*
+-
+-  if test "x$smart_lib" = "x"; then
+-    
+-
+-if test "x$LOCATE" != "x"; then
+-        DIRS=
+-  file=libssl${libltdl_cv_shlibext}
+-
+-  for x in `${LOCATE} $file 2>/dev/null`; do
+-                                        base=`echo $x | sed "s%/${file}%%"`
+-    if test "x$x" = "x$base"; then
+-      continue;
+-    fi
+-
+-    dir=`${DIRNAME} $x 2>/dev/null`
+-                exclude=`echo ${dir} | ${GREP} /home`
+-    if test "x$exclude" != "x"; then
+-      continue
+-    fi
+-
+-                    already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
+-    if test "x$already" = "x"; then
+-      DIRS="$DIRS $dir"
+-    fi
+-  done
+-fi
+-
+-eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
+-
+-    
+-
+-if test "x$LOCATE" != "x"; then
+-        DIRS=
+-  file=libssl.a
+-
+-  for x in `${LOCATE} $file 2>/dev/null`; do
+-                                        base=`echo $x | sed "s%/${file}%%"`
+-    if test "x$x" = "x$base"; then
+-      continue;
+-    fi
+-
+-    dir=`${DIRNAME} $x 2>/dev/null`
+-                exclude=`echo ${dir} | ${GREP} /home`
+-    if test "x$exclude" != "x"; then
+-      continue
+-    fi
+-
+-                    already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
+-    if test "x$already" = "x"; then
+-      DIRS="$DIRS $dir"
+-    fi
+-  done
+-fi
+-
+-eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
+-
+-
+-    for try in $smart_try_dir $smart_lib_dir /usr/local/lib/ /opt/lib; do
+-      LIBS="$old_LIBS -L$try -lssl"
+-
+-      cat > conftest.$ac_ext <<EOF
+-#line 1103 "configure"
+-#include "confdefs.h"
+-extern char SSL_new();
+-int main() {
+- SSL_new()
+-; return 0; }
+-EOF
+-if { (eval echo configure:1110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+-  rm -rf conftest*
+-  smart_lib="-L$try -lssl"
+-else
+-  echo "configure: failed program was:" >&5
+-  cat conftest.$ac_ext >&5
+-fi
+-rm -f conftest*
+-      if test "x$smart_lib" != "x"; then
+-        break;
+-      fi
+-    done
+-    LIBS="$old_LIBS"
+-  fi
+-
+-        if test "x$smart_lib" != "x"; then
+-    echo "$ac_t""yes" 1>&6
+-    eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
+-    LIBS="$old_LIBS $smart_lib"
+-    SMART_LIBS="$SMART_LIBS $smart_lib"
+-  else
+-    echo "$ac_t""no" 1>&6 
+-fi
+-
+-    if test "x$ac_cv_lib_ssl_SSL_new" != "xyes"; then
+-          fail="$fail libssl"
+-    fi
+-
+-      echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+-echo "configure:1139: checking how to run the C preprocessor" >&5
+-# On Suns, sometimes $CPP names a directory.
+-if test -n "$CPP" && test -d "$CPP"; then
+-  CPP=
+-fi
+-if test -z "$CPP"; then
+-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+-  echo $ac_n "(cached) $ac_c" 1>&6
+-else
+-    # This must be in double quotes, not single quotes, because CPP may get
+-  # substituted into the Makefile and "${CC-cc}" will confuse make.
+-  CPP="${CC-cc} -E"
+-  # On the NeXT, cc -E runs the code through the compiler's parser,
+-  # not just through cpp.
+-  cat > conftest.$ac_ext <<EOF
+-#line 1154 "configure"
+-#include "confdefs.h"
+-#include <assert.h>
+-Syntax Error
+-EOF
+-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:1160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+-if test -z "$ac_err"; then
+-  :
+-else
+-  echo "$ac_err" >&5
+-  echo "configure: failed program was:" >&5
+-  cat conftest.$ac_ext >&5
+-  rm -rf conftest*
+-  CPP="${CC-cc} -E -traditional-cpp"
+-  cat > conftest.$ac_ext <<EOF
+-#line 1171 "configure"
+-#include "confdefs.h"
+-#include <assert.h>
+-Syntax Error
+-EOF
+-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:1177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+-if test -z "$ac_err"; then
+-  :
+-else
+-  echo "$ac_err" >&5
+-  echo "configure: failed program was:" >&5
+-  cat conftest.$ac_ext >&5
+-  rm -rf conftest*
+-  CPP="${CC-cc} -nologo -E"
+-  cat > conftest.$ac_ext <<EOF
+-#line 1188 "configure"
+-#include "confdefs.h"
+-#include <assert.h>
+-Syntax Error
+-EOF
+-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:1194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+-if test -z "$ac_err"; then
+-  :
+-else
+-  echo "$ac_err" >&5
+-  echo "configure: failed program was:" >&5
+-  cat conftest.$ac_ext >&5
+-  rm -rf conftest*
+-  CPP=/lib/cpp
+-fi
+-rm -f conftest*
+-fi
+-rm -f conftest*
+-fi
+-rm -f conftest*
+-  ac_cv_prog_CPP="$CPP"
+-fi
+-  CPP="$ac_cv_prog_CPP"
+-else
+-  ac_cv_prog_CPP="$CPP"
+-fi
+-echo "$ac_t""$CPP" 1>&6
+-
+-for ac_hdr in \
+-              openssl/err.h \
+-              openssl/engine.h \
+-      
+-do
+-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:1225: checking for $ac_hdr" >&5
+-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+-  echo $ac_n "(cached) $ac_c" 1>&6
+-else
+-  cat > conftest.$ac_ext <<EOF
+-#line 1230 "configure"
+-#include "confdefs.h"
+-#include <$ac_hdr>
+-EOF
+-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:1235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+-if test -z "$ac_err"; then
+-  rm -rf conftest*
+-  eval "ac_cv_header_$ac_safe=yes"
+-else
+-  echo "$ac_err" >&5
+-  echo "configure: failed program was:" >&5
+-  cat conftest.$ac_ext >&5
+-  rm -rf conftest*
+-  eval "ac_cv_header_$ac_safe=no"
+-fi
+-rm -f conftest*
+-fi
+-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+-  echo "$ac_t""yes" 1>&6
+-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+-  cat >> confdefs.h <<EOF
+-#define $ac_tr_hdr 1
+-EOF
+- 
+-else
+-  echo "$ac_t""no" 1>&6
+-fi
+-done
+-
+-
+       targetname=rlm_eap_sim
+ else
+       targetname=
+@@ -1419,7 +913,6 @@
+ s%@infodir@%$infodir%g
+ s%@mandir@%$mandir%g
+ s%@CC@%$CC%g
+-s%@CPP@%$CPP%g
+ s%@eap_sim_ldflags@%$eap_sim_ldflags%g
+ s%@eap_sim_cflags@%$eap_sim_cflags%g
+ s%@targetname@%$targetname%g
+--- freeradius-1.0.2.orig/src/modules/rlm_eap/types/rlm_eap_sim/configure.in
++++ freeradius-1.0.2/src/modules/rlm_eap/types/rlm_eap_sim/configure.in
+@@ -9,54 +9,6 @@
+       AC_PROG_CC
+-      dnl #
+-      dnl # extra argument: --openssl-includes=dir
+-      dnl #
+-      AC_ARG_WITH(openssl-includes,
+-      [  --with-openssl-includes=DIR       Directory to look for OpenSSL include files],
+-      [ case "$withval" in
+-          *)
+-              rlm_eap_peap_inc_dir="$rlm_eap_peap_inc_dir $withval"
+-              SMART_CFLAGS="$SMART_CFLAGS -I$withval"
+-              ;;
+-        esac ]
+-      )
+-
+-      dnl #
+-      dnl # extra argument: --openssl-libraries=dir
+-      dnl #
+-      AC_ARG_WITH(openssl-libraries,
+-      [  --with-openssl-libraries=DIR      Directory to look for OpenSSL library files],
+-      [ case "$withval" in
+-          *)
+-              rlm_eap_peap_lib_dir="$rlm_eap_peap_lib_dir $withval"
+-              SMART_LIBS="$SMART_LIBS -L$withval"
+-              ;;
+-        esac ]
+-      )
+-
+-      smart_try_dir=$rlm_eap_peap_inc_dir
+-      AC_SMART_CHECK_INCLUDE(openssl/ssl.h)
+-      if test "x$ac_cv_header_openssl_ssl_h" != "xyes"; then
+-              fail="$fail (openssl/ssl.h)"
+-      fi
+-
+-      smart_try_dir=$rlm_eap_peap_lib_dir
+-      AC_SMART_CHECK_LIB(crypto, DH_new)
+-    if test "x$ac_cv_lib_crypto_DH_new" != "xyes"; then
+-          fail="$fail libcrypto"
+-    fi
+-
+-      AC_SMART_CHECK_LIB(ssl, SSL_new)
+-    if test "x$ac_cv_lib_ssl_SSL_new" != "xyes"; then
+-          fail="$fail libssl"
+-    fi
+-
+-      AC_CHECK_HEADERS( \
+-              openssl/err.h \
+-              openssl/engine.h \
+-      )
+-
+       targetname=modname
+ else
+       targetname=
diff --git a/debian/patches/03_X99_is_not_stable.dpatch b/debian/patches/03_X99_is_not_stable.dpatch
new file mode 100755 (executable)
index 0000000..52f66d4
--- /dev/null
@@ -0,0 +1,16 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03_X99_is_not_stable.dpatch by  <tbble@keitarou>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: rlm_x99 (X.99 token support) is not stable
+
+@DPATCH@
+
+--- freeradius-1.0.2.orig/src/modules/stable
++++ freeradius-1.0.2/src/modules/stable
+@@ -25,5 +25,4 @@
+ rlm_realm
+ rlm_sql
+ rlm_unix
+-rlm_x99_token
+ rlm_checkval
index 6ffc77a..e670f5c 100755 (executable)
@@ -3,6 +3,8 @@
 #      debian/rules file for freeradius
 #
 
+.NOTPARALLEL:
+
 SHELL          =/bin/bash
 
 package                = freeradius
@@ -31,9 +33,10 @@ ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
        confflags += $(DEB_HOST_GNU_TYPE)
 else
        confflags += --host $(DEB_BUILD_GNU_TYPE) --build $(DEB_HOST_GNU_TYPE)
+#      $(error Cannot cross-compile this package out-of-the-box)
 endif
 
-build-simple stamp-build:
+build-simple stamp-build: patch
        dh_testdir
        # dh_testroot
        ./configure \
@@ -49,9 +52,13 @@ build-simple stamp-build:
                --with-logdir=/var/log/$(package) \
                --with-thread-pool --with-system-libtool \
                --enable-ltdl-install=no --enable-strict-dependencies \
-               --enable-developer \
-               --with-rlm-sql-postgresql-lib-dir=`pg_config --libdir` \
-               --with-rlm-sql-postgresql-include-dir=`pg_config --includedir`
+               --without-rlm_eap_peap \
+               --without-rlm_eap_tls \
+               --without-rlm_eap_ttls \
+               --without-rlm_sql_postgresql \
+               --without-snmp \
+               --with-udpfromto --with-edir \
+               --enable-developer
        
        # Modify Make.inc for Debian...
        TEMPFILE=`mktemp /tmp/radmake-XXXXXX`; \
@@ -67,11 +74,53 @@ build-simple stamp-build:
 build: autotools build-simple
 
 binary-indep: stamp-build
-
-binary-arch: stamp-build
        dh_testroot
        dh_clean
        dh_installdirs
+       # Dialup-Admin
+       dh_installdocs -p freeradius-dialupadmin dialup_admin/README dialup_admin/doc/*
+       dh_installchangelogs -p freeradius-dialupadmin dialup_admin/Changelog
+       dh_installexamples -p freeradius-dialupadmin dialup_admin/bin/dialup_admin.cron
+       dh_install -p freeradius-dialupadmin -XCVS dialup_admin/conf/* etc/freeradius-dialupadmin/
+       dh_install -p freeradius-dialupadmin -XCVS -XChangelog -XREADME -Xconf/ -Xdoc/ -Xdialup_admin.cron dialup_admin/* usr/share/freeradius-dialupadmin/
+       dh_link -p freeradius-dialupadmin etc/freeradius-dialupadmin/ usr/share/freeradius-dialupadmin/conf
+       dh_perl -p freeradius-dialupadmin dialup_admin/bin/*
+# Fix the crontab example to point to the right directory
+       cat $(freeradius_dir)-dialupadmin/usr/share/doc/freeradius-dialupadmin/examples/dialup_admin.cron \
+               | sed -e 's#/usr/local/dialup_admin#/usr/share/freeradius-dialupadmin#' \
+               > $(freeradius_dir)-dialupadmin/usr/share/doc/freeradius-dialupadmin/examples/freeradius-dialupadmin.cron
+       rm $(freeradius_dir)-dialupadmin/usr/share/doc/freeradius-dialupadmin/examples/dialup_admin.cron
+       TEMPFILE=`mktemp /tmp/dialupconf-XXXXXX`; \
+       cp $(freeradius_dir)-dialupadmin/etc/freeradius-dialupadmin/admin.conf $$TEMPFILE; \
+       cat $$TEMPFILE \
+               | sed -e 's#/usr/local/dialup_admin#/usr/share/freeradius-dialupadmin#' \
+                       -e 's#/usr/local/radiusd#/usr#' \
+                       -e 's#general_raddb_dir: %{general_radiusd_base_dir}/etc/raddb#general_raddb_dir: /etc/freeradius#' \
+                       -e 's#general_clients_conf: /usr/local/etc/raddb/clients.conf#general_clients_conf: /etc/freeradius/clients.conf#' \
+                       -e 's#%{general_base_dir}/conf#/etc/freeradius-dialupadmin#' \
+                       -e 's#/usr/local/bin#/usr/bin#' \
+               > $(freeradius_dir)-dialupadmin/etc/freeradius-dialupadmin/admin.conf; \
+       rm $$TEMPFILE;
+       TEMPFILE=`mktemp /tmp/dialuphelp-XXXXXX`; \
+       cp $(freeradius_dir)-dialupadmin/usr/share/freeradius-dialupadmin/htdocs/help/help.php3 $$TEMPFILE; \
+       cat $$TEMPFILE \
+               | sed -e 's#readfile#readgzfile#' \
+                       -e 's#../../README#/usr/share/doc/freeradius-dialupadmin/README.gz#' \
+                       -e 's#../../doc/HOWTO#/usr/share/doc/freeradius-dialupadmin/HOWTO.gz#' \
+                       -e 's#../../doc/FAQ#/usr/share/doc/freeradius-dialupadmin/FAQ#' \
+               > $(freeradius_dir)-dialupadmin/usr/share/freeradius-dialupadmin/htdocs/help/help.php3; \
+       rm $$TEMPFILE;
+       for binfile in $(freeradius_dir)-dialupadmin/usr/share/freeradius-dialupadmin/bin/*; do \
+               TEMPFILE=`mktemp /tmp/dialupbin-XXXXXX`; \
+               cp $$binfile $$TEMPFILE; \
+               cat $$TEMPFILE \
+                       | sed -e 's#/usr/local/bin/#/usr/bin/#' \
+                               -e 's#/usr/local/dialup_admin/conf/#/etc/freeradius-dialupadmin/#' \
+                       > $$binfile; \
+               rm $$TEMPFILE; \
+       done
+
+binary-arch: stamp-build
        make install R=$(freeradius_dir)
 
        # rename radius binary to play nicely with others
@@ -86,14 +135,14 @@ binary-arch: stamp-build
        rm -rf $(freeradius_dir)/usr/share/doc/freeradius-1.0.4
 
        # split out inconvenient/controversal modules to other places
-       for modname in krb5 ldap mysql postgresql iodbc; do \
+       for modname in krb5 ldap mysql iodbc; do \
                mkdir -p $(debiandir)/$(package)-$${modname}/$(libdir); \
                mv $(freeradius_dir)/$(libdir)/rlm*_$${modname}* $(debiandir)/$(package)-$${modname}/$(libdir)/; \
        done
 
        # man pages & docs
        install -g root -m 644 CREDITS $(freeradius_dir)/$(pkgdocdir)/credits
-       dh_installdocs -XChangeLog -X00-OLD -XCVS -XMakefile doc/*
+       dh_installdocs -X.in -Xrc.radiusd -Xradwatch -Xcheck-radius-config -XChangeLog -X00-OLD -XCVS -XMakefile doc/*
        dh_installexamples -XCVS `find src/modules/rlm_sql/drivers -type f -name \*.sql`
        dh_installchangelogs doc/ChangeLog
        #Rename manpage to go with binary
@@ -116,48 +165,8 @@ binary-arch: stamp-build
                        > $(freeradius_dir)/$(raddbdir)/radiusd.conf; \
        rm $$TEMPFILE
 
-       # Dialup-Admin
-       dh_installdocs -p freeradius-dialupadmin dialup_admin/README dialup_admin/doc/*
-       dh_installchangelogs -p freeradius-dialupadmin dialup_admin/Changelog
-       dh_installexamples -p freeradius-dialupadmin dialup_admin/bin/dialup_admin.cron
-       dh_install -p freeradius-dialupadmin -XCVS dialup_admin/conf/* etc/freeradius-dialupadmin/
-       dh_install -p freeradius-dialupadmin -XCVS -XChangelog -XREADME -Xconf/ -Xdoc/ -Xdialup_admin.cron dialup_admin/* usr/share/freeradius-dialupadmin/
-       dh_link -p freeradius-dialupadmin etc/freeradius-dialupadmin/ usr/share/freeradius-dialupadmin/conf
-       dh_perl -p freeradius-dialupadmin dialup_admin/bin/*
-# Fix the crontab example to point to the right directory
-       cat $(freeradius_dir)-dialupadmin/usr/share/doc/freeradius-dialupadmin/examples/dialup_admin.cron \
-               | sed -e 's#/usr/local/dialup_admin#/usr/share/freeradius-dialupadmin#' \
-               > $(freeradius_dir)-dialupadmin/usr/share/doc/freeradius-dialupadmin/examples/freeradius-dialupadmin.cron
-       rm $(freeradius_dir)-dialupadmin/usr/share/doc/freeradius-dialupadmin/examples/dialup_admin.cron
-       TEMPFILE=`mktemp /tmp/dialupconf-XXXXXX`; \
-       cp $(freeradius_dir)-dialupadmin/etc/freeradius-dialupadmin/admin.conf $$TEMPFILE; \
-       cat $$TEMPFILE \
-               | sed -e 's#/usr/local/dialup_admin#/usr/share/freeradius-dialupadmin#' \
-                       -e 's#/usr/local/radiusd#/usr#' \
-                       -e 's#general_raddb_dir: %{general_radiusd_base_dir}/etc/raddb#general_raddb_dir: /etc/freeradius#' \
-                       -e 's#general_clients_conf: /usr/local/etc/raddb/clients.conf#general_clients_conf: /etc/freeradius/clients.conf#' \
-                       -e 's#%{general_base_dir}/conf#%/etc/freeradius-dialupadmin#' \
-                       -e 's#/usr/local/bin#/usr/bin#' \
-               > $(freeradius_dir)-dialupadmin/etc/freeradius-dialupadmin/admin.conf; \
-       rm $$TEMPFILE;
-       TEMPFILE=`mktemp /tmp/dialuphelp-XXXXXX`; \
-       cp $(freeradius_dir)-dialupadmin/usr/share/freeradius-dialupadmin/htdocs/help/help.php3 $$TEMPFILE; \
-       cat $$TEMPFILE \
-               | sed -e 's#readfile#readgzfile#' \
-                       -e 's#../../README#/usr/share/doc/freeradius-dialupadmin/README.gz#' \
-                       -e 's#../../doc/HOWTO#/usr/share/doc/freeradius-dialupadmin/HOWTO.gz#' \
-                       -e 's#../../doc/FAQ#/usr/share/doc/freeradius-dialupadmin/FAQ#' \
-               > $(freeradius_dir)-dialupadmin/usr/share/freeradius-dialupadmin/htdocs/help/help.php3; \
-       rm $$TEMPFILE;
-       for binfile in $(freeradius_dir)-dialupadmin/usr/share/freeradius-dialupadmin/bin/*; do \
-               TEMPFILE=`mktemp /tmp/dialupbin-XXXXXX`; \
-               cp $$binfile $$TEMPFILE; \
-               cat $$TEMPFILE \
-                       | sed -e 's#/usr/local/bin/#/usr/bin/#' \
-                               -e 's#/usr/local/dialup_admin/conf/#/etc/freeradius-dialupadmin/#' \
-                       > $$binfile; \
-               rm $$TEMPFILE; \
-       done
+       # bonus scipts
+
 
 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
        dh_strip
@@ -175,12 +184,14 @@ endif
        dh_gencontrol
        dh_builddeb
 
-clean: 
+clean: clean-patched unpatch
+
+clean-patched:
        dh_testdir
        rm -f stamp-build debian/{files,substvars} debian/*.debhelper libltdl/stamp-h1
        [ -f Make.inc ] && make distclean || true
        dh_clean
-       rm -rf $(freeradius_dir) $(debiandir)/$(package)-{krb5,ldap,mysql,postgresql,iodbc}{,.substvars}
+       rm -rf $(freeradius_dir) $(debiandir)/$(package)-{krb5,ldap,mysql,iodbc}{,.substvars}
        [ -f config.sub.dist ] && rm config.sub && mv config.sub.dist config.sub || true
        [ -f config.guess.dist ] && rm config.guess && mv config.guess.dist config.guess || true
 
@@ -207,4 +218,14 @@ sanitycheck:
        @test -n $$filename
        @echo good.
 
+patch: stamp-patch
+stamp-patch:
+       dpatch apply-all
+#      dpatch call-all -a=pkg-info > stamp-patch
+       dpatch list-all > stamp-patch
+
+unpatch:
+       dpatch deapply-all
+       rm -rf stamp-patch debian/patched
+
 .PHONY: binary binary-arch binary-indep clean sanitycheck autotools