]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm-no-neon.patch
- more
[packages/rpm.git] / rpm-no-neon.patch
index e9f6559c3ba4d38ca9011b3999a2a247f51c0e77..27671e3721fd051b0491a37c677201b8fb019119 100644 (file)
@@ -1,81 +1,99 @@
-diff -ur rpm-4.4.1/configure.ac rpm-4.4.1-no-neon/configure.ac
---- rpm-4.4.1/configure.ac     2005-06-19 20:37:35.675035608 +0200
-+++ rpm-4.4.1-no-neon/configure.ac     2005-06-19 20:34:07.022755576 +0200
-@@ -448,26 +448,6 @@
- WITH_NEON_SUBDIR=
- WITH_NEON_INCLUDE=
- WITH_NEON_LIB=
+--- rpm-4.4.7.org/configure.ac 2006-10-17 22:12:03.110624000 +0200
++++ rpm-4.4.7/configure.ac     2006-10-17 22:12:43.117124500 +0200
+@@ -530,33 +530,6 @@
+ AC_SUBST(WITH_BEECRYPT_INCLUDE)
+ AC_SUBST(WITH_BEECRYPT_LIB)
+-#=================
+-# Check for neon library. Prefer external, otherwise internal.
+-WITH_NEON_SUBDIR=
+-WITH_NEON_INCLUDE=
+-WITH_NEON_LIB=
 -AC_CHECK_HEADER([neon/ne_session.h], [
--      AC_CHECK_LIB(neon, ne_session_create, [
--          AC_DEFINE(HAVE_LIBNEON, 1, [Define to 1 if you have the `neon' library (-lneon).])
--          AC_CHECK_LIB(neon, ne_get_response_header, [
--              AC_DEFINE(HAVE_NEON_NE_GET_RESPONSE_HEADER, 1, [Define to 1 if you have ne_get_response_header() in libneon.])
--              ])
--          AC_CHECK_LIB(neon, ne_send_request_chunk, [
--              AC_DEFINE(HAVE_NEON_NE_SEND_REQUEST_CHUNK, 1, [Define to 1 if you have ne_send_request_chunk() in libneon.])
--              ])
--          WITH_NEON_INCLUDE="-I${includedir}/neon"
--          WITH_NEON_LIB="-lneon"
--      ])
--    ], [
--      if test -d neon ; then
--          AC_DEFINE(HAVE_LIBNEON, 1, [Define to 1 if you have the `neon' library (-lneon).])
--          WITH_NEON_SUBDIR=neon
--          WITH_NEON_INCLUDE="-I\${top_srcdir}/${WITH_NEON_SUBDIR}/src"
--          WITH_NEON_LIB="\${top_builddir}/${WITH_NEON_SUBDIR}/src/libneon.la"
--      fi
+-  AC_CHECK_LIB(neon, ne_session_create, [
+-    AC_DEFINE(HAVE_LIBNEON, 1, [Define to 1 if you have the 'neon' library (-lneon).])
+-    AC_CHECK_LIB(neon, ne_get_response_header, [
+-      AC_DEFINE(HAVE_NEON_NE_GET_RESPONSE_HEADER, 1, [Define to 1 if you have ne_get_response_header() in libneon.])
+-    ])
+-    AC_CHECK_LIB(neon, ne_send_request_chunk, [
+-      AC_DEFINE(HAVE_NEON_NE_SEND_REQUEST_CHUNK, 1, [Define to 1 if you have ne_send_request_chunk() in libneon.])
+-    ])
+-    WITH_NEON_INCLUDE="-I${includedir}/neon"
+-    WITH_NEON_LIB="-lneon"
+-  ])
+-],[
+-  if test -d neon ; then
+-    AC_DEFINE(HAVE_LIBNEON, 1, [Define to 1 if you have the 'neon' library (-lneon).])
+-# XXX HAVE_NEON_NE_GET_RESPONSE_HEADER assumes libneon-0.25 devel internal
+-    AC_DEFINE(HAVE_NEON_NE_GET_RESPONSE_HEADER, 1, [Define to 1 if you have ne_get_response_header() in libneon.])
+-    WITH_NEON_SUBDIR=neon
+-    WITH_NEON_INCLUDE="-I\${top_srcdir}/${WITH_NEON_SUBDIR}/src"
+-    WITH_NEON_LIB="\${top_builddir}/${WITH_NEON_SUBDIR}/src/libneon.la"
+-  fi
 -])
  AC_SUBST(WITH_NEON_SUBDIR)
  AC_SUBST(WITH_NEON_INCLUDE)
  AC_SUBST(WITH_NEON_LIB)
-diff -ur rpm-4.4.1/rpmio/Makefile.am rpm-4.4.1-no-neon/rpmio/Makefile.am
---- rpm-4.4.1/rpmio/Makefile.am        2005-06-19 20:37:35.322089264 +0200
-+++ rpm-4.4.1-no-neon/rpmio/Makefile.am        2005-06-19 20:34:06.996759528 +0200
-@@ -37,7 +37,7 @@
-       @WITH_LUA_LIB@ \
-       $(top_builddir)/file/src/libmagic.la \
-       @WITH_ZLIB_LIB@ \
--      -lneon -lpthread @HOME_ETC_LIB@
-+      -lpthread @HOME_ETC_LIB@
- librpmio_la_LIBADD = # $(BEECRYPTLOBJS)
- librpmio_la_DEPENDENCIES = # .created
-diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
---- rpm-4.4.1/rpmio/rpmdav.c   2005-01-17 19:46:27.000000000 +0100
-+++ rpm-4.4.1-no-neon/rpmio/rpmdav.c   2005-06-19 20:35:12.340825720 +0200
-@@ -9,17 +9,6 @@
+--- rpm-4.4.8/rpmio/rpmdav.c.orig      2007-02-20 00:51:07.000000000 +0100
++++ rpm-4.4.8/rpmio/rpmdav.c   2007-04-08 20:07:07.814412143 +0200
+@@ -9,31 +9,6 @@
  #include <pthread.h>
  #endif
  
--#include <neon/ne_alloc.h>
--#include <neon/ne_auth.h>
--#include <neon/ne_basic.h>
--#include <neon/ne_dates.h>
--#include <neon/ne_locks.h>
--#include <neon/ne_props.h>
--#include <neon/ne_request.h>
--#include <neon/ne_socket.h>
--#include <neon/ne_string.h>
--#include <neon/ne_utils.h>
+-#include "ne_alloc.h"
+-#include "ne_auth.h"
+-#include "ne_basic.h"
+-#include "ne_dates.h"
+-#include "ne_locks.h"
+-
+-#define       NEONBLOWSCHUNKS
+-#ifndef       NEONBLOWSCHUNKS
+-/* HACK: include ne_private.h to access sess->socket for now. */
+-#include "../neon/src/ne_private.h"
+-#endif
+-
+-#include "ne_props.h"
+-#include "ne_request.h"
+-#include "ne_socket.h"
+-#include "ne_string.h"
+-#include "ne_utils.h"
+-
+-/* XXX API changes for neon-0.26.0 */
+-#if !defined(NE_FREE)
+-#define       ne_set_persist(_sess, _flag)
+-#define       ne_propfind_set_private(_pfh, _create_item, NULL) \
+-      ne_propfind_set_private(_pfh, _create_item, NULL, NULL)
+-#endif
 -
  #include <rpmio_internal.h>
  
  #define _RPMDAV_INTERNAL
-@@ -55,1304 +44,6 @@
+@@ -69,1439 +44,6 @@
  }
  
  /* =============================================================== */
--static int davFree(urlinfo u)
+-int davFree(urlinfo u)
 -      /*@globals internalState @*/
 -      /*@modifies u, internalState @*/
 -{
--    if (u != NULL && u->sess != NULL) {
--      u->capabilities = _free(u->capabilities);
--      if (u->lockstore != NULL)
--          ne_lockstore_destroy(u->lockstore);
--      u->lockstore = NULL;
--      ne_session_destroy(u->sess);
--      u->sess = NULL;
+-    if (u != NULL) {
+-      if (u->sess != NULL) {
+-          ne_session_destroy(u->sess);
+-          u->sess = NULL;
+-      }
+-      switch (u->urltype) {
+-      default:
+-          /*@notreached@*/ break;
+-      case URL_IS_HTTPS:
+-      case URL_IS_HTTP:
+-      case URL_IS_HKP:
+-          u->capabilities = _free(u->capabilities);
+-          if (u->lockstore != NULL)
+-              ne_lockstore_destroy(u->lockstore);
+-          u->lockstore = NULL;
+-          ne_sock_exit();
+-          break;
+-      }
 -    }
 -    return 0;
 -}
@@ -275,18 +293,36 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -    /* HACK: where should server capabilities be read? */
 -    (void) urlPath(u->url, &path);
 -    /* HACK: perhaps capture Allow: tag, look for PUT permitted. */
+-    /* XXX [hdr] Allow: GET,HEAD,POST,OPTIONS,TRACE */
 -    rc = ne_options(u->sess, path, u->capabilities);
 -    switch (rc) {
 -    case NE_OK:
--      break;
+-    { ne_server_capabilities *cap = u->capabilities;
+-      if (cap->dav_class1)
+-          u->allow |= RPMURL_SERVER_HASDAVCLASS1;
+-      else
+-          u->allow &= ~RPMURL_SERVER_HASDAVCLASS1;
+-      if (cap->dav_class2)
+-          u->allow |= RPMURL_SERVER_HASDAVCLASS2;
+-      else
+-          u->allow &= ~RPMURL_SERVER_HASDAVCLASS2;
+-      if (cap->dav_executable)
+-          u->allow |= RPMURL_SERVER_HASDAVEXEC;
+-      else
+-          u->allow &= ~RPMURL_SERVER_HASDAVEXEC;
+-    } break;
 -    case NE_ERROR:
 -      /* HACK: "301 Moved Permanently" on empty subdir. */
 -      if (!strncmp("301 ", ne_get_error(u->sess), sizeof("301 ")-1))
 -          break;
--      /*@fallthrough@*/
--    case NE_CONNECT:
+-      errno = EIO;            /* HACK: more precise errno. */
+-      goto bottom;
 -    case NE_LOOKUP:
+-      errno = ENOENT;         /* HACK: errno same as non-existent path. */
+-      goto bottom;
+-    case NE_CONNECT:          /* HACK: errno set already? */
 -    default:
+-bottom:
 -if (_dav_debug)
 -fprintf(stderr, "*** Connect to %s:%d failed(%d):\n\t%s\n",
 -                 u->host, u->port, rc, ne_get_error(u->sess));
@@ -355,7 +391,7 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -      /* XXX check that neon is ssl enabled. */
 -      if (!strcasecmp(u->scheme, "https"))
 -          ne_ssl_set_verify(u->sess, davVerifyCert, (char *)u->host);
--                                                                                
+-
 -      ne_set_session_private(u->sess, "urlinfo", u);
 -
 -      ne_hook_destroy_session(u->sess, davDestroySession, u);
@@ -374,7 +410,7 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -
 -exit:
 -/*@-boundswrite@*/
--    if (rc == 0 && uret != NULL)
+-    if (uret != NULL)
 -      *uret = urlLink(u, __FUNCTION__);
 -/*@=boundswrite@*/
 -    u = urlFree(u, "urlSplit (davInit)");
@@ -389,8 +425,9 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -    resr_reference,
 -    resr_error
 -};
--                                                                                
+-
 -struct fetch_resource_s {
+-/*@dependent@*/
 -    struct fetch_resource_s *next;
 -    char *uri;
 -/*@unused@*/
@@ -408,8 +445,8 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -static void *fetch_destroy_item(/*@only@*/ struct fetch_resource_s *res)
 -      /*@modifies res @*/
 -{
--    NE_FREE(res->uri);
--    NE_FREE(res->error_reason);
+-    ne_free(res->uri);
+-    ne_free(res->error_reason);
 -    res = _free(res);
 -    return NULL;
 -}
@@ -439,7 +476,7 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -
 -/* =============================================================== */
 -struct fetch_context_s {
--/*@relnull@*/
+-/*@relnull@*/ /*@dependent@*/
 -    struct fetch_resource_s **resrock;
 -    const char *uri;
 -    unsigned int include_target; /* Include resource at href */
@@ -448,6 +485,8 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -    int ac;
 -    int nalloced;
 -    ARGV_t av;
+-/*@null@*/ /*@shared@*/
+-    struct stat *st;
 -    mode_t * modes;
 -    size_t * sizes;
 -    time_t * mtimes;
@@ -475,7 +514,7 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -}
 -
 -/*@null@*/
--static void *fetch_create_context(const char *uri)
+-static void *fetch_create_context(const char *uri, /*@null@*/ struct stat *st)
 -      /*@globals internalState @*/
 -      /*@modifies internalState @*/
 -{
@@ -490,6 +529,8 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -    ctx = ne_calloc(sizeof(*ctx));
 -    ctx->uri = xstrdup(uri);
 -    ctx->u = urlLink(u, __FUNCTION__);
+-    if ((ctx->st = st) != NULL)
+-      memset(ctx->st, 0, sizeof(*ctx->st));
 -    return ctx;
 -}
 -
@@ -513,7 +554,7 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -    { "DAV:", "collection", ELM_collection }
 -};
 -
--static int fetch_startelm(void *userdata, int parent, 
+-static int fetch_startelm(void *userdata, int parent,
 -              const char *nspace, const char *name,
 -              /*@unused@*/ const char **atts)
 -      /*@*/
@@ -523,7 +564,7 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -    int state = ne_xml_mapid(fetch_idmap, NE_XML_MAPLEN(fetch_idmap),
 -                             nspace, name);
 -
--    if (r == NULL || 
+-    if (r == NULL ||
 -        !((parent == NE_207_STATE_PROP && state == ELM_resourcetype) ||
 -          (parent == ELM_resourcetype && state == ELM_collection)))
 -        return NE_XML_DECLINE;
@@ -535,7 +576,7 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -    return state;
 -}
 -
--static int fetch_compare(const struct fetch_resource_s *r1, 
+-static int fetch_compare(const struct fetch_resource_s *r1,
 -                          const struct fetch_resource_s *r2)
 -      /*@*/
 -{
@@ -559,7 +600,7 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -    }
 -}
 -
--static void fetch_results(void *userdata, const char *uri,
+-static void fetch_results(void *userdata, void *uarg,
 -                  const ne_prop_result_set *set)
 -      /*@*/
 -{
@@ -570,7 +611,13 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -    const ne_status *status = NULL;
 -    const char * path = NULL;
 -
+-#if !defined(NE_FREE)
+-    const ne_uri * uri = uarg;
+-    (void) urlPath(uri->path, &path);
+-#else
+-    const char * uri = uarg;
 -    (void) urlPath(uri, &path);
+-#endif
 -    if (path == NULL)
 -      return;
 -
@@ -578,26 +625,28 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -
 -if (_dav_debug < 0)
 -fprintf(stderr, "==> %s in uri %s\n", path, ctx->uri);
--    
+-
 -    if (ne_path_compare(ctx->uri, path) == 0 && !ctx->include_target) {
 -      /* This is the target URI */
 -if (_dav_debug < 0)
 -fprintf(stderr, "==> %s skipping target resource.\n", path);
 -      /* Free the private structure. */
+-/*@-dependenttrans -exposetrans@*/
 -      free(newres);
+-/*@=dependenttrans =exposetrans@*/
 -      return;
 -    }
 -
 -    newres->uri = ne_strdup(path);
 -
 -/*@-boundsread@*/
--    clength = ne_propset_value(set, &fetch_props[0]);    
+-    clength = ne_propset_value(set, &fetch_props[0]);
 -    modtime = ne_propset_value(set, &fetch_props[1]);
 -    isexec = ne_propset_value(set, &fetch_props[2]);
 -    checkin = ne_propset_value(set, &fetch_props[4]);
 -    checkout = ne_propset_value(set, &fetch_props[5]);
 -/*@=boundsread@*/
--    
+-
 -/*@-branchstate@*/
 -    if (clength == NULL)
 -      status = ne_propset_status(set, &fetch_props[0]);
@@ -649,7 +698,7 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -      newres->is_vcr = 0;
 -    }
 -
--    for (current = *ctx->resrock, previous = NULL; current != NULL; 
+-    for (current = *ctx->resrock, previous = NULL; current != NULL;
 -      previous = current, current = current->next)
 -    {
 -      if (fetch_compare(current, newres) >= 0) {
@@ -659,9 +708,9 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -    if (previous) {
 -      previous->next = newres;
 -    } else {
--/*@-boundswrite@*/
+-/*@-boundswrite -dependenttrans @*/
 -      *ctx->resrock = newres;
--/*@=boundswrite@*/
+-/*@=boundswrite =dependenttrans @*/
 -    }
 -    newres->next = current;
 -}
@@ -684,12 +733,12 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -    (void) urlPath(u->url, &path);
 -    pfh = ne_propfind_create(u->sess, ctx->uri, depth);
 -
--    /* HACK: need to set u->httpHasRange here. */
+-    /* HACK: need to set RPMURL_SERVER_HASRANGE in u->allow here. */
 -
 -    ctx->resrock = resrock;
 -    ctx->include_target = include_target;
 -
--    ne_xml_push_handler(ne_propfind_get_parser(pfh), 
+-    ne_xml_push_handler(ne_propfind_get_parser(pfh),
 -                        fetch_startelm, NULL, NULL, pfh);
 -
 -    ne_propfind_set_private(pfh, fetch_create_item, NULL);
@@ -727,7 +776,7 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -      xx = argvAdd(&ctx->av, val);
 -if (_dav_debug < 0)
 -fprintf(stderr, "*** argvAdd(%p,\"%s\")\n", &ctx->av, val);
--      NE_FREE(val);
+-      ne_free(val);
 -
 -      while (ctx->ac >= ctx->nalloced) {
 -          if (ctx->nalloced <= 0)
@@ -764,7 +813,70 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -      current = fetch_destroy_item(current);
 -    }
 -    ctx->resrock = NULL;      /* HACK: avoid leaving stack reference. */
+-    /* HACK realloc to truncate modes/sizes/mtimes */
+-
+-    return rc;
+-}
+-
+-/* HACK this should be rewritten to use davReq/davResp w callbacks. */
+-static int davHEAD(urlinfo u, struct stat *st) 
+-      /*@modifies *st @*/
+-{
+-    ne_request *req;
+-    const char *htag;
+-    const char *value = NULL;
+-    int rc;
+-
+-    st->st_mode = S_IFREG;
+-    st->st_blksize = 4 * 1024;        /* HACK correct for linux ext */
+-    st->st_size = -1;
+-    st->st_atime = -1;
+-    st->st_mtime = -1;
+-    st->st_ctime = -1;
+-
+-    req = ne_request_create(u->sess, "HEAD", u->url);
+-
+-    rc = ne_request_dispatch(req);
+-    switch (rc) {
+-    default:
+-      goto exit;
+-      /*@notreached@*/
+-    case NE_OK:
+-      if (ne_get_status(req)->klass != 2) {
+-          rc = NE_ERROR;
+-          goto exit;
+-      }
+-      break;
+-    }
+-
+-#ifdef        NOTYET
+-    htag = "ETag";
+-    value = ne_get_response_header(req, htag); 
+-    if (value) {
+-      /* inode-size-mtime */
+-    }
+-#endif
+-
+-    htag = "Content-Length";
+-#if defined(HAVE_NEON_NE_GET_RESPONSE_HEADER)
+-    value = ne_get_response_header(req, htag); 
+-#endif
+-    if (value) {
+-      st->st_size = strtoll(value, NULL, 10);
+-      st->st_blocks = (st->st_size + 511)/512;
+-    }
 -
+-    htag = "Last-Modified";
+-#if defined(HAVE_NEON_NE_GET_RESPONSE_HEADER)
+-    value = ne_get_response_header(req, htag); 
+-#endif
+-    if (value) {
+-      st->st_mtime = ne_httpdate_parse(value);
+-      st->st_atime = st->st_ctime = st->st_mtime;     /* HACK */
+-    }
+-
+-exit:
+-    ne_request_destroy(req);
 -    return rc;
 -}
 -
@@ -780,11 +892,19 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -    if (rc || u == NULL)
 -      goto exit;
 -
--    rc = davFetch(u, ctx);
+-/* HACK do PROPFIND through davFetch iff enabled, otherwise HEAD Content-length/ETag/Last-Modified */
+-    if (u->allow & RPMURL_SERVER_HASDAV)
+-         rc = davFetch(u, ctx);       /* use PROPFIND to get contentLength */
+-    else
+-         rc = davHEAD(u, ctx->st);    /* use HEAD to get contentLength */
+-
 -    switch (rc) {
 -    case NE_OK:
 -        break;
 -    case NE_ERROR:
+-      /* HACK: "405 Method Not Allowed" for PROPFIND on non-DAV servers. */
+-      /* XXX #206066 OPTIONS is ok, but PROPFIND from Stat() fails. */
+-      /* rpm -qp --rpmiodebug --davdebug http://people.freedesktop.org/~sandmann/metacity-2.16.0-2.fc6/i386/metacity-2.16.0-2.fc6.i386.rpm */
 -      /* HACK: "301 Moved Permanently" on empty subdir. */
 -      if (!strncmp("301 ", ne_get_error(u->sess), sizeof("301 ")-1))
 -          break;
@@ -797,8 +917,7 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -    }
 -
 -exit:
--    if (rc)
--      xx = davFree(u);
+-    xx = davFree(u);
 -    return rc;
 -}
 -
@@ -839,50 +958,55 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -}
 -#endif
 -
+-/*@-mustmod@*/
 -static void davAcceptRanges(void * userdata, /*@null@*/ const char * value)
 -      /*@modifies userdata @*/
 -{
 -    urlinfo u = userdata;
 -
--    if (!(u && value)) return;
+-    if (!(u != NULL && value != NULL)) return;
 -if (_dav_debug < 0)
 -fprintf(stderr, "*** u %p Accept-Ranges: %s\n", u, value);
 -    if (!strcmp(value, "bytes"))
--      u->httpHasRange = 1;
+-      u->allow |= RPMURL_SERVER_HASRANGE;
 -    if (!strcmp(value, "none"))
--      u->httpHasRange = 0;
+-      u->allow &= ~RPMURL_SERVER_HASRANGE;
 -}
+-/*@=mustmod@*/
 -
 -#if !defined(HAVE_NEON_NE_GET_RESPONSE_HEADER)
 -static void davAllHeaders(void * userdata, const char * value)
 -{
 -    FD_t ctrl = userdata;
 -
--    if (!(ctrl && value)) return;
+-    if (!(ctrl != NULL && value != NULL)) return;
 -if (_dav_debug)
 -fprintf(stderr, "<- %s\n", value);
 -}
 -#endif
 -
+-/*@-mustmod@*/
 -static void davContentLength(void * userdata, /*@null@*/ const char * value)
 -      /*@modifies userdata @*/
 -{
 -    FD_t ctrl = userdata;
 -
--    if (!(ctrl && value)) return;
+-    if (!(ctrl != NULL && value != NULL)) return;
 -if (_dav_debug < 0)
 -fprintf(stderr, "*** fd %p Content-Length: %s\n", ctrl, value);
 -/*@-unrecog@*/
 -   ctrl->contentLength = strtoll(value, NULL, 10);
 -/*@=unrecog@*/
 -}
+-/*@=mustmod@*/
 -
+-/*@-mustmod@*/
 -static void davConnection(void * userdata, /*@null@*/ const char * value)
 -      /*@modifies userdata @*/
 -{
 -    FD_t ctrl = userdata;
 -
--    if (!(ctrl && value)) return;
+-    if (!(ctrl != NULL && value != NULL)) return;
 -if (_dav_debug < 0)
 -fprintf(stderr, "*** fd %p Connection: %s\n", ctrl, value);
 -    if (!strcasecmp(value, "close"))
@@ -890,6 +1014,7 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -    else if (!strcasecmp(value, "Keep-Alive"))
 -      ctrl->persist = 1;
 -}
+-/*@=mustmod@*/
 -
 -/*@-mustmod@*/ /* HACK: stash error in *str. */
 -int davResp(urlinfo u, FD_t ctrl, /*@unused@*/ char *const * str)
@@ -946,7 +1071,7 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -#endif
 -
 -    if (!strcmp(httpCmd, "PUT")) {
--#ifdef        NOTYET          /* XXX HACK no wr_chunked until libneon supports */
+-#if defined(HAVE_NEON_NE_SEND_REQUEST_CHUNK)
 -      ctrl->wr_chunked = 1;
 -      ne_add_request_header(ctrl->req, "Transfer-Encoding", "chunked");
 -      ne_set_request_chunked(ctrl->req, 1);
@@ -1033,7 +1158,9 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -      fd = fdNew("grab ctrl (davOpen)");
 -
 -    if (fd) {
+-      fdSetOpen(fd, url, flags, mode);
 -      fdSetIo(fd, ufdio);
+-
 -      fd->ftpFileDoneNeeded = 0;
 -      fd->rd_timeoutsecs = httpTimeoutSecs;
 -      fd->contentLength = fd->bytesRemain = -1;
@@ -1064,7 +1191,7 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -    rc = ne_read_response_block(fd->req, buf, count);
 -
 -if (_dav_debug < 0) {
--fprintf(stderr, "*** davRead(%p,%p,0x%x) rc 0x%x\n", cookie, buf, count, (unsigned)rc);
+-fprintf(stderr, "*** davRead(%p,%p,0x%x) rc 0x%x\n", cookie, buf, (unsigned)count, (unsigned)rc);
 -#ifdef        DYING
 -hexdump(buf, rc);
 -#endif
@@ -1075,29 +1202,40 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -
 -ssize_t davWrite(void * cookie, const char * buf, size_t count)
 -{
--#ifdef        NOTYET          /* XXX HACK no wr_chunked until libneon supports */
 -    FD_t fd = cookie;
 -    ssize_t rc;
 -    int xx;
 -
+-#if !defined(NEONBLOWSCHUNKS)
+-    ne_session * sess;
+-
+-assert(fd->req != NULL);
+-    sess = ne_get_session(fd->req);
+-assert(sess != NULL);
+-
+-    /* HACK: include ne_private.h to access sess->socket for now. */
+-    xx = ne_sock_fullwrite(sess->socket, buf, count);
+-#else
+-#if defined(HAVE_NEON_NE_SEND_REQUEST_CHUNK) || defined(__LCLINT__)
 -assert(fd->req != NULL);
 -    xx = ne_send_request_chunk(fd->req, buf, count);
+-#else
+-    errno = EIO;       /* HACK */
+-    return -1;
+-#endif
+-#endif
 -
 -    /* HACK: stupid error impedence matching. */
 -    rc = (xx == 0 ? count : -1);
 -
 -if (_dav_debug < 0)
--fprintf(stderr, "*** davWrite(%p,%p,0x%x) rc 0x%x\n", cookie, buf, count, rc);
+-fprintf(stderr, "*** davWrite(%p,%p,0x%x) rc 0x%x\n", cookie, buf, (unsigned)count, (unsigned)rc);
 -#ifdef        DYING
 -if (count > 0)
 -hexdump(buf, count);
 -#endif
 -
 -    return rc;
--#else
--    errno = EIO;      /* HACK */
--    return -1;
--#endif
 -}
 -
 -int davSeek(void * cookie, /*@unused@*/ _libio_pos_t pos, int whence)
@@ -1269,8 +1407,9 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -    int rc = -1;
 -
 -/* HACK: neon really wants collections with trailing '/' */
--    ctx = fetch_create_context(path);
+-    ctx = fetch_create_context(path, st);
 -    if (ctx == NULL) {
+-fprintf(stderr, "==> %s fetch_create_context ctx %p\n", __FUNCTION__, ctx);
 -/* HACK: errno = ??? */
 -      goto exit;
 -    }
@@ -1280,10 +1419,11 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -      goto exit;
 -    }
 -
--    memset(st, 0, sizeof(*st));
--    st->st_mode = ctx->modes[0];
--    st->st_size = ctx->sizes[0];
--    st->st_mtime = ctx->mtimes[0];
+-    if (st->st_mode == 0)
+-      st->st_mode = (ctx->ac > 1 ? S_IFDIR : S_IFREG);
+-    st->st_size = (ctx->sizes ? ctx->sizes[0] : st->st_size);
+-    st->st_mtime = (ctx->mtimes ? ctx->mtimes[0] : st->st_mtime);
+-    st->st_atime = st->st_ctime = st->st_mtime;       /* HACK */
 -    if (S_ISDIR(st->st_mode)) {
 -      st->st_nlink = 2;
 -      st->st_mode |= 0755;
@@ -1291,14 +1431,15 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -    if (S_ISREG(st->st_mode)) {
 -      st->st_nlink = 1;
 -      st->st_mode |= 0644;
--    } 
+-    }
 -
 -    /* XXX fts(3) needs/uses st_ino, make something up for now. */
 -    if (st->st_ino == 0)
 -      st->st_ino = dav_st_ino++;
+-
+-exit:
 -if (_dav_debug < 0)
 -fprintf(stderr, "*** davStat(%s) rc %d\n%s", path, rc, statstr(st, buf));
--exit:
 -    ctx = fetch_destroy_context(ctx);
 -    return rc;
 -}
@@ -1314,7 +1455,7 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -    int rc = -1;
 -
 -/* HACK: neon really wants collections with trailing '/' */
--    ctx = fetch_create_context(path);
+-    ctx = fetch_create_context(path, st);
 -    if (ctx == NULL) {
 -/* HACK: errno = ??? */
 -      goto exit;
@@ -1325,10 +1466,11 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -      goto exit;
 -    }
 -
--    memset(st, 0, sizeof(*st));
--    st->st_mode = ctx->modes[0];
--    st->st_size = ctx->sizes[0];
--    st->st_mtime = ctx->mtimes[0];
+-    if (st->st_mode == 0)
+-      st->st_mode = (ctx->ac > 1 ? S_IFDIR : S_IFREG);
+-    st->st_size = (ctx->sizes ? ctx->sizes[0] : st->st_size);
+-    st->st_mtime = (ctx->mtimes ? ctx->mtimes[0] : st->st_mtime);
+-    st->st_atime = st->st_ctime = st->st_mtime;       /* HACK */
 -    if (S_ISDIR(st->st_mode)) {
 -      st->st_nlink = 2;
 -      st->st_mode |= 0755;
@@ -1336,7 +1478,7 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -    if (S_ISREG(st->st_mode)) {
 -      st->st_nlink = 1;
 -      st->st_mode |= 0644;
--    } 
+-    }
 -
 -    /* XXX fts(3) needs/uses st_ino, make something up for now. */
 -    if (st->st_ino == 0)
@@ -1366,11 +1508,10 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
  /*@unchecked@*/
  int avmagicdir = 0x3607113;
  
-@@ -1475,172 +166,3 @@
- /*@=kepttrans@*/
+@@ -1625,171 +167,3 @@
  }
  /*@=boundswrite@*/
--
 -/* =============================================================== */
 -/*@unchecked@*/
 -int davmagicdir = 0x8440291;
@@ -1424,8 +1565,8 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -    dp->d_ino = i + 1;                /* W2DO? */
 -    dp->d_reclen = 0;         /* W2DO? */
 -
--#if !defined(hpux) && !defined(sun)
--#if !defined(__APPLE__)
+-#if !(defined(hpux) || defined(__hpux) || defined(sun))
+-#if !defined(__APPLE__) && !defined(__FreeBSD_kernel__)
 -    dp->d_off = 0;            /* W2DO? */
 -#endif
 -/*@-boundsread@*/
@@ -1437,7 +1578,7 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -    strncpy(dp->d_name, av[i], sizeof(dp->d_name));
 -if (_dav_debug < 0)
 -fprintf(stderr, "*** davReaddir(%p) %p \"%s\"\n", (void *)avdir, dp, dp->d_name);
--    
+-
 -    return dp;
 -}
 -
@@ -1469,7 +1610,7 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -fprintf(stderr, "*** davOpendir(%s)\n", path);
 -
 -    /* Load DAV collection into argv. */
--    ctx = fetch_create_context(path);
+-    ctx = fetch_create_context(path, NULL);
 -    if (ctx == NULL) {
 -/* HACK: errno = ??? */
 -      return NULL;
@@ -1539,10 +1680,23 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.c rpm-4.4.1-no-neon/rpmio/rpmdav.c
 -/*@=kepttrans@*/
 -}
 -/*@=modfilesys@*/
-diff -ur rpm-4.4.1/rpmio/rpmdav.h rpm-4.4.1-no-neon/rpmio/rpmdav.h
---- rpm-4.4.1/rpmio/rpmdav.h   2005-01-17 19:46:27.000000000 +0100
-+++ rpm-4.4.1-no-neon/rpmio/rpmdav.h   2005-06-19 20:39:46.034218000 +0200
-@@ -80,131 +80,6 @@
+diff -ur rpm-4.4.7.org/rpmio/rpmdav.h rpm-4.4.7/rpmio/rpmdav.h
+--- rpm-4.4.7.org/rpmio/rpmdav.h       2005-10-11 21:13:59.000000000 +0200
++++ rpm-4.4.7/rpmio/rpmdav.h   2006-10-17 22:35:33.742783250 +0200
+@@ -41,12 +41,6 @@
+ extern int avmagicdir;
+ #define ISAVMAGIC(_dir) (!memcmp((_dir), &avmagicdir, sizeof(avmagicdir)))
+-/**
+- */
+-/*@unchecked@*/
+-extern int davmagicdir;
+-#define ISDAVMAGIC(_dir) (!memcmp((_dir), &davmagicdir, sizeof(davmagicdir)))
+-
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+@@ -80,133 +74,6 @@
        /*@globals fileSystem, internalState @*/
        /*@modifies fileSystem, internalState @*/;
  
@@ -1564,9 +1718,11 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.h rpm-4.4.1-no-neon/rpmio/rpmdav.h
 - * @retval *str               error msg               
 - * @returns           0 on success
 - */
+-/*@-exportlocal@*/
 -int davResp(urlinfo u, FD_t ctrl, /*@out@*/ /*@null@*/ char *const * str)
 -      /*@globals fileSystem, internalState @*/
 -      /*@modifies ctrl, *str, fileSystem, internalState @*/;
+-/*@=exportlocal@*/
 -
 -/**
 - */
@@ -1674,22 +1830,10 @@ diff -ur rpm-4.4.1/rpmio/rpmdav.h rpm-4.4.1-no-neon/rpmio/rpmdav.h
  #ifdef __cplusplus
  }
  #endif
-diff -ur rpm-4.4.1/rpmio/rpmio.c rpm-4.4.1-no-neon/rpmio/rpmio.c
---- rpm-4.4.1/rpmio/rpmio.c    2005-01-26 04:39:58.000000000 +0100
-+++ rpm-4.4.1-no-neon/rpmio/rpmio.c    2005-06-19 20:34:07.005758160 +0200
-@@ -104,11 +104,6 @@
- /**
-  */
- /*@unchecked@*/
--static int httpTimeoutSecs = TIMEOUT_SECS;
--
--/**
-- */
--/*@unchecked@*/
- int _rpmio_debug = 0;
- /**
-@@ -369,13 +364,6 @@
+diff -ur rpm-4.4.7.org/rpmio/rpmio.c rpm-4.4.7/rpmio/rpmio.c
+--- rpm-4.4.7.org/rpmio/rpmio.c        2006-08-08 08:55:01.000000000 +0200
++++ rpm-4.4.7/rpmio/rpmio.c    2006-10-17 22:18:38.135311750 +0200
+@@ -406,13 +406,6 @@
  
      fdstat_enter(fd, FDSTAT_READ);
  /*@-boundswrite@*/
@@ -1703,7 +1847,7 @@ diff -ur rpm-4.4.1/rpmio/rpmio.c rpm-4.4.1-no-neon/rpmio/rpmio.c
        rc = read(fdFileno(fd), buf, (count > fd->bytesRemain ? fd->bytesRemain : count));
  /*@=boundswrite@*/
      fdstat_exit(fd, FDSTAT_READ, rc);
-@@ -403,10 +391,6 @@
+@@ -440,10 +433,6 @@
  
      fdstat_enter(fd, FDSTAT_WRITE);
  /*@-boundsread@*/
@@ -1714,7 +1858,7 @@ diff -ur rpm-4.4.1/rpmio/rpmio.c rpm-4.4.1-no-neon/rpmio/rpmio.c
        rc = write(fdno, buf, (count > fd->bytesRemain ? fd->bytesRemain : count));
  /*@=boundsread@*/
      fdstat_exit(fd, FDSTAT_WRITE, rc);
-@@ -453,11 +437,6 @@
+@@ -490,11 +479,6 @@
      fdSetFdno(fd, -1);
  
      fdstat_enter(fd, FDSTAT_CLOSE);
@@ -1726,7 +1870,7 @@ diff -ur rpm-4.4.1/rpmio/rpmio.c rpm-4.4.1-no-neon/rpmio/rpmio.c
        rc = ((fdno >= 0) ? close(fdno) : -2);
  /*@=branchstate@*/
      fdstat_exit(fd, FDSTAT_CLOSE, rc);
-@@ -509,10 +488,6 @@
+@@ -547,10 +531,6 @@
      FD_ZERO(&wrfds);
  #endif
        
@@ -1737,7 +1881,7 @@ diff -ur rpm-4.4.1/rpmio/rpmio.c rpm-4.4.1-no-neon/rpmio/rpmio.c
      if ((fdno = fdFileno(fd)) < 0)
        return -1;      /* XXX W2DO? */
        
-@@ -564,10 +539,6 @@
+@@ -602,10 +582,6 @@
      FD_ZERO(&rdfds);
  #endif
  
@@ -1748,10 +1892,11 @@ diff -ur rpm-4.4.1/rpmio/rpmio.c rpm-4.4.1-no-neon/rpmio/rpmio.c
      if ((fdno = fdFileno(fd)) < 0)
        return -1;      /* XXX W2DO? */
        
-@@ -1562,152 +1533,6 @@
+@@ -1758,159 +1734,6 @@
      return rc;
  }
  
+-#ifdef DEAD
 -static int httpResp(urlinfo u, FD_t ctrl, /*@out@*/ char ** str)
 -      /*@globals fileSystem @*/
 -      /*@modifies ctrl, *str, fileSystem @*/
@@ -1788,6 +1933,7 @@ diff -ur rpm-4.4.1/rpmio/rpmio.c rpm-4.4.1-no-neon/rpmio/rpmio.c
 -    urlinfo u;
 -    const char * host;
 -    const char * path;
+-    char hthost[NI_MAXHOST];
 -    int port;
 -    int rc;
 -    char * req;
@@ -1800,6 +1946,10 @@ diff -ur rpm-4.4.1/rpmio/rpmio.c rpm-4.4.1-no-neon/rpmio/rpmio.c
 -
 -    if (((host = (u->proxyh ? u->proxyh : u->host)) == NULL))
 -      return FTPERR_BAD_HOSTNAME;
+-    if (strchr(host, ':'))
+-      sprintf(hthost, "[%s]", host);
+-    else
+-      strcpy(hthost, host);
 -
 -    if ((port = (u->proxyp > 0 ? u->proxyp : u->port)) < 0) port = 80;
 -    path = (u->proxyh || u->proxyp > 0) ? u->url : httpArg;
@@ -1829,7 +1979,7 @@ diff -ur rpm-4.4.1/rpmio/rpmio.c rpm-4.4.1-no-neon/rpmio/rpmio.c
 -Accept: text/plain\r\n\
 -Transfer-Encoding: chunked\r\n\
 -\r\n\
--") + strlen(httpCmd) + strlen(path) + sizeof(VERSION) + strlen(host) + 20;
+-") + strlen(httpCmd) + strlen(path) + sizeof(VERSION) + strlen(hthost) + 20;
 -
 -/*@-boundswrite@*/
 -    req = alloca(len);
@@ -1843,7 +1993,7 @@ diff -ur rpm-4.4.1/rpmio/rpmio.c rpm-4.4.1-no-neon/rpmio/rpmio.c
 -Accept: text/plain\r\n\
 -Transfer-Encoding: chunked\r\n\
 -\r\n\
--",    httpCmd, path, (u->httpVersion ? 1 : 0), VERSION, host, port);
+-",    httpCmd, path, (u->httpVersion ? 1 : 0), VERSION, hthost, port);
 -} else {
 -    sprintf(req, "\
 -%s %s HTTP/1.%d\r\n\
@@ -1851,7 +2001,7 @@ diff -ur rpm-4.4.1/rpmio/rpmio.c rpm-4.4.1-no-neon/rpmio/rpmio.c
 -Host: %s:%d\r\n\
 -Accept: text/plain\r\n\
 -\r\n\
--",    httpCmd, path, (u->httpVersion ? 1 : 0), VERSION, host, port);
+-",    httpCmd, path, (u->httpVersion ? 1 : 0), VERSION, hthost, port);
 -}
 -/*@=boundswrite@*/
 -
@@ -1897,11 +2047,12 @@ diff -ur rpm-4.4.1/rpmio/rpmio.c rpm-4.4.1-no-neon/rpmio/rpmio.c
 -    return rc;
 -/*@=usereleased@*/
 -}
+-#endif
 -
  /* XXX DYING: unused */
  void * ufdGetUrlinfo(FD_t fd)
  {
-@@ -2064,29 +1889,6 @@
+@@ -2268,29 +2091,6 @@
            fd->wr_chunked = 0;
        }
        break;
@@ -1931,19 +2082,19 @@ diff -ur rpm-4.4.1/rpmio/rpmio.c rpm-4.4.1-no-neon/rpmio/rpmio.c
      case URL_IS_DASH:
        assert(!(flags & O_RDWR));
        fd = fdDup( ((flags & O_WRONLY) ? STDOUT_FILENO : STDIN_FILENO) );
-@@ -2703,10 +2505,8 @@
+@@ -2908,10 +2708,8 @@
            if (fd->nfps > 0 && fpno == -1 &&
                fd->fps[fd->nfps-1].io == ufdio &&
                fd->fps[fd->nfps-1].fp == fp &&
 -              (fd->fps[fd->nfps-1].fdno >= 0 || fd->req != NULL))
-+              fd->fps[fd->nfps-1].fdno >= 0)
++              (fd->fps[fd->nfps-1].fdno >= 0))
            {
 -              int hadreqpersist = (fd->req != NULL);
 -
                if (fp)
                    rc = fflush(fp);
                fd->nfps--;
-@@ -2716,26 +2516,9 @@
+@@ -2921,26 +2719,9 @@
  /*@-usereleased@*/
                if (fdGetFdno(fd) >= 0)
                    break;
@@ -1970,7 +2121,7 @@ diff -ur rpm-4.4.1/rpmio/rpmio.c rpm-4.4.1-no-neon/rpmio/rpmio.c
                        rc = fclose(fp);
                }
                fdPop(fd);
