cerbero backtrace when attempting to package GStreamer master build on ubuntu
Submitted by Matthew Thyer
Link to original bug (#795792)
Description
Cerbero crashes with a Python backtrace when it gets to the packaging stage on Ubuntu.
Tested on Ubuntu 16.04 LTS and 18.04 LTS native and in docker containers.
This appears to be an issue related to the porting of cerbero from Python 2 to Python 3 as it does not occur if I checkout version 1.12.4 of cerbero instead of master.
The two warnings and the backtrace are:
WARNING: No specific packager available for the distro version ubuntu_18_04_bionic, using generic packager for distro debian
WARNING: No packager defined, using default packager "Default default@change.me"
Traceback (most recent call last):
File "./cerbero-uninstalled", line 9, in <module>
main()
File "./cerbero/main.py", line 130, in main
Main(sys.argv[1:])
File "./cerbero/main.py", line 55, in init
self.run_command()
File "./cerbero/main.py", line 105, in run_command
res = commands.run(command, self.config, self.args)
File "./cerbero/commands/init.py", line 78, in run
return _commands[command].run(config, args)
File "./cerbero/commands/package.py", line 82, in run
pkg = Packager(config, p, self.store)
File "./cerbero/packages/packager.py", line 53, in new
return _packagers[d]v
File "./cerbero/packages/debian.py", line 448, in new
return DebianPackager(config, package, store)
File "./cerbero/packages/debian.py", line 187, in init
self.license = f.read()
File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)
Steps to reproduce in a docker container are:
docker run -it ubuntu bash
apt install -y sudo python3 python-dev git intltool
populate your ~/.gitconfig for your identity
mkdir ~/git
cd ~/git
git clone git://anongit.freedesktop.org/gstreamer/cerbero
cd ~/git/cerbero
./cerbero-uninstalled bootstrap
./cerbero-uninstalled package gstreamer-1.0