Bug 1508639 - GitPython and git 2.15.0 don't play nicely
Summary: GitPython and git 2.15.0 don't play nicely
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: GitPython
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Igor Gnatenko
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-01 20:25 UTC by Kevin Fenzi
Modified: 2018-08-30 02:50 UTC (History)
8 users (show)

Fixed In Version: GitPython-2.1.7-2.fc28 GitPython-2.1.7-2.fc27 GitPython-2.1.7-2.fc26 GitPython-1.0.1-7.el7 GitPython-0.3.2-0.7.RC1.el6
Clone Of:
Environment:
Last Closed: 2017-12-19 19:48:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch for GitPython-0.3 (el6) (1.07 KB, patch)
2017-11-12 20:04 UTC, Todd Zullinger
no flags Details | Diff
Patch for GitPython-1.0.1 (el7) (1.19 KB, patch)
2017-11-12 20:04 UTC, Todd Zullinger
no flags Details | Diff

Description Kevin Fenzi 2017-11-01 20:25:15 UTC
After updating git to 2.15.0, and trying to use fedpkg I get: 

PackingType of packed-Refs not understood: '# pack-refs with: peeled fully-peeled sorted" 

This has been reported upstream and there's a proposed patch, which works for me as well, but it's not been merged yet by upstream: 

https://github.com/gitpython-developers/GitPython/pull/689
https://github.com/gitpython-developers/GitPython/issues/687

I am not sure if you want to carry this patch or wait or propose some other fix. 

I suspect users may start hitting this and if git 2.15.0 is updated in stable releases they might hit it there too. CCing the git maintainer also as a FYI.

Comment 1 Todd Zullinger 2017-11-02 04:11:38 UTC
FWIW, we generally have avoided updating git within stable releases.  So this likely won't reach stable (including f27, which will stay on 2.14.x).

Comment 2 Todd Zullinger 2017-11-12 20:04:23 UTC
Created attachment 1351298 [details]
Patch for GitPython-0.3 (el6)

Comment 3 Todd Zullinger 2017-11-12 20:04:59 UTC
Created attachment 1351299 [details]
Patch for GitPython-1.0.1 (el7)

Comment 4 Todd Zullinger 2017-11-12 20:05:49 UTC
This looks like it's a problem for older releases if working with a repository that was cloned/created with git-2.15.  I tried using fedpkg on an el6 system where $HOME is shared via nfs.  I used git-2.15.0 to clone the git fedora package from https://src.fedoraproject.org/git/git.  Subsequent fedpkg calls like switch-branch fail with the same error as Kevin described:

[tmz@5bc9ad7c6594 /tmp/git (master)]$ fedpkg switch-branch f25
/usr/lib/python2.6/site-packages/fedora/client/bodhi.py:48: DeprecationWarning: fedora.client.bodhi has been deprecated. Please use bodhi.client.bindings instead.
  DeprecationWarning)
Could not execute switch_branch: PackingType of packed-Refs not understood: '# pack-refs with: peeled fully-peeled sorted'

[tmz@5bc9ad7c6594 /tmp/git (master)]$ rpm -q fedpkg git GitPython
fedpkg-1.29-5.el6.noarch
git-1.7.1-9.el6_9.x86_64
GitPython-0.3.2-0.6.RC1.el6.noarch

Let me know if you would you prefer a new ticket to backport the fix to previous Fedora/EPEL GitPython releases.  I would provide patches to the package repos, but I gave up after finding both EL6 and EL7 branches contain commits updating the release to versions which were never built or pushed.

I didn't want to spend time reverting things because I don't know what anyone's intentions are with those commits.  They seem like they're both dead ends that should be reverted, but in the case of el6, there is a build of 1.0.1 in koji.  For el7, there are no builds so the offending changes could simply be undone (as I did here: https://src.fedoraproject.org/fork/tmz/rpms/GitPython/branch/epel7).

The backported patches were pretty trivial.  Upstream changed indentation from spaces to tabs (or the other way, I forget already).  I've attached the patches for 0.3 (el6) and 1.0.1 (el7) in case those are helpful.

Comment 5 Dominic Hopf 2017-12-10 11:16:39 UTC
I edited the .git/packed-refs file in my repository and removed the first line (which obviously was a comment):

    # pack-refs with: peeled fully-peeled sorted 

With this, at least the `fedpkg switch-branch`-command seems to work for me again. Probably good to know as a possible workaround.

Comment 6 Todd Zullinger 2017-12-10 15:38:35 UTC
We really need to push a GitPython update with a patch across all releases.  The patch is trivial.

The hardest part seems to be that the GitPython.git package repo is in a strange state in el6 and el7 branches for reasons that are not clear.  Someone with knowledge of the GitPython history in EPEL is needed to help untangle the git state so we can move an update forward.

In the current state, it's impossible to properly submit patches or pull requests for an update.  (I'd hate to see what would happen if some urgent issue arose and a proven packager stumbled across the el6 and epel7 branches.)

