Blame SOURCES/BZ-1293378-ftp-disable-epsv.patch

d2a170
commit 8b41b097716abde0b4ad9af4e813da9e3ed6620b
d2a170
Author: Valentina Mukhamedzhanova <vmukhame@redhat.com>
d2a170
Date:   Mon Dec 21 16:29:34 2015 +0100
d2a170
d2a170
    Add ftp_disable_epsv config option
d2a170
d2a170
diff --git a/docs/yum.conf.5 b/docs/yum.conf.5
d2a170
index 27620b8..116829a 100644
d2a170
--- a/docs/yum.conf.5
d2a170
+++ b/docs/yum.conf.5
d2a170
@@ -439,6 +439,11 @@ default of 5 connections.  Note that there are also implicit per-mirror limits
d2a170
 and the downloader honors these too.
d2a170
 
d2a170
 .IP
d2a170
+\fBftp_disable_epsv \fR
d2a170
+This options disables Extended Passive Mode (the EPSV command) which does not
d2a170
+work correctly on some buggy ftp servers. Default is `0' (EPSV enabled).
d2a170
+
d2a170
+.IP
d2a170
 \fBdeltarpm\fR
d2a170
 
d2a170
 When non-zero, delta-RPM files are used if available.  The value specifies
d2a170
@@ -1114,6 +1119,11 @@ Overrides the \fBip_resolve\fR option from the [main] section for this
d2a170
 repository.
d2a170
 
d2a170
 .IP
d2a170
+\fBftp_disable_epsv\fR
d2a170
+Overrides the \fBftp_disable_epsv\fR option from the [main] section
d2a170
+for this repository.
d2a170
+
d2a170
+.IP
d2a170
 \fBdeltarpm_percentage\fR
d2a170
 Overrides the \fBdeltarpm_percentage\fR option from the [main] section
d2a170
 for this repository.
d2a170
diff --git a/yum/config.py b/yum/config.py
d2a170
index 77a1003..6bd8d24 100644
d2a170
--- a/yum/config.py
d2a170
+++ b/yum/config.py
d2a170
@@ -811,6 +811,7 @@ class YumConf(StartupConf):
d2a170
             allowed = ('ipv4', 'ipv6', 'whatever'),
d2a170
             mapper  = {'4': 'ipv4', '6': 'ipv6'})
d2a170
     max_connections = IntOption(0, range_min=0)
d2a170
+    ftp_disable_epsv = BoolOption(False)
d2a170
     deltarpm = IntOption(2, range_min=-16, range_max=128)
d2a170
     deltarpm_percentage = IntOption(75, range_min=0, range_max=100)
d2a170
     deltarpm_metadata_percentage = IntOption(100, range_min=0)
d2a170
@@ -1003,6 +1004,7 @@ class RepoConf(BaseConfig):
d2a170
     #  Rely on the above config. to do automatic disabling, and thus. no hack
d2a170
     # needed here.
d2a170
     deltarpm_metadata_percentage = Inherit(YumConf.deltarpm_metadata_percentage)
d2a170
+    ftp_disable_epsv = Inherit(YumConf.ftp_disable_epsv)
d2a170
 
d2a170
     http_caching = Inherit(YumConf.http_caching)
d2a170
     metadata_expire = Inherit(YumConf.metadata_expire)
d2a170
diff --git a/yum/yumRepo.py b/yum/yumRepo.py
d2a170
index 3dd0646..fc5d538 100644
d2a170
--- a/yum/yumRepo.py
d2a170
+++ b/yum/yumRepo.py
d2a170
@@ -675,6 +675,7 @@ class YumRepository(Repository, config.RepoConf):
d2a170
                  'user_agent': default_grabber.opts.user_agent,
d2a170
                  'username': self.username,
d2a170
                  'password': self.password,
d2a170
+                 'ftp_disable_epsv': self.ftp_disable_epsv,
d2a170
                  }
d2a170
         if self.proxy == 'libproxy':
d2a170
             opts['libproxy'] = True