Bug 1317489 - fedpkg import corrupts git repository
Summary: fedpkg import corrupts git repository
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: GitPython
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Dennis Gilmore
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 822055 1172512
Blocks: 1054176
TreeView+ depends on / blocked
 
Reported: 2016-03-14 11:56 UTC by Pavol Babinčák
Modified: 2016-08-08 06:06 UTC (History)
17 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 822055
Environment:
Last Closed: 2016-08-08 06:06:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Pavol Babinčák 2016-03-14 11:56:02 UTC
Rebuild python-smmap and python-gitdb for Fedora 23 and update it via Bodhi. Similarly to this one:

https://admin.fedoraproject.org/updates/FEDORA-2015-9354/GitPython-1.0.1-1.fc22,python-smmap-0.9.0-1.fc22,python-gitdb-0.6.4-1.fc22

+++ This bug was initially created as a clone of Bug #822055 +++

Description of problem:
It seems that doing "fedpkg import" corrupts somehow underlying git repository. After such import, although there are files in staging area, they are never committed and commit itself is empty.


Version-Release number of selected component (if applicable):
$ rpm -q git
git-1.7.10.1-1.fc17.x86_64
$ rpm -q fedpkg
fedpkg-1.9-1.fc17.noarch

How reproducible:
Not sure exactly. Doing "fedpkg clone" and importing once more works.

Actual results:
Broken repository, keeps files in staging after commit.


Expected results:
Files from staging should be committed.


Additional info:

--- Additional comment from Vít Ondruch on 2012-05-16 07:22:49 EDT ---



--- Additional comment from Jesse Keating on 2012-05-16 13:53:22 EDT ---

The contents are staged, but not committed.  From your tarball, if I do a 'git diff --staged' I see the diff of the modified files.  If I do a "git commit" the commit window shows the 3 modified files to be committed.

I don't see this repository as corrupt at all.

--- Additional comment from Vít Ondruch on 2012-05-17 03:41:24 EDT ---

