Просмотр исходного кода

upgrading package: jabberd 2.0s11 -> 2.1.11

Ralf S. Engelschall 18 лет назад
Родитель
Сommit
18a605aab0
2 измененных файлов с 57 добавлено и 91 удалено
  1. 34 80
      jabberd/jabberd.patch
  2. 23 11
      jabberd/jabberd.spec

+ 34 - 80
jabberd/jabberd.patch

@@ -1,50 +1,7 @@
-Index: c2s/authreg_ldap.c
---- c2s/authreg_ldap.c.orig	2004-04-26 07:47:19 +0200
-+++ c2s/authreg_ldap.c	2004-10-18 19:57:24 +0200
-@@ -70,6 +70,24 @@
-     return ld_errno;
- }
- 
-+/** entry-point function to be called when following referrals.
-+    this forces a re-bind, since Active Directory required you to
-+    re-bind this makes it work with M$ Windows AD.
-+                  -- Juan F Arjona (jfarjona at jfarjona.com). */
-+static int rebindProc(LDAP *ld, LDAP_CONST char *url, ber_tag_t request, ber_int_t msgid, void *mdata)
-+{
-+    moddata_t data = mdata;
-+    data->ld = ld;
-+    if (ldap_simple_bind_s(data->ld, data->binddn, data->bindpw)) {
-+        log_write(data->ar->c2s->log, LOG_ERR, "ldap: bind failed(to %s): %s",
-+                  url, ldap_err2string(_ldap_get_lderrno(data->ld)));
-+        ldap_unbind_s(data->ld);
-+        data->ld = NULL;
-+        return NULL;
-+    }
-+    return LDAP_SUCCESS;
-+}
-+
- /** connect to the ldap host */
- static int _ldap_connect(moddata_t data)
- {
-@@ -151,6 +169,14 @@
- 
-     snprintf(filter, 1024, "(%s=%s)", data->uidattr, username);
- 
-+    if (ldap_set_rebind_proc(data->ld, &rebindProc,data) ) {
-+        log_write(data->ar->c2s->log, LOG_ERR, "ldap: set_rebind_proc failed: %s",
-+                  ldap_err2string(_ldap_get_lderrno(data->ld)));
-+        ldap_unbind_s(data->ld);
-+        data->ld = NULL;
-+        return NULL;
-+    }
-+
-     if(ldap_search_s(data->ld, basedn, LDAP_SCOPE_SUBTREE, filter, no_attrs, 0, &result))
-     {
-         log_write(data->ar->c2s->log, LOG_ERR, "ldap: search %s failed: %s", filter, ldap_err2string(_ldap_get_lderrno(data->ld)));
 Index: etc/c2s.xml.dist.in
---- etc/c2s.xml.dist.in.orig	2004-04-26 07:47:21 +0200
-+++ etc/c2s.xml.dist.in	2004-10-18 19:57:24 +0200
-@@ -46,18 +46,16 @@
+--- etc/c2s.xml.dist.in.orig	2007-07-19 15:18:32 +0200
++++ etc/c2s.xml.dist.in	2007-07-27 08:15:22 +0200
+@@ -51,18 +51,16 @@
    </router>
  
    <!-- Log configuration - type is "syslog", "file" or "stdout" -->
@@ -66,8 +23,8 @@ Index: etc/c2s.xml.dist.in
    </log>
  
    <!-- Local network configuration -->
-@@ -78,7 +76,7 @@
-     <!-- <id realm='company'>localhost</id> -->
+@@ -123,7 +121,7 @@
+     >localhost</id> -->
  
      <!-- IP address to bind to (default: 0.0.0.0) -->
 -    <ip>0.0.0.0</ip>
@@ -75,19 +32,19 @@ Index: etc/c2s.xml.dist.in
  
      <!-- Port to bind to, or 0 to disable unencrypted access to the
           server (default: 5222) -->
-@@ -206,7 +204,7 @@
-   <!-- Authentication/registration database configuration -->
-   <authreg>
+@@ -263,7 +261,7 @@
+     <path>@pkglibdir@</path>
+ 
      <!-- Backend module to use -->
 -    <module>mysql</module>
 +    <module>db</module>
  
-     <!-- Registration configuration -->
-     <register>
+     <!-- Available authentication mechanisms -->
+     <mechanisms>
 Index: etc/resolver.xml.dist.in
---- etc/resolver.xml.dist.in.orig	2003-10-30 00:30:06 +0100
-+++ etc/resolver.xml.dist.in	2004-10-18 19:57:24 +0200
-@@ -46,18 +46,16 @@
+--- etc/resolver.xml.dist.in.orig	2007-04-09 16:19:52 +0200
++++ etc/resolver.xml.dist.in	2007-07-27 08:15:22 +0200
+@@ -51,18 +51,16 @@
    </router>
  
    <!-- Log configuration - type is "syslog", "file" or "stdout" -->
@@ -110,8 +67,8 @@ Index: etc/resolver.xml.dist.in
  
    <!-- SRV records will be resolved in the following order. The first
 Index: etc/router.xml.dist.in
---- etc/router.xml.dist.in.orig	2003-10-23 02:43:56 +0200
-+++ etc/router.xml.dist.in	2004-10-18 19:57:24 +0200
+--- etc/router.xml.dist.in.orig	2007-04-09 16:19:52 +0200
++++ etc/router.xml.dist.in	2007-07-27 08:15:22 +0200
 @@ -9,24 +9,22 @@
    <pidfile>@localstatedir@/jabberd/pid/router.pid</pidfile>
  
@@ -142,9 +99,9 @@ Index: etc/router.xml.dist.in
      <!-- Port to bind to (default: 5347) -->
      <port>5347</port>
 Index: etc/s2s.xml.dist.in
---- etc/s2s.xml.dist.in.orig	2004-04-25 12:28:29 +0200
-+++ etc/s2s.xml.dist.in	2004-10-18 19:57:24 +0200
-@@ -56,25 +56,23 @@
+--- etc/s2s.xml.dist.in.orig	2007-04-09 16:19:52 +0200
++++ etc/s2s.xml.dist.in	2007-07-27 08:15:22 +0200
+@@ -61,25 +61,23 @@
    </router>
  
    <!-- Log configuration - type is "syslog", "file" or "stdout" -->
@@ -175,9 +132,9 @@ Index: etc/s2s.xml.dist.in
  
      <!-- Helper DNS resolver component - if this component is not
 Index: etc/sm.xml.dist.in
---- etc/sm.xml.dist.in.orig	2004-04-02 06:34:17 +0200
-+++ etc/sm.xml.dist.in	2004-10-18 19:57:24 +0200
-@@ -49,24 +49,22 @@
+--- etc/sm.xml.dist.in.orig	2007-07-20 01:39:48 +0200
++++ etc/sm.xml.dist.in	2007-07-27 08:16:56 +0200
+@@ -54,13 +54,13 @@
    </router>
  
    <!-- Log configuration - type is "syslog", "file" or "stdout" -->
@@ -193,13 +150,10 @@ Index: etc/sm.xml.dist.in
 +    <!-- <facility>local3</facility> -->
  
      <!-- If logging to file, this is the filename of the logfile -->
--    <!--
-     <file>@localstatedir@/jabberd/log/sm.log</file>
--    -->
-   </log>
+     <!--
+@@ -74,7 +74,7 @@
+     <path>@pkglibdir@</path>
  
-   <!-- Storage database configuration -->
-   <storage>
      <!-- By default, we use the MySQL driver for all storage -->
 -    <driver>mysql</driver>
 +    <driver>db</driver>
@@ -207,21 +161,21 @@ Index: etc/sm.xml.dist.in
      <!-- Its also possible to explicitly list alternate drivers for
           specific data types. -->
 Index: sm/mod_roster.c
---- sm/mod_roster.c.orig	2004-10-05 06:34:10 +0200
-+++ sm/mod_roster.c	2004-10-18 19:57:35 +0200
-@@ -570,6 +570,9 @@
-     /* We have to free old packet - Lemming's memory leak fix */
-                pkt_free(pkt);
+--- sm/mod_roster.c.orig	2007-07-20 01:39:48 +0200
++++ sm/mod_roster.c	2007-07-27 08:15:22 +0200
+@@ -628,6 +628,9 @@
+     if(user->sessions == NULL)
+         return mod_PASS;
  
 +    /* We have to free old packet - Lemming's memory leak fix */
 +    pkt_free(pkt);
 +
      /* build a new packet to push out to everyone */
      pkt = pkt_create(user->sm, "iq", "set", NULL, NULL);
-     ns = nad_add_namespace(pkt->nad, uri_ROSTER, NULL);
+     pkt_id_new(pkt);
 Index: util/util.h
---- util/util.h.orig	2004-10-05 06:27:50 +0200
-+++ util/util.h	2004-10-18 19:57:24 +0200
+--- util/util.h.orig	2007-07-20 21:23:33 +0200
++++ util/util.h	2007-07-27 08:15:22 +0200
 @@ -30,6 +30,8 @@
  #include <time.h>
  #include <errno.h>
@@ -229,5 +183,5 @@ Index: util/util.h
 +#include <sys/types.h>
 +#include <sys/socket.h>
  
- #ifdef HAVE_NETINET_IN_H
- # include <netinet/in.h>
+ #include <expat.h>
+ 

+ 23 - 11
jabberd/jabberd.spec

@@ -23,29 +23,30 @@
 ##
 
 #   package version
-%define       V_major 2.0
-%define       V_minor s11
+%define       V_major 2.1
+%define       V_minor 11
 
 #   package information
 Name:         jabberd
 Summary:      Jabber Instant Messaging Daemon
-URL:          http://jabberd.jabberstudio.org/
+URL:          http://jabberd2.xiaoka.com/
 Vendor:       Jabber Software Foundation
 Packager:     OpenPKG Foundation e.V.
 Distribution: OpenPKG Community
 Class:        PLUS
 Group:        InstantMessaging
 License:      JOSL/GPL
-Version:      %{V_major}%{V_minor}
-Release:      20061013
+Version:      %{V_major}.%{V_minor}
+Release:      20070727
 
 #   package options
+%option       with_sqlite no
 %option       with_mysql  no
 %option       with_pgsql  no
 %option       with_pam    no
 
 #   list of sources
-Source0:      http://files.jabberstudio.org/jabberd2/jabberd-%{version}.tar.gz
+Source0:      http://ftp.xiaoka.com/jabberd2/releases/jabberd-%{version}.tar.gz
 Source1:      rc.jabberd
 Patch0:       jabberd.patch
 
@@ -58,6 +59,10 @@ BuildPreReq:  pth, openssl, libidn, libiconv
 PreReq:       pth, openssl, libidn, libiconv
 BuildPreReq:  db
 PreReq:       db
+%if "%{with_sqlite}" == "yes"
+BuildPreReq:  sqlite
+PreReq:       sqlite
+%endif
 %if "%{with_mysql}" == "yes"
 BuildPreReq:  mysql
 PreReq:       mysql
@@ -83,8 +88,8 @@ AutoReqProv:  no
 %track
     prog jabberd = {
         version   = %{version}
-        url       = http://jabberstudio.org/projects/jabberd2/releases/
-        regex     = jabberd-(\d+\.\d+(\.\d+|s\d+))\.tar\.gz
+        url       = http://ftp.xiaoka.com/jabberd2/releases/
+        regex     = jabberd-(\d+\.\d+(\.\d+)*)\.tar\.gz
     }
 
 %prep
@@ -115,11 +120,17 @@ AutoReqProv:  no
 %endif
     ./configure \
         --prefix=%{l_prefix} \
+        --sysconfdir=%{l_prefix}/etc/jabberd \
         --enable-ssl \
         --enable-idn \
         --enable-fs \
         --enable-db \
         --enable-pipe \
+%if "%{with_sqlite}" == "yes"
+        --enable-sqlite \
+%else
+        --disable-sqlite \
+%endif
 %if "%{with_mysql}" == "yes"
         --enable-mysql \
 %else
@@ -136,7 +147,7 @@ AutoReqProv:  no
         --disable-pam \
 %endif
         --enable-static \
-        --disable-shared
+        --enable-shared
 
     #   build program
     %{l_make} %{l_mflags}
@@ -157,8 +168,9 @@ AutoReqProv:  no
     %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
 
     #   remove unnecessary files
-    rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/jabberd/*dist
-    rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/jabberd/templates/*dist
+    rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/jabberd/*.dist
+    rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/jabberd/templates/*.dist
+    rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/jabberd/*.a
 
     #   install run-command script
     %{l_shtool} install -c -m 755 %{l_value -s -a} \