From 8bfb03a1f77266c6bacab2dceea8cb752de03c24 Mon Sep 17 00:00:00 2001 From: Renbo Date: Fri, 16 Aug 2024 14:41:10 +0800 Subject: [PATCH 1/4] update to git-lfs-3.4.1-2.src.rpm Signed-off-by: Renbo --- dist | 2 +- git-lfs.spec | 39 ++++++--------------------------------- 2 files changed, 7 insertions(+), 34 deletions(-) diff --git a/dist b/dist index 9c0e36e..1fe92cf 100644 --- a/dist +++ b/dist @@ -1 +1 @@ -an8 +an8_10 diff --git a/git-lfs.spec b/git-lfs.spec index d92143d..627d804 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: 1%{anolis_release}%{?dist} +Release: 2%{?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 -* Tue May 28 2024 Weisson - 3.4.1-1.0.1 -- Add doc sub package -- Disable pie mode for loongarch64 (geliwei@openanolis.org) -- Support loongarch build (geliwei@openanolis.org) +* Mon Apr 22 2024 Ondřej Pohořelský - 3.4.1-2 +- Rebuild with new Golang +- Resolves: RHEL-32543, RHEL-28377, RHEL-28399, RHEL-28423 * Mon Dec 18 2023 Ondrej Pohorelsky - 3.4.1-1 - Update to version 3.4.1 -- Gitee From a4c6489fd94dcc2d637a4c58f7bca18c83ab65de 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 627d804..be82b8c 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: 2%{?dist} +Release: 2%{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 +* Fri Aug 16 2024 Weisson - 3.4.1-2.0.1 +- Add doc sub package + * Mon Apr 22 2024 Ondřej Pohořelský - 3.4.1-2 - Rebuild with new Golang - Resolves: RHEL-32543, RHEL-28377, RHEL-28399, RHEL-28423 -- Gitee From 4c73db002b739b37663af68344dd2157c75d92ff 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 be82b8c..072e61e 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: 2%{anolis_release}%{?dist} @@ -185,6 +189,7 @@ PATH=%{buildroot}%{_bindir}:%{gobuilddir}/bin:$PATH \ %changelog * Fri Aug 16 2024 Weisson - 3.4.1-2.0.1 - Add doc sub package +- Disable pie mode for loongarch64 (geliwei@openanolis.org) * Mon Apr 22 2024 Ondřej Pohořelský - 3.4.1-2 - Rebuild with new Golang -- Gitee From 739eaacb6eede532532686a3573ae45429375d13 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 072e61e..d415441 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 \ * 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 Apr 22 2024 Ondřej Pohořelský - 3.4.1-2 - Rebuild with new Golang -- Gitee