I'm happy to help provide those patches/pull requests if someone can confirm how el6 should be handled.  I've pushed changes which revert the update to 1.0.1 in el6 (which was never successfully built) and then added the packed-refs patch on top:

    https://src.fedoraproject.org/fork/tmz/rpms/GitPython/branch/el6

As I mentioned in my previous comment, I similarly reverted the epel7 branch to remove an update to 2.1.0 which was never built, then applied the packed-refs patch on top:

    https://src.fedoraproject.org/fork/tmz/rpms/GitPython/branch/epel7

If those el6 and epel7 changes look good, I'm happy to file pull-requests to get them merged.

The f26 and f27 branches can simply be fast-forwarded to master.

Hopefully we can push some updates before more users run into this issue.

Comment 7 Fedora Update System 2017-12-10 19:22:45 UTC
GitPython-2.1.7-2.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-cc5ba9a121

Comment 8 Fedora Update System 2017-12-10 19:23:05 UTC
GitPython-2.1.7-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-f2352206e6

Comment 9 Igor Gnatenko 2017-12-10 19:26:21 UTC
I fixed f26/f27. I'm not interested in el6/epel7, so someone else needs to care about those branches.

Comment 10 Todd Zullinger 2017-12-10 19:34:32 UTC
Thanks for fixing f26/f27 Igor.  Should I file a separate bug for el6/epel7 or can we just reassign this to another GitPython maintainer?

I noticed that simply cloning a repo which has been created or updated by git-2.15 will cause the packed-refs error in GitPython.  The real reason is that GitPython's parsing is poor.  It's always just gotten lucky that the only packed-refs traits were peeled and fully-peeled.

Since I've done most of the work to make el6/epel7 work, I'll file a pull request and see if one of the other GitPython maintainers wants to push some updates.  

I'm not a proven packager nor am I terribly interested in co-maintaining GitPython, so I can't complete the process.  It would also be good to have another set of eyes on the changes I made to those branches, in case I've made any typo's or other mistakes.

I have tested el6 builds locally, so I'm fairly confident that's working properly.  I don't remember if I tested epel7 builds last month when I worked on that or not.

Comment 11 Todd Zullinger 2017-12-10 20:00:08 UTC
Pull requests for epel7 and el6 filed:

https://src.fedoraproject.org/rpms/GitPython/pull-request/1 (epel7)
https://src.fedoraproject.org/rpms/GitPython/pull-request/2 (el6)

I tested epel7 before filing, to be a bit more careful.

Comment 12 Fedora Update System 2017-12-11 07:59:31 UTC
GitPython-1.0.1-7.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-09b8e15792

Comment 13 Fedora Update System 2017-12-11 19:57:07 UTC
GitPython-2.1.7-2.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-cc5ba9a121

Comment 14 Fedora Update System 2017-12-11 20:33:22 UTC
GitPython-2.1.7-2.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-f2352206e6

Comment 15 Fedora Update System 2017-12-11 23:31:35 UTC
GitPython-1.0.1-7.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-09b8e15792

Comment 16 Fedora Update System 2017-12-12 09:00:45 UTC
GitPython-0.3.2-0.7.RC1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-e580d70574

Comment 17 Fedora Update System 2017-12-12 17:41:43 UTC
GitPython-0.3.2-0.7.RC1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-e580d70574

Comment 18 Fedora Update System 2017-12-19 19:48:19 UTC
GitPython-2.1.7-2.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2017-12-19 21:35:28 UTC
GitPython-2.1.7-2.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2018-01-09 16:17:34 UTC
GitPython-1.0.1-7.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Comment 21 Fedora Update System 2018-08-30 02:50:07 UTC
GitPython-0.3.2-0.7.RC1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.


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