rpms/squid/FC-3 squid-2.5.STABLE9-2GB.patch, NONE, 1.1 squid-2.5.STABLE9-CONNECT_truncated.patch, NONE, 1.1 squid-2.5.STABLE9-LDAP_SUN_SDK.patch, NONE, 1.1 squid-2.5.STABLE9-aufs.patch, NONE, 1.1 squid-2.5.STABLE9-aufs_shutdown.patch, NONE, 1.1 squid-2.5.STABLE9-disable_hostname_checks.patch, NONE, 1.1 squid-2.5.STABLE9-libbind.patch, NONE, 1.1 squid-2.5.STABLE9-long_basic_auth.patch, NONE, 1.1 squid-2.5.STABLE9-rename_cleanup.patch, NONE, 1.1 squid.spec, 1.30, 1.31
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Tue Mar 29 18:42:39 UTC 2005
- Previous message (by thread): rpms/gnome-themes/devel .cvsignore, 1.14, 1.15 gnome-themes-2.10.0-clearlooks.patch, 1.1, 1.2 gnome-themes.spec, 1.20, 1.21 sources, 1.14, 1.15
- Next message (by thread): rpms/gtk2-engines/devel .cvsignore, 1.7, 1.8 gtk2-engines.spec, 1.16, 1.17 sources, 1.7, 1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvs/dist/rpms/squid/FC-3
In directory cvs.devel.redhat.com:/tmp/cvs-serv29201
Modified Files:
squid.spec
Added Files:
squid-2.5.STABLE9-2GB.patch
squid-2.5.STABLE9-CONNECT_truncated.patch
squid-2.5.STABLE9-LDAP_SUN_SDK.patch
squid-2.5.STABLE9-aufs.patch
squid-2.5.STABLE9-aufs_shutdown.patch
squid-2.5.STABLE9-disable_hostname_checks.patch
squid-2.5.STABLE9-libbind.patch
squid-2.5.STABLE9-long_basic_auth.patch
squid-2.5.STABLE9-rename_cleanup.patch
Log Message:
More upstream patches.
Add -libbind patch to prevent squid from picking up libbind.
Follow upstream removal of /etc/squid/errors.
squid-2.5.STABLE9-2GB.patch:
configure | 85 ++++
configure.in | 70 ++++
helpers/basic_auth/MSNT/smblib-util.c | 1
helpers/external_acl/winbind_group/wb_check_group.c | 2
include/autoconf.h.in | 6
lib/rfc1035.c | 38 !!
src/HttpHdrContRange.c | 14
src/HttpHdrRange.c | 34 !
src/HttpHeader.c | 28 +
src/HttpHeaderTools.c | 13
src/HttpReply.c | 16
src/MemBuf.c | 2
src/MemPool.c | 18 !
src/Packer.c | 16
src/access_log.c | 4
src/asn.c | 4
src/authenticate.c | 2
src/cache_cf.c | 94 +!!!!
src/cachemgr.c | 2
src/cf.data.pre | 2
src/client.c | 13
src/client_db.c | 2
src/client_side.c | 60 !!!
src/defines.h | 3
src/disk.c | 20 !
src/enums.h | 5
src/forward.c | 15
src/fs/aufs/async_io.c | 4
src/fs/aufs/store_asyncufs.h | 4
src/fs/aufs/store_dir_aufs.c | 314 ++++++++++++!!!!!
src/fs/aufs/store_io_aufs.c | 20 !
src/fs/coss/store_dir_coss.c | 16
src/fs/coss/store_io_coss.c | 8
src/fs/diskd/diskd.c | 14
src/fs/diskd/store_dir_diskd.c | 345 ++++++++++!!!!!!!!!
src/fs/diskd/store_diskd.h | 6
src/fs/diskd/store_io_diskd.c | 26 !
src/fs/ufs/store_dir_ufs.c | 314 ++++++++++++!!!!!
src/fs/ufs/store_io_ufs.c | 12
src/ftp.c | 62 !!!
src/globals.h | 2
src/helper.c | 4
src/htcp.c | 4
src/http.c | 6
src/mime.c | 2
src/net_db.c | 6
src/peer_digest.c | 10
src/protos.h | 76 !!!!
src/squid.h | 8
src/ssl.c | 12
src/stat.c | 26 !
src/stmem.c | 12
src/store.c | 43 !!
src/store_client.c | 46 !!
src/store_dir.c | 16
src/store_io.c | 6
src/store_log.c | 16
src/store_swapmeta.c | 8
src/store_swapout.c | 179 +++!!!!!!!
src/structs.h | 159 +-!!!!!!!
src/tools.c | 2
src/typedefs.h | 37 +!
62 files changed, 957 insertions(+), 47 deletions(-), 1390 modifications(!)
--- NEW FILE squid-2.5.STABLE9-2GB.patch ---
Index: squid/configure.in
diff -c squid/configure.in:1.251.2.84 squid/configure.in:1.251.2.86
*** squid/configure.in:1.251.2.84 Fri Mar 18 18:31:35 2005
--- squid/configure.in Sat Mar 26 14:58:19 2005
***************
*** 747,752 ****
--- 747,821 ----
fi
])
+ dnl Enable Large file support
+ buildmodel=""
+ needlargefiles=
+
+ AC_ARG_WITH(large-files,
+ [ --with-large-files Enable support for large files (logs etc).],
+ [ if test "$withval" = yes; then
+ needlargefiles=1
+ fi
+ ])
+
+ AC_ARG_ENABLE(large-cache-files,
+ [ --enable-large-cache-files
+ Enable support for large cache files (>2GB).
+ WARNING: on-disk cache format is changed by this option],
+ [ if test "$enableval" = "yes" ; then
+ echo "Large cache file support enabled"
+ AC_DEFINE(LARGE_CACHE_FILES, 1, [Support large cache files > 2GB])
+ dnl needlargefiles=1
+ fi
+ ])
+
+ dnl UNIX Build environment
+ AC_ARG_WITH(build-environment,
+ [ --with-build-environment=model
+ The build environment to use. Normally one of
+ POSIX_V6_ILP32_OFF32 32 bits
+ POSIX_V6_ILP32_OFFBIG 32 bits with large file support
+ POSIX_V6_LP64_OFF64 64 bits
+ POSIX_V6_LPBIG_OFFBIG large pointers and files
+ XBS5_ILP32_OFF32 32 bits (legacy)
+ XBS5_ILP32_OFFBIG 32 bits with large file support (legacy)
+ XBS5_LP64_OFF64 64 bits (legacy)
+ XBS5_LPBIG_OFFBIG large pointers and files (legacy)
+ default The default for your OS],
+ [ case "$enableval" in
+ yes|no)
+ echo "--with-build-environment expects a build environment string as used by getconf"
+ exit 1
+ ;;
+ _*)
+ buildmodel="$enableval"
+ ;;
+ *)
+ buildmodel="_$enableval"
+ ;;
+ esac
+ ])
+
+ if test $needlargefiles && test -z "$buildmodel"; then
+ for model in POSIX_V6_ILP32_OFFBIG XBS5_ILP32_OFFBIG POSIX_V6_LP64_OFF64 XBS5_LP64_OFF64 POSIX_V6_LPBIG_OFFBIG XBS5_LPBIG_OFFBIG; do
+ if test "`getconf _$model 2>/dev/null || true`" = 1 || test "`getconf $model 2>/dev/null || true`" ; then
+ buildmodel=$model
+ break
+ fi
+ done
+ if test -z "$buildmodel"; then
+ echo "WARNING: No suitable build environment found for large files. Trying to use _FILE_OFFSET_BITS=64"
+ sleep 1
+ CFLAGS="-D_FILE_OFFSET_BITS=64 $CFLAGS"
+ fi
+ fi
+ if test -n "$buildmodel" && test "$buildmodel" != "_default"; then
+ echo "Using $buildmodel build environment"
+ CFLAGS="`getconf ${buildmodel}_CFLAGS` $CFLAGS"
+ LIBS="`getconf ${buildmodel}_LIBS` $LIBS"
+ LDFLAGS="`getconf ${buildmodel}_LDFLAGS` $LDFLAGS"
+ fi
+
AM_CONDITIONAL(MAKE_LEAKFINDER, false)
dnl Enable Leak Finding Functions
AC_ARG_ENABLE(leakfinder,
***************
*** 1743,1748 ****
--- 1812,1818 ----
srand48 \
srandom \
statfs \
+ strtoll \
sysconf \
syslog \
timegm \
Index: squid/configure
diff -c squid/configure:1.248.2.85 squid/configure:1.248.2.87
*** squid/configure:1.248.2.85 Fri Mar 18 18:31:54 2005
--- squid/configure Sat Mar 26 14:59:01 2005
***************
*** 129,134 ****
--- 129,152 ----
--enable-linux-netfilter
Enable Transparent Proxy support for Linux 2.4."
ac_help="$ac_help
+ --with-large-files Enable support for large files (logs etc)."
+ ac_help="$ac_help
+ --enable-large-cache-files
+ Enable support for large cache files (>2GB).
+ WARNING: on-disk cache format is changed by this option"
+ ac_help="$ac_help
+ --with-build-environment=model
+ The build environment to use. Normally one of
+ POSIX_V6_ILP32_OFF32 32 bits
+ POSIX_V6_ILP32_OFFBIG 32 bits with large file support
+ POSIX_V6_LP64_OFF64 64 bits
+ POSIX_V6_LPBIG_OFFBIG large pointers and files
+ XBS5_ILP32_OFF32 32 bits (legacy)
+ XBS5_ILP32_OFFBIG 32 bits with large file support (legacy)
+ XBS5_LP64_OFF64 64 bits (legacy)
+ XBS5_LPBIG_OFFBIG large pointers and files (legacy)
+ default The default for your OS"
+ ac_help="$ac_help
--enable-leakfinder
Enable Leak Finding code. Enabling this alone
does nothing; you also have to modify the source
***************
*** 2585,2590 ****
--- 2603,2674 ----
fi
+ buildmodel=""
+ needlargefiles=
+
+ # Check whether --with-large-files or --without-large-files was given.
+ if test "${with_large_files+set}" = set; then
+ withval="$with_large_files"
+ if test "$withval" = yes; then
+ needlargefiles=1
+ fi
+
+ fi
+
+
+ # Check whether --enable-large-cache-files or --disable-large-cache-files was given.
+ if test "${enable_large_cache_files+set}" = set; then
+ enableval="$enable_large_cache_files"
+ if test "$enableval" = "yes" ; then
+ echo "Large cache file support enabled"
+ cat >> confdefs.h <<\EOF
+ #define LARGE_CACHE_FILES 1
+ EOF
+
+ fi
+
+ fi
+
+
+ # Check whether --with-build-environment or --without-build-environment was given.
+ if test "${with_build_environment+set}" = set; then
+ withval="$with_build_environment"
+ case "$enableval" in
+ yes|no)
+ echo "--with-build-environment expects a build environment string as used by getconf"
+ exit 1
+ ;;
+ _*)
+ buildmodel="$enableval"
+ ;;
+ *)
+ buildmodel="_$enableval"
+ ;;
+ esac
+
+ fi
+
+
+ if test $needlargefiles && test -z "$buildmodel"; then
+ for model in POSIX_V6_ILP32_OFFBIG XBS5_ILP32_OFFBIG POSIX_V6_LP64_OFF64 XBS5_LP64_OFF64 POSIX_V6_LPBIG_OFFBIG XBS5_LPBIG_OFFBIG; do
+ if test "`getconf _$model 2>/dev/null || true`" = 1 || test "`getconf $model 2>/dev/null || true`" ; then
+ buildmodel=$model
+ break
+ fi
+ done
+ if test -z "$buildmodel"; then
+ echo "WARNING: No suitable build environment found for large files. Trying to use _FILE_OFFSET_BITS=64"
+ sleep 1
+ CFLAGS="-D_FILE_OFFSET_BITS=64 $CFLAGS"
+ fi
+ fi
+ if test -n "$buildmodel" && test "$buildmodel" != "_default"; then
+ echo "Using $buildmodel build environment"
+ CFLAGS="`getconf ${buildmodel}_CFLAGS` $CFLAGS"
+ LIBS="`getconf ${buildmodel}_LIBS` $LIBS"
+ LDFLAGS="`getconf ${buildmodel}_LDFLAGS` $LDFLAGS"
+ fi
+
if false; then
***************
[...7604 lines suppressed...]
time_t lastref,
***************
*** 845,851 ****
fclose(fp);
func = storeUfsDirRebuildFromDirectory;
} else {
! func = storeUfsDirRebuildFromSwapLog;
rb->log = fp;
rb->flags.clean = (unsigned int) clean;
}
--- 1086,1092 ----
fclose(fp);
func = storeUfsDirRebuildFromDirectory;
} else {
! func = storeUfsDirRebuildFromSwapLogCheckVersion;
rb->log = fp;
rb->flags.clean = (unsigned int) clean;
}
***************
*** 885,890 ****
--- 1126,1156 ----
debug(47, 3) ("Cache Dir #%d log opened on FD %d\n", sd->index, fd);
}
+ static void
+ storeSwapLogDataFree(void *s)
+ {
+ memFree(s, MEM_SWAP_LOG_DATA);
+ }
+
+ static void
+ storeUfsWriteSwapLogheader(int fd)
+ {
+ storeSwapLogHeader *hdr = memAllocate(MEM_SWAP_LOG_DATA);
+ hdr->op = SWAP_LOG_VERSION;
+ hdr->version = 1;
+ hdr->record_size = sizeof(storeSwapLogData);
+ /* The header size is a full log record to keep some level of backward
+ * compatibility even if the actual header is smaller
+ */
+ file_write(fd,
+ -1,
+ hdr,
+ sizeof(storeSwapLogData),
+ NULL,
+ NULL,
+ (FREE *) storeSwapLogDataFree);
+ }
+
static FILE *
storeUfsDirOpenTmpSwapLog(SwapDir * sd, int *clean_flag, int *zero_flag)
{
***************
*** 914,919 ****
--- 1180,1186 ----
fatal("storeDirOpenTmpSwapLog: Failed to open swap log.");
}
ufsinfo->swaplog_fd = fd;
+ storeUfsWriteSwapLogheader(fd);
/* open a read-only stream of the old log */
fp = fopen(swaplog_path, "r");
if (fp == NULL) {
***************
*** 942,948 ****
char *new;
char *cln;
char *outbuf;
! off_t outbuf_offset;
int fd;
RemovalPolicyWalker *walker;
};
--- 1209,1215 ----
char *new;
char *cln;
char *outbuf;
! int outbuf_offset;
int fd;
RemovalPolicyWalker *walker;
};
***************
*** 973,978 ****
--- 1240,1246 ----
xfree(state);
return -1;
}
+ storeUfsWriteSwapLogheader(state->fd);
state->cur = xstrdup(storeUfsDirSwapLogFile(sd, NULL));
state->cln = xstrdup(storeUfsDirSwapLogFile(sd, ".last-clean"));
state->outbuf = xcalloc(CLEAN_BUF_SZ, 1);
***************
*** 1101,1112 ****
}
static void
- storeSwapLogDataFree(void *s)
- {
- memFree(s, MEM_SWAP_LOG_DATA);
- }
-
- static void
storeUfsDirSwapLog(const SwapDir * sd, const StoreEntry * e, int op)
{
ufsinfo_t *ufsinfo = (ufsinfo_t *) sd->fsdata;
--- 1369,1374 ----
Index: squid/src/fs/ufs/store_io_ufs.c
diff -c squid/src/fs/ufs/store_io_ufs.c:1.9.2.4 squid/src/fs/ufs/store_io_ufs.c:1.9.2.6
*** squid/src/fs/ufs/store_io_ufs.c:1.9.2.4 Sat Jul 17 13:44:20 2004
--- squid/src/fs/ufs/store_io_ufs.c Sat Mar 26 15:44:10 2005
***************
*** 150,156 ****
}
void
! storeUfsRead(SwapDir * SD, storeIOState * sio, char *buf, size_t size, off_t offset, STRCB * callback, void *callback_data)
{
ufsstate_t *ufsstate = (ufsstate_t *) sio->fsstate;
--- 150,156 ----
}
void
! storeUfsRead(SwapDir * SD, storeIOState * sio, char *buf, size_t size, squid_off_t offset, STRCB * callback, void *callback_data)
{
ufsstate_t *ufsstate = (ufsstate_t *) sio->fsstate;
***************
*** 166,184 ****
file_read(ufsstate->fd,
buf,
size,
! offset,
storeUfsReadDone,
sio);
}
void
! storeUfsWrite(SwapDir * SD, storeIOState * sio, char *buf, size_t size, off_t offset, FREE * free_func)
{
ufsstate_t *ufsstate = (ufsstate_t *) sio->fsstate;
debug(79, 3) ("storeUfsWrite: dirn %d, fileno %08X, FD %d\n", sio->swap_dirn, sio->swap_filen, ufsstate->fd);
ufsstate->flags.writing = 1;
file_write(ufsstate->fd,
! offset,
buf,
size,
storeUfsWriteDone,
--- 166,184 ----
file_read(ufsstate->fd,
buf,
size,
! (off_t) offset,
storeUfsReadDone,
sio);
}
void
! storeUfsWrite(SwapDir * SD, storeIOState * sio, char *buf, size_t size, squid_off_t offset, FREE * free_func)
{
ufsstate_t *ufsstate = (ufsstate_t *) sio->fsstate;
debug(79, 3) ("storeUfsWrite: dirn %d, fileno %08X, FD %d\n", sio->swap_dirn, sio->swap_filen, ufsstate->fd);
ufsstate->flags.writing = 1;
file_write(ufsstate->fd,
! (off_t) offset,
buf,
size,
storeUfsWriteDone,
***************
*** 213,219 ****
debug(79, 3) ("storeUfsReadDone: got failure (%d)\n", errflag);
rlen = -1;
} else {
! rlen = (ssize_t) len;
sio->offset += len;
}
assert(callback);
--- 213,219 ----
debug(79, 3) ("storeUfsReadDone: got failure (%d)\n", errflag);
rlen = -1;
} else {
! rlen = len;
sio->offset += len;
}
assert(callback);
***************
*** 221,227 ****
sio->read.callback = NULL;
sio->read.callback_data = NULL;
if (cbdataValid(their_data))
! callback(their_data, buf, (size_t) rlen);
cbdataUnlock(their_data);
}
--- 221,227 ----
sio->read.callback = NULL;
sio->read.callback_data = NULL;
if (cbdataValid(their_data))
! callback(their_data, buf, rlen);
cbdataUnlock(their_data);
}
squid-2.5.STABLE9-CONNECT_truncated.patch:
ssl.c | 34 ++++++++++++++!!!!!!!!!!!!!!!!!!!!
1 files changed, 14 insertions(+), 20 modifications(!)
--- NEW FILE squid-2.5.STABLE9-CONNECT_truncated.patch ---
Index: squid/src/ssl.c
diff -c squid/src/ssl.c:1.118.2.7 squid/src/ssl.c:1.118.2.9
*** squid/src/ssl.c:1.118.2.7 Mon Sep 27 12:07:30 2004
--- squid/src/ssl.c Mon Mar 21 12:39:29 2005
***************
*** 75,80 ****
--- 75,92 ----
#endif
static void
+ sslAbort(SslStateData * sslState)
+ {
+ debug(26, 3) ("sslAbort: FD %d/%d\n", sslState->client.fd, sslState->server.fd);
+ cbdataLock(sslState);
+ if (sslState->client.fd > -1)
+ comm_close(sslState->client.fd);
+ if (sslState->server.fd > -1)
+ comm_close(sslState->server.fd);
+ cbdataUnlock(sslState);
+ }
+
+ static void
sslServerClosed(int fd, void *data)
{
SslStateData *sslState = data;
***************
*** 92,100 ****
debug(26, 3) ("sslClientClosed: FD %d\n", fd);
assert(fd == sslState->client.fd);
sslState->client.fd = -1;
! if (sslState->server.fd != -1)
! comm_close(sslState->server.fd);
! else
sslStateFree(sslState);
}
--- 104,110 ----
debug(26, 3) ("sslClientClosed: FD %d\n", fd);
assert(fd == sslState->client.fd);
sslState->client.fd = -1;
! if (sslState->server.fd == -1)
sslStateFree(sslState);
}
***************
*** 152,158 ****
sslState,
Config.Timeout.read);
}
! } else if (sslState->client.len == 0) {
comm_close(sslState->server.fd);
}
if (!sslState->connected) {
--- 162,168 ----
sslState,
Config.Timeout.read);
}
! } else if (sslState->client.len == 0 && sslState->server.fd > -1) {
comm_close(sslState->server.fd);
}
if (!sslState->connected) {
***************
*** 183,191 ****
sslState,
Config.Timeout.read);
}
! } else if (sslState->client.fd == -1) {
! /* client already closed, nothing more to do */
! } else if (sslState->server.len == 0) {
comm_close(sslState->client.fd);
}
}
--- 193,199 ----
sslState,
Config.Timeout.read);
}
! } else if (sslState->server.len == 0 && sslState->client.fd > -1) {
comm_close(sslState->client.fd);
}
}
***************
*** 262,268 ****
debug(50, level) ("sslReadClient: FD %d: read failure: %s\n",
fd, xstrerror());
if (!ignoreErrno(errno))
! comm_close(fd);
} else if (len == 0) {
comm_close(fd);
}
--- 270,276 ----
debug(50, level) ("sslReadClient: FD %d: read failure: %s\n",
fd, xstrerror());
if (!ignoreErrno(errno))
! sslAbort(sslState);
} else if (len == 0) {
comm_close(fd);
}
***************
*** 303,309 ****
debug(50, ignoreErrno(errno) ? 3 : 1)
("sslWriteServer: FD %d: write failure: %s.\n", fd, xstrerror());
if (!ignoreErrno(errno))
! comm_close(fd);
}
if (cbdataValid(sslState))
sslSetSelect(sslState);
--- 311,317 ----
debug(50, ignoreErrno(errno) ? 3 : 1)
("sslWriteServer: FD %d: write failure: %s.\n", fd, xstrerror());
if (!ignoreErrno(errno))
! sslAbort(sslState);
}
if (cbdataValid(sslState))
sslSetSelect(sslState);
***************
*** 347,353 ****
debug(50, ignoreErrno(errno) ? 3 : 1)
("sslWriteClient: FD %d: write failure: %s.\n", fd, xstrerror());
if (!ignoreErrno(errno))
! comm_close(fd);
}
if (cbdataValid(sslState))
sslSetSelect(sslState);
--- 355,361 ----
debug(50, ignoreErrno(errno) ? 3 : 1)
("sslWriteClient: FD %d: write failure: %s.\n", fd, xstrerror());
if (!ignoreErrno(errno))
! sslAbort(sslState);
}
if (cbdataValid(sslState))
sslSetSelect(sslState);
***************
*** 359,365 ****
{
SslStateData *sslState = data;
debug(26, 3) ("sslTimeout: FD %d\n", fd);
! comm_close(sslState->client.fd);
}
static void
--- 367,373 ----
{
SslStateData *sslState = data;
debug(26, 3) ("sslTimeout: FD %d\n", fd);
! sslAbort(sslState);
}
static void
***************
*** 383,389 ****
static void
! sslConnectDone(int fdnotused, int status, void *data)
{
SslStateData *sslState = data;
request_t *request = sslState->request;
--- 391,397 ----
static void
! sslConnectDone(int fd, int status, void *data)
{
SslStateData *sslState = data;
request_t *request = sslState->request;
***************
*** 399,404 ****
--- 407,413 ----
sslState->host);
if (status == COMM_ERR_DNS) {
debug(26, 4) ("sslConnect: Unknown host: %s\n", sslState->host);
+ comm_close(fd);
err = errorCon(ERR_DNS_FAIL, HTTP_NOT_FOUND);
*sslState->status_ptr = HTTP_NOT_FOUND;
err->request = requestLink(request);
***************
*** 407,412 ****
--- 416,422 ----
err->callback_data = sslState;
errorSend(sslState->client.fd, err);
} else if (status != COMM_OK) {
+ comm_close(fd);
err = errorCon(ERR_CONNECT_FAIL, HTTP_SERVICE_UNAVAILABLE);
*sslState->status_ptr = HTTP_SERVICE_UNAVAILABLE;
err->xerrno = errno;
squid-2.5.STABLE9-LDAP_SUN_SDK.patch:
configure | 39 +++++++++++++++++++++
configure.in | 4 ++
helpers/basic_auth/LDAP/Makefile.in | 3 !
helpers/basic_auth/LDAP/squid_ldap_auth.c | 17 !!!!!!!!!
helpers/external_acl/ldap_group/Makefile.am | 2 !
helpers/external_acl/ldap_group/Makefile.in | 3 !
helpers/external_acl/ldap_group/squid_ldap_group.c | 23 !!!!!!!!!!!!
7 files changed, 46 insertions(+), 45 modifications(!)
--- NEW FILE squid-2.5.STABLE9-LDAP_SUN_SDK.patch ---
Index: squid/helpers/basic_auth/LDAP/squid_ldap_auth.c
diff -c squid/helpers/basic_auth/LDAP/squid_ldap_auth.c:1.21.2.19 squid/helpers/basic_auth/LDAP/squid_ldap_auth.c:1.21.2.20
*** squid/helpers/basic_auth/LDAP/squid_ldap_auth.c:1.21.2.19 Sun Feb 20 12:07:44 2005
--- squid/helpers/basic_auth/LDAP/squid_ldap_auth.c Fri Mar 18 17:53:55 2005
***************
*** 252,266 ****
if (version == -1) {
version = LDAP_VERSION2;
}
! if (ldap_set_option(ld, LDAP_OPT_PROTOCOL_VERSION, &version)
! != LDAP_OPT_SUCCESS) {
fprintf(stderr, "Could not set LDAP_OPT_PROTOCOL_VERSION %d\n",
version);
exit(1);
}
! if (use_tls && (version == LDAP_VERSION3) && (ldap_start_tls_s(ld, NULL, NULL) != LDAP_SUCCESS)) {
! fprintf(stderr, "Could not Activate TLS connection\n");
exit(1);
}
#endif
squid_ldap_set_timelimit(ld, timelimit);
--- 252,275 ----
if (version == -1) {
version = LDAP_VERSION2;
}
! if (ldap_set_option(ld, LDAP_OPT_PROTOCOL_VERSION, &version) != LDAP_SUCCESS) {
fprintf(stderr, "Could not set LDAP_OPT_PROTOCOL_VERSION %d\n",
version);
exit(1);
}
! if (use_tls) {
! #ifdef LDAP_OPT_X_TLS
! if (version == LDAP_VERSION3 && ldap_start_tls_s(ld, NULL, NULL) != LDAP_SUCCESS) {
! fprintf(stderr, "Could not Activate TLS connection\n");
! exit(1);
! } else {
! fprintf(stderr, "TLS requires LDAP version 3\n");
! exit(1);
! }
! #else
! fprintf(stderr, "TLS not supported with your LDAP library\n");
exit(1);
+ #endif
}
#endif
squid_ldap_set_timelimit(ld, timelimit);
Index: squid/helpers/external_acl/ldap_group/squid_ldap_group.c
diff -c squid/helpers/external_acl/ldap_group/squid_ldap_group.c:1.2.2.21 squid/helpers/external_acl/ldap_group/squid_ldap_group.c:1.2.2.22
*** squid/helpers/external_acl/ldap_group/squid_ldap_group.c:1.2.2.21 Sat Feb 5 03:53:07 2005
--- squid/helpers/external_acl/ldap_group/squid_ldap_group.c Fri Mar 18 17:54:10 2005
***************
*** 488,506 ****
if (version == -1) {
version = LDAP_VERSION2;
}
! if (ldap_set_option(ld, LDAP_OPT_PROTOCOL_VERSION, &version)
! != LDAP_OPT_SUCCESS) {
fprintf(stderr, "Could not set LDAP_OPT_PROTOCOL_VERSION %d\n",
version);
ldap_unbind(ld);
ld = NULL;
break;
}
! if (use_tls && (version == LDAP_VERSION3) && (ldap_start_tls_s(ld, NULL, NULL) != LDAP_SUCCESS)) {
! fprintf(stderr, "Could not Activate TLS connection\n");
! ldap_unbind(ld);
! ld = NULL;
! break;
}
#endif
squid_ldap_set_timelimit(ld, timelimit);
--- 488,515 ----
if (version == -1) {
version = LDAP_VERSION2;
}
! if (ldap_set_option(ld, LDAP_OPT_PROTOCOL_VERSION, &version) != LDAP_SUCCESS) {
fprintf(stderr, "Could not set LDAP_OPT_PROTOCOL_VERSION %d\n",
version);
ldap_unbind(ld);
ld = NULL;
break;
}
! if (use_tls) {
! #ifdef LDAP_OPT_X_TLS
! if (version == LDAP_VERSION3 && ldap_start_tls_s(ld, NULL, NULL) != LDAP_SUCCESS) {
! fprintf(stderr, "Could not Activate TLS connection\n");
! ldap_unbind(ld);
! ld = NULL;
! break;
! } else {
! fprintf(stderr, "TLS requires LDAP version 3\n");
! exit(1);
! }
! #else
! fprintf(stderr, "TLS not supported with your LDAP library\n");
! exit(1);
! #endif
}
#endif
squid_ldap_set_timelimit(ld, timelimit);
Index: squid/configure.in
diff -c squid/configure.in:1.251.2.81 squid/configure.in:1.251.2.83
*** squid/configure.in:1.251.2.81 Wed Feb 23 16:53:39 2005
--- squid/configure.in Fri Mar 18 18:10:27 2005
***************
*** 1583,1588 ****
--- 1583,1592 ----
;;
esac
+ dnl LDAP helpers need to know if -llber is needed or not
+ AC_CHECK_LIB(lber, main, [LIB_LBER="-llber"])
+ AC_SUBST(LIB_LBER)
+
dnl System-specific library modifications
dnl
case "$host" in
Index: squid/configure
diff -c squid/configure:1.248.2.82 squid/configure:1.248.2.84
*** squid/configure:1.248.2.82 Wed Feb 23 18:12:26 2005
--- squid/configure Fri Mar 18 18:10:52 2005
***************
*** 7460,7465 ****
--- 7460,7503 ----
;;
esac
+ echo $ac_n "checking for main in -llber""... $ac_c" 1>&6
+ echo "configure:7465: checking for main in -llber" >&5
+ ac_lib_var=`echo lber'_'main | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ ac_save_LIBS="$LIBS"
+ LIBS="-llber $LIBS"
+ cat > conftest.$ac_ext <<EOF
+ #line 7473 "configure"
+ #include "confdefs.h"
+
+ int main() {
+ main()
+ ; return 0; }
+ EOF
+ if { (eval echo configure:7480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+ fi
+ rm -f conftest*
+ LIBS="$ac_save_LIBS"
+
+ fi
+ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ LIB_LBER="-llber"
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+
+
+
case "$host" in
i386-*-solaris2.*)
if test "$GCC" = "yes"; then
***************
*** 8930,8935 ****
--- 8968,8974 ----
s%@AR_R@%$AR_R%g
s%@ALLOCA@%$ALLOCA%g
s%@CRYPTLIB@%$CRYPTLIB%g
+ s%@LIB_LBER@%$LIB_LBER%g
s%@NEED_OWN_SNPRINTF_TRUE@%$NEED_OWN_SNPRINTF_TRUE%g
s%@NEED_OWN_SNPRINTF_FALSE@%$NEED_OWN_SNPRINTF_FALSE%g
s%@REGEXLIB@%$REGEXLIB%g
Index: squid/helpers/basic_auth/LDAP/Makefile.in
diff -c squid/helpers/basic_auth/LDAP/Makefile.in:1.8.2.13 squid/helpers/basic_auth/LDAP/Makefile.in:1.8.2.14
*** squid/helpers/basic_auth/LDAP/Makefile.in:1.8.2.13 Sat Jul 10 06:11:41 2004
--- squid/helpers/basic_auth/LDAP/Makefile.in Fri Mar 18 17:55:41 2005
***************
*** 88,93 ****
--- 88,94 ----
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+ LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
***************
*** 127,133 ****
EXTRA_DIST = squid_ldap_auth.8
squid_ldap_auth_SOURCES = squid_ldap_auth.c
! LDADD = -L$(top_builddir)/lib -lmiscutil -lldap -llber $(XTRA_LIBS)
INCLUDES = -I$(top_srcdir)/include
subdir = helpers/basic_auth/LDAP
mkinstalldirs = $(SHELL) $(top_srcdir)/cfgaux/mkinstalldirs
--- 128,134 ----
EXTRA_DIST = squid_ldap_auth.8
squid_ldap_auth_SOURCES = squid_ldap_auth.c
! LDADD = -L$(top_builddir)/lib -lmiscutil -lldap $(LIB_LBER) $(XTRA_LIBS)
INCLUDES = -I$(top_srcdir)/include
subdir = helpers/basic_auth/LDAP
mkinstalldirs = $(SHELL) $(top_srcdir)/cfgaux/mkinstalldirs
Index: squid/helpers/external_acl/ldap_group/Makefile.am
diff -c squid/helpers/external_acl/ldap_group/Makefile.am:1.1.2.3 squid/helpers/external_acl/ldap_group/Makefile.am:1.1.2.4
*** squid/helpers/external_acl/ldap_group/Makefile.am:1.1.2.3 Wed Dec 11 17:23:30 2002
--- squid/helpers/external_acl/ldap_group/Makefile.am Fri Mar 18 17:54:10 2005
***************
*** 11,14 ****
EXTRA_DIST = squid_ldap_group.8
squid_ldap_group_SOURCES = squid_ldap_group.c
! LDADD = -lldap -llber $(XTRA_LIBS)
--- 11,14 ----
EXTRA_DIST = squid_ldap_group.8
squid_ldap_group_SOURCES = squid_ldap_group.c
! LDADD = -lldap $(LIB_LBER) $(XTRA_LIBS)
Index: squid/helpers/external_acl/ldap_group/Makefile.in
diff -c squid/helpers/external_acl/ldap_group/Makefile.in:1.1.2.10 squid/helpers/external_acl/ldap_group/Makefile.in:1.1.2.11
*** squid/helpers/external_acl/ldap_group/Makefile.in:1.1.2.10 Sat Jul 10 06:11:42 2004
--- squid/helpers/external_acl/ldap_group/Makefile.in Fri Mar 18 17:55:49 2005
***************
*** 88,93 ****
--- 88,94 ----
LIBDLMALLOC = @LIBDLMALLOC@
LIBREGEX = @LIBREGEX@
LIBSASL = @LIBSASL@
+ LIB_LBER = @LIB_LBER@
LIB_MALLOC = @LIB_MALLOC@
LN = @LN@
LN_S = @LN_S@
***************
*** 127,133 ****
EXTRA_DIST = squid_ldap_group.8
squid_ldap_group_SOURCES = squid_ldap_group.c
! LDADD = -lldap -llber $(XTRA_LIBS)
subdir = helpers/external_acl/ldap_group
mkinstalldirs = $(SHELL) $(top_srcdir)/cfgaux/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/autoconf.h
--- 128,134 ----
EXTRA_DIST = squid_ldap_group.8
squid_ldap_group_SOURCES = squid_ldap_group.c
! LDADD = -lldap $(LIB_LBER) $(XTRA_LIBS)
subdir = helpers/external_acl/ldap_group
mkinstalldirs = $(SHELL) $(top_srcdir)/cfgaux/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/autoconf.h
squid-2.5.STABLE9-aufs.patch:
fs/aufs/aiops.c | 7 --!!!!!
fs/aufs/store_asyncufs.h | 3 +!!
fs/aufs/store_io_aufs.c | 26 ++++++++++++!!!!!!!!!!!!!!
protos.h | 2 ++
stmem.c | 30 +++++++++++++++++-!!!!!!!!!!!!
store_swapout.c | 2 !!
structs.h | 1 +
7 files changed, 33 insertions(+), 3 deletions(-), 35 modifications(!)
--- NEW FILE squid-2.5.STABLE9-aufs.patch ---
Index: squid/src/protos.h
diff -c squid/src/protos.h:1.420.2.27 squid/src/protos.h:1.420.2.28
*** squid/src/protos.h:1.420.2.27 Sun Feb 20 19:55:04 2005
--- squid/src/protos.h Fri Mar 18 17:01:52 2005
***************
*** 874,879 ****
--- 874,881 ----
extern ssize_t stmemCopy(const mem_hdr *, off_t, char *, size_t);
extern void stmemFree(mem_hdr *);
extern void stmemFreeData(mem_hdr *);
+ extern void stmemNodeFree(void *);
+ extern char *stmemNodeGet(mem_node *);
/* ----------------------------------------------------------------- */
Index: squid/src/stmem.c
diff -c squid/src/stmem.c:1.70 squid/src/stmem.c:1.70.2.2
*** squid/src/stmem.c:1.70 Wed Oct 24 02:19:08 2001
--- squid/src/stmem.c Sat Mar 19 04:41:39 2005
***************
*** 36,51 ****
#include "squid.h"
void
stmemFree(mem_hdr * mem)
{
mem_node *p;
while ((p = mem->head)) {
mem->head = p->next;
store_mem_size -= SM_PAGE_SIZE;
! if (p) {
! memFree(p, MEM_MEM_NODE);
! p = NULL;
! }
}
mem->head = mem->tail = NULL;
mem->origin_offset = 0;
--- 36,65 ----
#include "squid.h"
void
+ stmemNodeFree(void *buf)
+ {
+ mem_node *p = (mem_node *) buf;
+ if (!p->uses)
+ memFree(p, MEM_MEM_NODE);
+ else
+ p->uses--;
+ }
+
+ char *
+ stmemNodeGet(mem_node * p)
+ {
+ p->uses++;
+ return p->data;
+ }
+
+ void
stmemFree(mem_hdr * mem)
{
mem_node *p;
while ((p = mem->head)) {
mem->head = p->next;
store_mem_size -= SM_PAGE_SIZE;
! stmemNodeFree(p);
}
mem->head = mem->tail = NULL;
mem->origin_offset = 0;
***************
*** 55,61 ****
stmemFreeDataUpto(mem_hdr * mem, int target_offset)
{
int current_offset = mem->origin_offset;
- mem_node *lastp;
mem_node *p = mem->head;
while (p && ((current_offset + p->len) <= target_offset)) {
if (p == mem->tail) {
--- 69,74 ----
***************
*** 64,77 ****
mem->origin_offset = current_offset;
return current_offset;
} else {
! lastp = p;
p = p->next;
current_offset += lastp->len;
store_mem_size -= SM_PAGE_SIZE;
! if (lastp) {
! memFree(lastp, MEM_MEM_NODE);
! lastp = NULL;
! }
}
}
mem->head = p;
--- 77,87 ----
mem->origin_offset = current_offset;
return current_offset;
} else {
! mem_node *lastp = p;
p = p->next;
current_offset += lastp->len;
store_mem_size -= SM_PAGE_SIZE;
! stmemNodeFree(lastp);
}
}
mem->head = p;
Index: squid/src/store_swapout.c
diff -c squid/src/store_swapout.c:1.85.2.1 squid/src/store_swapout.c:1.85.2.2
*** squid/src/store_swapout.c:1.85.2.1 Sat Apr 13 15:47:21 2002
--- squid/src/store_swapout.c Fri Mar 18 17:01:52 2005
***************
*** 256,262 ****
debug(20, 3) ("storeSwapOut: swapping out %ld bytes from %ld\n",
(long int) swap_buf_len, (long int) mem->swapout.queue_offset);
mem->swapout.queue_offset += swap_buf_len;
! storeWrite(mem->swapout.sio, mem->swapout.memnode->data, swap_buf_len, -1, NULL);
/* the storeWrite() call might generate an error */
if (e->swap_status != SWAPOUT_WRITING)
break;
--- 256,262 ----
debug(20, 3) ("storeSwapOut: swapping out %ld bytes from %ld\n",
(long int) swap_buf_len, (long int) mem->swapout.queue_offset);
mem->swapout.queue_offset += swap_buf_len;
! storeWrite(mem->swapout.sio, stmemNodeGet(mem->swapout.memnode), swap_buf_len, -1, stmemNodeFree);
/* the storeWrite() call might generate an error */
if (e->swap_status != SWAPOUT_WRITING)
break;
Index: squid/src/structs.h
diff -c squid/src/structs.h:1.408.2.38 squid/src/structs.h:1.408.2.39
*** squid/src/structs.h:1.408.2.38 Wed Mar 2 19:18:29 2005
--- squid/src/structs.h Fri Mar 18 17:01:52 2005
***************
*** 1431,1436 ****
--- 1431,1437 ----
struct _mem_node {
char data[SM_PAGE_SIZE];
int len;
+ int uses;
mem_node *next;
};
Index: squid/src/fs/aufs/aiops.c
diff -c squid/src/fs/aufs/aiops.c:1.12.2.8 squid/src/fs/aufs/aiops.c:1.12.2.9
*** squid/src/fs/aufs/aiops.c:1.12.2.8 Wed Aug 6 08:16:26 2003
--- squid/src/fs/aufs/aiops.c Fri Mar 18 17:01:52 2005
***************
*** 92,98 ****
mode_t mode;
int fd;
char *bufferp;
- char *tmpbufp;
int buflen;
off_t offset;
int whence;
--- 92,97 ----
***************
*** 573,579 ****
case _AIO_OP_READ:
break;
case _AIO_OP_WRITE:
- squidaio_xfree(requestp->tmpbufp, requestp->buflen);
break;
default:
break;
--- 572,577 ----
***************
*** 671,678 ****
squidaio_init();
requestp = memPoolAlloc(squidaio_request_pool);
requestp->fd = fd;
! requestp->tmpbufp = (char *) squidaio_xmalloc(bufs);
! xmemcpy(requestp->tmpbufp, bufp, bufs);
requestp->buflen = bufs;
requestp->offset = offset;
requestp->whence = whence;
--- 669,675 ----
squidaio_init();
requestp = memPoolAlloc(squidaio_request_pool);
requestp->fd = fd;
! requestp->bufferp = bufp;
requestp->buflen = bufs;
requestp->offset = offset;
requestp->whence = whence;
***************
*** 688,694 ****
static void
squidaio_do_write(squidaio_request_t * requestp)
{
! requestp->ret = write(requestp->fd, requestp->tmpbufp, requestp->buflen);
requestp->err = errno;
}
--- 685,691 ----
static void
squidaio_do_write(squidaio_request_t * requestp)
{
! requestp->ret = write(requestp->fd, requestp->bufferp, requestp->buflen);
requestp->err = errno;
}
Index: squid/src/fs/aufs/store_asyncufs.h
diff -c squid/src/fs/aufs/store_asyncufs.h:1.9.2.2 squid/src/fs/aufs/store_asyncufs.h:1.9.2.3
*** squid/src/fs/aufs/store_asyncufs.h:1.9.2.2 Wed Aug 6 08:16:26 2003
--- squid/src/fs/aufs/store_asyncufs.h Fri Mar 18 17:01:52 2005
***************
*** 86,93 ****
unsigned int reading:1;
unsigned int writing:1;
unsigned int opening:1;
unsigned int write_kicking:1;
! unsigned int read_kicking:1;
unsigned int inreaddone:1;
} flags;
char *read_buf;
--- 86,94 ----
unsigned int reading:1;
unsigned int writing:1;
unsigned int opening:1;
+ #if !ASYNC_WRITE
unsigned int write_kicking:1;
! #endif
unsigned int inreaddone:1;
} flags;
char *read_buf;
Index: squid/src/fs/aufs/store_io_aufs.c
diff -c squid/src/fs/aufs/store_io_aufs.c:1.15.2.12 squid/src/fs/aufs/store_io_aufs.c:1.15.2.13
*** squid/src/fs/aufs/store_io_aufs.c:1.15.2.12 Sat Jun 5 13:42:14 2004
--- squid/src/fs/aufs/store_io_aufs.c Fri Mar 18 17:01:52 2005
***************
*** 393,410 ****
}
sio->offset += len;
#if ASYNC_WRITE
! if (!storeAufsKickWriteQueue(sio))
(void) 0;
else if (aiostate->flags.close_request)
storeAufsIOCallback(sio, errflag);
#else
if (!aiostate->flags.write_kicking) {
aiostate->flags.write_kicking = 1;
while (storeAufsKickWriteQueue(sio))
! (void) 0;
! aiostate->flags.write_kicking = 0;
! if (aiostate->flags.close_request)
! storeAufsIOCallback(sio, errflag);
}
#endif
loop_detect--;
--- 393,421 ----
}
sio->offset += len;
#if ASYNC_WRITE
! if (storeAufsKickWriteQueue(sio))
(void) 0;
else if (aiostate->flags.close_request)
storeAufsIOCallback(sio, errflag);
#else
+ /* loop around storeAufsKickWriteQueue to break recursion stack
+ * overflow when large amounts of data has been queued for write.
+ * As writes are blocking here we immediately get called again
+ * without going via the I/O event loop..
+ */
if (!aiostate->flags.write_kicking) {
+ /* cbdataLock to protect us from the storeAufsIOCallback on error above */
+ cbdataLock(sio);
aiostate->flags.write_kicking = 1;
while (storeAufsKickWriteQueue(sio))
! if (!cbdataValid(sio))
! break;
! if (cbdataValid(sio)) {
! aiostate->flags.write_kicking = 0;
! if (aiostate->flags.close_request)
! storeAufsIOCallback(sio, errflag);
! }
! cbdataUnlock(sio);
}
#endif
loop_detect--;
***************
*** 433,440 ****
--- 444,456 ----
if (fd < 0)
return;
debug(79, 9) ("%s:%d\n", __FILE__, __LINE__);
+ #if ASYNC_CLOSE
aioClose(fd);
fd_close(fd);
+ #else
+ aioCancel(fd);
+ file_close(fd);
+ #endif
store_open_disk_fd--;
statCounter.syscalls.disk.closes++;
debug(79, 9) ("%s:%d\n", __FILE__, __LINE__);
squid-2.5.STABLE9-aufs_shutdown.patch:
fs/aufs/aiops.c | 40 ++++++++++++++++-----------------!!!!!!
fs/aufs/async_io.c | 1
fs/aufs/store_asyncufs.h | 2 +
fs/aufs/store_dir_aufs.c | 48 ++++++++++-------------------------------!!!!!!
main.c | 2 -
5 files changed, 32 insertions(+), 49 deletions(-), 12 modifications(!)
--- NEW FILE squid-2.5.STABLE9-aufs_shutdown.patch ---
Index: squid/src/fs/aufs/aiops.c
diff -c squid/src/fs/aufs/aiops.c:1.12.2.9 squid/src/fs/aufs/aiops.c:1.12.2.10
*** squid/src/fs/aufs/aiops.c:1.12.2.9 Fri Mar 18 17:01:52 2005
--- squid/src/fs/aufs/aiops.c Sat Mar 19 16:02:29 2005
***************
*** 120,126 ****
unsigned long requests;
};
- static void squidaio_init(void);
static void squidaio_queue_request(squidaio_request_t *);
static void squidaio_cleanup_request(squidaio_request_t *);
static void *squidaio_thread_loop(void *);
--- 120,125 ----
***************
*** 255,261 ****
commSetSelect(fd, COMM_SELECT_READ, squidaio_fdhandler, NULL, 0);
}
! static void
squidaio_init(void)
{
int i;
--- 254,260 ----
commSetSelect(fd, COMM_SELECT_READ, squidaio_fdhandler, NULL, 0);
}
! void
squidaio_init(void)
{
int i;
***************
*** 307,314 ****
pipe(done_pipe);
done_fd = done_pipe[1];
done_fd_read = done_pipe[0];
! fd_open(done_pipe[0], FD_PIPE, "async-io completetion event: main");
! fd_open(done_pipe[1], FD_PIPE, "async-io completetion event: threads");
commSetNonBlocking(done_pipe[0]);
commSetNonBlocking(done_pipe[1]);
commSetSelect(done_pipe[0], COMM_SELECT_READ, squidaio_fdhandler, NULL, 0);
--- 306,313 ----
pipe(done_pipe);
done_fd = done_pipe[1];
done_fd_read = done_pipe[0];
! fd_open(done_fd_read, FD_PIPE, "async-io completion event: main");
! fd_open(done_fd, FD_PIPE, "async-io completion event: threads");
commSetNonBlocking(done_pipe[0]);
commSetNonBlocking(done_pipe[1]);
commSetSelect(done_pipe[0], COMM_SELECT_READ, squidaio_fdhandler, NULL, 0);
***************
*** 351,356 ****
--- 350,372 ----
squidaio_initialised = 1;
}
+ void
+ squidaio_shutdown(void)
+ {
+ if (!squidaio_initialised)
+ return;
+
+ /* This is the same as in squidaio_sync */
+ do {
+ squidaio_poll_queues();
+ } while (request_queue_len > 0);
+
+ close(done_fd);
+ close(done_fd_read);
+ fd_close(done_fd);
+ fd_close(done_fd_read);
+ }
+
static void *
squidaio_thread_loop(void *ptr)
***************
*** 606,613 ****
{
squidaio_request_t *requestp;
- if (!squidaio_initialised)
- squidaio_init();
requestp = memPoolAlloc(squidaio_request_pool);
requestp->path = (char *) squidaio_xstrdup(path);
requestp->oflag = oflag;
--- 622,627 ----
***************
*** 634,641 ****
{
squidaio_request_t *requestp;
- if (!squidaio_initialised)
- squidaio_init();
requestp = memPoolAlloc(squidaio_request_pool);
requestp->fd = fd;
requestp->bufferp = bufp;
--- 648,653 ----
***************
*** 665,672 ****
{
squidaio_request_t *requestp;
- if (!squidaio_initialised)
- squidaio_init();
requestp = memPoolAlloc(squidaio_request_pool);
requestp->fd = fd;
requestp->bufferp = bufp;
--- 677,682 ----
***************
*** 695,702 ****
{
squidaio_request_t *requestp;
- if (!squidaio_initialised)
- squidaio_init();
requestp = memPoolAlloc(squidaio_request_pool);
requestp->fd = fd;
requestp->resultp = resultp;
--- 705,710 ----
***************
*** 721,728 ****
{
squidaio_request_t *requestp;
- if (!squidaio_initialised)
- squidaio_init();
requestp = memPoolAlloc(squidaio_request_pool);
requestp->path = (char *) squidaio_xstrdup(path);
requestp->statp = sb;
--- 729,734 ----
***************
*** 749,756 ****
{
squidaio_request_t *requestp;
- if (!squidaio_initialised)
- squidaio_init();
requestp = memPoolAlloc(squidaio_request_pool);
requestp->path = squidaio_xstrdup(path);
requestp->resultp = resultp;
--- 755,760 ----
***************
*** 774,781 ****
{
squidaio_request_t *requestp;
- if (!squidaio_initialised)
- squidaio_init();
requestp = memPoolAlloc(squidaio_request_pool);
requestp->path = (char *) squidaio_xstrdup(path);
requestp->offset = length;
--- 778,783 ----
***************
*** 805,812 ****
squidaio_request_t *requestp;
int len;
- if (!squidaio_initialised)
- squidaio_init();
requestp = memPoolAlloc(squidaio_request_pool);
return -1;
}
--- 807,812 ----
Index: squid/src/fs/aufs/async_io.c
diff -c squid/src/fs/aufs/async_io.c:1.10.2.5 squid/src/fs/aufs/async_io.c:1.10.2.6
*** squid/src/fs/aufs/async_io.c:1.10.2.5 Fri Jan 3 18:19:42 2003
--- squid/src/fs/aufs/async_io.c Sat Mar 19 16:02:29 2005
***************
*** 103,108 ****
--- 103,109 ----
void
aioDone(void)
{
+ squidaio_shutdown();
memPoolDestroy(squidaio_ctrl_pool);
initialised = 0;
}
Index: squid/src/fs/aufs/store_asyncufs.h
diff -c squid/src/fs/aufs/store_asyncufs.h:1.9.2.3 squid/src/fs/aufs/store_asyncufs.h:1.9.2.4
*** squid/src/fs/aufs/store_asyncufs.h:1.9.2.3 Fri Mar 18 17:01:52 2005
--- squid/src/fs/aufs/store_asyncufs.h Sat Mar 19 16:02:29 2005
***************
*** 41,46 ****
--- 41,48 ----
typedef void AIOCB(int fd, void *cbdata, const char *buf, int aio_return, int aio_errno);
+ void squidaio_init(void);
+ void squidaio_shutdown(void);
int squidaio_cancel(squidaio_result_t *);
int squidaio_open(const char *, int, mode_t, squidaio_result_t *);
int squidaio_read(int, char *, int, off_t, int, squidaio_result_t *);
Index: squid/src/fs/aufs/store_dir_aufs.c
diff -c squid/src/fs/aufs/store_dir_aufs.c:1.40.2.9 squid/src/fs/aufs/store_dir_aufs.c:1.40.2.11
*** squid/src/fs/aufs/store_dir_aufs.c:1.40.2.9 Wed Aug 25 15:07:25 2004
--- squid/src/fs/aufs/store_dir_aufs.c Sat Mar 19 16:43:10 2005
***************
*** 111,117 ****
static QS rev_int_sort;
static int storeAufsDirClean(int swap_index);
static EVH storeAufsDirCleanEvent;
- static int storeAufsDirIs(SwapDir * sd);
static int storeAufsFilenoBelongsHere(int fn, int F0, int F1, int F2);
static int storeAufsCleanupDoubleCheck(SwapDir *, StoreEntry *);
static void storeAufsDirStats(SwapDir *, StoreEntry *);
--- 111,116 ----
***************
*** 331,340 ****
}
debug(50, 3) ("Cache Dir #%d log opened on FD %d\n", sd->index, fd);
aioinfo->swaplog_fd = fd;
- if (0 == n_asyncufs_dirs)
- assert(NULL == asyncufs_dir_index);
- n_asyncufs_dirs++;
- assert(n_asyncufs_dirs <= Config.cacheSwap.n_configured);
}
static void
--- 330,335 ----
***************
*** 347,356 ****
debug(47, 3) ("Cache Dir #%d log closed on FD %d\n",
sd->index, aioinfo->swaplog_fd);
aioinfo->swaplog_fd = -1;
- n_asyncufs_dirs--;
- assert(n_asyncufs_dirs >= 0);
- if (0 == n_asyncufs_dirs)
- safe_free(asyncufs_dir_index);
}
static void
--- 342,347 ----
***************
*** 364,369 ****
--- 355,361 ----
storeAufsDirInitBitmap(sd);
if (storeAufsDirVerifyCacheDirs(sd) < 0)
fatal(errmsg);
+ squidaio_init();
storeAufsDirOpenSwapLog(sd);
storeAufsDirRebuild(sd);
if (!started_clean_event) {
***************
*** 1227,1281 ****
static void
storeAufsDirCleanEvent(void *unused)
{
! static int swap_index = 0;
! int i;
int j = 0;
int n = 0;
/*
* Assert that there are AUFS cache_dirs configured, otherwise
* we should never be called.
*/
! assert(n_asyncufs_dirs);
! if (NULL == asyncufs_dir_index) {
SwapDir *sd;
squidaioinfo_t *aioinfo;
/*
- * Initialize the little array that translates AUFS cache_dir
- * number into the Config.cacheSwap.swapDirs array index.
- */
- asyncufs_dir_index = xcalloc(n_asyncufs_dirs, sizeof(*asyncufs_dir_index));
- for (i = 0, n = 0; i < Config.cacheSwap.n_configured; i++) {
- sd = &Config.cacheSwap.swapDirs[i];
- if (!storeAufsDirIs(sd))
- continue;
- asyncufs_dir_index[n++] = i;
- aioinfo = (squidaioinfo_t *) sd->fsdata;
- j += (aioinfo->l1 * aioinfo->l2);
- }
- assert(n == n_asyncufs_dirs);
- /*
* Start the storeAufsDirClean() swap_index with a random
* value. j equals the total number of AUFS level 2
* swap directories
*/
swap_index = (int) (squid_random() % j);
}
if (0 == store_dirs_rebuilding) {
n = storeAufsDirClean(swap_index);
swap_index++;
}
eventAdd("storeDirClean", storeAufsDirCleanEvent, NULL,
15.0 * exp(-0.25 * n), 1);
}
- static int
- storeAufsDirIs(SwapDir * sd)
- {
- if (strncmp(sd->type, "aufs", 4) == 0)
- return 1;
- return 0;
- }
-
/*
* Does swapfile number 'fn' belong in cachedir #F0,
* level1 dir #F1, level2 dir #F2?
--- 1219,1256 ----
static void
storeAufsDirCleanEvent(void *unused)
{
! static int swap_index = -1;
int j = 0;
int n = 0;
/*
* Assert that there are AUFS cache_dirs configured, otherwise
* we should never be called.
*/
! if (swap_index == -1) {
SwapDir *sd;
squidaioinfo_t *aioinfo;
/*
* Start the storeAufsDirClean() swap_index with a random
* value. j equals the total number of AUFS level 2
* swap directories
*/
+ for (n = 0; n < n_asyncufs_dirs; n++) {
+ sd = &Config.cacheSwap.swapDirs[asyncufs_dir_index[n]];
+ aioinfo = (squidaioinfo_t *) sd->fsdata;
+ j += (aioinfo->l1 * aioinfo->l2);
+ }
swap_index = (int) (squid_random() % j);
}
if (0 == store_dirs_rebuilding) {
n = storeAufsDirClean(swap_index);
swap_index++;
+ if (swap_index < 0)
+ swap_index = 0;
}
eventAdd("storeDirClean", storeAufsDirCleanEvent, NULL,
15.0 * exp(-0.25 * n), 1);
}
/*
* Does swapfile number 'fn' belong in cachedir #F0,
* level1 dir #F1, level2 dir #F2?
***************
*** 1689,1694 ****
--- 1664,1672 ----
/* Initialise replacement policy stuff */
sd->repl = createRemovalPolicy(Config.replPolicy);
+
+ asyncufs_dir_index = realloc(asyncufs_dir_index, (n_asyncufs_dirs + 1) * sizeof(*asyncufs_dir_index));
+ asyncufs_dir_index[n_asyncufs_dirs++] = index;
}
/*
Index: squid/src/main.c
diff -c squid/src/main.c:1.345.2.21 squid/src/main.c:1.345.2.22
*** squid/src/main.c:1.345.2.21 Sat Mar 19 15:46:28 2005
--- squid/src/main.c Sat Mar 19 16:56:23 2005
***************
*** 988,995 ****
fwdUninit();
#endif
storeDirSync(); /* Flush log close */
- #if PURIFY || XMALLOC_TRACE
storeFsDone();
configFreeMemory();
storeFreeMemory();
/*stmemFreeMemory(); */
--- 988,995 ----
fwdUninit();
#endif
storeDirSync(); /* Flush log close */
storeFsDone();
+ #if PURIFY || XMALLOC_TRACE
configFreeMemory();
storeFreeMemory();
/*stmemFreeMemory(); */
squid-2.5.STABLE9-disable_hostname_checks.patch:
configure | 16 ++!!!!!!!!!!!!!!
configure.in | 15 ++!!!!!!!!!!!!!
2 files changed, 4 insertions(+), 27 modifications(!)
--- NEW FILE squid-2.5.STABLE9-disable_hostname_checks.patch ---
Index: squid/configure.in
diff -c squid/configure.in:1.251.2.83 squid/configure.in:1.251.2.84
*** squid/configure.in:1.251.2.83 Fri Mar 18 18:10:27 2005
--- squid/configure.in Fri Mar 18 18:31:35 2005
***************
*** 804,811 ****
])
dnl Disable hostname checks
! enable_hostname_checks=1
! AC_ARG_ENABLE(hostname_checks,
[ --disable-hostname-checks
Squid by default rejects any host names with
odd characters in their name to conform with
--- 804,810 ----
])
dnl Disable hostname checks
! AC_ARG_ENABLE(hostname-checks,
[ --disable-hostname-checks
Squid by default rejects any host names with
odd characters in their name to conform with
***************
*** 815,827 ****
Squid does not reject such host names.. This
may be required to participate in testbeds for
international domain names.],
! [ if test "$enableval" = "no"; then
! echo "Disabling hostname sanity checks"
! enable_hostname_checks=0
! fi
! ])
! if test "$enable_hostname_checks" = 1; then
AC_DEFINE(CHECK_HOSTNAMES, 1, [Enable hostname sanity checks])
fi
dnl Enable underscore in hostnames
--- 814,826 ----
Squid does not reject such host names.. This
may be required to participate in testbeds for
international domain names.],
! [],
! [enable_hostname_checks=yes])
! if test "$enable_hostname_checks" = "yes"; then
! echo "Hostname sanity checks enabled"
AC_DEFINE(CHECK_HOSTNAMES, 1, [Enable hostname sanity checks])
+ else
+ echo "Disabling hostname sanity checks"
fi
dnl Enable underscore in hostnames
Index: squid/configure
diff -c squid/configure:1.248.2.84 squid/configure:1.248.2.85
*** squid/configure:1.248.2.84 Fri Mar 18 18:10:52 2005
--- squid/configure Fri Mar 18 18:31:54 2005
***************
*** 2687,2708 ****
fi
! enable_hostname_checks=1
! # Check whether --enable-hostname_checks or --disable-hostname_checks was given.
if test "${enable_hostname_checks+set}" = set; then
enableval="$enable_hostname_checks"
! if test "$enableval" = "no"; then
! echo "Disabling hostname sanity checks"
! enable_hostname_checks=0
! fi
!
fi
! if test "$enable_hostname_checks" = 1; then
cat >> confdefs.h <<\EOF
#define CHECK_HOSTNAMES 1
EOF
fi
# Check whether --enable-underscores or --disable-underscores was given.
--- 2687,2708 ----
fi
! # Check whether --enable-hostname-checks or --disable-hostname-checks was given.
if test "${enable_hostname_checks+set}" = set; then
enableval="$enable_hostname_checks"
! :
! else
! enable_hostname_checks=yes
fi
! if test "$enable_hostname_checks" = "yes"; then
! echo "Hostname sanity checks enabled"
cat >> confdefs.h <<\EOF
#define CHECK_HOSTNAMES 1
EOF
+ else
+ echo "Disabling hostname sanity checks"
fi
# Check whether --enable-underscores or --disable-underscores was given.
squid-2.5.STABLE9-libbind.patch:
configure | 94 +++++++++++++++++++++++++++++++-------------------------------
1 files changed, 47 insertions(+), 47 deletions(-)
--- NEW FILE squid-2.5.STABLE9-libbind.patch ---
--- squid-2.5.STABLE9/configure.libbind 2005-03-28 17:41:35.000000000 -0500
+++ squid-2.5.STABLE9/configure 2005-03-28 18:04:32.000000000 -0500
@@ -7058,53 +7058,53 @@
echo "$ac_t""no" 1>&6
fi
-echo $ac_n "checking for gethostbyname in -lbind""... $ac_c" 1>&6
-echo "configure:6979: checking for gethostbyname in -lbind" >&5
-ac_lib_var=`echo bind'_'gethostbyname | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lbind $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 6987 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char gethostbyname();
-
-int main() {
-gethostbyname()
-; return 0; }
-EOF
-if { (eval echo configure:6998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
- LIBS="-lbind $LIBS"
-
-else
- echo "$ac_t""no" 1>&6
-fi
-
+#echo $ac_n "checking for gethostbyname in -lbind""... $ac_c" 1>&6
+#echo "configure:6979: checking for gethostbyname in -lbind" >&5
+#ac_lib_var=`echo bind'_'gethostbyname | sed 'y%./+-%__p_%'`
+#if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+# echo $ac_n "(cached) $ac_c" 1>&6
+#else
+# ac_save_LIBS="$LIBS"
+#LIBS="-lbind $LIBS"
+#cat > conftest.$ac_ext <<EOF
+##line 6987 "configure"
+##include "confdefs.h"
+#/* Override any gcc2 internal prototype to avoid an error. */
+#/* We use char because int might match the return type of a gcc2
+# builtin and then its argument prototype would still apply. */
+#char gethostbyname();
+#
+#int main() {
+#gethostbyname()
+#; return 0; }
+#EOF
+#if { (eval echo configure:6998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+# rm -rf conftest*
+# eval "ac_cv_lib_$ac_lib_var=yes"
+#else
+# echo "configure: failed program was:" >&5
+# cat conftest.$ac_ext >&5
+# rm -rf conftest*
+# eval "ac_cv_lib_$ac_lib_var=no"
+#fi
+#rm -f conftest*
+#LIBS="$ac_save_LIBS"
+#
+#fi
+#if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+# echo "$ac_t""yes" 1>&6
+# ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+# -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+# cat >> confdefs.h <<EOF
+##define $ac_tr_lib 1
+#EOF
+#
+# LIBS="-lbind $LIBS"
+#
+#else
+# echo "$ac_t""no" 1>&6
+#fi
+ac_cv_lib_bind_gethostbyname="no"
if test $ac_cv_lib_bind_gethostbyname = "no" ; then
case "$host" in
i386-*-freebsd*)
squid-2.5.STABLE9-long_basic_auth.patch:
auth_basic.c | 10 -!!!!!!!!!
1 files changed, 1 deletion(-), 9 modifications(!)
--- NEW FILE squid-2.5.STABLE9-long_basic_auth.patch ---
Index: squid/src/auth/basic/auth_basic.c
diff -c squid/src/auth/basic/auth_basic.c:1.14.2.8 squid/src/auth/basic/auth_basic.c:1.14.2.9
*** squid/src/auth/basic/auth_basic.c:1.14.2.8 Sat Sep 25 15:03:49 2004
--- squid/src/auth/basic/auth_basic.c Fri Mar 18 17:15:29 2005
***************
*** 442,451 ****
* Don't allow NL or CR in the credentials.
* Oezguer Kesim <oec at codeblau.de>
*/
- strtok(cleartext, "\r\n");
debug(29, 9) ("authenticateBasicDecodeAuth: cleartext = '%s'\n", cleartext);
! local_basic.username = xstrndup(cleartext, USER_IDENT_SZ);
! xfree(cleartext);
if ((cleartext = strchr(local_basic.username, ':')) != NULL)
*(cleartext)++ = '\0';
local_basic.passwd = cleartext;
--- 442,455 ----
* Don't allow NL or CR in the credentials.
* Oezguer Kesim <oec at codeblau.de>
*/
debug(29, 9) ("authenticateBasicDecodeAuth: cleartext = '%s'\n", cleartext);
! if (strcspn(cleartext, "\r\n") != strlen(cleartext)) {
! debug(29, 1) ("authenticateBasicDecodeAuth: bad characters in authorization header '%s'\n",
! proxy_auth);
! xfree(cleartext);
! return;
! }
! local_basic.username = cleartext;
if ((cleartext = strchr(local_basic.username, ':')) != NULL)
*(cleartext)++ = '\0';
local_basic.passwd = cleartext;
squid-2.5.STABLE9-rename_cleanup.patch:
disk.c | 2 !!
fs/aufs/store_dir_aufs.c | 9 ---------
fs/coss/store_dir_coss.c | 9 ---------
fs/diskd/store_dir_diskd.c | 9 ---------
fs/ufs/store_dir_ufs.c | 11 ---------!!
tools.c | 3 +++
6 files changed, 3 insertions(+), 36 deletions(-), 4 modifications(!)
--- NEW FILE squid-2.5.STABLE9-rename_cleanup.patch ---
Index: squid/src/disk.c
diff -c squid/src/disk.c:1.157.2.5 squid/src/disk.c:1.157.2.6
*** squid/src/disk.c:1.157.2.5 Sat Mar 26 10:36:01 2005
--- squid/src/disk.c Sat Mar 26 16:27:10 2005
***************
*** 91,97 ****
read_callback(-1, F->read_data);
}
if (F->flags.write_daemon) {
! #if defined(_SQUID_MSWIN_) || defined(_SQUID_OS2_) || defined (_SQUID_CYGWIN_)
/*
* on some operating systems, you can not delete or rename
* open files, so we won't allow delayed close.
--- 91,97 ----
read_callback(-1, F->read_data);
}
if (F->flags.write_daemon) {
! #if defined(_SQUID_MSWIN_) || defined(_SQUID_OS2_) || defined(_SQUID_CYGWIN_)
/*
* on some operating systems, you can not delete or rename
* open files, so we won't allow delayed close.
Index: squid/src/tools.c
diff -c squid/src/tools.c:1.213.2.13 squid/src/tools.c:1.213.2.14
*** squid/src/tools.c:1.213.2.13 Fri Mar 25 19:50:54 2005
--- squid/src/tools.c Sat Mar 26 16:27:10 2005
***************
*** 939,944 ****
--- 939,947 ----
xrename(const char *from, const char *to)
{
debug(21, 2) ("xrename: renaming %s to %s\n", from, to);
+ #if defined(_SQUID_OS2_) || defined(_SQUID_CYGWIN_) || defined(_SQUID_MSWIN_)
+ remove(to);
+ #endif
if (0 == rename(from, to))
return 0;
debug(21, errno == ENOENT ? 2 : 1) ("xrename: Cannot rename %s to %s: %s\n",
Index: squid/src/fs/aufs/store_dir_aufs.c
diff -c squid/src/fs/aufs/store_dir_aufs.c:1.40.2.13 squid/src/fs/aufs/store_dir_aufs.c:1.40.2.14
*** squid/src/fs/aufs/store_dir_aufs.c:1.40.2.13 Sat Mar 26 15:29:25 2005
--- squid/src/fs/aufs/store_dir_aufs.c Sat Mar 26 16:27:10 2005
***************
*** 1100,1111 ****
char *new_path = xstrdup(storeAufsDirSwapLogFile(sd, ".new"));
int fd;
file_close(aioinfo->swaplog_fd);
- #if defined (_SQUID_OS2_) || defined (_SQUID_CYGWIN_)
- if (unlink(swaplog_path) < 0) {
- debug(50, 0) ("%s: %s\n", swaplog_path, xstrerror());
- fatal("storeAufsDirCloseTmpSwapLog: unlink failed");
- }
- #endif
if (xrename(new_path, swaplog_path) < 0) {
fatal("storeAufsDirCloseTmpSwapLog: rename failed");
}
--- 1100,1105 ----
***************
*** 1337,1345 ****
#if defined(_SQUID_OS2_) || defined (_SQUID_CYGWIN_)
file_close(state->fd);
state->fd = -1;
- if (unlink(state->cur) < 0)
- debug(50, 0) ("storeDirWriteCleanLogs: unlinkd failed: %s, %s\n",
- xstrerror(), state->cur);
#endif
xrename(state->new, state->cur);
}
--- 1331,1336 ----
Index: squid/src/fs/coss/store_dir_coss.c
diff -c squid/src/fs/coss/store_dir_coss.c:1.30.2.10 squid/src/fs/coss/store_dir_coss.c:1.30.2.11
*** squid/src/fs/coss/store_dir_coss.c:1.30.2.10 Fri Mar 25 19:50:55 2005
--- squid/src/fs/coss/store_dir_coss.c Sat Mar 26 16:27:10 2005
***************
*** 411,422 ****
char *new_path = xstrdup(storeCossDirSwapLogFile(sd, ".new"));
int fd;
file_close(cs->swaplog_fd);
- #ifdef _SQUID_OS2_
- if (unlink(swaplog_path) < 0) {
- debug(50, 0) ("%s: %s\n", swaplog_path, xstrerror());
- fatal("storeCossDirCloseTmpSwapLog: unlink failed");
- }
- #endif
if (xrename(new_path, swaplog_path) < 0) {
fatal("storeCossDirCloseTmpSwapLog: rename failed");
}
--- 411,416 ----
***************
*** 613,621 ****
#ifdef _SQUID_OS2_
file_close(state->fd);
state->fd = -1;
- if (unlink(cur) < 0)
- debug(50, 0) ("storeCossDirWriteCleanLogs: unlinkd failed: %s, %s\n",
- xstrerror(), cur);
#endif
xrename(state->new, state->cur);
}
--- 607,612 ----
Index: squid/src/fs/diskd/store_dir_diskd.c
diff -c squid/src/fs/diskd/store_dir_diskd.c:1.58.2.10 squid/src/fs/diskd/store_dir_diskd.c:1.58.2.11
*** squid/src/fs/diskd/store_dir_diskd.c:1.58.2.10 Sat Mar 26 15:29:25 2005
--- squid/src/fs/diskd/store_dir_diskd.c Sat Mar 26 16:27:11 2005
***************
*** 1320,1331 ****
char *new_path = xstrdup(storeDiskdDirSwapLogFile(sd, ".new"));
int fd;
file_close(diskdinfo->swaplog_fd);
- #ifdef _SQUID_OS2_
- if (unlink(swaplog_path) < 0) {
- debug(50, 0) ("%s: %s\n", swaplog_path, xstrerror());
- fatal("storeDiskdDirCloseTmpSwapLog: unlink failed");
- }
- #endif
if (xrename(new_path, swaplog_path) < 0) {
fatal("storeDiskdDirCloseTmpSwapLog: rename failed");
}
--- 1320,1325 ----
***************
*** 1549,1557 ****
#ifdef _SQUID_OS2_
file_close(state->fd);
state->fd = -1;
- if (unlink(cur) < 0)
- debug(50, 0) ("storeDirWriteCleanLogs: unlinkd failed: %s, %s\n",
- xstrerror(), cur);
#endif
xrename(state->new, state->cur);
}
--- 1543,1548 ----
Index: squid/src/fs/ufs/store_dir_ufs.c
diff -c squid/src/fs/ufs/store_dir_ufs.c:1.39.2.12 squid/src/fs/ufs/store_dir_ufs.c:1.39.2.13
*** squid/src/fs/ufs/store_dir_ufs.c:1.39.2.12 Sat Mar 26 15:29:26 2005
--- squid/src/fs/ufs/store_dir_ufs.c Sat Mar 26 16:27:11 2005
***************
*** 1106,1117 ****
char *new_path = xstrdup(storeUfsDirSwapLogFile(sd, ".new"));
int fd;
file_close(ufsinfo->swaplog_fd);
- #if defined (_SQUID_OS2_) || defined (_SQUID_CYGWIN_)
- if (unlink(swaplog_path) < 0) {
- debug(50, 0) ("%s: %s\n", swaplog_path, xstrerror());
- fatal("storeUfsDirCloseTmpSwapLog: unlink failed");
- }
- #endif
if (xrename(new_path, swaplog_path) < 0) {
fatal("storeUfsDirCloseTmpSwapLog: rename failed");
}
--- 1106,1111 ----
***************
*** 1340,1351 ****
fd = state->fd;
/* rename */
if (state->fd >= 0) {
! #if defined(_SQUID_OS2_) || defined (_SQUID_CYGWIN_)
file_close(state->fd);
state->fd = -1;
- if (unlink(state->cur) < 0)
- debug(50, 0) ("storeDirWriteCleanLogs: unlinkd failed: %s, %s\n",
- xstrerror(), state->cur);
#endif
xrename(state->new, state->cur);
}
--- 1334,1342 ----
fd = state->fd;
/* rename */
if (state->fd >= 0) {
! #if defined(_SQUID_OS2_) || defined(_SQUID_CYGWIN_) || defined(_SQUID_MSWIN_)
file_close(state->fd);
state->fd = -1;
#endif
xrename(state->new, state->cur);
}
Index: squid.spec
===================================================================
RCS file: /cvs/dist/rpms/squid/FC-3/squid.spec,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- squid.spec 16 Mar 2005 19:22:00 -0000 1.30
+++ squid.spec 29 Mar 2005 18:42:37 -0000 1.31
@@ -5,7 +5,7 @@
Summary: The Squid proxy caching server.
Name: squid
Version: 2.5.STABLE9
-Release: 1.FC3.3
+Release: 1.FC3.4
Epoch: 7
License: GPL
Group: System Environment/Daemons
@@ -32,6 +32,14 @@
Patch111: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE9-defer_digest_fetch.patch
Patch112: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE9-dup_content_length.patch
Patch113: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE9-excess_data.patch
+Patch114: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE9-aufs.patch
+Patch115: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE9-long_basic_auth.patch
+Patch116: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE9-CONNECT_truncated.patch
+Patch117: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE9-LDAP_SUN_SDK.patch
+Patch118: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE9-disable_hostname_checks.patch
+Patch119: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE9-aufs_shutdown.patch
+Patch120: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE9-2GB.patch
+Patch121: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE9-rename_cleanup.patch
# Local patches
# Putting upstream patches first lowers the chances that we'll need to modify
@@ -41,6 +49,7 @@
Patch203: squid-2.5.STABLE7-build.patch
Patch204: squid-2.5.STABLE4-perlpath.patch
Patch205: squid-2.5.STABLE5-pipe.patch
+Patch206: squid-2.5.STABLE9-libbind.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Prereq: /sbin/chkconfig logrotate shadow-utils
@@ -77,12 +86,21 @@
%patch111 -p1
%patch112 -p1
%patch113 -p1
+%patch114 -p1
+%patch115 -p1
+%patch116 -p1
+%patch117 -p1
+%patch118 -p1
+%patch119 -p1
+%patch120 -p1
+%patch121 -p1
%patch201 -p1 -b .config
%patch202 -p1 -b .location
%patch203 -p1 -b .build
%patch204 -p1 -b .perlpath
%patch205 -p1 -b .pipe
+%patch206 -p1 -b .libbind
%build
export CFLAGS="-fPIE -Os -g -pipe -fsigned-char" ; export LDFLAGS=-pie ;
@@ -133,7 +151,6 @@
bindir=$RPM_BUILD_ROOT/%{_sbindir} \
libexecdir=$RPM_BUILD_ROOT/%{_libdir}/squid
-ln -s %{_datadir}/squid/errors/English $RPM_BUILD_ROOT/etc/squid/errors
ln -s %{_datadir}/squid/icons $RPM_BUILD_ROOT/etc/squid/icons
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
@@ -171,9 +188,9 @@
/etc/squid/msntauth.conf.default
/etc/squid/squid.conf.default
/etc/squid/mime.conf.default
-%config(noreplace) /etc/squid/errors
%{_datadir}/squid
+%config(noreplace) %{_datadir}/squid/errors
%{_sbindir}/squid
%{_sbindir}/squidclient
%config(noreplace) /etc/squid/icons
@@ -199,92 +216,6 @@
%post
/sbin/chkconfig --add squid
-if [ $1 = 0 ]; then
- case "$LANG" in
- bg*)
- DIR=Bulgarian
- ;;
- ca*)
- DIR=Catalan
- ;;
- cs*)
- DIR=Czech
- ;;
- da*)
- DIR=Danish
- ;;
- nl*)
- DIR=Dutch
- ;;
- en*)
- DIR=English
- ;;
- ea*)
- DIR=Estonian
- ;;
- fi*)
- DIR=Finnish
- ;;
- fr*)
- DIR=French
- ;;
- de*)
- DIR=German
- ;;
- he*)
- DIR=Hebrew
- ;;
- hu*)
- DIR=Hungarian
- ;;
- it*)
- DIR=Italian
- ;;
- ja*)
- DIR=Japanese
- ;;
- kr*)
- DIR=Korean
- ;;
- pl*)
- DIR=Polish
- ;;
- pt*)
- DIR=Portuguese
- ;;
- ro*)
- DIR=Romanian
- ;;
- ru*)
- DIR=Russian-koi8-r
- ;;
- sr*)
- DIR=Serbian
- ;;
- sk*)
- DIR=Slovak
- ;;
- es*)
- DIR=Spanish
- ;;
- sv*)
- DIR=Swedish
- ;;
- zh_TW*)
- DIR=Traditional_Chinese
- ;;
- zh_CN*)
- DIR=Simplify_Chinese
- ;;
- tr*)
- DIR=Turkish
- ;;
- *)
- DIR=English
- ;;
- esac
- ln -snf %{_datadir}/squid/errors/$DIR /etc/squid/errors
-fi
%preun
if [ $1 = 0 ] ; then
@@ -302,6 +233,15 @@
chgrp squid /var/cache/samba/winbindd_privileged > /dev/null 2>& 1 || true
%changelog
+* Wed Mar 23 2005 Jay Fenlason <fenlason at redhat.com> 7:2.5.STABLE9-1.FC3.4
+- Add more upstream patches.
+- add the -libbind patch, to avoid picking up a new dependency on libbind.
+- Remove references to /etc/squid/errors from this spec, since squid
+ now uses {_datadir}/squid/errors/English/ by default (overridable in
+ /etc/squid/squid.conf, as always)
+- mark {_datadir}/squid/errors as config(noreplace) so custom error messages
+ won't get stomped on.
+
* Wed Mar 16 2005 Jay Fenlason <fenlason at redhat.com> 7:2.5.STABLE9-1.FC3.3
- Actually apply the -date patch.
- Previous message (by thread): rpms/gnome-themes/devel .cvsignore, 1.14, 1.15 gnome-themes-2.10.0-clearlooks.patch, 1.1, 1.2 gnome-themes.spec, 1.20, 1.21 sources, 1.14, 1.15
- Next message (by thread): rpms/gtk2-engines/devel .cvsignore, 1.7, 1.8 gtk2-engines.spec, 1.16, 1.17 sources, 1.7, 1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list