Add sw_64 support
(cherry picked from commit a67e24f78b781a614698a64cb5bb6372c5235a95)
This commit is contained in:
parent
c582fe9102
commit
db1ed47eca
2858
0001-add-sw64-support.patch
Normal file
2858
0001-add-sw64-support.patch
Normal file
File diff suppressed because it is too large
Load Diff
20
skopeo.spec
20
skopeo.spec
@ -12,7 +12,7 @@ ExcludeArch: ppc64
|
||||
Name: skopeo
|
||||
Epoch: 1
|
||||
Version: 1.14.2
|
||||
Release: 3
|
||||
Release: 4
|
||||
Summary: Work with remote images registries - retrieving information, images, signing content
|
||||
License: Apache-2.0
|
||||
URL: https://github.com/containers/skopeo
|
||||
@ -21,6 +21,7 @@ Source1: https://github.com/cpuguy83/go-md2man/archive/refs/tags/v2.0.3.tar.gz
|
||||
|
||||
Patch0001: 0001-fix-CVE-2024-24786.patch
|
||||
Patch0002: 0002-fix-CVE-2024-28180.patch
|
||||
Patch0003: 0001-add-sw64-support.patch
|
||||
|
||||
BuildRequires: go-srpm-macros git-core pkgconfig(devmapper) make
|
||||
BuildRequires: golang >= 1.19
|
||||
@ -60,6 +61,12 @@ sed -i 's/^install-docs: docs.*/install-docs:/' Makefile
|
||||
|
||||
tar -zxf %SOURCE1
|
||||
|
||||
%ifarch sw_64
|
||||
grep -r "buildmode" | cut -d: -f1 | xargs -I {} sed -i -e 's/buildmode=pie/buildmode=exe/g' -e 's/buildmode pie/buildmode exe/g' {}
|
||||
sed -i -e 's/riscv64 || sh/riscv64 || sh || sw64/' -e 's/riscv64 sh/riscv64 sh sw64/' vendor/golang.org/x/sys/unix/endian_little.go vendor/golang.org/x/sys/cpu/endian_little.go
|
||||
sed -i 's/syscall.Pause()/unix.Pause()/g' vendor/github.com/containers/storage/pkg/idmap/idmapped_utils.go
|
||||
%endif
|
||||
|
||||
%build
|
||||
pushd go-md2man-*
|
||||
go build -mod=vendor -o go-md2man .
|
||||
@ -82,7 +89,13 @@ LDFLAGS=''
|
||||
export GO111MODULE=on
|
||||
export GOFLAGS=-mod=vendor
|
||||
|
||||
go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -extldflags '-Wl,-z,relro -Wl,-z,now '" -a -v -x -o bin/%{name} ./cmd/%{name}
|
||||
go build \
|
||||
%ifnarch sw_64
|
||||
-buildmode pie \
|
||||
%else
|
||||
-buildmode exe \
|
||||
%endif
|
||||
-compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -extldflags '-Wl,-z,relro -Wl,-z,now '" -a -v -x -o bin/%{name} ./cmd/%{name}
|
||||
%{__make} docs
|
||||
|
||||
%install
|
||||
@ -116,6 +129,9 @@ cp -pav systemtest/* %{buildroot}/%{_datadir}/%{name}/test/system/
|
||||
%{_datadir}/%{name}/test
|
||||
|
||||
%changelog
|
||||
* Fri Feb 28 2025 zhangshaoning <zhangshaoning@uniontech.com> - 1:1.14.2-4
|
||||
- Add sw_64 support
|
||||
|
||||
* Fri Apr 12 2024 zhangbowei <zhangbowei@kylinos.cn> - 1:1.14.2-3
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user