gentoo / dotnet

[MIRROR] Newer mono, .NET languages, and libraries
https://gitweb.gentoo.org/repo/proj/dotnet.git
77 stars 56 forks source link

libxml2 doesn't support https #178

Open ArsenShnurkov opened 8 years ago

ArsenShnurkov commented 8 years ago

travis.yml uses repoman repoman uses xmllint tool from libxml2 package xmllint tries to download .dtd file from gentoo.org gentoo org was moved to https protocol

xmllint is unable to work with https

http://stackoverflow.com/questions/35530009/how-to-validate-metadata-xml-against-dtd-in-gentoo

libxml2 uses nanohttp. nanohttp is able to use https (with openssl and additional configure parameter)

so the problem is wrong packaging of libxml2 in Debian (because travis-ci uses debian or ubuntu)

ArsenShnurkov commented 8 years ago

something should be changed. The variants are: 1) to implement https support for libxml2 in debian 2) patch repoman to use mono-xmltool (which works with https), instead of xmllint 3) rewrite travis.yml (to use something from this list instead of repoman)

ArsenShnurkov commented 8 years ago

One more idea: 1) fetch .dtd with wget -c in travis.yml (actually, it's already fetched and record exist in travis log)

wget -c http://www.gentoo.org/dtd/metadata.dtd -O /usr/portage/distfiles/metadata.dtd

2) configure XML Catalog file (/etc/xml/catalog) add there a some system line

<system   systemId="http://www.gentoo.org/dtd/metadata.dtd"
      uri="file:///usr/portage/distfiles/metadata.dtd" />

from this spec: https://www.oasis-open.org/committees/entity/spec.html#s.system

3) run xmllint with --catalogs command line parameter (to use the local version instead of downloading) https://github.com/gentoo/portage/blob/c20b67e5479047a21b889ab59a33fd03cedb988c/pym/repoman/_xml.py#L97 (repoman is downloaded in travis.yml, so python script can be patched with sed -i before running)


This will prevent the error

(error : Unknown IO error
metadata.xml:2: warning: failed to load external entity "http://www.gentoo.org/dtd/metadata.dtd")

Which can happen when someone will commit malformed manifest.xml (for example with 'herd' line)

cnd commented 8 years ago

shouldn't this question be there: https://github.com/mrueg/repoman-travis