- make peace with libtool-1.5.10 and automake-1.9.3.
CVS patchset: 7571 CVS date: 2004/11/11 01:04:07
This commit is contained in:
parent
103a5c0e48
commit
7008350f3e
1
CHANGES
1
CHANGES
|
@ -30,6 +30,7 @@
|
||||||
- use external libneon for http/https transport.
|
- use external libneon for http/https transport.
|
||||||
- python: add python 2.4 support.
|
- python: add python 2.4 support.
|
||||||
- add --delsign to purge packages of digital signatures.
|
- add --delsign to purge packages of digital signatures.
|
||||||
|
- make peace with libtool-1.5.10 and automake-1.9.3.
|
||||||
|
|
||||||
4.3.1 -> 4.3.2:
|
4.3.1 -> 4.3.2:
|
||||||
- use /etc/selinux/targeted/contexts/files/file_contexts for now.
|
- use /etc/selinux/targeted/contexts/files/file_contexts for now.
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
export CFLAGS
|
export CFLAGS
|
||||||
export LDFLAGS
|
export LDFLAGS
|
||||||
|
|
||||||
LTV="libtoolize (GNU libtool) 1.5.6"
|
LTV="libtoolize (GNU libtool) 1.5.10"
|
||||||
ACV="autoconf (GNU Autoconf) 2.59"
|
ACV="autoconf (GNU Autoconf) 2.59"
|
||||||
AMV="automake (GNU automake) 1.9.2"
|
AMV="automake (GNU automake) 1.9.3"
|
||||||
USAGE="
|
USAGE="
|
||||||
This script documents the versions of the tools I'm using to build rpm:
|
This script documents the versions of the tools I'm using to build rpm:
|
||||||
libtool-1.5.6
|
libtool-1.5.10
|
||||||
autoconf-2.59
|
autoconf-2.59
|
||||||
automake-1.9.2
|
automake-1.9.3
|
||||||
Simply edit this script to change the libtool/autoconf/automake versions
|
Simply edit this script to change the libtool/autoconf/automake versions
|
||||||
checked if you need to, as rpm should build (and has built) with all
|
checked if you need to, as rpm should build (and has built) with all
|
||||||
recent versions of libtool/autoconf/automake.
|
recent versions of libtool/autoconf/automake.
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
export CFLAGS
|
export CFLAGS
|
||||||
export LDFLAGS
|
export LDFLAGS
|
||||||
|
|
||||||
LTV="libtoolize (GNU libtool) 1.5.6"
|
LTV="libtoolize (GNU libtool) 1.5.10"
|
||||||
ACV="autoconf (GNU Autoconf) 2.59"
|
ACV="autoconf (GNU Autoconf) 2.59"
|
||||||
AMV="automake (GNU automake) 1.9.2"
|
AMV="automake (GNU automake) 1.9.3"
|
||||||
USAGE="
|
USAGE="
|
||||||
This script documents the versions of the tools I'm using to build rpm:
|
This script documents the versions of the tools I'm using to build rpm:
|
||||||
libtool-1.5.6
|
libtool-1.5.10
|
||||||
autoconf-2.59
|
autoconf-2.59
|
||||||
automake-1.9.2
|
automake-1.9.3
|
||||||
Simply edit this script to change the libtool/autoconf/automake versions
|
Simply edit this script to change the libtool/autoconf/automake versions
|
||||||
checked if you need to, as rpm should build (and has built) with all
|
checked if you need to, as rpm should build (and has built) with all
|
||||||
recent versions of libtool/autoconf/automake.
|
recent versions of libtool/autoconf/automake.
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
export CFLAGS
|
export CFLAGS
|
||||||
export LDFLAGS
|
export LDFLAGS
|
||||||
|
|
||||||
LTV="libtoolize (GNU libtool) 1.5.6"
|
LTV="libtoolize (GNU libtool) 1.5.10"
|
||||||
ACV="autoconf (GNU Autoconf) 2.59"
|
ACV="autoconf (GNU Autoconf) 2.59"
|
||||||
AMV="automake (GNU automake) 1.9.2"
|
AMV="automake (GNU automake) 1.9.3"
|
||||||
USAGE="
|
USAGE="
|
||||||
This script documents the versions of the tools I'm using to build rpm:
|
This script documents the versions of the tools I'm using to build rpm:
|
||||||
libtool-1.5.6
|
libtool-1.5.10
|
||||||
autoconf-2.59
|
autoconf-2.59
|
||||||
automake-1.9.2
|
automake-1.9.3
|
||||||
Simply edit this script to change the libtool/autoconf/automake versions
|
Simply edit this script to change the libtool/autoconf/automake versions
|
||||||
checked if you need to, as rpm should build (and has built) with all
|
checked if you need to, as rpm should build (and has built) with all
|
||||||
recent versions of libtool/autoconf/automake.
|
recent versions of libtool/autoconf/automake.
|
||||||
|
|
|
@ -140,6 +140,8 @@ struct ne_request_s {
|
||||||
ne_off_t body_length; /* length of request body */
|
ne_off_t body_length; /* length of request body */
|
||||||
ne_off_t body_progress; /* number of bytes of body sent so far */
|
ne_off_t body_progress; /* number of bytes of body sent so far */
|
||||||
|
|
||||||
|
int chunked; /* send request incrementally chunked */
|
||||||
|
|
||||||
/* temporary store for response lines. */
|
/* temporary store for response lines. */
|
||||||
char respbuf[BUFSIZ];
|
char respbuf[BUFSIZ];
|
||||||
|
|
||||||
|
@ -487,6 +489,29 @@ static int send_request_body(ne_request *req)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ne_send_request_chunk(ne_request *req, const char *buffer, size_t size)
|
||||||
|
{
|
||||||
|
char chunksize[20];
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
ne_snprintf(chunksize, sizeof chunksize, "%x%s", size, EOL);
|
||||||
|
chunksize[sizeof(chunksize)-1] = '\0';
|
||||||
|
|
||||||
|
ret = ne_sock_fullwrite(req->session->socket, chunksize, strlen(chunksize));
|
||||||
|
|
||||||
|
if (!ret && size > 0)
|
||||||
|
ret = ne_sock_fullwrite(req->session->socket, buffer, size);
|
||||||
|
|
||||||
|
if (!ret)
|
||||||
|
ret = ne_sock_fullwrite(req->session->socket, EOL, sizeof(EOL)-1);
|
||||||
|
|
||||||
|
/* XXX Final EOL on last 0 byte chunk? perhaps call ne_finish_request? */
|
||||||
|
if (!ret && size == 0)
|
||||||
|
ret = ne_sock_fullwrite(req->session->socket, EOL, sizeof(EOL)-1);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/* Lob the User-Agent, connection and host headers in to the request
|
/* Lob the User-Agent, connection and host headers in to the request
|
||||||
* headers */
|
* headers */
|
||||||
static void add_fixed_headers(ne_request *req)
|
static void add_fixed_headers(ne_request *req)
|
||||||
|
@ -666,6 +691,11 @@ void ne_set_request_body_provider64(ne_request *req, off64_t bodysize,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void ne_set_request_chunked(ne_request *req, int chunked)
|
||||||
|
{
|
||||||
|
req->chunked = chunked;
|
||||||
|
}
|
||||||
|
|
||||||
void ne_set_request_expect100(ne_request *req, int flag)
|
void ne_set_request_expect100(ne_request *req, int flag)
|
||||||
{
|
{
|
||||||
req->use_expect100 = flag;
|
req->use_expect100 = flag;
|
||||||
|
@ -1053,7 +1083,10 @@ static int send_request(ne_request *req, const ne_buffer *request)
|
||||||
int aret = aborted(req, _("Could not send request"), ret);
|
int aret = aborted(req, _("Could not send request"), ret);
|
||||||
return RETRY_RET(retry, ret, aret);
|
return RETRY_RET(retry, ret, aret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Return with request in progress if sending incrementally chunked body. */
|
||||||
|
if (req->chunked) return ret;
|
||||||
|
|
||||||
if (!req->use_expect100 && req->body_length > 0) {
|
if (!req->use_expect100 && req->body_length > 0) {
|
||||||
/* Send request body, if not using 100-continue. */
|
/* Send request body, if not using 100-continue. */
|
||||||
ret = send_request_body(req);
|
ret = send_request_body(req);
|
||||||
|
@ -1239,32 +1272,10 @@ static int lookup_host(ne_session *sess, struct host_info *info)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int ne_begin_request(ne_request *req)
|
int ne_finish_request(ne_request *req)
|
||||||
{
|
{
|
||||||
struct body_reader *rdr;
|
struct body_reader *rdr;
|
||||||
struct host_info *host;
|
|
||||||
ne_buffer *data;
|
|
||||||
const ne_status *const st = &req->status;
|
const ne_status *const st = &req->status;
|
||||||
int ret;
|
|
||||||
|
|
||||||
/* Resolve hostname if necessary. */
|
|
||||||
host = req->session->use_proxy?&req->session->proxy:&req->session->server;
|
|
||||||
if (host->address == NULL)
|
|
||||||
HTTP_ERR(lookup_host(req->session, host));
|
|
||||||
|
|
||||||
req->resp.mode = R_TILLEOF;
|
|
||||||
|
|
||||||
/* Build the request string, and send it */
|
|
||||||
data = build_request(req);
|
|
||||||
DEBUG_DUMP_REQUEST(data->data);
|
|
||||||
ret = send_request(req, data);
|
|
||||||
/* Retry this once after a persistent connection timeout. */
|
|
||||||
if (ret == NE_RETRY && !req->session->no_persist) {
|
|
||||||
NE_DEBUG(NE_DBG_HTTP, "Persistent connection timed out, retrying.\n");
|
|
||||||
ret = send_request(req, data);
|
|
||||||
}
|
|
||||||
ne_buffer_destroy(data);
|
|
||||||
if (ret != NE_OK) return ret;
|
|
||||||
|
|
||||||
/* Determine whether server claims HTTP/1.1 compliance. */
|
/* Determine whether server claims HTTP/1.1 compliance. */
|
||||||
req->session->is_http11 = (st->major_version == 1 &&
|
req->session->is_http11 = (st->major_version == 1 &&
|
||||||
|
@ -1287,9 +1298,9 @@ int ne_begin_request(ne_request *req)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* HEAD requests and 204, 304 responses have no response body,
|
/* HEAD requests and 201, 204, 304 responses have no response body,
|
||||||
* regardless of what headers are present. */
|
* regardless of what headers are present. */
|
||||||
if (req->method_is_head || st->code == 204 || st->code == 304)
|
if (req->method_is_head || st->code == 201 || st->code == 204 || st->code == 304)
|
||||||
req->resp.mode = R_NO_BODY;
|
req->resp.mode = R_NO_BODY;
|
||||||
|
|
||||||
/* Prepare for reading the response entity-body. Call each of the
|
/* Prepare for reading the response entity-body. Call each of the
|
||||||
|
@ -1302,6 +1313,42 @@ int ne_begin_request(ne_request *req)
|
||||||
return NE_OK;
|
return NE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ne_begin_request(ne_request *req)
|
||||||
|
{
|
||||||
|
struct body_reader *rdr;
|
||||||
|
struct host_info *host;
|
||||||
|
ne_buffer *data;
|
||||||
|
const ne_status *const st = &req->status;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
/* Resolve hostname if necessary. */
|
||||||
|
host = req->session->use_proxy?&req->session->proxy:&req->session->server;
|
||||||
|
if (host->address == NULL)
|
||||||
|
HTTP_ERR(lookup_host(req->session, host));
|
||||||
|
|
||||||
|
req->resp.mode = R_TILLEOF;
|
||||||
|
|
||||||
|
/* Build the request string, and send it */
|
||||||
|
data = build_request(req);
|
||||||
|
DEBUG_DUMP_REQUEST(data->data);
|
||||||
|
ret = send_request(req, data);
|
||||||
|
/* Retry this once after a persistent connection timeout. */
|
||||||
|
if (ret == NE_RETRY && !req->session->no_persist && !req->chunked) {
|
||||||
|
NE_DEBUG(NE_DBG_HTTP, "Persistent connection timed out, retrying.\n");
|
||||||
|
ret = send_request(req, data);
|
||||||
|
}
|
||||||
|
ne_buffer_destroy(data);
|
||||||
|
if (ret != NE_OK) return ret;
|
||||||
|
|
||||||
|
/* Return with request in progress if sending incrementally chunked body. */
|
||||||
|
if (req->chunked)
|
||||||
|
return ret; /* XXX perhaps NE_INPROGRESS? */
|
||||||
|
|
||||||
|
ret = ne_finish_request(req);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
int ne_end_request(ne_request *req)
|
int ne_end_request(ne_request *req)
|
||||||
{
|
{
|
||||||
struct hook *hk;
|
struct hook *hk;
|
||||||
|
|
|
@ -258,6 +258,20 @@ ssize_t ne_read_response_block(ne_request *req, /*@out@*/ char *buffer, size_t b
|
||||||
/*@globals internalState @*/
|
/*@globals internalState @*/
|
||||||
/*@modifies req, buffer, internalState @*/;
|
/*@modifies req, buffer, internalState @*/;
|
||||||
|
|
||||||
|
/* Mark the request body as incrementally chunked. */
|
||||||
|
void ne_set_request_chunked(ne_request *req, int chunked)
|
||||||
|
/*@modifies req @*/;
|
||||||
|
|
||||||
|
/* Send request body chunk.
|
||||||
|
* Return 0 on success, else NE_* return. */
|
||||||
|
int ne_send_request_chunk(ne_request *req, const char *buffer, size_t size)
|
||||||
|
/*@modifies req @*/;
|
||||||
|
|
||||||
|
/* Finish incrementally chunked request. */
|
||||||
|
int ne_finish_request(ne_request *req)
|
||||||
|
/*@globals internalState @*/
|
||||||
|
/*@modifies req, internalState @*/;
|
||||||
|
|
||||||
/* Include the HTTP/1.1 header "Expect: 100-continue" in request 'req'
|
/* Include the HTTP/1.1 header "Expect: 100-continue" in request 'req'
|
||||||
* if 'flag' is non-zero. Warning: 100-continue support is not
|
* if 'flag' is non-zero. Warning: 100-continue support is not
|
||||||
* implemented correctly in some HTTP/1.1 servers, enabling this
|
* implemented correctly in some HTTP/1.1 servers, enabling this
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue