On Thu, Jun 04, 2020 at 02:41:04PM +0200, Gianfranco Costamagna wrote:
> Hello, since version 0.68 we are hitting autopkgtest failures on Ubuntu s390x
> (but I presume this might be an endianess issue unrelated to Ubuntu, but an 
> issue on Debian too)
> 
> look e.g.:
> 
> https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-groovy/groovy/s390x/l/lintian-brush/20200526_071151_45b70@/log.gz
> 
> or
> https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-groovy/groovy/s390x/l/lintian-brush/20200602_160733_92e77@/log.gz
> 
> 
> autopkgtest [16:06:43]: test tool-testsuite: [-----------------------
> failed to open trace file: [Errno 13] Permission denied: 
> '/you-should-use-TestCaseInTempDir-if-you-need-a-log-file'
> .../usr/lib/python3/dist-packages/debian/changelog.py:483: UserWarning: 
> Unexpected line while looking for first heading: THIS IS NOT A PARSEABLE LINE
>   warnings.warn(message)
> ............/usr/lib/python3/dist-packages/debian/changelog.py:483: 
> UserWarning: Unexpected line while looking for first heading: lalalalala
>   warnings.warn(message)
> /usr/lib/python3/dist-packages/debian/changelog.py:483: UserWarning: Found 
> eof where expected first heading
>   warnings.warn(message)
> ........./tmp/autopkgtest.aoDwvO/build.6pK/src/lintian_brush/_deb822.py:115: 
> UserWarning: cannot parse package relationship "${misc:Depends}", returning 
> it raw
>   warnings.warn(
> ...........................................................................ssssssssss...........EE.....................................................................................x..............................................................................................sed:
>  can't read debian/rules: No such file or directory
> sed: can't read debian/rules: No such file or directory
> .sed: can't read debian/rules: No such file or directory
> sed: can't read debian/rules: No such file or directory
> ...................../tmp/autopkgtest.aoDwvO/build.6pK/src/fixers/common-license.py:176:
>  UserWarning: A common license shortname (Apache-2.0) is used, but license 
> text not recognized.
>   warn(
> ../tmp/autopkgtest.aoDwvO/build.6pK/src/fixers/common-license.py:160: 
> UserWarning: Unable to get canonical name for 'BSD-3-clause'
>   warn('Unable to get canonical name for %r' % license_id)
> /tmp/autopkgtest.aoDwvO/build.6pK/src/fixers/common-license.py:190: 
> UserWarning: Found full license text for BSD-3-clause, but unknown synopsis 
> BSD-3-clause (BSD-3-clause)
>   warn('Found full license text for %s, but unknown synopsis %s (%s)'
> .........../usr/lib/python3/dist-packages/lintian_brush/_deb822.py:115: 
> UserWarning: cannot parse package relationship "libf2fs5 (= 
> ${binary:Version})", returning it raw
>   warnings.warn(
> /usr/lib/python3/dist-packages/lintian_brush/_deb822.py:115: UserWarning: 
> cannot parse package relationship "libf2fs-format4 (= ${binary:Version})", 
> returning it raw
>   warnings.warn(
> /usr/lib/python3/dist-packages/lintian_brush/_deb822.py:115: UserWarning: 
> cannot parse package relationship "${shlibs:Depends}", returning it raw
>   warnings.warn(
> /usr/lib/python3/dist-packages/lintian_brush/_deb822.py:115: UserWarning: 
> cannot parse package relationship "${misc:Depends}", returning it raw
>   warnings.warn(
> /usr/lib/python3/dist-packages/lintian_brush/_deb822.py:115: UserWarning: 
> cannot parse package relationship "f2fs-tools (= ${binary:Version})", 
> returning it raw
>   warnings.warn(
> ................/usr/lib/python3/dist-packages/debian/changelog.py:483: 
> UserWarning: Unexpected line while looking for start of change data:  * 
> Initial Release.
>   warnings.warn(message)
> .............................../usr/lib/python3/dist-packages/lintian_brush/_deb822.py:115:
>  UserWarning: cannot parse package relationship "${misc:Depends}", returning 
> it raw
>   warnings.warn(
> ......Tree has non-standard patches directory debian/patches-applied.
> ......................dpkg-architecture: warning: cannot determine CC system 
> type, falling back to default (native compilation)
> Use of uninitialized value $step in string ne at 
> /usr/share/perl5/Debian/Debhelper/Buildsystem/perl_build.pm line 24.
> Use of uninitialized value $step in string ne at 
> /usr/share/perl5/Debian/Debhelper/Buildsystem.pm line 424.
> ..dpkg-architecture: warning: cannot determine CC system type, falling back 
> to default (native compilation)
> Use of uninitialized value $step in string ne at 
> /usr/share/perl5/Debian/Debhelper/Buildsystem/perl_build.pm line 24.
> Use of uninitialized value $step in string ne at 
> /usr/share/perl5/Debian/Debhelper/Buildsystem.pm line 424.
> ....../tmp/autopkgtest.aoDwvO/build.6pK/src/fixers/package-uses-deprecated-debhelper-compat-version.py:80:
>  UserWarning: Not upgrading beyond debhelper 10, since the package disables 
> autoreconf but its configure does not provide --runstatedir.
>   warnings.warn(
> .................gpg: WARNING: running with faked system time: 2019-08-24 
> 12:26:39
> gpg: WARNING: running with faked system time: 2019-08-24 12:26:39
> .gpg: WARNING: running with faked system time: 2019-08-24 12:26:39
> gpg: WARNING: running with faked system time: 2019-08-24 12:26:39
> .gpg: WARNING: running with faked system time: 2019-08-24 12:26:39
> gpg: WARNING: running with faked system time: 2019-08-24 12:26:39
> .gpg: WARNING: running with faked system time: 2019-08-24 12:26:39
> gpg: WARNING: running with faked system time: 2019-08-24 12:26:39
> .gpg: WARNING: running with faked system time: 2019-08-24 12:26:39
> gpg: WARNING: running with faked system time: 2019-08-24 12:26:39
> gpg: WARNING: running with faked system time: 2019-08-24 12:26:39
> ......................../usr/lib/python3/dist-packages/pkginfo/develop.py:45: 
> UserWarning: No PKG-INFO found for path: /tmp/tmpu0kdvv1b/testdir
>   warnings.warn('No PKG-INFO found for path: %s' % self.path)
> ............./usr/lib/python3/dist-packages/lintian_brush/upstream_metadata.py:449:
>  UserWarning: Unable to parse dist.ini: Source contains parsing errors: 
> '<string>'
>       [line  7]: ':version = 0.097\n'
>   warn('Unable to parse dist.ini: %r' % e)
> ............................Undefined licenses in copyright: 
> ['GPL-2+']........................................../usr/lib/python3/dist-packages/lintian_brush/_deb822.py:115:
>  UserWarning: cannot parse package relationship "${misc:Built-Using}", 
> returning it raw
>   warnings.warn(
> ./usr/lib/python3/dist-packages/lintian_brush/_deb822.py:115: UserWarning: 
> cannot parse package relationship "${misc:Built-Using}", returning it raw
>   warnings.warn(
> ./usr/lib/python3/dist-packages/lintian_brush/_deb822.py:115: UserWarning: 
> cannot parse package relationship "${w32:Built-Using}", returning it raw
>   warnings.warn(
> ....................................................
> ======================================================================
> ERROR: test_invalid_header 
> (lintian_brush.tests.test_multiarch_hints.ParseMultiArchHints)
> lintian_brush.tests.test_multiarch_hints.ParseMultiArchHints.test_invalid_header
> ----------------------------------------------------------------------
> testtools.testresult.real._StringException: Empty attachments:
>   log
> 
> Traceback (most recent call last):
>   File 
> "/tmp/autopkgtest.aoDwvO/build.6pK/src/lintian_brush/tests/test_multiarch_hints.py",
>  line 37, in test_invalid_header
>     self.assertRaises(ValueError, parse_multiarch_hints, f)
>   File "/usr/lib/python3/dist-packages/breezy/tests/__init__.py", line 1483, 
> in assertRaises
>     callableObj(*args, **kwargs)
>   File 
> "/tmp/autopkgtest.aoDwvO/build.6pK/src/lintian_brush/multiarch_hints.py", 
> line 66, in parse_multiarch_hints
>     data = yaml.load(f)
>   File "/usr/lib/python3/dist-packages/ruamel/yaml/main.py", line 331, in load
>     return constructor.get_single_data()
>   File "/usr/lib/python3/dist-packages/ruamel/yaml/constructor.py", line 109, 
> in get_single_data
>     node = self.composer.get_single_node()
>   File "ext/_ruamel_yaml.pyx", line 701, in 
> _ruamel_yaml.CParser.get_single_node
>   File "ext/_ruamel_yaml.pyx", line 904, in 
> _ruamel_yaml.CParser._parse_next_event
> ruamel.yaml.reader.ReaderError: unacceptable character #x001a: control 
> characters are not allowed
>   in "<file>", position 13
> 
> 
> ======================================================================
> ERROR: test_some_entries 
> (lintian_brush.tests.test_multiarch_hints.ParseMultiArchHints)
> lintian_brush.tests.test_multiarch_hints.ParseMultiArchHints.test_some_entries
> ----------------------------------------------------------------------
> testtools.testresult.real._StringException: Empty attachments:
>   log
> 
> Traceback (most recent call last):
>   File 
> "/tmp/autopkgtest.aoDwvO/build.6pK/src/lintian_brush/tests/test_multiarch_hints.py",
>  line 51, in test_some_entries
>     parse_multiarch_hints(f), [{
>   File 
> "/tmp/autopkgtest.aoDwvO/build.6pK/src/lintian_brush/multiarch_hints.py", 
> line 66, in parse_multiarch_hints
>     data = yaml.load(f)
>   File "/usr/lib/python3/dist-packages/ruamel/yaml/main.py", line 331, in load
>     return constructor.get_single_data()
>   File "/usr/lib/python3/dist-packages/ruamel/yaml/constructor.py", line 109, 
> in get_single_data
>     node = self.composer.get_single_node()
>   File "ext/_ruamel_yaml.pyx", line 701, in 
> _ruamel_yaml.CParser.get_single_node
>   File "ext/_ruamel_yaml.pyx", line 904, in 
> _ruamel_yaml.CParser._parse_next_event
> ruamel.yaml.reader.ReaderError: unacceptable character #x0022: invalid 
> trailing UTF-8 octet
>   in "<file>", position 239

This looks like a bug in ruamel.yaml to me. The only change since 0.67
that is relevant here is that lintian-brush has started using the new
API it provides and it's passing in a valid YAML file (at least in the
second of these tests).

Can you verify this by running this on s390x:

#!/usr/bin/python3
from io import BytesIO
from ruamel.yaml import YAML
yaml = YAML(typ='safe')

f = BytesIO(b"""\
format: multiarch-hints-1.0
hints:
- binary: coinor-libcoinmp-dev
  description: coinor-libcoinmp-dev conflicts on ...
  link: https://wiki.debian.org/MultiArch/Hints#file-conflict
  severity: high
  source: coinmp
  version: 1.8.3-2+b11
""")
yaml.load(f)

Cheers,

Jelmer

Reply via email to