(In reply to comment #2)

Jessie,

I did not complained about any of the steps you described and I confirm that they works as you said. However, if you would proceed with the commit, then you would see something like this:

$ git commit
[master 7a0ec90] foo

So no notion of committing something. "git diff --staged" still shows diff, "git status" still shows 3 files to commit, etc.

--- Additional comment from Jesse Keating on 2012-05-17 12:45:32 EDT ---

Whoops, you're correct.  I didn't realize that the problem occurs after the commit.  I'm able to reproduce with the repository you've attached, but this really feels like a git bug.

I'm going to re-assign it there, as that's really weird.

--- Additional comment from Vít Ondruch on 2012-10-19 06:06:26 EDT ---

This still occurs. Since fedpkg is using GitPython, I am afraid that there is bug somewhere. It seems that the .git/index is somehow messed up. Maybe git changed the format of the file and GitPython did not followed. I dunno. But it would be nice to fallback back to plain git or fix the GitPython. This is really annoying issue for me. Thank you.

--- Additional comment from Bohuslav "Slavek" Kabrda on 2012-11-02 05:30:58 EDT ---

I just hit this bug on F18 using fedpkg-1.10-1.fc18. This is really annoying, since I'm getting empty commits in the dist-git repo. Can someone have a look at this, please?

--- Additional comment from Simon Green on 2013-01-09 21:18:03 EST ---

User jkeating's account has been closed

--- Additional comment from Fedora Admin XMLRPC Client on 2013-02-22 05:05:08 EST ---

This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

--- Additional comment from Fedora End Of Life on 2013-04-03 15:18:07 EDT ---

This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

--- Additional comment from Toshio Ernie Kuratomi on 2013-05-21 11:28:42 EDT ---

https://bugzilla.redhat.com/show_bug.cgi?id=915501 may be a dupe of this.  Does the workaround listed in the initial comment of #915501 fix the broken repository you have as well?

--- Additional comment from Vít Ondruch on 2013-05-22 03:54:47 EDT ---

(In reply to Toshio Ernie Kuratomi from comment #10)
> https://bugzilla.redhat.com/show_bug.cgi?id=915501 may be a dupe of this. 
> Does the workaround listed in the initial comment of #915501 fix the broken
> repository you have as well?

The bug 915501 is definitely the same issue IMO. And yes, the workaround works. But I learned simpler one. It is enough to "git {reset,add}" just one file to fix the repo and commit (the import typically add/removes patches and modifies sources and git ignore, so I typically {reset,add} the .spec file).

--- Additional comment from Vít Ondruch on 2013-05-22 03:57:30 EDT ---



--- Additional comment from marcindulak on 2014-04-22 08:15:21 EDT ---

Have just experienced that bug - the workaround bug #915501 comment #0 worked for me. Using GitPython-0.3.2-0.6.RC1.fc19.

--- Additional comment from Vít Ondruch on 2015-03-02 09:15:17 EST ---

Is there any chance to get this fixed? There seems to be updated versions of GitPythong available upstream, which might resolve this issue.


[1] https://pypi.python.org/pypi/GitPython/

--- Additional comment from Vít Ondruch on 2015-03-02 10:13:29 EST ---

Tried with recent versions without success. I reported this error upstream:

https://github.com/gitpython-developers/GitPython/issues/265

--- Additional comment from Vít Ondruch on 2015-04-29 09:12:01 EDT ---

GitPython 0.3.7, which should fix this issue was released:

https://github.com/gitpython-developers/GitPython/releases/tag/0.3.7

--- Additional comment from Kamil Dudka on 2015-05-26 06:49:27 EDT ---

I can confirm this bug with GitPython-0.3.2-0.7.RC1.fc21.noarch on Fedora 22.  This bug causes unnecessary commits to be pushed by mistake to Fedora git.

.git/index gets corrupted after invocation of 'fedpkg new-sources ...' in such a way that it can be parsed by git-status without any warning, but git-commit (with no additional options!) produces empty commits.

--- Additional comment from Fedora End Of Life on 2015-05-29 04:44:33 EDT ---

This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

--- Additional comment from Fedora Update System on 2015-05-31 18:50:31 EDT ---

GitPython-1.0.1-1.fc22,python-smmap-0.9.0-1.fc22,python-gitdb-0.6.4-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/GitPython-1.0.1-1.fc22,python-smmap-0.9.0-1.fc22,python-gitdb-0.6.4-1.fc22

--- Additional comment from Fedora Update System on 2015-06-02 11:17:12 EDT ---

Package GitPython-1.0.1-1.fc22, python-gitdb-0.6.4-1.fc22, python-smmap-0.9.0-1.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing GitPython-1.0.1-1.fc22 python-gitdb-0.6.4-1.fc22 python-smmap-0.9.0-1.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-9354/GitPython-1.0.1-1.fc22,python-smmap-0.9.0-1.fc22,python-gitdb-0.6.4-1.fc22
then log in and leave karma (feedback).

--- Additional comment from Fedora Update System on 2015-06-09 11:15:50 EDT ---

GitPython-1.0.1-1.fc22, python-gitdb-0.6.4-1.fc22, python-smmap-0.9.0-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

--- Additional comment from Vít Ondruch on 2015-06-10 03:47:51 EDT ---

Thanks to all involved for finally fixing this issue \ó/

--- Additional comment from Tomas Tomecek on 2015-10-19 08:20:03 EDT ---

Still happening even with 1.0 GitPython.

--- Additional comment from Pavol Babinčák on 2015-10-20 04:21:46 EDT ---

(In reply to Tomas Tomecek from comment #23)
> Still happening even with 1.0 GitPython.
Can you provide steps to reproduce the issue? Also versions of GitPython, python-smmap and python-gitdb?

--- Additional comment from Tomas Tomecek on 2015-11-02 04:15:58 EST ---

(In reply to Pavol Babinčák from comment #24)
> (In reply to Tomas Tomecek from comment #23)
> > Still happening even with 1.0 GitPython.
> Can you provide steps to reproduce the issue? Also versions of GitPython,
> python-smmap and python-gitdb?

Will do once it happens again.


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