Skip to content

Commit 63252ae

Browse files
[AUTO-CHERRYPICK] git-lfs: upgrade to 3.4.1 to fix multiple CVEs - branch main (#8844)
Co-authored-by: Andrew Phelps <anphel31@users.noreply.github.com>
1 parent c2c6f21 commit 63252ae

5 files changed

Lines changed: 17 additions & 211 deletions

File tree

SPECS/git-lfs/CVE-2021-44716.patch

Lines changed: 0 additions & 51 deletions
This file was deleted.

SPECS/git-lfs/CVE-2023-44487.patch

Lines changed: 0 additions & 143 deletions
This file was deleted.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Signatures": {
3-
"git-lfs-3.1.4.tar.gz": "d7bfeb6f4c219c44773da4f93da28eb1e2e654efa4cd23294d9039247d8cde64",
4-
"git-lfs-3.1.4-vendor.tar.gz": "0bb6efd3854ebb232445ecc0bd6fbb8bbce65bca4a958111293ed0084f43cab2"
3+
"git-lfs-3.4.1-vendor.tar.gz": "a7b525a15b71a92ab789853a172345a4e4815de71ebe3486d5b843651b74cf1e",
4+
"git-lfs-3.4.1.tar.gz": "2a36239d7968ae18e1ba2820dc664c4ef753f10bf424f98bccaf44d527f19a17"
55
}
6-
}
6+
}

SPECS/git-lfs/git-lfs.spec

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
%global debug_package %{nil}
22
Summary: Git extension for versioning large files
33
Name: git-lfs
4-
Version: 3.1.4
5-
Release: 17%{?dist}
4+
Version: 3.4.1
5+
Release: 1%{?dist}
66
Group: System Environment/Programming
77
Vendor: Microsoft Corporation
88
Distribution: Mariner
@@ -28,41 +28,37 @@ Source0: https://github.com/git-lfs/git-lfs/archive/v%{version}.tar.gz#/%{
2828
# See: https://reproducible-builds.org/docs/archives/
2929
# - For the value of "--mtime" use the date "2021-04-26 00:00Z" to simplify future updates.
3030
Source1: %{name}-%{version}-vendor.tar.gz
31-
Patch0: CVE-2023-44487.patch
32-
Patch1: CVE-2021-44716.patch
3331

3432
BuildRequires: golang
3533
BuildRequires: which
36-
BuildRequires: rubygem-ronn
3734
BuildRequires: tar
3835
BuildRequires: git
36+
BuildRequires: rubygem-asciidoctor
3937
Requires: git
4038
%define our_gopath %{_topdir}/.gopath
4139

4240
%description
4341
Git LFS is a command line extension and specification for managing large files with Git
4442

4543
%prep
46-
%autosetup -N
47-
# Apply vendor before patching
48-
tar --no-same-owner -xf %{SOURCE1}
49-
%autopatch -p1
44+
%autosetup
5045

5146
%build
47+
tar --no-same-owner -xf %{SOURCE1}
5248
export GOPATH=%{our_gopath}
5349
export GOFLAGS="-buildmode=pie -trimpath -mod=vendor -modcacherw -ldflags=-linkmode=external"
5450
go generate ./commands
5551
go build .
5652
export PATH=$PATH:%{gem_dir}/bin
57-
make man %{?_smp_mflags}
53+
make man GIT_LFS_SHA=unused VERSION=unused PREFIX=unused
5854

5955
%install
6056
rm -rf %{buildroot}
6157
install -D git-lfs %{buildroot}%{_bindir}/git-lfs
6258
mkdir -p %{buildroot}%{_mandir}/man1
6359
mkdir -p %{buildroot}%{_mandir}/man5
64-
install -D man/*.1 %{buildroot}%{_mandir}/man1
65-
install -D man/*.5 %{buildroot}%{_mandir}/man5
60+
install -D man/man1/*.1 %{buildroot}%{_mandir}/man1
61+
install -D man/man5/*.5 %{buildroot}%{_mandir}/man5
6662

6763
%check
6864
go test -mod=vendor ./...
@@ -81,6 +77,10 @@ git lfs uninstall
8177
%{_mandir}/man5/*
8278

8379
%changelog
80+
* Thu Apr 18 2024 Andrew Phelps <anphel@microsoft.com> - 3.4.1-1
81+
- Bump version to 3.4.1 based on AZL3 spec
82+
- Add BR on asciidoctor & drop un-needed BR
83+
8484
* Mon Feb 05 2024 Nicolas Guibourge <nicolasg@microsoft.com> - 3.1.4-17
8585
- Patch CVE-2021-44716
8686

cgmanifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4290,8 +4290,8 @@
42904290
"type": "other",
42914291
"other": {
42924292
"name": "git-lfs",
4293-
"version": "3.1.4",
4294-
"downloadUrl": "https://github.com/git-lfs/git-lfs/archive/v3.1.4.tar.gz"
4293+
"version": "3.4.1",
4294+
"downloadUrl": "https://github.com/git-lfs/git-lfs/archive/v3.4.1.tar.gz"
42954295
}
42964296
}
42974297
},

0 commit comments

Comments
 (0)