-@@ -2984,18 +2767,9 @@
+@@ -3195,18 +2976,9 @@
            return NULL;
        }
      } else {
@@ -1989,7 +2140,7 @@ diff -ur rpm-4.4.1/rpmio/rpmio.c rpm-4.4.1-no-neon/rpmio/rpmio.c
        case URL_IS_PATH:
        case URL_IS_DASH:
        case URL_IS_FTP:
-@@ -3003,7 +2777,7 @@
+@@ -3214,7 +2986,7 @@
  if (_rpmio_debug)
  fprintf(stderr, "*** Fopen ufdio path %s fmode %s\n", path, fmode);
            fd = ufdOpen(path, flags, perms);
@@ -1998,7 +2149,7 @@ diff -ur rpm-4.4.1/rpmio/rpmio.c rpm-4.4.1-no-neon/rpmio/rpmio.c
                return fd;
            break;
        default:
-@@ -3012,15 +2786,6 @@
+@@ -3223,15 +2995,6 @@
            return NULL;
            /*@notreached@*/ break;
        }
@@ -2014,7 +2165,7 @@ diff -ur rpm-4.4.1/rpmio/rpmio.c rpm-4.4.1-no-neon/rpmio/rpmio.c
      }
      /*@=branchstate@*/
  
-@@ -3056,10 +2821,6 @@
+@@ -3267,10 +3030,6 @@
      int i, rc = 0;
  
      if (fd == NULL) return -1;
