Add an option to disable modifying the git filter config.
This commit is contained in:
parent
65a97aafe2
commit
65880637e1
11
README.Fedora
Normal file
11
README.Fedora
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
git-lfs on Fedora
|
||||||
|
=================
|
||||||
|
|
||||||
|
By default, the package will run a post-install/post-uninstall task to
|
||||||
|
enable/disable git-lfs filters in the system git configuration.
|
||||||
|
|
||||||
|
If you wish to enable/disable git-lfs manually, you can set the following
|
||||||
|
option in the system git config, and package install/uninstall will no longer
|
||||||
|
do this:
|
||||||
|
|
||||||
|
# git config --system 'fedora.git-lfs.no-modify-config' true
|
10
git-lfs.spec
10
git-lfs.spec
@ -20,6 +20,7 @@ Summary: Git extension for versioning large files
|
|||||||
License: MIT
|
License: MIT
|
||||||
URL: https://git-lfs.github.io/
|
URL: https://git-lfs.github.io/
|
||||||
Source0: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-v%{version}.tar.gz
|
Source0: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-v%{version}.tar.gz
|
||||||
|
Source1: README.Fedora
|
||||||
|
|
||||||
BuildRequires: golang(github.com/dpotapov/go-spnego)
|
BuildRequires: golang(github.com/dpotapov/go-spnego)
|
||||||
BuildRequires: golang(github.com/git-lfs/gitobj/v2) >= 2
|
BuildRequires: golang(github.com/git-lfs/gitobj/v2) >= 2
|
||||||
@ -63,6 +64,7 @@ storing the file contents on a remote server.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%goprep
|
%goprep
|
||||||
|
cp -p %SOURCE1 .
|
||||||
|
|
||||||
# Modify Makefile so that it expects binaries where we build them.
|
# Modify Makefile so that it expects binaries where we build them.
|
||||||
sed -i -e 's!\.\./bin/!/%{gobuilddir}/bin/!g' t/Makefile
|
sed -i -e 's!\.\./bin/!/%{gobuilddir}/bin/!g' t/Makefile
|
||||||
@ -99,10 +101,13 @@ install -Dpm0644 man/*.5 %{buildroot}%{_mandir}/man5/
|
|||||||
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
|
if [ "x$(git config --type=bool --get 'fedora.git-lfs.no-modify-config')" != "xtrue" ]; then
|
||||||
%{_bindir}/%{name} install --system --skip-repo
|
%{_bindir}/%{name} install --system --skip-repo
|
||||||
|
fi
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ $1 -eq 0 ]; then
|
if [ $1 -eq 0 ] && \
|
||||||
|
[ "x$(git config --type=bool --get 'fedora.git-lfs.no-modify-config')" != "xtrue" ]; then
|
||||||
%{_bindir}/%{name} uninstall --system --skip-repo
|
%{_bindir}/%{name} uninstall --system --skip-repo
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
@ -117,7 +122,7 @@ PATH=%{buildroot}%{_bindir}:%{gobuilddir}/bin:$PATH \
|
|||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc README.md CHANGELOG.md docs
|
%doc README.md README.Fedora CHANGELOG.md docs
|
||||||
%license LICENSE.md
|
%license LICENSE.md
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
%{_mandir}/man1/%{name}*.1*
|
%{_mandir}/man1/%{name}*.1*
|
||||||
@ -130,6 +135,7 @@ PATH=%{buildroot}%{_bindir}:%{gobuilddir}/bin:$PATH \
|
|||||||
* Thu Sep 03 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.12.0-1
|
* Thu Sep 03 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.12.0-1
|
||||||
- Update to latest version (#1874604)
|
- Update to latest version (#1874604)
|
||||||
- Remove duplicate docs/man directory (#1852765)
|
- Remove duplicate docs/man directory (#1852765)
|
||||||
|
- Add an option to disable modifying the git filter config (#1768060)
|
||||||
|
|
||||||
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.11.0-3
|
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.11.0-3
|
||||||
- Second attempt - Rebuilt for
|
- Second attempt - Rebuilt for
|
||||||
|
Loading…
Reference in New Issue
Block a user