From 61ae58f18442af8cdee6caa34bcc7657a2a2017d Mon Sep 17 00:00:00 2001 From: Jacob Wang Date: Thu, 26 Sep 2024 09:58:50 +0800 Subject: [PATCH 1/4] update to git-lfs-3.4.1-3.src.rpm Signed-off-by: Jacob Wang --- git-lfs.spec | 39 ++++++--------------------------------- 1 file changed, 6 insertions(+), 33 deletions(-) diff --git a/git-lfs.spec b/git-lfs.spec index d415441..00772f3 100644 --- a/git-lfs.spec +++ b/git-lfs.spec @@ -1,4 +1,3 @@ -%define anolis_release .0.1 # Build man pages %global with_manpages 1 @@ -15,16 +14,12 @@ Version: 3.4.1 %global gobuilddir %{_builddir}/%{name}-%{version}/_build -%ifnarch loongarch64 -%define pie_mode -buildmode pie -%endif - # define gobuild macro to not lose hardening, because of macro conflict # https://bugzilla.redhat.com/show_bug.cgi?id=1919348 -%global gobuild CGO_CPPFLAGS="-D_FORTIFY_SOURCE=2 -fstack-protector-all" go build -compiler gc %{?!pie_mode} '-tags=rpm_crashtraceback libtrust_openssl ' -ldflags "-linkmode=external -compressdwarf=false ${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v -x %{?**} +%global gobuild CGO_CPPFLAGS="-D_FORTIFY_SOURCE=2 -fstack-protector-all" go build -compiler gc -buildmode pie '-tags=rpm_crashtraceback libtrust_openssl ' -ldflags "-linkmode=external -compressdwarf=false ${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v -x %{?**} Name: git-lfs -Release: 2%{anolis_release}%{?dist} +Release: 3%{?dist} Summary: Git extension for versioning large files License: MIT @@ -83,27 +78,12 @@ BuildRequires: git >= 2.32.0 %endif Requires: git-core >= 2.32.0 -%ifarch loongarch64 -BuildRequires: golang-vendored-golang.org -%endif - -Requires: bash -Requires: glibc - -Provides: /usr/bin/git-lfs %description Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server. -%package doc -Summary: Documents for %{name} -BuildArch: noarch -Requires: %{name} = %{version}-%{release} - -%description doc -Doc pages for %{name}. %prep %autosetup -p1 -n %{name}-%{version} @@ -125,11 +105,6 @@ sed -i -e 's!^BINPATH=.\+!BINPATH="%{gobuilddir}/bin"!g' t/testenv.sh export GOPATH=%{gobuilddir}:%{gopath} export GO111MODULE=off -%ifarch loongarch64 -rm -rf vendor/golang.org/x/sys vendor/golang.org/x/net -cp -arp %{_datadir}/golang/vendor/golang.org/x/* vendor/golang.org/x/ -%endif - # Build manpages first (some embedding in the executable is done.) pushd docs %gobuild -o mangen man/mangen.go @@ -186,20 +161,18 @@ PATH=%{buildroot}%{_bindir}:%{gobuilddir}/bin:$PATH \ %files # In Fedora this is done by using %%gopkgfiles +%doc README.md CHANGELOG.md docs %license LICENSE.md %{_bindir}/%{name} %{_mandir}/man1/%{name}*.1* %{_mandir}/man5/%{name}*.5* %{_mandir}/man7/%{name}*.7* -%files doc -%doc README.md CHANGELOG.md docs %changelog -* Fri Aug 16 2024 Weisson - 3.4.1-2.0.1 -- Add doc sub package -- Disable pie mode for loongarch64 (geliwei@openanolis.org) -- Support loongarch build (geliwei@openanolis.org) +* Mon Sep 23 2024 Ondřej Pohořelský - 3.4.1-3 +- Rebuild with new Golang +- Resolves: RHEL-57900 * Mon Apr 22 2024 Ondřej Pohořelský - 3.4.1-2 - Rebuild with new Golang -- Gitee From f60a8a15358e200e490b75edde237a8f8a5e1289 Mon Sep 17 00:00:00 2001 From: Weisson Date: Sun, 17 Jul 2022 15:42:42 +0800 Subject: [PATCH 2/4] spec: add doc sub package Signed-off-by: Weisson --- git-lfs.spec | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/git-lfs.spec b/git-lfs.spec index 00772f3..b0ff962 100644 --- a/git-lfs.spec +++ b/git-lfs.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 # Build man pages %global with_manpages 1 @@ -19,7 +20,7 @@ Version: 3.4.1 %global gobuild CGO_CPPFLAGS="-D_FORTIFY_SOURCE=2 -fstack-protector-all" go build -compiler gc -buildmode pie '-tags=rpm_crashtraceback libtrust_openssl ' -ldflags "-linkmode=external -compressdwarf=false ${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v -x %{?**} Name: git-lfs -Release: 3%{?dist} +Release: 3%{anolis_release}%{?dist} Summary: Git extension for versioning large files License: MIT @@ -78,12 +79,23 @@ BuildRequires: git >= 2.32.0 %endif Requires: git-core >= 2.32.0 +Requires: bash +Requires: glibc + +Provides: /usr/bin/git-lfs %description Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server. +%package doc +Summary: Documents for %{name} +BuildArch: noarch +Requires: %{name} = %{version}-%{release} + +%description doc +Doc pages for %{name}. %prep %autosetup -p1 -n %{name}-%{version} @@ -161,15 +173,19 @@ PATH=%{buildroot}%{_bindir}:%{gobuilddir}/bin:$PATH \ %files # In Fedora this is done by using %%gopkgfiles -%doc README.md CHANGELOG.md docs %license LICENSE.md %{_bindir}/%{name} %{_mandir}/man1/%{name}*.1* %{_mandir}/man5/%{name}*.5* %{_mandir}/man7/%{name}*.7* +%files doc +%doc README.md CHANGELOG.md docs %changelog +* Thu Sep 26 2024 Weisson - 3.4.1-3.0.1 +- Add doc sub package + * Mon Sep 23 2024 Ondřej Pohořelský - 3.4.1-3 - Rebuild with new Golang - Resolves: RHEL-57900 -- Gitee From 69f6114760e2bac40134275b26d67d1e88f82f79 Mon Sep 17 00:00:00 2001 From: Liwei Ge Date: Tue, 29 Nov 2022 12:44:54 +0800 Subject: [PATCH 3/4] spec: disable pie mode for loongarch --- git-lfs.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/git-lfs.spec b/git-lfs.spec index b0ff962..16b61cb 100644 --- a/git-lfs.spec +++ b/git-lfs.spec @@ -15,9 +15,13 @@ Version: 3.4.1 %global gobuilddir %{_builddir}/%{name}-%{version}/_build +%ifnarch loongarch64 +%define pie_mode -buildmode pie +%endif + # define gobuild macro to not lose hardening, because of macro conflict # https://bugzilla.redhat.com/show_bug.cgi?id=1919348 -%global gobuild CGO_CPPFLAGS="-D_FORTIFY_SOURCE=2 -fstack-protector-all" go build -compiler gc -buildmode pie '-tags=rpm_crashtraceback libtrust_openssl ' -ldflags "-linkmode=external -compressdwarf=false ${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v -x %{?**} +%global gobuild CGO_CPPFLAGS="-D_FORTIFY_SOURCE=2 -fstack-protector-all" go build -compiler gc %{?!pie_mode} '-tags=rpm_crashtraceback libtrust_openssl ' -ldflags "-linkmode=external -compressdwarf=false ${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v -x %{?**} Name: git-lfs Release: 3%{anolis_release}%{?dist} @@ -185,6 +189,7 @@ PATH=%{buildroot}%{_bindir}:%{gobuilddir}/bin:$PATH \ %changelog * Thu Sep 26 2024 Weisson - 3.4.1-3.0.1 - Add doc sub package +- Disable pie mode for loongarch64 (geliwei@openanolis.org) * Mon Sep 23 2024 Ondřej Pohořelský - 3.4.1-3 - Rebuild with new Golang -- Gitee From 4d5cba337923cce92da1ebbba0e86753c3bb5ea3 Mon Sep 17 00:00:00 2001 From: Liwei Ge Date: Wed, 28 Dec 2022 22:19:37 +0800 Subject: [PATCH 4/4] spec: support loongarch build --- git-lfs.spec | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/git-lfs.spec b/git-lfs.spec index 16b61cb..7dfcbe8 100644 --- a/git-lfs.spec +++ b/git-lfs.spec @@ -83,6 +83,10 @@ BuildRequires: git >= 2.32.0 %endif Requires: git-core >= 2.32.0 +%ifarch loongarch64 +BuildRequires: golang-vendored-golang.org +%endif + Requires: bash Requires: glibc @@ -121,6 +125,11 @@ sed -i -e 's!^BINPATH=.\+!BINPATH="%{gobuilddir}/bin"!g' t/testenv.sh export GOPATH=%{gobuilddir}:%{gopath} export GO111MODULE=off +%ifarch loongarch64 +rm -rf vendor/golang.org/x/sys vendor/golang.org/x/net +cp -arp %{_datadir}/golang/vendor/golang.org/x/* vendor/golang.org/x/ +%endif + # Build manpages first (some embedding in the executable is done.) pushd docs %gobuild -o mangen man/mangen.go @@ -190,6 +199,7 @@ PATH=%{buildroot}%{_bindir}:%{gobuilddir}/bin:$PATH \ * Thu Sep 26 2024 Weisson - 3.4.1-3.0.1 - Add doc sub package - Disable pie mode for loongarch64 (geliwei@openanolis.org) +- Support loongarch build (geliwei@openanolis.org) * Mon Sep 23 2024 Ondřej Pohořelský - 3.4.1-3 - Rebuild with new Golang -- Gitee