Forráskód Böngészése

upgrade to versioned mod_auth_mysql

Ralf S. Engelschall 21 éve
szülő
commit
5319bcd431
2 módosított fájl, 33 hozzáadás és 9 törlés
  1. 23 0
      apache/apache.patch.modauthmysql
  2. 10 9
      apache/apache.spec

+ 23 - 0
apache/apache.patch.modauthmysql

@@ -0,0 +1,23 @@
+Index: mod_auth_mysql.c
+--- mod_auth_mysql.c.orig	2004-09-10 20:46:16 +0200
++++ mod_auth_mysql.c	2004-09-10 20:50:32 +0200
+@@ -127,9 +127,9 @@
+ #include "http_request.h"   /* for ap_hook_(check_user_id | auth_checker)*/
+ #include "ap_compat.h"
+ #include "apr_strings.h"
+-#include "util_md5.h"
+ #include "crypt.h"
+ #endif
++#include "util_md5.h"
+ #include <mysql.h>
+ 
+ /*
+@@ -412,7 +412,7 @@
+     (void*)XtOffsetOf(mysql_auth_config_rec, mysqlsocket),
+     OR_AUTHCFG, TAKE1, "mysql server socket path" },
+ 
+-  { "AuthMySQLPort", ap_set_int_slot,
++  { "AuthMySQLPort", ap_set_flag_slot,
+     (void*)XtOffsetOf(mysql_auth_config_rec, mysqlport),
+     OR_AUTHCFG, TAKE1, "mysql server port number" },
+ 

+ 10 - 9
apache/apache.spec

@@ -44,7 +44,7 @@
 %define       V_mod_auth_pam       1.1.1
 %define       V_mod_auth_ldap      2.4.2
 %define       V_mod_auth_radius    1.5.7
-%define       V_mod_auth_mysql     20030510
+%define       V_mod_auth_mysql     2.5.0
 %define       V_mod_gzip           1.3.19.1a
 %define       V_mod_fastcgi        2.4.2
 %define       V_mod_throttle       312
@@ -66,7 +66,7 @@ Class:        BASE
 Group:        Web
 License:      ASF
 Version:      %{V_apache}
-Release:      20040907
+Release:      20040910
 
 #   package options (suexec related)
 %option       with_suexec               yes
@@ -197,7 +197,7 @@ Source12:     http://www.klomp.org/mod_roaming/mod_roaming-%{V_mod_roaming}.tar.
 Source13:     http://software.tangent.org/download/mod_relocate-%{V_mod_relocate}.tar.gz
 Source14:     http://www.muquit.com/muquit/software/mod_auth_ldap/mod_auth_ldap.tar.gz
 Source15:     ftp://ftp.freeradius.org/pub/radius/mod_auth_radius-%{V_mod_auth_radius}.tar
-Source16:     http://osdn.dl.sourceforge.net/sourceforge/modauthmysql/mod_auth_mysql.tgz
+Source16:     http://osdn.dl.sourceforge.net/modauthmysql/mod_auth_mysql-%{V_mod_auth_mysql}.tar.gz
 Source17:     http://www.suphp.org/download/suphp-%{V_suphp}.tar.gz
 Source18:     http://www.modsecurity.org/download/mod_security-%{V_mod_security}.tar.gz
 Source19:     http://www.nuclearelephant.com/projects/dosevasive/mod_dosevasive.%{V_mod_dosevasive}.tar.gz
@@ -213,6 +213,7 @@ Patch0:       apache.patch
 Patch1:       apache.patch.modowa
 Patch2:       apache.patch.php
 Patch3:       http://www.hardened-php.net/hardened-php-%{V_mod_php}-%{V_mod_php_hardened}.patch.gz
+Patch4:       apache.patch.modauthmysql
 
 #   build information
 Prefix:       %{l_prefix}
@@ -403,8 +404,8 @@ AutoReqProv:  no
     }
     prog apache:mod_auth_mysql = {
         version   = %{V_mod_auth_mysql}
-        url       = http://sourceforge.net/projects/modauthmysql/
-        regex     = release_id=\d+[^\d]+(\d+)
+        url       = http://osdn.dl.sourceforge.net/modauthmysql/
+        regex     = mod_auth_mysql-(__VER__)\.tar\.gz
     }
     prog apache:mod_auth_radius = {
         version   = %{V_mod_auth_radius}
@@ -558,6 +559,7 @@ AutoReqProv:  no
 %endif
 %if "%{with_mod_auth_mysql}" == "yes"
     %setup -q -T -D -a 16
+    %{l_patch} -d mod_auth_mysql-%{V_mod_auth_mysql} -p0 <%{PATCH4}
 %endif
 %if "%{with_suphp}" == "yes"
     %setup -q -T -D -a 17
@@ -927,7 +929,7 @@ AutoReqProv:  no
 %if "%{with_mod_auth_mysql}" == "yes"
     %{l_shtool} install -c -m 644 \
         -e 's;^[ 	]*MYSQL_LIB=.*$;;' \
-        mod_auth_mysql/mod_auth_mysql.c \
+        mod_auth_mysql-%{V_mod_auth_mysql}/mod_auth_mysql.c \
         apache_%{V_apache}/src/modules/extra/
 %endif
     #   optionally prepare mod_gzip
@@ -1042,9 +1044,8 @@ AutoReqProv:  no
       esac
 %endif
 %if "%{with_mod_auth_mysql}" == "yes"
-      cflags="$cflags %{l_cppflags} -DAPACHE1"
-      ldflags="$ldflags %{l_ldflags mysql}"
-      libs="$libs -lmysqlclient"
+      cflags="$cflags -DAPACHE1 `mysql_config --cflags`"
+      libs="$libs `mysql_config --libs`"
 %endif
 %if "%{with_mod_owa}" == "yes"
       cflags="$cflags `%{l_prefix}/etc/rc --query oracle_cflags`"