Bug 18540 - [PATCH] gitpython fails on gpg signed commits
Summary: [PATCH] gitpython fails on gpg signed commits
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 5
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: has_procedure MGA5-64-OK advisory
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2016-05-25 19:54 CEST by Christian Lohmaier
Modified: 2016-07-05 17:47 CEST (History)
5 users (show)

See Also:
Source RPM: python-gitpython-0.3.1-9.mga5.src.rpm
CVE:
Status comment:


Attachments
patch from mentioned pullrequest 57, rediffed to make it apply cleanly to 0.3.1-9 (2.27 KB, patch)
2016-05-25 19:54 CEST, Christian Lohmaier
Details | Diff

Description Christian Lohmaier 2016-05-25 19:54:41 CEST
Created attachment 7857 [details]
patch from mentioned pullrequest 57, rediffed to make it apply cleanly to 0.3.1-9

processing commits that have gpg signature make gitpython fail with:

LookupError: unknown encoding: -----BEGIN PGP SIGNATURE-----

see https://github.com/gitpython-developers/GitPython/issues/110 or 
https://github.com/gitpython-developers/GitPython/pull/57 for details
Comment 1 Philippe Makowski 2016-05-25 21:35:20 CEST
python-gitpython-1.0.2-1.mga6 should fix this
for mga5  python-gitpython-0.3.1-9.1.mga5 should be ok

Please test new packages in 5/core/testing

Suggested advisory:
========================
Fix gitpython fails on gpg signed commits in python-gitpython package


Updated packages in core/updates_testing:
=========================================
python-gitpython-0.3.1-9.1.mga5.noarch

from python-gitpython-0.3.1-9.1.mga5.src

CC: (none) => makowski.mageia
Assignee: bugsquad => qa-bugs

Comment 2 Herman Viaene 2016-06-01 15:09:48 CEST
MGA5-32 on Acer D620 Xfce
No installation issues, does not seem to break anything, but I have not been able to dream something up that uses this package 
# urpmq --whatrequires python-gitpython
gitbuster
openerp-git
python-gfbi_core
python-gitpython
w3af

openerp and gitbuster are way over my head and w3af crashes on me.

CC: (none) => herman.viaene

Comment 3 Christian Lohmaier 2016-06-01 15:44:43 CEST
FYI: using https://bitbucket.org/spaetz/gitanaly that in turn uses gitpython.
Comment 4 Herman Viaene 2016-06-22 11:08:18 CEST
Sorry this is way over my head, I won't start a study on git.
Comment 5 Philippe Makowski 2016-06-22 14:48:49 CEST
Tested on x86_64

$ cd ~
$ git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
# urpmi python-gitpython
$ python
Python 2.7.9 (default, Dec 14 2014, 10:12:16) 
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from git import repo
>>> rp = repo.Repo('~/linux/')
>>> cm = rp.commit("ad3e2751e7")
>>> cm.stats.files.keys()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/git/objects/commit.py", line 217, in stats
    if not self.parents:
  File "/usr/lib64/python2.7/site-packages/gitdb/util.py", line 238, in __getattr__
    self._set_cache_(attr)
  File "/usr/lib/python2.7/site-packages/git/objects/commit.py", line 132, in _set_cache_
    self._deserialize(StringIO(stream.read()))
  File "/usr/lib/python2.7/site-packages/git/objects/commit.py", line 443, in _deserialize
    self.author.name = self.author.name.decode(self.encoding) 
LookupError: unknown encoding: -----BEGIN PGP SIGNATURE-----
>>> exit()
# urpmi.update --no-ignore "Core Updates Testing"
# urpmi python-gitpython
$ python
Python 2.7.9 (default, Dec 14 2014, 10:12:16) 
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from git import repo
>>> rp = repo.Repo('~/linux/')
>>> cm = rp.commit("ad3e2751e7")
>>> cm.stats.files.keys()
['drivers/ntb/ntb_hw.c']
>>> exit()
$

Whiteboard: (none) => has_procedure MGA5-64-OK

Comment 6 Lewis Smith 2016-07-02 08:41:22 CEST
Given the extensive software infrastructure needed to test this update, and the fact that Philippe (many thanks) has tested it on x64, it has been agreed to validate it with just the one OK.

Keywords: (none) => validated_update
CC: (none) => lewyssmith, sysadmin-bugs

Dave Hodgins 2016-07-04 09:19:55 CEST

CC: (none) => davidwhodgins
Whiteboard: has_procedure MGA5-64-OK => has_procedure MGA5-64-OK advisory

Comment 7 Mageia Robot 2016-07-05 17:47:56 CEST
An update for this issue has been pushed to the Mageia Updates repository.

http://advisories.mageia.org/MGAA-2016-0097.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.