aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-02-04 14:34:33 +0100
committerMichał Górny <mgorny@gentoo.org>2018-02-05 19:45:38 +0100
commit3950d76df63cf0f3f6502014dd61b8aa9c260e36 (patch)
tree5be108c4d25c2d7638c94478db5cde6b1c42e839
parentgit: Support running the verification against sync-openpgp-key-path (diff)
downloadportage-3950d76df63cf0f3f6502014dd61b8aa9c260e36.tar.gz
portage-3950d76df63cf0f3f6502014dd61b8aa9c260e36.tar.bz2
portage-3950d76df63cf0f3f6502014dd61b8aa9c260e36.zip
repoman: Update metadata.dtd URI to allow https://
Update the default metadata.dtd URI used in repoman and Portage tests to use https://. However, allow also http:// form for the migration period. The http:// compat can be removed once the Gentoo repository is updated to use https:// everywhere. Bug: https://bugs.gentoo.org/552720 Closes: https://github.com/gentoo/portage/pull/255 Reviewed-by: Zac Medico <zmedico@gentoo.org>
-rw-r--r--pym/portage/tests/resolver/ResolverPlayground.py2
-rw-r--r--repoman/pym/repoman/metadata.py2
-rw-r--r--repoman/pym/repoman/modules/scan/metadata/pkgmetadata.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py
index d8037194b..d3a5d8092 100644
--- a/pym/portage/tests/resolver/ResolverPlayground.py
+++ b/pym/portage/tests/resolver/ResolverPlayground.py
@@ -45,7 +45,7 @@ class ResolverPlayground(object):
"unpack_dependencies", "use.aliases", "use.force", "use.mask", "layout.conf"))
metadata_xml_template = """<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>maintainer-needed@gentoo.org</email>
diff --git a/repoman/pym/repoman/metadata.py b/repoman/pym/repoman/metadata.py
index 53bda6305..11ec1aaf8 100644
--- a/repoman/pym/repoman/metadata.py
+++ b/repoman/pym/repoman/metadata.py
@@ -29,7 +29,7 @@ if sys.hexversion >= 0x3000000:
# Note: This URI is hardcoded in all metadata.xml files. We can't
# change it without updating all the xml files in the tree.
-metadata_dtd_uri = 'http://www.gentoo.org/dtd/metadata.dtd'
+metadata_dtd_uri = 'https://www.gentoo.org/dtd/metadata.dtd'
metadata_xsd_uri = 'https://www.gentoo.org/xml-schema/metadata.xsd'
# force refetch if the local copy creation time is older than this
metadata_xsd_ctime_interval = 60 * 60 * 24 * 7 # 7 days
diff --git a/repoman/pym/repoman/modules/scan/metadata/pkgmetadata.py b/repoman/pym/repoman/modules/scan/metadata/pkgmetadata.py
index 6a0f501ec..3c38697fe 100644
--- a/repoman/pym/repoman/modules/scan/metadata/pkgmetadata.py
+++ b/repoman/pym/repoman/modules/scan/metadata/pkgmetadata.py
@@ -120,7 +120,7 @@ class PkgMetadata(ScanBase, USEFlagChecks):
"%s/metadata.xml: %s" % (xpkg, "DOCTYPE is missing"))
else:
doctype_system = _metadata_xml.docinfo.system_url
- if doctype_system != metadata_dtd_uri:
+ if doctype_system.replace('http://', 'https://') != metadata_dtd_uri:
if doctype_system is None:
system_problem = "but it is undefined"
else: