diff --git a/.git-lfs.spec.swp b/.git-lfs.spec.swp deleted file mode 100644 index f4e6a09ad01a8e429085d9156dda66d904828375..0000000000000000000000000000000000000000 Binary files a/.git-lfs.spec.swp and /dev/null differ diff --git a/git-lfs-v3.4.0.tar.gz b/git-lfs-v3.4.0.tar.gz deleted file mode 100644 index ef216cbcd41d16db00489b736675b35d6162ea95..0000000000000000000000000000000000000000 Binary files a/git-lfs-v3.4.0.tar.gz and /dev/null differ diff --git a/git-lfs-v3.6.1.tar.gz b/git-lfs-v3.6.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..5b45f8c12f19443ebaf849805731e555de659968 Binary files /dev/null and b/git-lfs-v3.6.1.tar.gz differ diff --git a/git-lfs.spec b/git-lfs.spec index b8a3dec81cf299e9002223fb6a2abaf91378cb69..f410e4a6f3335f8da46c3efb2044e29426753592 100644 --- a/git-lfs.spec +++ b/git-lfs.spec @@ -1,18 +1,55 @@ %define anolis_release 1 %bcond_without check -%undefine _missing_build_ids_terminate_build -%define debug_package %{nil} +%global goipath github.com/git-lfs/git-lfs/v3 +%global gobuilddir %{_builddir}/%{name}-%{version}/_build Name: git-lfs -Version: 3.4.0 +Version: 3.6.1 Release: %{anolis_release}%{?dist} Summary: Git extension for versioning large files -License: MIT +License: MIT AND BSD-3-Clause URL: https://git-lfs.github.io/ Source0: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-v%{version}.tar.gz -Source1: vendor.tar.xz +# Generated provides by vendor2provides.py +# https://src.fedoraproject.org/rpms/syncthing/blob/603e4e03a92a7d704d199629dd85304018e8279d/f/vendor2provides.py +Provides: bundled(golang(github.com/alexbrainman/sspi)) = 909beea +Provides: bundled(golang(github.com/avast/retry-go)) = 2.4.2+incompatible +Provides: bundled(golang(github.com/davecgh/go-spew)) = 1.1.1 +Provides: bundled(golang(github.com/dpotapov/go-spnego)) = 298b63a +Provides: bundled(golang(github.com/git-lfs/gitobj/v2)) = 2.1.1 +Provides: bundled(golang(github.com/git-lfs/go-netrc)) = f0c862d +Provides: bundled(golang(github.com/git-lfs/pktline)) = 06e9096 +Provides: bundled(golang(github.com/git-lfs/wildmatch/v2)) = 2.0.1 +Provides: bundled(golang(github.com/hashicorp/go-uuid)) = 1.0.2 +Provides: bundled(golang(github.com/inconshreveable/mousetrap)) = 1.1.0 +Provides: bundled(golang(github.com/jcmturner/aescts/v2)) = 2.0.0 +Provides: bundled(golang(github.com/jcmturner/dnsutils/v2)) = 2.0.0 +Provides: bundled(golang(github.com/jcmturner/gofork)) = 1.0.0 +Provides: bundled(golang(github.com/jcmturner/goidentity/v6)) = 6.0.1 +Provides: bundled(golang(github.com/jcmturner/gokrb5/v8)) = 8.4.2 +Provides: bundled(golang(github.com/jcmturner/rpc/v2)) = 2.0.3 +Provides: bundled(golang(github.com/jmhodges/clock)) = 1.2.0 +Provides: bundled(golang(github.com/leonelquinteros/gotext)) = 1.5.0 +Provides: bundled(golang(github.com/mattn/go-isatty)) = 0.0.4 +Provides: bundled(golang(github.com/olekukonko/ts)) = 78ecb04 +Provides: bundled(golang(github.com/pkg/errors)) = c605e28 +Provides: bundled(golang(github.com/pmezard/go-difflib)) = 1.0.0 +Provides: bundled(golang(github.com/rubyist/tracerx)) = 7879593 +Provides: bundled(golang(github.com/spf13/cobra)) = 1.7.0 +Provides: bundled(golang(github.com/spf13/pflag)) = 1.0.5 +Provides: bundled(golang(github.com/ssgelm/cookiejarparser)) = 1.0.1 +Provides: bundled(golang(github.com/stretchr/testify)) = 1.6.1 +Provides: bundled(golang(github.com/xeipuuv/gojsonpointer)) = 4e3ac27 +Provides: bundled(golang(github.com/xeipuuv/gojsonreference)) = bd5ef7b +Provides: bundled(golang(github.com/xeipuuv/gojsonschema)) = 6b67b3f +Provides: bundled(golang(golang.org/x/crypto)) = 0.21.0 +Provides: bundled(golang(golang.org/x/net)) = 0.23.0 +Provides: bundled(golang(golang.org/x/sync)) = 0.1.0 +Provides: bundled(golang(golang.org/x/sys)) = 0.18.0 +Provides: bundled(golang(golang.org/x/text)) = 0.14.0 +Provides: bundled(golang(gopkg.in/yaml.v3)) = 3.0.1 BuildRequires: gnupg2 BuildRequires: curl BuildRequires: fdupes @@ -23,6 +60,14 @@ BuildRequires: golang >= 1.18 # Generate man pages BuildRequires: /usr/bin/asciidoctor +%if %{with check} +# Tests +BuildRequires: perl-Digest-SHA +BuildRequires: perl-Test-Harness +# Tests require full git suite, but not generally needed. +BuildRequires: git >= 2.32.0 +%endif + Requires: git-core >= 1.8.5 %description @@ -39,35 +84,71 @@ BuildArch: noarch The %{name}-doc package contains documentation files for %{name}. %prep -%autosetup -n %{name}-%{version} -p1 -a 1 +%autosetup -n %{name}-%{version} -p1 + +install -m 0755 -vd %{gobuilddir}/bin +install -m 0755 -vd "$(dirname %{gobuilddir}/src/%{goipath})" +ln -fs "$(pwd)" "%{gobuilddir}/src/%{goipath}" + +# Modify tests so that they expect binaries where we build them. +sed -i -e 's!\.\./bin/!/%{gobuilddir}/bin/!g' t/Makefile +sed -i -e 's!^BINPATH=.\+!BINPATH="%{gobuilddir}/bin"!g' t/testenv.sh %build -go build -mod=vendor --buildmode=pie . -make man +export GOPATH=%{gobuilddir}:%{gopath} +export GO111MODULE=off + +# Build manpages first (some embedding in the executable is done.) +make man GIT_LFS_SHA=unused VERSION=unused PREFIX=unused +pushd docs +%gobuild -o %{gobuilddir}/bin/mangen man/mangen.go +%{gobuilddir}/bin/mangen +popd + +%gobuild -o %{gobuilddir}/bin/git-lfs %{goipath} + +# Generate completion files. +for shell in bash fish zsh; do + %{gobuilddir}/bin/git-lfs completion ${shell} > %{name}.${shell} +done + +# Build test executables +pushd %{gobuilddir}/src/%{goipath} +for cmd in t/cmd/*.go; do + %gobuild -o "%{gobuilddir}/bin/$(basename $cmd .go)" "$cmd" +done +%gobuild -o "%{gobuilddir}/bin/git-lfs-test-server-api" t/git-lfs-test-server-api/*.go +popd + +# Remove man pages from docs so they don't get installed twice. +rm -r docs/man %install -install -D -m 755 git-lfs %{buildroot}%{_bindir}/git-lfs +install -Dpm0755 %{gobuilddir}/bin/git-lfs %{buildroot}%{_bindir}/%{name} for section in 1 5 7; do install -d -p %{buildroot}%{_mandir}/man${section}/ install -Dpm0644 man/man${section}/*.${section} %{buildroot}%{_mandir}/man${section}/ done - +install -Dpm 0644 %{name}.bash %{buildroot}%{bash_completions_dir}/%{name} +install -Dpm 0644 %{name}.fish %{buildroot}%{fish_completions_dir}/%{name}.fish +install -Dpm 0644 %{name}.zsh %{buildroot}%{zsh_completions_dir}/_%{name} %post %{_bindir}/%{name} install --system --skip-repo %preun -if [ $1 -eq 0 ] ; then +if [ $1 -eq 0 ]; then %{_bindir}/%{name} uninstall --system --skip-repo fi +exit 0 %if %{with check} %check -export GIT_LFS_TEST_DIR=$(mktemp -d) -export SKIPAPITESTCOMPILE=1 -go test -x -mod=vendor +%gocheck +PATH=%{buildroot}%{_bindir}:%{gobuilddir}/bin:$PATH \ + make -C t PROVE_EXTRA_ARGS="-j$(getconf _NPROCESSORS_ONLN)" %endif @@ -77,11 +158,17 @@ go test -x -mod=vendor %{_mandir}/man1/%{name}*.1* %{_mandir}/man5/%{name}*.5* %{_mandir}/man7/%{name}*.7* +%{bash_completions_dir}/%{name} +%{fish_completions_dir}/%{name}.fish +%{zsh_completions_dir}/_%{name} %files doc %doc README.md CHANGELOG.md docs %changelog +* Thu Feb 13 2025 mgb01105731 - 3.6.1-1 +- Refer to CentOS Stream git-lfs-3.6.1-1(opohorel@redhat.com) + * Mon Nov 6 2023 Wenlong Zhang - 3.4.0-1 - update to 3.4.0 diff --git a/vendor.tar.xz b/vendor.tar.xz deleted file mode 100644 index a417521e2ce0699d1de253584a653e268ff1d390..0000000000000000000000000000000000000000 Binary files a/vendor.tar.xz and /dev/null differ