Rebase to latest stable upstream release 3.4.1
Fixed #1034306: fails to build for AArch64 Fixed: active ftp
This commit is contained in:
parent
86d9eb2cee
commit
23333d8759
@ -1,11 +1,61 @@
|
||||
--- ./src/ftp.cc 2013-04-30 06:47:06.000000000 +0200
|
||||
+++ ./src/ftp.cc 2013-07-04 14:42:06.000000000 +0200
|
||||
@@ -2555,7 +2555,7 @@
|
||||
/** \par
|
||||
* Checks for previous EPSV/PASV failures on this server/session.
|
||||
* Diverts to EPRT immediately if they are not working. */
|
||||
- if (!ftpState->flags.pasv_supported) {
|
||||
+ if (!ftpState->flags.pasv_supported && Config.Ftp.passive) {
|
||||
ftpSendEPRT(ftpState);
|
||||
--- ./src/ftp.cc 2013-12-09 02:20:54.000000000 +0100
|
||||
+++ ./src/ftp.cc 2013-12-30 13:08:20.216408559 +0100
|
||||
@@ -2786,6 +2786,7 @@
|
||||
}
|
||||
|
||||
ftpState->listenForDataChannel(temp, ftpState->entry->url());
|
||||
+ ftpState->data.listenConn = temp;
|
||||
}
|
||||
|
||||
/// \ingroup ServerProtocolFTPInternal
|
||||
@@ -2822,13 +2823,18 @@
|
||||
// pull out the internal IP address bytes to send in PORT command...
|
||||
// source them from the listen_conn->local
|
||||
|
||||
+ struct sockaddr_in addr;
|
||||
+ socklen_t addrlen = sizeof(addr);
|
||||
+ getsockname(ftpState->data.listenConn->fd, (struct sockaddr *) &addr, &addrlen);
|
||||
+ unsigned char port_high = ntohs(addr.sin_port) >> 8;
|
||||
+ unsigned char port_low = ntohs(addr.sin_port) & 0xff;
|
||||
+
|
||||
struct addrinfo *AI = NULL;
|
||||
ftpState->data.listenConn->local.getAddrInfo(AI, AF_INET);
|
||||
unsigned char *addrptr = (unsigned char *) &((struct sockaddr_in*)AI->ai_addr)->sin_addr;
|
||||
- unsigned char *portptr = (unsigned char *) &((struct sockaddr_in*)AI->ai_addr)->sin_port;
|
||||
snprintf(cbuf, CTRL_BUFLEN, "PORT %d,%d,%d,%d,%d,%d\r\n",
|
||||
addrptr[0], addrptr[1], addrptr[2], addrptr[3],
|
||||
- portptr[0], portptr[1]);
|
||||
+ port_high, port_low);
|
||||
ftpState->writeCommand(cbuf);
|
||||
ftpState->state = SENT_PORT;
|
||||
|
||||
@@ -2877,15 +2883,27 @@
|
||||
ftpFail(ftpState);
|
||||
return;
|
||||
}
|
||||
+
|
||||
+ unsigned int port;
|
||||
+ struct sockaddr_storage addr;
|
||||
+ socklen_t addrlen = sizeof(addr);
|
||||
+ getsockname(ftpState->data.listenConn->fd, (struct sockaddr *) &addr, &addrlen);
|
||||
+ if (addr.ss_family == AF_INET) {
|
||||
+ struct sockaddr_in *addr4 = (struct sockaddr_in*) &addr;
|
||||
+ port = ntohs( addr4->sin_port );
|
||||
+ } else {
|
||||
+ struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *) &addr;
|
||||
+ port = ntohs( addr6->sin6_port );
|
||||
+ }
|
||||
|
||||
char buf[MAX_IPSTRLEN];
|
||||
|
||||
/* RFC 2428 defines EPRT as IPv6 equivalent to IPv4 PORT command. */
|
||||
/* Which can be used by EITHER protocol. */
|
||||
- snprintf(cbuf, CTRL_BUFLEN, "EPRT |%d|%s|%d|\r\n",
|
||||
+ snprintf(cbuf, CTRL_BUFLEN, "EPRT |%d|%s|%u|\r\n",
|
||||
( ftpState->data.listenConn->local.isIPv6() ? 2 : 1 ),
|
||||
ftpState->data.listenConn->local.toStr(buf,MAX_IPSTRLEN),
|
||||
- ftpState->data.listenConn->local.port() );
|
||||
+ port );
|
||||
|
||||
ftpState->writeCommand(cbuf);
|
||||
ftpState->state = SENT_EPRT;
|
||||
|
4
sources
4
sources
@ -1,2 +1,2 @@
|
||||
dd016ff5f14b2548083b3882207914f6 squid-3.3.11.tar.xz
|
||||
0e9e95fb73e74c9ac88d3ebed277c443 squid-3.3.11.tar.xz.asc
|
||||
8fe456b7666f6e81a22bfd7ca20462cc squid-3.4.1.tar.xz
|
||||
2fff4b2893b6a122fe2bab10917174f7 squid-3.4.1.tar.xz.asc
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- ./src/cf.data.pre 2013-04-27 05:34:48.000000000 +0200
|
||||
+++ ./src/cf.data.pre 2013-05-03 10:13:16.007067356 +0200
|
||||
@@ -3889,7 +3889,7 @@
|
||||
@@ -4147,7 +4147,7 @@
|
||||
|
||||
NAME: logfile_rotate
|
||||
TYPE: int
|
||||
@ -9,7 +9,7 @@
|
||||
LOC: Config.Log.rotateNumber
|
||||
DOC_START
|
||||
Specifies the number of logfile rotations to make when you
|
||||
@@ -5313,11 +5313,11 @@
|
||||
@@ -5751,11 +5751,11 @@
|
||||
|
||||
NAME: cache_mgr
|
||||
TYPE: string
|
||||
|
@ -13,7 +13,7 @@ diff -up squid-3.1.9/aclocal.m4.ltdl squid-3.1.9/aclocal.m4
|
||||
diff -up squid-3.1.9/configure.ltdl squid-3.1.9/configure
|
||||
--- squid-3.1.9/configure.ltdl 2010-10-25 13:35:32.000000000 +0200
|
||||
+++ squid-3.1.9/configure 2010-11-01 14:14:55.320299060 +0100
|
||||
@@ -10286,7 +10286,7 @@ fi
|
||||
@@ -10375,7 +10375,7 @@ fi
|
||||
LIBTOOL_DEPS="$ltmain"
|
||||
|
||||
# Always use our own libtool.
|
||||
@ -50,7 +50,7 @@ diff -up squid-3.1.9/Makefile.in.ltdl squid-3.1.9/Makefile.in
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(top_srcdir)/configure \
|
||||
@@ -325,7 +325,7 @@ top_build_prefix = @top_build_prefix@
|
||||
@@ -374,7 +374,7 @@ top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects 1.5 foreign
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -up squid-3.2.0.9/compat/Makefile.in.fpic squid-3.2.0.9/compat/Makefile.in
|
||||
--- squid-3.2.0.9/compat/Makefile.in.fpic 2011-07-01 11:38:35.332618191 +0200
|
||||
+++ squid-3.2.0.9/compat/Makefile.in 2011-07-01 11:41:07.207345197 +0200
|
||||
@@ -321,7 +321,7 @@ target_alias = @target_alias@
|
||||
@@ -370,7 +370,7 @@ target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
@ -25,7 +25,7 @@ diff -up squid-3.2.0.9/snmplib/Makefile.am.fpic squid-3.2.0.9/snmplib/Makefile.a
|
||||
diff -up squid-3.2.0.9/snmplib/Makefile.in.fpic squid-3.2.0.9/snmplib/Makefile.in
|
||||
--- squid-3.2.0.9/snmplib/Makefile.in.fpic 2011-07-01 12:04:44.083181152 +0200
|
||||
+++ squid-3.2.0.9/snmplib/Makefile.in 2011-07-01 12:05:06.796437407 +0200
|
||||
@@ -290,7 +290,7 @@ target_alias = @target_alias@
|
||||
@@ -339,7 +339,7 @@ target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
23
squid.spec
23
squid.spec
@ -3,7 +3,7 @@
|
||||
## % define __find_requires %{SOURCE99}
|
||||
|
||||
Name: squid
|
||||
Version: 3.3.11
|
||||
Version: 3.4.1
|
||||
Release: 1%{?dist}
|
||||
Summary: The Squid proxy caching server
|
||||
Epoch: 7
|
||||
@ -11,8 +11,8 @@ Epoch: 7
|
||||
License: GPLv2+ and (LGPLv2+ and MIT and BSD and Public Domain)
|
||||
Group: System Environment/Daemons
|
||||
URL: http://www.squid-cache.org
|
||||
Source0: http://www.squid-cache.org/Versions/v3/3.3/squid-%{version}.tar.xz
|
||||
Source1: http://www.squid-cache.org/Versions/v3/3.3/squid-%{version}.tar.xz.asc
|
||||
Source0: http://www.squid-cache.org/Versions/v3/3.4/squid-%{version}.tar.xz
|
||||
Source1: http://www.squid-cache.org/Versions/v3/3.4/squid-%{version}.tar.xz.asc
|
||||
Source2: squid.init
|
||||
Source3: squid.logrotate
|
||||
Source4: squid.sysconfig
|
||||
@ -37,8 +37,7 @@ Patch202: squid-3.1.0.9-location.patch
|
||||
Patch203: squid-3.0.STABLE1-perlpath.patch
|
||||
Patch204: squid-3.2.0.9-fpic.patch
|
||||
Patch205: squid-3.1.9-ltdl.patch
|
||||
Patch206: squid-3.3.4-empty-pod2man.patch
|
||||
Patch207: active-ftp.patch
|
||||
Patch206: active-ftp.patch
|
||||
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Requires: bash >= 2.0
|
||||
@ -109,8 +108,7 @@ The squid-sysvinit contains SysV initscritps support.
|
||||
%patch203 -p1 -b .perlpath
|
||||
%patch204 -p1 -b .fpic
|
||||
%patch205 -p1 -b .ltdl
|
||||
%patch206 -p1 -b .empty-pod2man
|
||||
%patch207 -p1 -b .active-ftp
|
||||
%patch206 -p1 -b .active-ftp
|
||||
|
||||
%build
|
||||
%ifarch sparcv9 sparc64 s390 s390x
|
||||
@ -123,7 +121,6 @@ The squid-sysvinit contains SysV initscritps support.
|
||||
LDFLAGS="$RPM_LD_FLAGS -pie -Wl,-z,relro -Wl,-z,now"
|
||||
|
||||
%configure \
|
||||
--disable-strict-error-checking \
|
||||
--exec_prefix=/usr \
|
||||
--libexecdir=%{_libdir}/squid \
|
||||
--localstatedir=/var \
|
||||
@ -139,14 +136,15 @@ LDFLAGS="$RPM_LD_FLAGS -pie -Wl,-z,relro -Wl,-z,now"
|
||||
--enable-auth-ntlm="smb_lm,fake" \
|
||||
--enable-auth-digest="file,LDAP,eDirectory" \
|
||||
--enable-auth-negotiate="kerberos" \
|
||||
--enable-external-acl-helpers="ip_user,ldap_group,time_quota,session,unix_group,wbinfo_group" \
|
||||
--enable-external-acl-helpers="LDAP_group,time_quota,session,unix_group,wbinfo_group" \
|
||||
--enable-storeid-rewrite-helpers="file" \
|
||||
--enable-cache-digests \
|
||||
--enable-cachemgr-hostname=localhost \
|
||||
--enable-delay-pools \
|
||||
--enable-epoll \
|
||||
--enable-icap-client \
|
||||
--enable-ident-lookups \
|
||||
%ifnarch ppc64 ia64 x86_64 s390x
|
||||
%ifnarch ppc64 ia64 x86_64 s390x aarch64
|
||||
--with-large-files \
|
||||
%endif
|
||||
--enable-linux-netfilter \
|
||||
@ -314,6 +312,11 @@ fi
|
||||
/sbin/chkconfig --add squid >/dev/null 2>&1 || :
|
||||
|
||||
%changelog
|
||||
* Sat Dec 30 2013 Michal Luscon <mluscon@redhat.com> - 7:3.4.1-1
|
||||
- Rebase to latest stable upstream release 3.4.1
|
||||
- Fixed #1034306: fails to build for AArch64
|
||||
- Fixed: active ftp
|
||||
|
||||
* Tue Dec 03 2013 Henrik Nordstrom <henrik@henriknordstrom.net> - 7:3.3.11-1
|
||||
- Update to latest upstream bugfix version 3.3.11
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user