Some distributions use Python 3.x by default, when using python as the name of the interpretter. The attached patch modifies the package so that it works on such distributions.
python
patch to fix the issue python2.patch
This patch is not desirable; all the tools except rmdevelrpms should work with python 2 and 3 already in release 8.4, and rmdevelrpms has also been made to do that in current git.
Not sure whether it's in rpmdevtools but they certainly don't work for me correctly with Python 3.x. Always testing with git master.
Steps to reproduce:
1) Make sure you have reasonable locale setting.
{{{ $ locale LANG=en_US.utf8 ... }}}
2) Make sure you have environment for rpmdev-bumpspec with non-ASCII characters.
{{{ $ env | grep RPM RPM_PACKAGER=Pavel Šimerda psimerda@redhat.com }}}
3) Run rpmdev-bumpspec using Python 2.x in a dist-git working tree.
{{{ $ python2 /usr/bin/rpmdev-bumpspec *.spec }}}
4) Run rpmdev-bumpspec using Python 3.x in a dist-git working tree.
{{{ $ python3 /usr/bin/rpmdev-bumpspec *.spec }}}
5) Check the changelog.
{{{ $ git --no-pager diff ... %changelog + Wed Aug 20 2014 b'Pavel \xc5\xa0imerda psimerda@redhat.com' - b'1.24-3\n1.24-3\n' +- rebuilt + + Wed Aug 20 2014 Pavel Šimerda psimerda@redhat.com - 1.24-2 +- rebuilt + ... }}}
Expected result: Author's name should be the same in changelog entries from #3 and #4.
Actual result: With Python 2.x, the name is correct, while with Python 3.x it is mangled.
Should be fixed in git. If you find any other things that don't work with Python 3, please file separate bugs for them instead of reusing this one.
Replying to [comment:3 scop]:
Should be fixed in git.
Confirmed, thanks. Now I'll try to start using as many RPM related tools as possible with Python 3.x. Feel free to ping me on IRC if you have any suggestions.
If you find any other things that don't work with Python 3, please file separate bugs for them instead of reusing this one.
Agreed.
Cheers,
Pavel