Bug 1580357 - install complains about no repo; uninstall does not remove /etc/gitconfig config entries
Summary: install complains about no repo; uninstall does not remove /etc/gitconfig con...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: git-lfs
Version: 28
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Carl George
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-21 10:58 UTC by Robert P. J. Day
Modified: 2018-06-14 12:36 UTC (History)
2 users (show)

Fixed In Version: git-lfs-2.4.1-1.fc28 git-lfs-2.4.0-3.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-05 13:42:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Robert P. J. Day 2018-05-21 10:58:52 UTC
Two possible issues with current git-lfs package installing to Fedora 28.

  First, when doing a regular "sudo dnf install git-lfs", while the package is installed, this is printed during the installation process:

  "Running scriptlet: git-lfs-2.4.0-1.fc28.x86_64                  1/1
Error: Failed to call git rev-parse --git-dir --show-toplevel: "fatal: not a git repository (or any of the parent directories): .git\n"
Git LFS initialized."

I'm not sure if that's expected, as I run this while at the top level of a Linux kernel source repository, so it's not as if there's no Git repository available.

  And, second, I notice that the installation process adds this to the system-level /etc/gitconfig file:

  [filter "lfs"]
	smudge = git-lfs smudge -- %f
	process = git-lfs filter-process
	required = true
	clean = git-lfs clean -- %f

However, the subsequent removal of that package does not remove that content. Should it?

Comment 1 Carl George 2018-05-21 14:24:35 UTC
Here are the scriptlets.

https://src.fedoraproject.org/rpms/git-lfs/blob/master/f/git-lfs.spec#_214-221

All %post is doing is running `git-lfs install --system`.  I can reproduce the install error on F28 and F29, but not F27.  The big difference I see is that F27 has git 2.14.3, but F28 and F29 have git 2.17.0.  Please report the issue upstream [1].

Regarding the uninstall, I see that %preun is running `git-lfs uninstall`.  Without the `--system` flag, this command is trying to remove the lfs filter from ~/.gitconfig instead of /etc/gitconfig.  I can take care of that.

[1]: https://github.com/git-lfs/git-lfs/issues

Comment 2 Carl George 2018-05-21 14:45:54 UTC
While updating this, I noticed another issue.  %preun is running `git-lfs uninstall` for package upgrade, not uninstall.  I need to flip that logic as well.

Comment 3 Robert P. J. Day 2018-05-21 14:47:16 UTC
(In reply to Carl George from comment #1)
> Here are the scriptlets.
> 
> https://src.fedoraproject.org/rpms/git-lfs/blob/master/f/git-lfs.spec#_214-
> 221
> 
> All %post is doing is running `git-lfs install --system`.  I can reproduce
> the install error on F28 and F29, but not F27.  The big difference I see is
> that F27 has git 2.14.3, but F28 and F29 have git 2.17.0.  Please report the
> issue upstream [1].
> 
> Regarding the uninstall, I see that %preun is running `git-lfs uninstall`. 
> Without the `--system` flag, this command is trying to remove the lfs filter
> from ~/.gitconfig instead of /etc/gitconfig.  I can take care of that.
> 
> [1]: https://github.com/git-lfs/git-lfs/issues

Done: https://github.com/git-lfs/git-lfs/issues/3013

Comment 4 Fedora Update System 2018-05-21 19:35:41 UTC
git-lfs-2.4.0-3.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-49831b624d

Comment 5 Fedora Update System 2018-05-21 19:35:48 UTC
git-lfs-2.4.0-3.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-a1882988d0

Comment 6 Fedora Update System 2018-05-22 15:19:08 UTC
git-lfs-2.4.0-3.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-2018-a1882988d0

Comment 7 Fedora Update System 2018-05-22 19:38:29 UTC
git-lfs-2.4.0-3.fc28 has been pushed to the Fedora 28 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-2018-49831b624d

Comment 8 Fedora Update System 2018-05-28 06:17:04 UTC
git-lfs-2.4.1-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-49831b624d

Comment 9 Fedora Update System 2018-05-28 15:48:20 UTC
git-lfs-2.4.1-1.fc28 has been pushed to the Fedora 28 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-2018-49831b624d

Comment 10 Fedora Update System 2018-06-05 13:42:51 UTC
git-lfs-2.4.1-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2018-06-06 13:00:43 UTC
git-lfs-2.4.0-3.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 12 Carl George 2018-06-14 12:36:12 UTC
The "not a git repository" error was reported again in bug 1591122.  Since this bug was already closed by bodhi for the update that adds the missing `--system` flag to the scriptlet, I'll just leave this one closed and track the first error in the other bug.


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