OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src openpkg-web          Date:   28-Jul-2003 20:47:18
  Branch: HEAD                             Handle: 2003072819471404

  Modified files:
    openpkg-src/dnstracer   dnstracer.patch dnstracer.spec
    openpkg-web             news.txt

  Log:
    fix NOIPV6 support and use it under Solaris

  Summary:
    Revision    Changes     Path
    1.2         +46 -6      openpkg-src/dnstracer/dnstracer.patch
    1.20        +5  -6      openpkg-src/dnstracer/dnstracer.spec
    1.5877      +1  -0      openpkg-web/news.txt
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/dnstracer/dnstracer.patch
  ============================================================================
  $ cvs diff -u -r1.1 -r1.2 dnstracer.patch
  --- openpkg-src/dnstracer/dnstracer.patch     22 Jul 2003 08:20:05 -0000      1.1
  +++ openpkg-src/dnstracer/dnstracer.patch     28 Jul 2003 18:47:18 -0000      1.2
  @@ -1,10 +1,50 @@
  ---- dnstracer.c.dist 2003-06-12 21:01:02.000000000 +0200
  -+++ dnstracer.c      2003-06-12 21:10:38.000000000 +0200
  -@@ -1246,7 +1246,11 @@
  +--- dnstracer.c      2003-02-14 11:04:03.000000000 +0100
  ++++ dnstracer.c      2003-07-28 20:40:03.000000000 +0200
  +@@ -603,7 +603,11 @@
  +                                 get_resource(rr->type,session,rr->data,0));
  + }
  + 
  ++#ifdef NOIPV6
  ++void dump_data(struct sockaddr_in *dest4,void *dest6,struct dnssession *session) {
  ++#else
  + void dump_data(struct sockaddr_in *dest4,struct sockaddr_in6 *dest6,struct 
dnssession *session) {
  ++#endif
  +     struct dnsrr *answerrr;
  +     struct dnsrr *authorityrr;
  +     struct dnsrr *additionalrr;
  +@@ -719,6 +723,7 @@
  +     exit(1);
  +     }
  + 
  ++#if defined(AI_NUMERICHOST) && defined(EAI_NODATA)
  +     if (global_source_address!=NULL) {
  +     struct addrinfo hints,*src_res;
  +     int error;
  +@@ -745,6 +750,7 @@
  +         exit(1);
  +     }
  +     }
  ++#endif
  + 
  +     return s;
  + }
  +@@ -1084,7 +1090,11 @@
  +     // don't have to worry about packets received from previous sessions.
  +     //
  +     session=(struct dnssession *)calloc(1,sizeof(struct dnssession));
  ++#ifdef NOIPV6
  ++    session->socket=create_socket(AF_INET);
  ++#else
  +     session->socket=create_socket(ipv6?AF_INET6:AF_INET);
  ++#endif
  +     session->ipv6=ipv6;
  +     session->server=strdup(server_ip);
  +     session->host=strdup(host);
  +@@ -1246,7 +1256,11 @@
                    struct hostent *h;
                    char **addr_list=NULL;
    
  -+#if defined(HAVE_GETHOSTBYNAME2)
  ++#ifndef NOIPV6
                    h=gethostbyname2(nextserver_name,ip==0?AF_INET:AF_INET6);
   +#else
   +                h=gethostbyname(nextserver_name);
  @@ -12,11 +52,11 @@
                    if (h==NULL) continue;
    
                    //
  -@@ -1480,8 +1484,12 @@
  +@@ -1480,8 +1494,12 @@
    
        {
        struct hostent *h;
  -+#if defined(HAVE_GETHOSTBYNAME2)
  ++#ifndef NOIPV6
        if (((h=gethostbyname2(server_name,AF_INET6))==NULL) &&
            ((h=gethostbyname2(server_name,AF_INET))==NULL)) {
   +#else
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/dnstracer/dnstracer.spec
  ============================================================================
  $ cvs diff -u -r1.19 -r1.20 dnstracer.spec
  --- openpkg-src/dnstracer/dnstracer.spec      22 Jul 2003 08:20:05 -0000      1.19
  +++ openpkg-src/dnstracer/dnstracer.spec      28 Jul 2003 18:47:18 -0000      1.20
  @@ -33,7 +33,7 @@
   Group:        DNS
   License:      BSD
   Version:      1.7
  -Release:      20030722
  +Release:      20030728
   
   #   list of sources
   Source0:      http://www.mavetju.org/download/dnstracer-%{version}.tar.gz
  @@ -57,12 +57,10 @@
       %patch -p0
   
   %build
  -    #   enable platform-specific patch
  +    opts=""
       case "%{l_target}" in
  -    solaris*) defs=""                      ;;
  -    *)        defs="-DHAVE_GETHOSTBYNAME2" ;;
  +        *-solaris* ) opts="--disable-ipv6" ;;
       esac
  -
       ACLOCAL=true \
       AUTOCONF=true \
       AUTOMAKE=true \
  @@ -70,7 +68,8 @@
       CC="%{l_cc}" \
       CFLAGS="%{l_cflags -O}" \
       ./configure \
  -        --prefix=%{l_prefix}
  +        --prefix=%{l_prefix} \
  +        $opts
       %{l_make} %{l_mflags -O}
   
   %install
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-web/news.txt
  ============================================================================
  $ cvs diff -u -r1.5876 -r1.5877 news.txt
  --- openpkg-web/news.txt      28 Jul 2003 18:28:59 -0000      1.5876
  +++ openpkg-web/news.txt      28 Jul 2003 18:47:14 -0000      1.5877
  @@ -1,3 +1,4 @@
  +28-Jul-2003: Upgraded package: P<dnstracer-1.7-20030728>
   28-Jul-2003: Upgraded package: P<hexer-0.1.4c-20030728>
   28-Jul-2003: Upgraded package: P<icon-9.4.2-20030728>
   28-Jul-2003: Upgraded package: P<openpkg-tool-20030728-20030728>
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to