Changeset 1497
- Timestamp:
- 06/05/08 18:30:56 (7 months ago)
- Files:
-
- cherokee/trunk/ChangeLog (modified) (1 diff)
- cherokee/trunk/TODO (modified) (2 diffs)
- cherokee/trunk/cherokee/Makefile.am (modified) (4 diffs)
- cherokee/trunk/cherokee/rule_geoip.c (added)
- cherokee/trunk/cherokee/rule_geoip.h (added)
- cherokee/trunk/configure.in (modified) (5 diffs)
- cherokee/trunk/qa/167-RuleGeoIP.py (added)
- cherokee/trunk/qa/Makefile.am (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cherokee/trunk/ChangeLog
r1496 r1497 1 1 2008-06-05 Alvaro Lopez Ortega <alvaro@alobbs.com> 2 3 * cherokee/rule_geoip.h, cherokee/rule_geoip.c, 4 cherokee/Makefile.am, configure.in: Added a new GeoIP rule module. 5 It checks the origin IP with the GeoIP library. 6 7 * qa/167-RuleGeoIP.py, qa/Makefile.am: Added a new QA test to 8 ensure that rule_geoip actually works. 2 9 3 10 * qa/061-PAM1.py, qa/062-PAM2.py (Test.Precondition): Updated to cherokee/trunk/TODO
r1493 r1497 5 5 ----- 6 6 [ ] Mime encodings separated from mime types 7 [ ] Chuncked encoding 7 [x] Chuncked encoding 8 [x] GeoIP rule 8 9 9 10 0.9.0 … … 16 17 Later 17 18 ----- 18 [ ] X-Sendfile19 [x] X-Sendfile 19 20 [ ] WSGI handler 20 21 [ ] Upload progress module cherokee/trunk/cherokee/Makefile.am
r1478 r1497 157 157 158 158 # 159 # Rule geoip 160 # 161 rule_geoip = \ 162 rule_geoip.c \ 163 rule_geoip.h 164 165 libplugin_geoip_la_LDFLAGS = $(module_ldflags) 166 libplugin_geoip_la_SOURCES = $(rule_geoip) 167 libplugin_geoip_la_LIBADD = -lGeoIP 168 169 if STATIC_RULE_HEADER 170 static_rule_geoip_src = $(rule_geoip) 171 static_rule_geoip_lib = -lGeoIP 172 else 173 dynamic_rule_geoip_lib = libplugin_geoip.la 174 endif 175 176 177 # 159 178 # Rule not 160 179 # … … 770 789 $(static_validator_pam_lib) \ 771 790 $(static_validator_ldap_lib) \ 791 $(static_rule_geoip_lib) \ 772 792 $(static_validator_htpasswd_lib) \ 773 793 $(static_validator_mysql_lib) \ … … 933 953 $(static_rule_request_src) \ 934 954 $(static_rule_header_src) \ 955 $(static_rule_geoip_src) \ 935 956 $(static_rule_not_src) \ 936 957 $(static_rule_and_src) \ … … 1082 1103 $(dynamic_rule_request_lib) \ 1083 1104 $(dynamic_rule_header_lib) \ 1105 $(dynamic_rule_geoip_lib) \ 1084 1106 $(dynamic_rule_not_lib) \ 1085 1107 $(dynamic_rule_and_lib) \ cherokee/trunk/configure.in
r1493 r1497 1083 1083 1084 1084 dnl 1085 dnl GeoIP library 1086 dnl 1087 AC_ARG_WITH([geoip], 1088 AC_HELP_STRING([--with-geoip=@<:@ARG@:>@], 1089 [use the GeoIP library @<:@default=yes@:>@, optionally specify path to dev libs] 1090 ), 1091 [ 1092 if test "$withval" = "no"; then 1093 want_geoip="no" 1094 elif test "$withval" = "yes"; then 1095 want_geoip="yes" 1096 else 1097 want_geoip="yes" 1098 GEOIP_CONFIG="$withval" 1099 fi 1100 ], 1101 [want_geoip="yes"] 1102 ) 1103 1104 if test "$want_geoip" = "yes"; then 1105 AC_CHECK_LIB(GeoIP, GeoIP_new, have_geoip_lib=yes, have_geoip_lib=no) 1106 AC_CHECK_HEADERS(GeoIP.h, have_geoip_include=yes, have_geoip_include=no) 1107 fi 1108 1109 have_geoip="no" 1110 if test "$have_geoip_lib $have_geoip_include" = "yes yes"; then 1111 have_geoip="yes" 1112 fi 1113 1114 AM_CONDITIONAL(HAVE_GEOIP, test $have_geoip = "yes") 1115 1116 1117 dnl 1085 1118 dnl Python's docutils 1086 1119 dnl … … 1168 1201 [use_static_module="$use_static_module $enableval "],[]) 1169 1202 1170 modules="error_redir server_info file admin dirlist fcgi fastcgi scgi redir common nn cgi phpcgi proxy mirror gzip ncsa combined w3c pam ldap mysql htpasswd plain htdigest round_robin directory extensions request header not and or"1203 modules="error_redir server_info file admin dirlist fcgi fastcgi scgi redir common nn cgi phpcgi proxy mirror gzip ncsa combined w3c pam ldap mysql htpasswd plain htdigest round_robin directory extensions request header geoip not and or" 1171 1204 1172 1205 # Remove modules that will not be compiles … … 1180 1213 if test "x$have_mysql" != "xyes"; then 1181 1214 modules=`echo $modules | sed s/mysql//` 1215 fi 1216 if test "x$have_geoip" != "xyes"; then 1217 modules=`echo $modules | sed s/geoip//` 1182 1218 fi 1183 1219 if test "$use_crypt" != "yes"; then … … 1245 1281 AM_CONDITIONAL(STATIC_RULE_REQUEST, grep request $conf_h >/dev/null) 1246 1282 AM_CONDITIONAL(STATIC_RULE_HEADER, grep header $conf_h >/dev/null) 1283 AM_CONDITIONAL(STATIC_RULE_GEOIP, grep geoip $conf_h >/dev/null) 1247 1284 # These must be at the end 1248 1285 AM_CONDITIONAL(STATIC_RULE_NOT, grep _not_ $conf_h >/dev/null) … … 1311 1348 echo "LDAP $have_ldap" 1312 1349 echo "MySQL $have_mysql" 1350 echo "GeoIP $have_geoip" 1313 1351 echo "crypt support $crypt_type" 1314 1352 if test "x$is_beta" = "xyes"; then cherokee/trunk/qa/Makefile.am
r1480 r1497 171 171 164-RuleOr1.py \ 172 172 165-RuleOr2.py \ 173 166-xsendfile1.py 173 166-xsendfile1.py \ 174 167-RuleGeoIP.py 174 175 175 176 test: