dotnet icon indicating copy to clipboard operation
dotnet copied to clipboard

libxml2 doesn't support https

Open ArsenShnurkov opened this issue 9 years ago • 3 comments

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 avatar Feb 21 '16 01:02 ArsenShnurkov

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 avatar Feb 21 '16 01:02 ArsenShnurkov

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
  1. 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

  1. 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)

ArsenShnurkov avatar Feb 21 '16 02:02 ArsenShnurkov

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

Cynede avatar Feb 24 '16 12:02 Cynede