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

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