1 |
commit: 3950d76df63cf0f3f6502014dd61b8aa9c260e36 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Feb 4 13:34:33 2018 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 5 18:45:38 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=3950d76d |
7 |
|
8 |
repoman: Update metadata.dtd URI to allow https:// |
9 |
|
10 |
Update the default metadata.dtd URI used in repoman and Portage tests |
11 |
to use https://. However, allow also http:// form for the migration |
12 |
period. |
13 |
|
14 |
The http:// compat can be removed once the Gentoo repository is updated |
15 |
to use https:// everywhere. |
16 |
|
17 |
Bug: https://bugs.gentoo.org/552720 |
18 |
Closes: https://github.com/gentoo/portage/pull/255 |
19 |
Reviewed-by: Zac Medico <zmedico <AT> gentoo.org> |
20 |
|
21 |
pym/portage/tests/resolver/ResolverPlayground.py | 2 +- |
22 |
repoman/pym/repoman/metadata.py | 2 +- |
23 |
repoman/pym/repoman/modules/scan/metadata/pkgmetadata.py | 2 +- |
24 |
3 files changed, 3 insertions(+), 3 deletions(-) |
25 |
|
26 |
diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py |
27 |
index d8037194b..d3a5d8092 100644 |
28 |
--- a/pym/portage/tests/resolver/ResolverPlayground.py |
29 |
+++ b/pym/portage/tests/resolver/ResolverPlayground.py |
30 |
@@ -45,7 +45,7 @@ class ResolverPlayground(object): |
31 |
"unpack_dependencies", "use.aliases", "use.force", "use.mask", "layout.conf")) |
32 |
|
33 |
metadata_xml_template = """<?xml version="1.0" encoding="UTF-8"?> |
34 |
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
35 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
36 |
<pkgmetadata> |
37 |
<maintainer type="person"> |
38 |
<email>maintainer-needed@g.o</email> |
39 |
|
40 |
diff --git a/repoman/pym/repoman/metadata.py b/repoman/pym/repoman/metadata.py |
41 |
index 53bda6305..11ec1aaf8 100644 |
42 |
--- a/repoman/pym/repoman/metadata.py |
43 |
+++ b/repoman/pym/repoman/metadata.py |
44 |
@@ -29,7 +29,7 @@ if sys.hexversion >= 0x3000000: |
45 |
|
46 |
# Note: This URI is hardcoded in all metadata.xml files. We can't |
47 |
# change it without updating all the xml files in the tree. |
48 |
-metadata_dtd_uri = 'http://www.gentoo.org/dtd/metadata.dtd' |
49 |
+metadata_dtd_uri = 'https://www.gentoo.org/dtd/metadata.dtd' |
50 |
metadata_xsd_uri = 'https://www.gentoo.org/xml-schema/metadata.xsd' |
51 |
# force refetch if the local copy creation time is older than this |
52 |
metadata_xsd_ctime_interval = 60 * 60 * 24 * 7 # 7 days |
53 |
|
54 |
diff --git a/repoman/pym/repoman/modules/scan/metadata/pkgmetadata.py b/repoman/pym/repoman/modules/scan/metadata/pkgmetadata.py |
55 |
index 6a0f501ec..3c38697fe 100644 |
56 |
--- a/repoman/pym/repoman/modules/scan/metadata/pkgmetadata.py |
57 |
+++ b/repoman/pym/repoman/modules/scan/metadata/pkgmetadata.py |
58 |
@@ -120,7 +120,7 @@ class PkgMetadata(ScanBase, USEFlagChecks): |
59 |
"%s/metadata.xml: %s" % (xpkg, "DOCTYPE is missing")) |
60 |
else: |
61 |
doctype_system = _metadata_xml.docinfo.system_url |
62 |
- if doctype_system != metadata_dtd_uri: |
63 |
+ if doctype_system.replace('http://', 'https://') != metadata_dtd_uri: |
64 |
if doctype_system is None: |
65 |
system_problem = "but it is undefined" |
66 |
else: |