@@ -2025,7 +2176,7 @@ diff -ur rpm-4.4.1/rpmio/rpmio.c rpm-4.4.1-no-neon/rpmio/rpmio.c
      for (i = fd->nfps; rc == 0 && i >= 0; i--) {
  /*@-boundsread@*/
        FDSTACK_t * fps = &fd->fps[i];
-@@ -3094,9 +2855,6 @@
+@@ -3305,9 +3064,6 @@
  {
      int i, rc = -1;
  
@@ -2035,10 +2186,10 @@ diff -ur rpm-4.4.1/rpmio/rpmio.c rpm-4.4.1-no-neon/rpmio/rpmio.c
      for (i = fd->nfps ; rc == -1 && i >= 0; i--) {
  /*@-boundsread@*/
        rc = fd->fps[i].fdno;
-diff -ur rpm-4.4.1/rpmio/rpmio_internal.h rpm-4.4.1-no-neon/rpmio/rpmio_internal.h
---- rpm-4.4.1/rpmio/rpmio_internal.h   2005-02-08 18:14:20.000000000 +0100
-+++ rpm-4.4.1-no-neon/rpmio/rpmio_internal.h   2005-06-19 20:34:07.006758008 +0200
-@@ -152,7 +152,6 @@
+diff -ur rpm-4.4.7.org/rpmio/rpmio_internal.h rpm-4.4.7/rpmio/rpmio_internal.h
+--- rpm-4.4.7.org/rpmio/rpmio_internal.h       2006-06-18 20:54:59.000000000 +0200
++++ rpm-4.4.7/rpmio/rpmio_internal.h   2006-10-17 22:18:51.308135000 +0200
+@@ -157,7 +157,6 @@
  /*@dependent@*/
      void *    url;            /* ufdio: URL info */
  /*@relnull@*/
@@ -2046,9 +2197,9 @@ diff -ur rpm-4.4.1/rpmio/rpmio_internal.h rpm-4.4.1-no-neon/rpmio/rpmio_internal
  
      int               rd_timeoutsecs; /* ufdRead: per FD_t timer */
      ssize_t   bytesRemain;    /* ufdio: */
-diff -ur rpm-4.4.1/rpmio/rpmrpc.c rpm-4.4.1-no-neon/rpmio/rpmrpc.c
---- rpm-4.4.1/rpmio/rpmrpc.c   2005-01-26 06:16:09.000000000 +0100
-+++ rpm-4.4.1-no-neon/rpmio/rpmrpc.c   2005-06-19 20:34:07.008757704 +0200
+diff -ur rpm-4.4.7.org/rpmio/rpmrpc.c rpm-4.4.7/rpmio/rpmrpc.c
+--- rpm-4.4.7.org/rpmio/rpmrpc.c       2006-10-03 06:38:01.000000000 +0200
++++ rpm-4.4.7/rpmio/rpmrpc.c   2006-10-17 22:35:59.040364250 +0200
 @@ -91,10 +91,6 @@
      case URL_IS_FTP:
        return ftpMkdir(path, mode);
@@ -2060,7 +2211,7 @@ diff -ur rpm-4.4.1/rpmio/rpmrpc.c rpm-4.4.1-no-neon/rpmio/rpmrpc.c
      case URL_IS_PATH:
        path = lpath;
        /*@fallthrough@*/
-@@ -118,14 +114,6 @@
+@@ -118,15 +114,6 @@
      case URL_IS_FTP:
        return ftpChdir(path);
        /*@notreached@*/ break;
@@ -2069,13 +2220,14 @@ diff -ur rpm-4.4.1/rpmio/rpmrpc.c rpm-4.4.1-no-neon/rpmio/rpmrpc.c
 -#ifdef        NOTYET
 -      return davChdir(path);
 -#else
+-      errno = EINVAL;         /* XXX W2DO? */
 -      return -2;
 -#endif
 -      /*@notreached@*/ break;
      case URL_IS_PATH:
        path = lpath;
        /*@fallthrough@*/
-@@ -149,10 +137,6 @@
+@@ -151,10 +138,6 @@
      case URL_IS_FTP:
        return ftpRmdir(path);
        /*@notreached@*/ break;
@@ -2086,7 +2238,16 @@ diff -ur rpm-4.4.1/rpmio/rpmrpc.c rpm-4.4.1-no-neon/rpmio/rpmrpc.c
      case URL_IS_PATH:
        path = lpath;
        /*@fallthrough@*/
-@@ -180,10 +164,6 @@
+@@ -185,8 +168,6 @@
+     case URL_IS_DASH:
+     case URL_IS_HKP:
+     case URL_IS_FTP:          /* XXX TODO: implement. */
+-    case URL_IS_HTTPS:                /* XXX TODO: implement. */
+-    case URL_IS_HTTP:         /* XXX TODO: implement. */
+     default:
+       errno = EINVAL;         /* XXX W2DO? */
+       return -2;
+@@ -208,10 +189,6 @@
  
      oldut = urlPath(oldpath, &oe);
      switch (oldut) {
@@ -2097,7 +2258,34 @@ diff -ur rpm-4.4.1/rpmio/rpmrpc.c rpm-4.4.1-no-neon/rpmio/rpmrpc.c
      case URL_IS_FTP:          /* XXX WRONG WRONG WRONG */
      case URL_IS_PATH:
      case URL_IS_UNKNOWN:
-@@ -278,10 +258,6 @@
+@@ -233,8 +210,6 @@
+           return -2;
+       return ftpRename(oldpath, newpath);
+       /*@notreached@*/ break;
+-    case URL_IS_HTTPS:                /* XXX WRONG WRONG WRONG */
+-    case URL_IS_HTTP:         /* XXX WRONG WRONG WRONG */
+     case URL_IS_PATH:
+       oldpath = oe;
+       newpath = ne;
+@@ -258,8 +233,6 @@
+     oldut = urlPath(oldpath, &oe);
+     switch (oldut) {
+-    case URL_IS_HTTPS:                /* XXX WRONG WRONG WRONG */
+-    case URL_IS_HTTP:         /* XXX WRONG WRONG WRONG */
+     case URL_IS_FTP:          /* XXX WRONG WRONG WRONG */
+     case URL_IS_PATH:
+     case URL_IS_UNKNOWN:
+@@ -273,8 +246,6 @@
+     newut = urlPath(newpath, &ne);
+     switch (newut) {
+-    case URL_IS_HTTPS:                /* XXX WRONG WRONG WRONG */
+-    case URL_IS_HTTP:         /* XXX WRONG WRONG WRONG */
+     case URL_IS_FTP:          /* XXX WRONG WRONG WRONG */
+     case URL_IS_PATH:
+ if (_rpmio_debug)
+@@ -306,10 +277,6 @@
      case URL_IS_FTP:
        return ftpUnlink(path);
        /*@notreached@*/ break;
@@ -2108,7 +2296,7 @@ diff -ur rpm-4.4.1/rpmio/rpmrpc.c rpm-4.4.1-no-neon/rpmio/rpmrpc.c
      case URL_IS_PATH:
        path = lpath;
        /*@fallthrough@*/
-@@ -1280,10 +1256,6 @@
+@@ -1308,10 +1275,6 @@
      case URL_IS_FTP:
        return ftpStat(path, st);
        /*@notreached@*/ break;
@@ -2119,7 +2307,7 @@ diff -ur rpm-4.4.1/rpmio/rpmrpc.c rpm-4.4.1-no-neon/rpmio/rpmrpc.c
      case URL_IS_PATH:
        path = lpath;
        /*@fallthrough@*/
-@@ -1309,10 +1281,6 @@
+@@ -1338,10 +1301,6 @@
      case URL_IS_FTP:
        return ftpLstat(path, st);
        /*@notreached@*/ break;
@@ -2130,7 +2318,79 @@ diff -ur rpm-4.4.1/rpmio/rpmrpc.c rpm-4.4.1-no-neon/rpmio/rpmrpc.c
      case URL_IS_PATH:
        path = lpath;
        /*@fallthrough@*/
-@@ -1336,14 +1304,6 @@
+@@ -1373,8 +1332,6 @@
+     case URL_IS_DASH:
+     case URL_IS_HKP:
+     case URL_IS_FTP:          /* XXX TODO: implement. */
+-    case URL_IS_HTTPS:                /* XXX TODO: implement. */
+-    case URL_IS_HTTP:         /* XXX TODO: implement. */
+     default:
+       errno = EINVAL;         /* XXX W2DO? */
+       return -2;
+@@ -1399,8 +1356,6 @@
+     case URL_IS_DASH:
+     case URL_IS_HKP:
+     case URL_IS_FTP:          /* XXX TODO: implement. */
+-    case URL_IS_HTTPS:                /* XXX TODO: implement. */
+-    case URL_IS_HTTP:         /* XXX TODO: implement. */
+     default:
+       errno = EINVAL;         /* XXX W2DO? */
+       return -2;
+@@ -1425,8 +1380,6 @@
+     case URL_IS_DASH:
+     case URL_IS_HKP:
+     case URL_IS_FTP:          /* XXX TODO: implement. */
+-    case URL_IS_HTTPS:                /* XXX TODO: implement. */
+-    case URL_IS_HTTP:         /* XXX TODO: implement. */
+     default:
+       errno = EINVAL;         /* XXX W2DO? */
+       return -2;
+@@ -1451,8 +1404,6 @@
+     case URL_IS_DASH:
+     case URL_IS_HKP:
+     case URL_IS_FTP:          /* XXX TODO: implement. */
+-    case URL_IS_HTTPS:                /* XXX TODO: implement. */
+-    case URL_IS_HTTP:         /* XXX TODO: implement. */
+     default:
+       errno = EINVAL;         /* XXX W2DO? */
+       return -2;
+@@ -1477,8 +1428,6 @@
+     case URL_IS_DASH:
+     case URL_IS_HKP:
+     case URL_IS_FTP:          /* XXX TODO: implement. */
+-    case URL_IS_HTTPS:                /* XXX TODO: implement. */
+-    case URL_IS_HTTP:         /* XXX TODO: implement. */
+     default:
+       errno = EINVAL;         /* XXX W2DO? */
+       return -2;
+@@ -1503,8 +1452,6 @@
+     case URL_IS_DASH:
+     case URL_IS_HKP:
+     case URL_IS_FTP:          /* XXX TODO: implement. */
+-    case URL_IS_HTTPS:                /* XXX TODO: implement. */
+-    case URL_IS_HTTP:         /* XXX TODO: implement. */
+     default:
+       errno = EINVAL;         /* XXX W2DO? */
+       return -2;
+@@ -1529,8 +1476,6 @@
+     case URL_IS_DASH:
+     case URL_IS_HKP:
+     case URL_IS_FTP:          /* XXX TODO: implement. */
+-    case URL_IS_HTTPS:                /* XXX TODO: implement. */
+-    case URL_IS_HTTP:         /* XXX TODO: implement. */
+     default:
+       errno = EINVAL;         /* XXX W2DO? */
+       return -2;
+@@ -1558,8 +1503,6 @@
+     case URL_IS_DASH:
+     case URL_IS_HKP:
+     case URL_IS_FTP:          /* XXX TODO: implement. */
+-    case URL_IS_HTTPS:                /* XXX TODO: implement. */
+-    case URL_IS_HTTP:         /* XXX TODO: implement. */
+     default:
+       errno = EINVAL;         /* XXX W2DO? */
+       return -2;
+@@ -1577,14 +1520,6 @@
      case URL_IS_FTP:
        return ftpReadlink(path, buf, bufsiz);
        /*@notreached@*/ break;
@@ -2145,7 +2405,25 @@ diff -ur rpm-4.4.1/rpmio/rpmrpc.c rpm-4.4.1-no-neon/rpmio/rpmrpc.c
      case URL_IS_PATH:
        path = lpath;
        /*@fallthrough@*/
-@@ -1487,10 +1447,6 @@
+@@ -1617,8 +1552,6 @@
+       break;
+     case URL_IS_DASH:
+     case URL_IS_HKP:
+-    case URL_IS_HTTPS:                /* XXX TODO: implement. */
+-    case URL_IS_HTTP:         /* XXX TODO: implement. */
+     case URL_IS_FTP:          /* XXX TODO: implement. */
+     default:
+       errno = EINVAL;         /* XXX W2DO? */
+@@ -1685,8 +1618,6 @@
+ fprintf(stderr, "*** Glob(%s,0x%x,%p,%p)\n", pattern, (unsigned)flags, (void *)errfunc, pglob);
+ /*@=castfcnptr@*/
+     switch (ut) {
+-    case URL_IS_HTTPS:
+-    case URL_IS_HTTP:
+     case URL_IS_FTP:
+ /*@-type@*/
+       pglob->gl_closedir = Closedir;
+@@ -1730,10 +1661,6 @@
      case URL_IS_FTP:
        return ftpOpendir(path);
        /*@notreached@*/ break;
@@ -2156,7 +2434,7 @@ diff -ur rpm-4.4.1/rpmio/rpmrpc.c rpm-4.4.1-no-neon/rpmio/rpmrpc.c
      case URL_IS_PATH:
        path = lpath;
        /*@fallthrough@*/
-@@ -1515,8 +1471,6 @@
+@@ -1758,8 +1685,6 @@
        return NULL;
      if (ISAVMAGIC(dir))
        return avReaddir(dir);
@@ -2165,7 +2443,7 @@ diff -ur rpm-4.4.1/rpmio/rpmrpc.c rpm-4.4.1-no-neon/rpmio/rpmrpc.c
      return readdir(dir);
  }
  
-@@ -1528,7 +1482,5 @@
+@@ -1771,8 +1696,6 @@
        return 0;
      if (ISAVMAGIC(dir))
        return avClosedir(dir);
@@ -2173,18 +2451,20 @@ diff -ur rpm-4.4.1/rpmio/rpmrpc.c rpm-4.4.1-no-neon/rpmio/rpmrpc.c
 -      return davClosedir(dir);
      return closedir(dir);
  }
-diff -ur rpm-4.4.1/rpmio/tget.c rpm-4.4.1-no-neon/rpmio/tget.c
---- rpm-4.4.1/rpmio/tget.c     2004-11-19 17:52:58.000000000 +0100
-+++ rpm-4.4.1-no-neon/rpmio/tget.c     2005-06-19 20:34:07.009757552 +0200
-@@ -9,7 +9,6 @@
+diff -ur rpm-4.4.7.org/rpmio/tget.c rpm-4.4.7/rpmio/tget.c
+--- rpm-4.4.7.org/rpmio/tget.c 2004-11-19 17:52:58.000000000 +0100
++++ rpm-4.4.7/rpmio/tget.c     2006-10-17 22:20:47.995427500 +0200
+@@ -9,8 +9,6 @@
  
  static int _debug = 0;
  
 -int noNeon;
+-
  #define       HTTPSPATH       "https://localhost/test.txt"
  #define       HTTPPATH        "http://localhost/test.txt"
-@@ -40,8 +39,6 @@
+ #define       FTPPATH         "ftp://localhost/test.txt"
+@@ -40,8 +38,6 @@
   { "debug", 'd', POPT_ARG_VAL,        &_debug, -1,            NULL, NULL },
   { "ftpdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_ftp_debug, -1,
        N_("debug protocol data stream"), NULL},
@@ -2193,18 +2473,19 @@ diff -ur rpm-4.4.1/rpmio/tget.c rpm-4.4.1-no-neon/rpmio/tget.c
   { "rpmiodebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmio_debug, -1,
        N_("debug rpmio I/O"), NULL},
   { "urldebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_url_debug, -1,
-diff -ur rpm-4.4.1/rpmio/tglob.c rpm-4.4.1-no-neon/rpmio/tglob.c
---- rpm-4.4.1/rpmio/tglob.c    2004-11-19 17:53:05.000000000 +0100
-+++ rpm-4.4.1-no-neon/rpmio/tglob.c    2005-06-19 20:34:07.010757400 +0200
-@@ -9,7 +9,6 @@
+diff -ur rpm-4.4.7.org/rpmio/tglob.c rpm-4.4.7/rpmio/tglob.c
+--- rpm-4.4.7.org/rpmio/tglob.c        2004-11-19 17:53:05.000000000 +0100
++++ rpm-4.4.7/rpmio/tglob.c    2006-10-17 22:21:01.712284750 +0200
+@@ -9,8 +9,6 @@
  
  static int _debug = 0;
  
 -int noNeon;
+-
  #define       HTTPSPATH       "https://localhost/rawhide/test/*.rpm"
  #if 0
-@@ -52,8 +51,6 @@
+ #define       HTTPPATH        "http://localhost/rawhide/test/*.rpm"
+@@ -52,8 +50,6 @@
   { "debug", 'd', POPT_ARG_VAL,        &_debug, -1,            NULL, NULL },
   { "ftpdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_ftp_debug, -1,
        N_("debug protocol data stream"), NULL},
@@ -2213,18 +2494,19 @@ diff -ur rpm-4.4.1/rpmio/tglob.c rpm-4.4.1-no-neon/rpmio/tglob.c
   { "rpmiodebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmio_debug, -1,
        N_("debug rpmio I/O"), NULL},
   { "urldebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_url_debug, -1,
-diff -ur rpm-4.4.1/rpmio/thkp.c rpm-4.4.1-no-neon/rpmio/thkp.c
---- rpm-4.4.1/rpmio/thkp.c     2005-01-04 17:35:12.000000000 +0100
-+++ rpm-4.4.1-no-neon/rpmio/thkp.c     2005-06-19 20:34:07.012757096 +0200
-@@ -10,7 +10,6 @@
+diff -ur rpm-4.4.7.org/rpmio/thkp.c rpm-4.4.7/rpmio/thkp.c
+--- rpm-4.4.7.org/rpmio/thkp.c 2005-01-04 17:35:12.000000000 +0100
++++ rpm-4.4.7/rpmio/thkp.c     2006-10-17 22:21:10.696846250 +0200
+@@ -10,8 +10,6 @@
  static int _debug = 0;
  static int _printing = 0;
  
 -int noNeon;
+-
  #if 0
  #define       HKPPATH         "hkp://pgp.mit.edu:11371/pks/lookup?op=get&search=0xF5C75256"
-@@ -95,8 +94,6 @@
+ #else
+@@ -95,8 +93,6 @@
        N_("debug protocol data stream"), NULL},
   { "ftpdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_ftp_debug, -1,
        N_("debug protocol data stream"), NULL},
@@ -2233,18 +2515,19 @@ diff -ur rpm-4.4.1/rpmio/thkp.c rpm-4.4.1-no-neon/rpmio/thkp.c
   { "rpmiodebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmio_debug, -1,
        N_("debug rpmio I/O"), NULL},
   { "urldebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_url_debug, -1,
-diff -ur rpm-4.4.1/rpmio/tput.c rpm-4.4.1-no-neon/rpmio/tput.c
---- rpm-4.4.1/rpmio/tput.c     2004-11-19 17:53:11.000000000 +0100
-+++ rpm-4.4.1-no-neon/rpmio/tput.c     2005-06-19 20:34:07.013756944 +0200
-@@ -9,7 +9,6 @@
+diff -ur rpm-4.4.7.org/rpmio/tput.c rpm-4.4.7/rpmio/tput.c
+--- rpm-4.4.7.org/rpmio/tput.c 2004-11-19 17:53:11.000000000 +0100
++++ rpm-4.4.7/rpmio/tput.c     2006-10-17 22:21:25.841792750 +0200
+@@ -9,8 +9,6 @@
  
  static int _debug = 0;
  
 -int noNeon;
+-
  #define       HTTPSPATH       "https://localhost/rawhide/toad/tput.txt"
  #define       HTTPPATH        "http://localhost/rawhide/toad/tput.txt"
-@@ -100,8 +99,6 @@
+ #define       FTPPATH         "ftp://localhost/home/test/tput.txt"
+@@ -100,8 +98,6 @@
   { "debug", 'd', POPT_ARG_VAL,        &_debug, -1,            NULL, NULL },
   { "ftpdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_ftp_debug, -1,
        N_("debug protocol data stream"), NULL},
@@ -2253,38 +2536,17 @@ diff -ur rpm-4.4.1/rpmio/tput.c rpm-4.4.1-no-neon/rpmio/tput.c
   { "rpmiodebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmio_debug, -1,
        N_("debug rpmio I/O"), NULL},
   { "urldebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_url_debug, -1,
-diff -ur rpm-4.4.1/rpmio/tring.c rpm-4.4.1-no-neon/rpmio/tring.c
---- rpm-4.4.1/rpmio/tring.c    2004-11-28 21:41:04.000000000 +0100
-+++ rpm-4.4.1-no-neon/rpmio/tring.c    2005-06-19 20:34:07.013756944 +0200
-@@ -5,7 +5,6 @@
- static int printing = 1;
- static int _debug = 0;
--int noNeon;
- static struct poptOption optionsTable[] = {
-  { "print", 'p', POPT_ARG_VAL,        &printing, 1,           NULL, NULL },
-@@ -13,8 +12,6 @@
-  { "debug", 'd', POPT_ARG_VAL,        &_debug, -1,            NULL, NULL },
-  { "ftpdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_ftp_debug, -1,
-       N_("debug protocol data stream"), NULL},
-- { "noneon", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &noNeon, 1,
--      N_("disable use of libneon for HTTP"), NULL},
-  { "rpmiodebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmio_debug, -1,
-       N_("debug rpmio I/O"), NULL},
-  { "urldebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_url_debug, -1,
-diff -ur rpm-4.4.1/rpmio/url.c rpm-4.4.1-no-neon/rpmio/url.c
---- rpm-4.4.1/rpmio/url.c      2004-11-28 21:41:31.000000000 +0100
-+++ rpm-4.4.1-no-neon/rpmio/url.c      2005-06-19 20:37:11.810663544 +0200
-@@ -148,7 +148,6 @@
-     }
-     if (u->sess != NULL) {
-       /* HACK: neon include has prototype. */
--      ne_session_destroy(u->sess);
-       u->sess = NULL;
+--- rpm-4.4.8/rpmio/url.c.orig 2007-01-20 21:33:50.000000000 +0100
++++ rpm-4.4.8/rpmio/url.c      2007-04-08 19:57:45.646376012 +0200
+@@ -146,7 +146,6 @@
+                       (u->scheme ? u->scheme : ""));
+       /*@=usereleased@*/
      }
+-    xx = davFree(u);
      u->buf = _free(u->buf);
-@@ -352,9 +351,6 @@
+     u->url = _free(u->url);
+     u->scheme = _free((void *)u->scheme);
+@@ -348,9 +347,6 @@
  } urlstrings[] = {
      { "file://",      URL_IS_PATH },
      { "ftp://",               URL_IS_FTP },
This page took 0.083755 seconds and 4 git commands to generate.