python: satisfy setup.py 'setup_requires'
PATCH 1/1 python: satisfy setup.py 'setup_requires'
Python setuptools will attempt to satisfy the packages defined as 'setup_requires' in setup.py by first looking for the package availability locally and ultimately by downloading it from PyPI. This is actually a huge security hole and packages should move to using pip instead, but this is another story that the upstream packages have to address. This also disregards BB_NO_NETWORK and may prove to introduce host contamination.
The best approach is to ensure we have the -native version of the 'setup_requires' packages present such that setup.py will not attempt to complete the download from PyPI.
Make 'pbr' -native available and for packages which we have identified as having 'setup_requires' include 'pbr' add the necessary python-pbr-native DEPENDS.
---
When sending out patches today I dropped this one. This needs to be applied before any of the other patches I sent today.
Mark
meta-openstack/recipes-devtools/python/python-cliff_1.15.0.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-fixtures_1.3.1.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-glanceclient_git.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-heat_git.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-heatclient_git.bb | 5 +++++ .../recipes-devtools/python/python-keystoneclient_git.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-lockfile_0.10.2.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-mox3_0.9.0.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-oslo.config_git.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-oslo.context_git.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-oslo.i18n_git.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-oslo.log_git.bb | 5 +++++ .../recipes-devtools/python/python-oslo.serialization_git.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-oslo.utils_git.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-pbr_1.8.1.bb | 4 ++++ .../recipes-devtools/python/python-sqlalchemy-migrate_0.9.7.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-stevedore_1.9.0.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-swiftclient_git.bb | 5 +++++ .../recipes-devtools/python/python-testscenarios_0.5.0.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-testtools_1.8.0.bb | 8 ++++++-- meta-openstack/recipes-devtools/python/python-wsme_0.7.0.bb | 5 +++++ 21 files changed, 105 insertions(+), 2 deletions(-)
meta-openstack/recipes-devtools/python/python-cliff_1.15.0.bb +5 -0
@@ -19,6 +19,11 @@ DEPENDS += "\ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} += "python-prettytable \ python-cmd2 \ python-pbr \
meta-openstack/recipes-devtools/python/python-fixtures_1.3.1.bb +5 -0
@@ -25,6 +25,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} += "python-testtools \ python-pbr \ "
meta-openstack/recipes-devtools/python/python-glanceclient_git.bb +5 -0
@@ -24,6 +24,11 @@ inherit setuptools monitor rmargparse FILES_${PN} += "${datadir}/${SRCNAME}" +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} = "gmp \ python-warlock \ python-pyopenssl \
meta-openstack/recipes-devtools/python/python-heat_git.bb +5 -0
@@ -162,6 +162,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} += " \ python-heatclient \ python-sqlalchemy \
meta-openstack/recipes-devtools/python/python-heatclient_git.bb +5 -0
@@ -9,6 +9,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} +="python-cliff \ python-httplib2 \ python-iso8601 \
meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb +5 -0
@@ -25,6 +25,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} += " \ python-iso8601 \ python-prettytable \
meta-openstack/recipes-devtools/python/python-lockfile_0.10.2.bb +5 -0
@@ -19,6 +19,11 @@ DEPENDS += "\ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} += "\ python-pbr \ "
meta-openstack/recipes-devtools/python/python-mox3_0.9.0.bb +5 -0
@@ -20,6 +20,11 @@ DEPENDS += "\ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} += " \ python-pbr \ python-fixtures \
meta-openstack/recipes-devtools/python/python-oslo.config_git.bb +5 -0
@@ -19,6 +19,11 @@ DEPENDS += " \ python-pip \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} += " \ python-pbr \ python-netaddr \
meta-openstack/recipes-devtools/python/python-oslo.context_git.bb +5 -0
@@ -19,6 +19,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + # RDEPENDS_default: RDEPENDS_${PN} += " \ bash \
meta-openstack/recipes-devtools/python/python-oslo.i18n_git.bb +5 -0
@@ -21,6 +21,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + # RDEPENDS_default: RDEPENDS_${PN} += " \ python-babel \
meta-openstack/recipes-devtools/python/python-oslo.log_git.bb +5 -0
@@ -19,6 +19,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + # RDEPENDS_default: RDEPENDS_${PN} += " \ bash \
meta-openstack/recipes-devtools/python/python-oslo.serialization_git.bb +5 -0
@@ -20,6 +20,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + # RDEPENDS_default: RDEPENDS_${PN} += " \ python-pbr \
meta-openstack/recipes-devtools/python/python-oslo.utils_git.bb +5 -0
@@ -20,6 +20,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + # RDEPENDS_default: RDEPENDS_${PN} += " \ python-pbr \
meta-openstack/recipes-devtools/python/python-pbr_1.8.1.bb +4 -0
@@ -21,6 +21,10 @@ DEPENDS += " \ python-pip \ " +DEPENDS_class-native += "" + # RDEPENDS_default: RDEPENDS_${PN} += " \ " + +BBCLASSEXTEND = "native"
meta-openstack/recipes-devtools/python/python-sqlalchemy-migrate_0.9.7.bb +5 -0
@@ -20,6 +20,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} += "python-sqlalchemy \ python-decorator \ python-tempita \
meta-openstack/recipes-devtools/python/python-stevedore_1.9.0.bb +5 -0
@@ -20,6 +20,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} += " \ python-pbr \ python-argparse \
meta-openstack/recipes-devtools/python/python-swiftclient_git.bb +5 -0
@@ -24,6 +24,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} += " \ python-simplejson \ python-pbr \
meta-openstack/recipes-devtools/python/python-testscenarios_0.5.0.bb +5 -0
@@ -20,6 +20,11 @@ DEPENDS += "\ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} += "\ python-testtools \ python-pbr \
meta-openstack/recipes-devtools/python/python-testtools_1.8.0.bb +6 -2
@@ -16,10 +16,14 @@ SRC_URI[sha256sum] = "8afd6400fb4e75adb0b29bd09695ecb2024cd7befab4677a58c147701a S = "${WORKDIR}/${SRCNAME}-${PV}" inherit setuptools - DEPENDS += " \ python-pbr \ -" + " + +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " RDEPENDS_${PN} += "\ python-extras \
meta-openstack/recipes-devtools/python/python-wsme_0.7.0.bb +5 -0
@@ -20,6 +20,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} += "\ python-pbr \ "
Signature · 1 line
2.7.4
Quoted 12 lines · Mark Asselstine
Python setuptools will attempt to satisfy the packages defined as '
setup_requires' insetup.pyby first looking for the package availability locally and ultimately by downloading it from PyPI. This is actually a huge security hole and packages should move to using pip instead, but this is another story that the upstream packages have to address. This also disregardsBB_NO_NETWORKand may prove to introduce host contamination.The best approach is to ensure we have the -native version of the '
setup_requires' packages present such thatsetup.pywill not attempt to complete the download from PyPI.
Quoted 8 lines
Make 'pbr' -native available and for packages which we have identified as having '
setup_requires' include 'pbr' add the necessary python-pbr-native DEPENDS.Signed-off-by Mark Asselstine <[email protected]>---
When sending out patches today I dropped this one. This needs to be applied before any of the other patches I sent today.
aha. All are merged now.
Bruce
Quoted 368 lines
Mark
meta-openstack/recipes-devtools/python/python-cliff_1.15.0.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-fixtures_1.3.1.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-glanceclient_git.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-heat_git.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-heatclient_git.bb | 5 +++++ .../recipes-devtools/python/python-keystoneclient_git.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-lockfile_0.10.2.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-mox3_0.9.0.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-oslo.config_git.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-oslo.context_git.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-oslo.i18n_git.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-oslo.log_git.bb | 5 +++++ .../recipes-devtools/python/python-oslo.serialization_git.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-oslo.utils_git.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-pbr_1.8.1.bb | 4 ++++ .../recipes-devtools/python/python-sqlalchemy-migrate_0.9.7.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-stevedore_1.9.0.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-swiftclient_git.bb | 5 +++++ .../recipes-devtools/python/python-testscenarios_0.5.0.bb | 5 +++++ meta-openstack/recipes-devtools/python/python-testtools_1.8.0.bb | 8 ++++++-- meta-openstack/recipes-devtools/python/python-wsme_0.7.0.bb | 5 +++++ 21 files changed, 105 insertions(+), 2 deletions(-)meta-openstack/recipes-devtools/python/python-cliff_1.15.0.bb +5
-0@@ -19,6 +19,11 @@ DEPENDS += "\ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} += "python-prettytable \ python-cmd2 \ python-pbr \meta-openstack/recipes-devtools/python/python-fixtures_1.3.1.bb +5
-0@@ -25,6 +25,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} += "python-testtools \ python-pbr \ "meta-openstack/recipes-devtools/python/python-glanceclient_git.bb +5
-0@@ -24,6 +24,11 @@ inherit setuptools monitor rmargparse FILES_${PN} += "${datadir}/${SRCNAME}" +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} = "gmp \ python-warlock \ python-pyopenssl \meta-openstack/recipes-devtools/python/python-heat_git.bb +5
-0@@ -162,6 +162,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} += " \ python-heatclient \ python-sqlalchemy \meta-openstack/recipes-devtools/python/python-heatclient_git.bb +5
-0@@ -9,6 +9,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} +="python-cliff \ python-httplib2 \ python-iso8601 \meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb +5
-0@@ -25,6 +25,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} += " \ python-iso8601 \ python-prettytable \meta-openstack/recipes-devtools/python/python-lockfile_0.10.2.bb +5
-0@@ -19,6 +19,11 @@ DEPENDS += "\ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} += "\ python-pbr \ "meta-openstack/recipes-devtools/python/python-mox3_0.9.0.bb +5
-0@@ -20,6 +20,11 @@ DEPENDS += "\ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} += " \ python-pbr \ python-fixtures \meta-openstack/recipes-devtools/python/python-oslo.config_git.bb +5
-0@@ -19,6 +19,11 @@ DEPENDS += " \ python-pip \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} += " \ python-pbr \ python-netaddr \meta-openstack/recipes-devtools/python/python-oslo.context_git.bb +5
-0@@ -19,6 +19,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + # RDEPENDS_default: RDEPENDS_${PN} += " \ bash \meta-openstack/recipes-devtools/python/python-oslo.i18n_git.bb +5
-0@@ -21,6 +21,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + # RDEPENDS_default: RDEPENDS_${PN} += " \ python-babel \meta-openstack/recipes-devtools/python/python-oslo.log_git.bb +5
-0@@ -19,6 +19,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + # RDEPENDS_default: RDEPENDS_${PN} += " \ bash \meta-openstack/recipes-devtools/python/python-oslo.serialization_git.bb +5
-0@@ -20,6 +20,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + # RDEPENDS_default: RDEPENDS_${PN} += " \ python-pbr \meta-openstack/recipes-devtools/python/python-oslo.utils_git.bb +5
-0@@ -20,6 +20,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + # RDEPENDS_default: RDEPENDS_${PN} += " \ python-pbr \meta-openstack/recipes-devtools/python/python-pbr_1.8.1.bb +4
-0@@ -21,6 +21,10 @@ DEPENDS += " \ python-pip \ " +DEPENDS_class-native += "" + # RDEPENDS_default: RDEPENDS_${PN} += " \ " + +BBCLASSEXTEND = "native"meta-openstack/recipes-devtools/python/python-sqlalchemy-migrate_0.9.7.bb +5
-0@@ -20,6 +20,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} += "python-sqlalchemy \ python-decorator \ python-tempita \meta-openstack/recipes-devtools/python/python-stevedore_1.9.0.bb +5
-0@@ -20,6 +20,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} += " \ python-pbr \ python-argparse \meta-openstack/recipes-devtools/python/python-swiftclient_git.bb +5
-0@@ -24,6 +24,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} += " \ python-simplejson \ python-pbr \meta-openstack/recipes-devtools/python/python-testscenarios_0.5.0.bb +5
-0@@ -20,6 +20,11 @@ DEPENDS += "\ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} += "\ python-testtools \ python-pbr \meta-openstack/recipes-devtools/python/python-testtools_1.8.0.bb +6
-2@@ -16,10 +16,14 @@ SRC_URI[sha256sum] = "8afd6400fb4e75adb0b29bd09695ecb2024cd7befab4677a58c147701a S = "${WORKDIR}/${SRCNAME}-${PV}" inherit setuptools - DEPENDS += " \ python-pbr \ -" + " + +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " RDEPENDS_${PN} += "\ python-extras \meta-openstack/recipes-devtools/python/python-wsme_0.7.0.bb +5
-0@@ -20,6 +20,11 @@ DEPENDS += " \ python-pbr \ " +# Satisfy setup.py 'setup_requires' +DEPENDS += " \ + python-pbr-native \ + " + RDEPENDS_${PN} += "\ python-pbr \ "