From: Jakub Bogusz Date: Sun, 8 Apr 2007 18:10:10 +0000 (+0000) Subject: - updated for 4.4.8 X-Git-Tag: auto/th/rpm-build-macros-1_382-1~20 X-Git-Url: http://git.pld-linux.org/?p=packages%2Frpm.git;a=commitdiff_plain;h=e9c15efc5093aa65b9fbdbe9fb1b0dc525ae2d43;hp=dd3810fab74b8182dd6168ca0e8b840a3506cf7b - updated for 4.4.8 Changed files: rpm-no-neon.patch -> 1.9 --- diff --git a/rpm-no-neon.patch b/rpm-no-neon.patch index b880e95..844f698 100644 --- a/rpm-no-neon.patch +++ b/rpm-no-neon.patch @@ -1,43 +1,5 @@ -diff -ur rpm-4.4.7.org/configure.ac rpm-4.4.7/configure.ac ---- 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).]) --# 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.7.org/rpmio/rpmdav.c rpm-4.4.7/rpmio/rpmdav.c ---- rpm-4.4.7.org/rpmio/rpmdav.c 2006-04-17 17:23:29.000000000 +0200 -+++ rpm-4.4.7/rpmio/rpmdav.c 2006-10-17 22:14:01.150001250 +0200 +--- 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 #endif @@ -70,21 +32,32 @@ diff -ur rpm-4.4.7.org/rpmio/rpmdav.c rpm-4.4.7/rpmio/rpmdav.c #include #define _RPMDAV_INTERNAL -@@ -69,1332 +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; -} @@ -284,18 +257,36 @@ diff -ur rpm-4.4.7.org/rpmio/rpmdav.c rpm-4.4.7/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)); @@ -383,7 +374,7 @@ diff -ur rpm-4.4.7.org/rpmio/rpmdav.c rpm-4.4.7/rpmio/rpmdav.c - -exit: -/*@-boundswrite@*/ -- if (rc == 0 && uret != NULL) +- if (uret != NULL) - *uret = urlLink(u, __FUNCTION__); -/*@=boundswrite@*/ - u = urlFree(u, "urlSplit (davInit)"); @@ -458,6 +449,8 @@ diff -ur rpm-4.4.7.org/rpmio/rpmdav.c rpm-4.4.7/rpmio/rpmdav.c - int ac; - int nalloced; - ARGV_t av; +-/*@null@*/ /*@shared@*/ +- struct stat *st; - mode_t * modes; - size_t * sizes; - time_t * mtimes; @@ -485,7 +478,7 @@ diff -ur rpm-4.4.7.org/rpmio/rpmdav.c rpm-4.4.7/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 @*/ -{ @@ -500,6 +493,8 @@ diff -ur rpm-4.4.7.org/rpmio/rpmdav.c rpm-4.4.7/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; -} - @@ -702,7 +697,7 @@ diff -ur rpm-4.4.7.org/rpmio/rpmdav.c rpm-4.4.7/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; @@ -782,7 +777,70 @@ diff -ur rpm-4.4.7.org/rpmio/rpmdav.c rpm-4.4.7/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; -} - @@ -798,11 +856,19 @@ diff -ur rpm-4.4.7.org/rpmio/rpmdav.c rpm-4.4.7/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; @@ -815,8 +881,7 @@ diff -ur rpm-4.4.7.org/rpmio/rpmdav.c rpm-4.4.7/rpmio/rpmdav.c - } - -exit: -- if (rc) -- xx = davFree(u); +- xx = davFree(u); - return rc; -} - @@ -867,9 +932,9 @@ diff -ur rpm-4.4.7.org/rpmio/rpmdav.c rpm-4.4.7/rpmio/rpmdav.c -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@*/ - @@ -1306,8 +1371,9 @@ diff -ur rpm-4.4.7.org/rpmio/rpmdav.c rpm-4.4.7/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; - } @@ -1317,10 +1383,11 @@ diff -ur rpm-4.4.7.org/rpmio/rpmdav.c rpm-4.4.7/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; @@ -1333,9 +1400,10 @@ diff -ur rpm-4.4.7.org/rpmio/rpmdav.c rpm-4.4.7/rpmio/rpmdav.c - /* 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; -} @@ -1351,7 +1419,7 @@ diff -ur rpm-4.4.7.org/rpmio/rpmdav.c rpm-4.4.7/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; @@ -1362,10 +1430,11 @@ diff -ur rpm-4.4.7.org/rpmio/rpmdav.c rpm-4.4.7/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; @@ -1403,7 +1472,7 @@ diff -ur rpm-4.4.7.org/rpmio/rpmdav.c rpm-4.4.7/rpmio/rpmdav.c /*@unchecked@*/ int avmagicdir = 0x3607113; -@@ -1518,171 +167,4 @@ +@@ -1625,171 +167,3 @@ } /*@=boundswrite@*/ @@ -1461,7 +1530,7 @@ diff -ur rpm-4.4.7.org/rpmio/rpmdav.c rpm-4.4.7/rpmio/rpmdav.c - dp->d_reclen = 0; /* W2DO? */ - -#if !(defined(hpux) || defined(__hpux) || defined(sun)) --#if !defined(__APPLE__) +-#if !defined(__APPLE__) && !defined(__FreeBSD_kernel__) - dp->d_off = 0; /* W2DO? */ -#endif -/*@-boundsread@*/ @@ -1489,7 +1558,7 @@ diff -ur rpm-4.4.7.org/rpmio/rpmdav.c rpm-4.4.7/rpmio/rpmdav.c - char * t; - int ac, nac; - int rc; - +- - /* HACK: glob does not pass dirs with trailing '/' */ - nb = strlen(path)+1; -/*@-branchstate@*/ @@ -1505,7 +1574,7 @@ diff -ur rpm-4.4.7.org/rpmio/rpmdav.c rpm-4.4.7/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; @@ -2431,18 +2500,9 @@ diff -ur rpm-4.4.7.org/rpmio/tput.c rpm-4.4.7/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.7.org/rpmio/url.c rpm-4.4.7/rpmio/url.c ---- rpm-4.4.7.org/rpmio/url.c 2006-08-06 02:31:18.000000000 +0200 -+++ rpm-4.4.7/rpmio/url.c 2006-10-17 22:21:51.747411750 +0200 -@@ -148,7 +148,6 @@ - } - if (u->sess != NULL) { - /* HACK: neon include has prototype. */ -- ne_session_destroy(u->sess); - u->sess = NULL; - } - u->buf = _free(u->buf); -@@ -352,9 +351,6 @@ +--- 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 +@@ -348,9 +348,6 @@ } urlstrings[] = { { "file://", URL_IS_PATH }, { "ftp://", URL_IS_FTP },