Package: git-buildpackage Version: 0.9.9 Severity: normal Hi,
I think git-buildpackage assumes that Git authors are valid UTF-8. This causes tracebacks when using the GIT_FOO environment vars: gbp:debug: ['git', 'rev-parse', '--show-cdup'] gbp:info: Downloading 'allegro4.4' using 'apt-get'... gbp:debug: apt-get ['--download-only', '-qq', 'source', 'allegro4.4'] [] gbp:debug: Upstream version: 4.4.2 gbp:debug: Debian version: 11 gbp:debug: Upstream tarball: /tmp/tmpptj_4d75/allegro4.4_4.4.2.orig.tar.gz gbp:debug: Debian patch: /tmp/tmpptj_4d75/allegro4.4_4.4.2-11.debian.tar.xz gbp:debug: Epoch: 2 gbp:info: No git repository found, creating one. gbp:debug: ['git', 'init'] gbp:debug: ['git', 'rev-parse', '--show-cdup'] gbp:debug: ['git', 'rev-parse', '--is-bare-repository'] gbp:debug: ['git', 'rev-parse', '--git-dir'] gbp:debug: ['git', 'config', 'user.name', 'Chris Lamb'] gbp:debug: ['git', 'config', 'user.email', '[email protected]'] gbp:debug: tar ['-C', '/home/lamby/temp/cdt.20180615084647.JowagATs9U/tmpzvdxai5p', '-a', '-xf', '/tmp/tmpptj_4d75/allegro4.4_4.4.2.orig.tar.gz'] [] gbp:debug: ['git', 'tag', '-l', 'debian/2%4.4.2-11'] gbp:debug: ['git', 'tag', '-l', 'debian/4.4.2-11'] gbp:debug: ['git', 'tag', '-l', 'upstream/4.4.2'] gbp:debug: ['git', 'tag', '-l', 'upstream/4.4.2'] gbp:debug: ['git', 'tag', '-l', 'upstream/4.4.2'] gbp:debug: ['git', 'tag', '-l', 'upstream/4.4.2'] gbp:debug: ['git', 'add', '-f', '.'] gbp:debug: ['git', 'write-tree'] gbp:debug: ['git', 'commit-tree', 'b58fb12543b375ec6137603e1aac51f83e4dcc94'] gbp:debug: ['git', 'update-ref', '-m', 'gbp: Import Upstream version 4.4.2', 'refs/heads/master', 'fe0967e88085053ff299b5726d92369826dd28a7'] gbp:debug: ['git', 'symbolic-ref', 'HEAD'] gbp:debug: ['git', 'show-ref', 'refs/heads/master'] gbp:debug: ['git', 'branch', 'upstream', 'master'] gbp:debug: ['git', 'tag', '-m', 'Upstream version 4.4.2', 'upstream/4.4.2', 'fe0967e88085053ff299b5726d92369826dd28a7'] gbp:debug: ['git', 'show-ref', '--verify', 'refs/heads/master'] gbp:debug: tar ['-C', '.', '-a', '-xf', '/tmp/tmpptj_4d75/allegro4.4_4.4.2-11.debian.tar.xz'] [] gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'fe0967e88085053ff299b5726d92369826dd28a7^{commit}'] gbp:debug: ['git', 'branch', '--contains', 'fe0967e88085053ff299b5726d92369826dd28a7'] gbp:debug: ['git', 'add', '-f', '.'] gbp:debug: ['git', 'write-tree'] gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'master'] gbp:debug: ['git', 'commit-tree', 'f4a9d1727791bf23d411bfbe2c5dba225fd3194e', '-p', 'fe0967e88085053ff299b5726d92369826dd28a7'] gbp:debug: rm ['-rf', '/home/lamby/temp/cdt.20180615084647.JowagATs9U/tmpzvdxai5p'] [] gbp:debug: rm ['-rf', '/tmp/tmpptj_4d75'] [] Traceback (most recent call last): File "/usr/bin/gbp", line 149, in <module> sys.exit(supercommand()) File "/usr/bin/gbp", line 145, in supercommand return module.main(args) File "/usr/lib/python3/dist-packages/gbp/scripts/import_dsc.py", line 518, in main apply_debian_patch(repo, source, dsc, commit, options) File "/usr/lib/python3/dist-packages/gbp/scripts/import_dsc.py", line 186, in apply_debian_patch committer=committer) File "/usr/lib/python3/dist-packages/gbp/git/repository.py", line 1555, in commit_dir author=author, committer=committer) File "/usr/lib/python3/dist-packages/gbp/git/repository.py", line 1589, in commit_tree capture_stderr=True) File "/usr/lib/python3/dist-packages/gbp/git/repository.py", line 195, in _git_inout return self.__git_inout(command, args, input, extra_env, cwd, capture_stderr, config_args) File "/usr/lib/python3/dist-packages/gbp/git/repository.py", line 219, in __git_inout cwd=cwd) File "/usr/lib/python3.6/subprocess.py", line 709, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1255, in _execute_child env_list.append(k + b'=' + os.fsencode(v)) File "/usr/lib/python3.6/os.py", line 802, in fsencode return filename.encode(encoding, errors) UnicodeEncodeError: 'ascii' codec can't encode character '\xf6' in position 9: ordinal not in range(128) For example, here, GIT_AUTHOR_NAME is: b'Andreas R\xc3\xb6nnquist'. (Package is allegro 4.4 4.4.2-11 which just hit unstable.) Regards, -- ,''`. : :' : Chris Lamb `. `'` [email protected] / chris-lamb.co.uk `-

