Source: runc
Version: 1.1.15+ds1-1
Severity: normal
Tags: ftbfs
User: debian-loonga...@lists.debian.org
Usertags: loong64
X-Debbugs-CC: debian-loonga...@lists.debian.org
Dear maintainers,
User feedback on installation of docker.io failed.
The specific phenomenon is as follows:
```
# apt install docker.io
Unsatisfied dependencies:
docker.io : Depends: containerd (>= 1.4~) but it is not going to be
installed
Depends: runc (>= 1.0.0~rc8~) but it is not installable
```
In fact, compiling the runc failed for loong64 in the Debian Package
Auto-Building environment.
The full build log can be found at
https://buildd.debian.org/status/logs.php?pkg=runc&ver=1.1.15%2Bds1-1&arch=loong64.
After analysis, three points have been confirmed.
- need to improve loongarch64 support in runc.
- runc depends golang-github-seccomp-libseccomp-golang-dev.
- Debian golang-github-seccomp-libseccomp-golang lacks of loongarch64
support.
Please consider the patch I attached for runc.
Based on my local golang-github-seccomp-libseccomp-golang-dev(including
loongarch64 support), runc was built successfully on my local ENV.
Finally, after installing the locally built runc, the docker.io package
was installed successfully, e.g.
```
# apt install ./runc_1.1.15+ds1-1+loong64_loong64.deb
# apt install docker.io
# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled;
preset: enabled)
Active: active (running) since Fri 2025-02-07 08:42:50 UTC; 3min
4s ago
Invocation: d86f7cbfe54e47e2bd59f459db5c9326
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 2184501 (dockerd)
......
```
Please note that I have submitted loongarch64 support for Debian
golang-github-seccomp-libseccomp-golang(Bug: 1095322).
Before building runc(Make sure you have merged the attached patch) in
Debian, loongarch64 support need to be merged in Debian
golang-github-seccomp-libseccomp-golang first.
Your opinions are welcome.
Best regards,
Dandan Zhang
Description: Update loongarch64 support.
.
runc (1.1.15+ds1-1+loong64) unstable; urgency=medium
.
* Update loongarch64 support.
Author: Dandan Zhang <zhangdan...@loongson.cn>
---
Last-Update: 2025-02-07
--- runc-1.1.15+ds1.orig/libcontainer/seccomp/config.go
+++ runc-1.1.15+ds1/libcontainer/seccomp/config.go
@@ -69,6 +69,7 @@ var archs = map[string]string{
"SCMP_ARCH_RISCV64": "riscv64",
"SCMP_ARCH_S390": "s390",
"SCMP_ARCH_S390X": "s390x",
+ "SCMP_ARCH_LOONGARCH64": "loong64",
}
// KnownArchs returns the list of the known archs.
--- runc-1.1.15+ds1.orig/libcontainer/seccomp/patchbpf/enosys_linux.go
+++ runc-1.1.15+ds1/libcontainer/seccomp/patchbpf/enosys_linux.go
@@ -55,6 +55,13 @@ const uintptr_t C_FILTER_FLAG_NEW_LISTEN
#define AUDIT_ARCH_RISCV64 (EM_RISCV|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
#endif
+#ifndef AUDIT_ARCH_LOONGARCH64
+#ifndef EM_LOONGARCH
+#define EM_LOONGARCH 258
+#endif
+#define AUDIT_ARCH_LOONGARCH64 (EM_LOONGARCH|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
+#endif
+
// We use the AUDIT_ARCH_* values because those are the ones used by the kernel
// and SCMP_ARCH_* sometimes has fake values (such as SCMP_ARCH_X32). But we
// use <seccomp.h> so we get libseccomp's fallback definitions of AUDIT_ARCH_*.
@@ -75,6 +82,7 @@ const uint32_t C_AUDIT_ARCH_PPC64LE
const uint32_t C_AUDIT_ARCH_S390 = AUDIT_ARCH_S390;
const uint32_t C_AUDIT_ARCH_S390X = AUDIT_ARCH_S390X;
const uint32_t C_AUDIT_ARCH_RISCV64 = AUDIT_ARCH_RISCV64;
+const uint32_t C_AUDIT_ARCH_LOONGARCH64 = AUDIT_ARCH_LOONGARCH64;
*/
import "C"
@@ -212,6 +220,8 @@ func scmpArchToAuditArch(arch libseccomp
return linuxAuditArch(C.C_AUDIT_ARCH_S390X), nil
case libseccomp.ArchRISCV64:
return linuxAuditArch(C.C_AUDIT_ARCH_RISCV64), nil
+ case libseccomp.ArchLOONGARCH64:
+ return linuxAuditArch(C.C_AUDIT_ARCH_LOONGARCH64), nil
default:
return invalidArch, fmt.Errorf("unknown architecture: %v", arch)
}