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?
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
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.
(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
git-lfs-2.4.0-3.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-49831b624d
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
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
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
git-lfs-2.4.1-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-49831b624d
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
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.
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.
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.