diff --git a/0001-podman-4.9.4-add-support-for-loongarch64.patch b/0001-podman-4.9.4-add-support-for-loongarch64.patch new file mode 100644 index 0000000000000000000000000000000000000000..1c56640776a86186caeab4d41629b17d3523b222 --- /dev/null +++ b/0001-podman-4.9.4-add-support-for-loongarch64.patch @@ -0,0 +1,38 @@ +From e7c298c09f6892952703f05bd25fd3ba6c5d1ea2 Mon Sep 17 00:00:00 2001 +From: Pengda Dou +Date: Wed, 24 Apr 2024 10:14:14 +0800 +Subject: [PATCH] podman 4.9.4 add support for loong64 + +--- + .../vendor/github.com/u-root/uio/ubinary/little_endian.go | 2 +- + vendor/github.com/cilium/ebpf/internal/endian_le.go | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/gvisor-tap-vsock-0.7.1/vendor/github.com/u-root/uio/ubinary/little_endian.go b/gvisor-tap-vsock-0.7.1/vendor/github.com/u-root/uio/ubinary/little_endian.go +index 317bb91..bab304a 100644 +--- a/gvisor-tap-vsock-0.7.1/vendor/github.com/u-root/uio/ubinary/little_endian.go ++++ b/gvisor-tap-vsock-0.7.1/vendor/github.com/u-root/uio/ubinary/little_endian.go +@@ -2,7 +2,7 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-// +build 386 amd64 arm arm64 mipsle mips64le ppc64le riscv riscv64 ++// +build 386 amd64 arm arm64 loong64 mipsle mips64le ppc64le riscv riscv64 + + package ubinary + +diff --git a/vendor/github.com/cilium/ebpf/internal/endian_le.go b/vendor/github.com/cilium/ebpf/internal/endian_le.go +index 41a6822..273fad8 100644 +--- a/vendor/github.com/cilium/ebpf/internal/endian_le.go ++++ b/vendor/github.com/cilium/ebpf/internal/endian_le.go +@@ -1,5 +1,5 @@ +-//go:build 386 || amd64 || amd64p32 || arm || arm64 || mipsle || mips64le || mips64p32le || ppc64le || riscv64 +-// +build 386 amd64 amd64p32 arm arm64 mipsle mips64le mips64p32le ppc64le riscv64 ++//go:build 386 || amd64 || amd64p32 || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || ppc64le || riscv64 ++// +build 386 amd64 amd64p32 arm arm64 loong64 mipsle mips64le mips64p32le ppc64le riscv64 + + package internal + +-- +2.38.1 + diff --git a/podman.spec b/podman.spec index a3f7fb02b8ecf0d95a22db224ef80f3966141888..aba22ab4a14a9bf9f5f3aab60e287cc07842140e 100644 --- a/podman.spec +++ b/podman.spec @@ -2,7 +2,7 @@ Name: podman Version: 4.9.4 -Release: 3 +Release: 4 Summary: A tool for managing OCI containers and pods. Epoch: 1 License: Apache-2.0 and MIT @@ -11,6 +11,7 @@ Source0: https://github.com/containers/podman/archive/refs/tags/v%{version Source1: https://github.com/containers/dnsname/archive/18822f9a4fb35d1349eb256f4cd2bfd372474d84/dnsname-18822f9.tar.gz Source2: https://github.com/containers/gvisor-tap-vsock/archive/refs/tags/v0.7.1.tar.gz Source3: https://github.com/cpuguy83/go-md2man/archive/refs/tags/v2.0.3.tar.gz +Patch0: 0001-podman-4.9.4-add-support-for-loongarch64.patch BuildRequires: gcc golang btrfs-progs-devel glib2-devel glibc-devel glibc-static BuildRequires: gpgme-devel libassuan-devel libgpg-error-devel libseccomp-devel libselinux-devel @@ -108,7 +109,7 @@ It is a symlink to %{_bindir}/%{name} and execs into the `%{name}sh` container when `%{_bindir}/%{name}sh` is set as a login shell or set as os.Args[0]. %prep -%autosetup -Sgit -n %{name}-%{version} +%setup -n %{name}-%{version} sed -i 's;@@PODMAN@@\;$(BINDIR);@@PODMAN@@\;%{_bindir};' Makefile # untar dnsname tar zxf %{SOURCE1} @@ -116,6 +117,18 @@ tar zxf %{SOURCE1} tar zxf %{SOURCE2} # untar go-md2man tar zxf %{SOURCE3} +%ifarch loongarch64 +cd dnsname-18822f9a4fb35d1349eb256f4cd2bfd372474d84 +export GOSUMDB="sum.golang.org" +export GOPROXY="https://goproxy.cn" +go get -d golang.org/x/sys@v0.19.0 +go mod tidy +go mod download +go mod vendor +cd - +%patch0 -p1 +%endif + %build GO_MD2MAN_PATH="$(pwd)%{_bindir}" @@ -277,6 +290,9 @@ cp -pav test/system %{buildroot}/%{_datadir}/%{name}/test/ %{_bindir}/%{name}sh %changelog +* Wed Apr 24 2024 Pengda Dou - 1:4.9.4-4 +- add support for loongarch64 + * Mon Apr 08 2024 lijian 1:4.9.4-3 - Add require containernetworking-plugins