runc-1.0.0-336.rc95.el9
- add GO111MODULE=off - Related: #1970747 Signed-off-by: Jindrich Novy <jnovy@redhat.com>
This commit is contained in:
parent
587c26f4f5
commit
7e19a0f0e3
308
.gitignore
vendored
308
.gitignore
vendored
@ -1,307 +1 @@
|
|||||||
/runc-57b9972.tar.gz
|
/*.tar.gz
|
||||||
/runc-04f275d.tar.gz
|
|
||||||
/runc-47ea5c7.tar.gz
|
|
||||||
/runc-c91b5be.tar.gz
|
|
||||||
/runc-75f8da7.tar.gz
|
|
||||||
/runc-6394544.tar.gz
|
|
||||||
/runc-c5ec254.tar.gz
|
|
||||||
/runc-aea4f21.tar.gz
|
|
||||||
/runc-1d3ab6d.tar.gz
|
|
||||||
/runc-e6516b3.tar.gz
|
|
||||||
/runc-9f9c962.tar.gz
|
|
||||||
/runc-4bb1fe4.tar.gz
|
|
||||||
/runc-cc4307a.tar.gz
|
|
||||||
/runc-f753f30.tar.gz
|
|
||||||
/runc-d56f6cc.tar.gz
|
|
||||||
/runc-63e6708.tar.gz
|
|
||||||
/runc-1f11dc5.tar.gz
|
|
||||||
/runc-871ba2e.tar.gz
|
|
||||||
/runc-0cbfd83.tar.gz
|
|
||||||
/runc-dd67ab1.tar.gz
|
|
||||||
/runc-ecd55a4.tar.gz
|
|
||||||
/runc-2e91544.tar.gz
|
|
||||||
/runc-dd56ece.tar.gz
|
|
||||||
/runc-ad0f525.tar.gz
|
|
||||||
/runc-0154d05.tar.gz
|
|
||||||
/runc-3ccfa2f.tar.gz
|
|
||||||
/runc-2c632d1.tar.gz
|
|
||||||
/runc-45e08f6.tar.gz
|
|
||||||
/runc-21ac086.tar.gz
|
|
||||||
/runc-bc14672.tar.gz
|
|
||||||
/runc-b4e2ecb.tar.gz
|
|
||||||
/runc-beadf0e.tar.gz
|
|
||||||
/runc-4056a41.tar.gz
|
|
||||||
/runc-20aff4f.tar.gz
|
|
||||||
/runc-fdd8055.tar.gz
|
|
||||||
/runc-70ca035.tar.gz
|
|
||||||
/runc-00dc700.tar.gz
|
|
||||||
/runc-578fe65.tar.gz
|
|
||||||
/runc-78ef28e.tar.gz
|
|
||||||
/runc-9e5aa74.tar.gz
|
|
||||||
/runc-079817c.tar.gz
|
|
||||||
/runc-ccb5efd.tar.gz
|
|
||||||
/runc-9397a6f.tar.gz
|
|
||||||
/runc-4932620.tar.gz
|
|
||||||
/runc-96ec217.tar.gz
|
|
||||||
/runc-25f3f89.tar.gz
|
|
||||||
/runc-859f745.tar.gz
|
|
||||||
/runc-f5b9991.tar.gz
|
|
||||||
/runc-bbb17ef.tar.gz
|
|
||||||
/runc-12f6a99.tar.gz
|
|
||||||
/runc-c1e454b.tar.gz
|
|
||||||
/runc-8011af4.tar.gz
|
|
||||||
/runc-e4fa8a4.tar.gz
|
|
||||||
/runc-dd023c4.tar.gz
|
|
||||||
/runc-6635b4f.tar.gz
|
|
||||||
/runc-0a012df.tar.gz
|
|
||||||
/runc-f414f49.tar.gz
|
|
||||||
/runc-751f18d.tar.gz
|
|
||||||
/runc-8084f76.tar.gz
|
|
||||||
/runc-5b5130a.tar.gz
|
|
||||||
/runc-f79e211.tar.gz
|
|
||||||
/runc-f739110.tar.gz
|
|
||||||
/runc-923a8f8.tar.gz
|
|
||||||
/runc-2b18fe1.tar.gz
|
|
||||||
/runc-7341c22.tar.gz
|
|
||||||
/runc-f56b4cb.tar.gz
|
|
||||||
/runc-dd22a84.tar.gz
|
|
||||||
/runc-11fc498.tar.gz
|
|
||||||
/runc-da20211.tar.gz
|
|
||||||
/runc-6a3f474.tar.gz
|
|
||||||
/runc-029124d.tar.gz
|
|
||||||
/runc-c1b8c57.tar.gz
|
|
||||||
/runc-b9b6cc6.tar.gz
|
|
||||||
/runc-6cccc17.tar.gz
|
|
||||||
/runc-9ae7901.tar.gz
|
|
||||||
/runc-80d35c7.tar.gz
|
|
||||||
/runc-2e94378.tar.gz
|
|
||||||
/runc-3525edd.tar.gz
|
|
||||||
/runc-68d73f0.tar.gz
|
|
||||||
/runc-c61c737.tar.gz
|
|
||||||
/runc-dd07560.tar.gz
|
|
||||||
/runc-51f2a86.tar.gz
|
|
||||||
/runc-92d851e.tar.gz
|
|
||||||
/runc-92ac8e3.tar.gz
|
|
||||||
/runc-0fd4342.tar.gz
|
|
||||||
/runc-a6606a7.tar.gz
|
|
||||||
/runc-e7a87dd.tar.gz
|
|
||||||
/runc-267490e.tar.gz
|
|
||||||
/runc-6c05552.tar.gz
|
|
||||||
/runc-bf27c2f.tar.gz
|
|
||||||
/runc-7507c64.tar.gz
|
|
||||||
/runc-3e425f8.tar.gz
|
|
||||||
/runc-84373aa.tar.gz
|
|
||||||
/runc-cad42f6.tar.gz
|
|
||||||
/runc-1b8a1ee.tar.gz
|
|
||||||
/runc-c1485a1.tar.gz
|
|
||||||
/runc-4e37017.tar.gz
|
|
||||||
/runc-8790f24.tar.gz
|
|
||||||
/runc-792af40.tar.gz
|
|
||||||
/runc-c4d8e16.tar.gz
|
|
||||||
/runc-03cf145.tar.gz
|
|
||||||
/runc-d239ca8.tar.gz
|
|
||||||
/runc-e57a774.tar.gz
|
|
||||||
/runc-b133fea.tar.gz
|
|
||||||
/runc-46def4c.tar.gz
|
|
||||||
/runc-2186cfa.tar.gz
|
|
||||||
/runc-c35c2c9.tar.gz
|
|
||||||
/runc-8bb10af.tar.gz
|
|
||||||
/runc-5e63695.tar.gz
|
|
||||||
/runc-e1b5af0.tar.gz
|
|
||||||
/runc-201b063.tar.gz
|
|
||||||
/runc-7496a96.tar.gz
|
|
||||||
/runc-a88592a.tar.gz
|
|
||||||
/runc-2b52db7.tar.gz
|
|
||||||
/runc-5cc0dea.tar.gz
|
|
||||||
/runc-709377c.tar.gz
|
|
||||||
/runc-f6fb7a0.tar.gz
|
|
||||||
/runc-2fc03cc.tar.gz
|
|
||||||
/runc-2b5730a.tar.gz
|
|
||||||
/runc-ff107ee.tar.gz
|
|
||||||
/runc-e6555cc.tar.gz
|
|
||||||
/runc-3b7e32f.tar.gz
|
|
||||||
/runc-8615da6.tar.gz
|
|
||||||
/runc-981dbef.tar.gz
|
|
||||||
/runc-525b9f3.tar.gz
|
|
||||||
/runc-939cd0b.tar.gz
|
|
||||||
/runc-1797622.tar.gz
|
|
||||||
/runc-07bd280.tar.gz
|
|
||||||
/runc-3087d43.tar.gz
|
|
||||||
/runc-4e6d8a0.tar.gz
|
|
||||||
/runc-cc183ca.tar.gz
|
|
||||||
/runc-be51398.tar.gz
|
|
||||||
/runc-96596cb.tar.gz
|
|
||||||
/runc-cebef0e.tar.gz
|
|
||||||
/runc-d4a6a1d.tar.gz
|
|
||||||
/runc-f1eea90.tar.gz
|
|
||||||
/runc-8df45c8.tar.gz
|
|
||||||
/runc-4a9e174.tar.gz
|
|
||||||
/runc-9ec5b03.tar.gz
|
|
||||||
/runc-e3e26ca.tar.gz
|
|
||||||
/runc-f8e1388.tar.gz
|
|
||||||
/runc-0c6659a.tar.gz
|
|
||||||
/runc-e4363b0.tar.gz
|
|
||||||
/runc-6cda0ea.tar.gz
|
|
||||||
/runc-0c7a9c0.tar.gz
|
|
||||||
/runc-d5e91b1.tar.gz
|
|
||||||
/runc-d3fdacb.tar.gz
|
|
||||||
/runc-5c15da9.tar.gz
|
|
||||||
/runc-9a93b73.tar.gz
|
|
||||||
/runc-d65ba5f.tar.gz
|
|
||||||
/runc-ccbb336.tar.gz
|
|
||||||
/runc-13431e0.tar.gz
|
|
||||||
/runc-5c6216b.tar.gz
|
|
||||||
/runc-56aca5a.tar.gz
|
|
||||||
/runc-191def7.tar.gz
|
|
||||||
/runc-9f6a2d4.tar.gz
|
|
||||||
/runc-e4981c9.tar.gz
|
|
||||||
/runc-5b38ef7.tar.gz
|
|
||||||
/runc-46be7b6.tar.gz
|
|
||||||
/runc-cdce577.tar.gz
|
|
||||||
/runc-dbe44cb.tar.gz
|
|
||||||
/runc-4402442.tar.gz
|
|
||||||
/runc-78ff279.tar.gz
|
|
||||||
/runc-49ca1fd.tar.gz
|
|
||||||
/runc-634e51b.tar.gz
|
|
||||||
/runc-0fd8d46.tar.gz
|
|
||||||
/runc-b19f9ce.tar.gz
|
|
||||||
/runc-53fb4a5.tar.gz
|
|
||||||
/runc-80e2d1f.tar.gz
|
|
||||||
/runc-0a4dcc0.tar.gz
|
|
||||||
/runc-c18485a.tar.gz
|
|
||||||
/runc-051d670.tar.gz
|
|
||||||
/runc-dd8d48e.tar.gz
|
|
||||||
/runc-f6439a8.tar.gz
|
|
||||||
/runc-609ba79.tar.gz
|
|
||||||
/runc-12ba2a7.tar.gz
|
|
||||||
/runc-a0ddd02.tar.gz
|
|
||||||
/runc-96310f0.tar.gz
|
|
||||||
/runc-a57358e.tar.gz
|
|
||||||
/runc-64416d3.tar.gz
|
|
||||||
/runc-47a7343.tar.gz
|
|
||||||
/runc-2b31437.tar.gz
|
|
||||||
/runc-6621af8.tar.gz
|
|
||||||
/runc-2c8d668.tar.gz
|
|
||||||
/runc-867c9f5.tar.gz
|
|
||||||
/runc-2b9a36e.tar.gz
|
|
||||||
/runc-58bf083.tar.gz
|
|
||||||
/runc-df3d7f6.tar.gz
|
|
||||||
/runc-4b71877.tar.gz
|
|
||||||
/runc-85d4264.tar.gz
|
|
||||||
/runc-3f1e886.tar.gz
|
|
||||||
/runc-53a4649.tar.gz
|
|
||||||
/runc-f369199.tar.gz
|
|
||||||
/runc-b207d57.tar.gz
|
|
||||||
/runc-9a808dd.tar.gz
|
|
||||||
/runc-cd4b71c.tar.gz
|
|
||||||
/runc-716079f.tar.gz
|
|
||||||
/runc-8cd84e3.tar.gz
|
|
||||||
/runc-21cb236.tar.gz
|
|
||||||
/runc-3c8da9d.tar.gz
|
|
||||||
/runc-7673bee.tar.gz
|
|
||||||
/runc-1f737ee.tar.gz
|
|
||||||
/runc-a891fee.tar.gz
|
|
||||||
/runc-4f0bdaf.tar.gz
|
|
||||||
/runc-64dbdb8.tar.gz
|
|
||||||
/runc-774a9e7.tar.gz
|
|
||||||
/runc-2679754.tar.gz
|
|
||||||
/runc-e664e73.tar.gz
|
|
||||||
/runc-a30f255.tar.gz
|
|
||||||
/runc-0f7ffbe.tar.gz
|
|
||||||
/runc-dbe5aca.tar.gz
|
|
||||||
/runc-1302020.tar.gz
|
|
||||||
/runc-0853956.tar.gz
|
|
||||||
/runc-2a04669.tar.gz
|
|
||||||
/runc-1b97c04.tar.gz
|
|
||||||
/runc-b216304.tar.gz
|
|
||||||
/runc-ed9d93e.tar.gz
|
|
||||||
/runc-fdc4837.tar.gz
|
|
||||||
/runc-5b247e7.tar.gz
|
|
||||||
/runc-55c77cb.tar.gz
|
|
||||||
/runc-82d2fa4.tar.gz
|
|
||||||
/runc-12a7c8f.tar.gz
|
|
||||||
/runc-406298f.tar.gz
|
|
||||||
/runc-819c40b.tar.gz
|
|
||||||
/runc-9748b48.tar.gz
|
|
||||||
/runc-dff7685.tar.gz
|
|
||||||
/runc-0fa097f.tar.gz
|
|
||||||
/runc-834c457.tar.gz
|
|
||||||
/runc-1b94395.tar.gz
|
|
||||||
/runc-6f5edda.tar.gz
|
|
||||||
/runc-3cb1909.tar.gz
|
|
||||||
/runc-46a304b.tar.gz
|
|
||||||
/runc-3f81131.tar.gz
|
|
||||||
/runc-30dc54a.tar.gz
|
|
||||||
/runc-819fcc6.tar.gz
|
|
||||||
/runc-5517d1d.tar.gz
|
|
||||||
/runc-9806eb5.tar.gz
|
|
||||||
/runc-ce54a9d.tar.gz
|
|
||||||
/runc-fbf047b.tar.gz
|
|
||||||
/runc-545ebdd.tar.gz
|
|
||||||
/runc-cf1273a.tar.gz
|
|
||||||
/runc-47fbafb.tar.gz
|
|
||||||
/runc-b7d8f3b.tar.gz
|
|
||||||
/runc-f9850af.tar.gz
|
|
||||||
/runc-f8749ba.tar.gz
|
|
||||||
/runc-86d9399.tar.gz
|
|
||||||
/runc-d65df61.tar.gz
|
|
||||||
/runc-67169a9.tar.gz
|
|
||||||
/runc-97b02cf.tar.gz
|
|
||||||
/runc-46243fc.tar.gz
|
|
||||||
/runc-d6f5641.tar.gz
|
|
||||||
/runc-3de3112.tar.gz
|
|
||||||
/runc-78d02e8.tar.gz
|
|
||||||
/runc-f668854.tar.gz
|
|
||||||
/runc-a340fa9.tar.gz
|
|
||||||
/runc-dedadbf.tar.gz
|
|
||||||
/runc-a2d1f85.tar.gz
|
|
||||||
/runc-54c53b1.tar.gz
|
|
||||||
/runc-49a7346.tar.gz
|
|
||||||
/runc-7930f0c.tar.gz
|
|
||||||
/runc-a5847db.tar.gz
|
|
||||||
/runc-2265daa.tar.gz
|
|
||||||
/runc-e949339.tar.gz
|
|
||||||
/runc-f844a2f.tar.gz
|
|
||||||
/runc-e5f2eae.tar.gz
|
|
||||||
/runc-09ddc63.tar.gz
|
|
||||||
/runc-cbb0a79.tar.gz
|
|
||||||
/runc-165ecd2.tar.gz
|
|
||||||
/runc-ab740e9.tar.gz
|
|
||||||
/runc-bbd4ffe.tar.gz
|
|
||||||
/runc-2cf8d24.tar.gz
|
|
||||||
/runc-892477c.tar.gz
|
|
||||||
/runc-d636ad6.tar.gz
|
|
||||||
/runc-190fcf2.tar.gz
|
|
||||||
/runc-33faa5d.tar.gz
|
|
||||||
/runc-6e5320f.tar.gz
|
|
||||||
/runc-43d2b10.tar.gz
|
|
||||||
/runc-49d4507.tar.gz
|
|
||||||
/runc-ecfad5a.tar.gz
|
|
||||||
/runc-a220b9c.tar.gz
|
|
||||||
/runc-750036e.tar.gz
|
|
||||||
/runc-f671f6b.tar.gz
|
|
||||||
/runc-c23c05e.tar.gz
|
|
||||||
/runc-bb539a9.tar.gz
|
|
||||||
/runc-c11e997.tar.gz
|
|
||||||
/runc-10825f7.tar.gz
|
|
||||||
/runc-44f221e.tar.gz
|
|
||||||
/runc-d8bfd6c.tar.gz
|
|
||||||
/runc-7ba005b.tar.gz
|
|
||||||
/runc-411e413.tar.gz
|
|
||||||
/runc-07e35a7.tar.gz
|
|
||||||
/runc-cf6c074.tar.gz
|
|
||||||
/runc-e8498d3.tar.gz
|
|
||||||
/runc-27227a9.tar.gz
|
|
||||||
/runc-30233a7.tar.gz
|
|
||||||
/runc-636f23d.tar.gz
|
|
||||||
/runc-689513c.tar.gz
|
|
||||||
/runc-b69070a.tar.gz
|
|
||||||
/runc-0b11e29.tar.gz
|
|
||||||
/runc-d15ffff.tar.gz
|
|
||||||
/runc-06b737b.tar.gz
|
|
||||||
/runc-7cfb3dc.tar.gz
|
|
||||||
/runc-2b92c25.tar.gz
|
|
||||||
/runc-2a50985.tar.gz
|
|
||||||
/runc-3517877.tar.gz
|
|
||||||
/runc-56a1f1f.tar.gz
|
|
||||||
/runc-bd013b6.tar.gz
|
|
||||||
|
103
cgroups-v2.patch
103
cgroups-v2.patch
@ -1,103 +0,0 @@
|
|||||||
From 5fb0f19ec8c52ed0c9bbb3551deb0016992ecc52 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Giuseppe Scrivano <gscrivan@redhat.com>
|
|
||||||
Date: Thu, 3 Oct 2019 15:58:39 +0200
|
|
||||||
Subject: [PATCH] cgroups: raise an error on cgroups v2
|
|
||||||
|
|
||||||
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
|
|
||||||
---
|
|
||||||
create.go | 8 ++++++++
|
|
||||||
run.go | 8 ++++++++
|
|
||||||
utils_linux.go | 14 ++++++++++++++
|
|
||||||
3 files changed, 30 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/create.go b/create.go
|
|
||||||
index 5f3ac609..91d17d07 100644
|
|
||||||
--- a/create.go
|
|
||||||
+++ b/create.go
|
|
||||||
@@ -1,6 +1,7 @@
|
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
+ "fmt"
|
|
||||||
"os"
|
|
||||||
|
|
||||||
"github.com/urfave/cli"
|
|
||||||
@@ -52,6 +53,13 @@ command(s) that get executed on start, edit the args parameter of the spec. See
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Action: func(context *cli.Context) error {
|
|
||||||
+ unified, err := IsCgroup2UnifiedMode()
|
|
||||||
+ if err != nil {
|
|
||||||
+ return err
|
|
||||||
+ }
|
|
||||||
+ if unified {
|
|
||||||
+ return fmt.Errorf("this version of runc doesn't work on cgroups v2")
|
|
||||||
+ }
|
|
||||||
if err := checkArgs(context, 1, exactArgs); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
diff --git a/run.go b/run.go
|
|
||||||
index f8d63178..3f29737b 100644
|
|
||||||
--- a/run.go
|
|
||||||
+++ b/run.go
|
|
||||||
@@ -3,6 +3,7 @@
|
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
+ "fmt"
|
|
||||||
"os"
|
|
||||||
|
|
||||||
"github.com/urfave/cli"
|
|
||||||
@@ -63,6 +64,13 @@ command(s) that get executed on start, edit the args parameter of the spec. See
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Action: func(context *cli.Context) error {
|
|
||||||
+ unified, err := IsCgroup2UnifiedMode()
|
|
||||||
+ if err != nil {
|
|
||||||
+ return err
|
|
||||||
+ }
|
|
||||||
+ if unified {
|
|
||||||
+ return fmt.Errorf("this version of runc doesn't work on cgroups v2")
|
|
||||||
+ }
|
|
||||||
if err := checkArgs(context, 1, exactArgs); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
diff --git a/utils_linux.go b/utils_linux.go
|
|
||||||
index 984e6b0f..a5a03de9 100644
|
|
||||||
--- a/utils_linux.go
|
|
||||||
+++ b/utils_linux.go
|
|
||||||
@@ -9,6 +9,7 @@ import (
|
|
||||||
"os/exec"
|
|
||||||
"path/filepath"
|
|
||||||
"strconv"
|
|
||||||
+ "syscall"
|
|
||||||
|
|
||||||
"github.com/opencontainers/runc/libcontainer"
|
|
||||||
"github.com/opencontainers/runc/libcontainer/cgroups/systemd"
|
|
||||||
@@ -26,6 +27,10 @@ import (
|
|
||||||
"golang.org/x/sys/unix"
|
|
||||||
)
|
|
||||||
|
|
||||||
+const (
|
|
||||||
+ _cgroup2SuperMagic = 0x63677270
|
|
||||||
+)
|
|
||||||
+
|
|
||||||
var errEmptyID = errors.New("container id cannot be empty")
|
|
||||||
|
|
||||||
// loadFactory returns the configured factory instance for execing containers.
|
|
||||||
@@ -451,3 +456,12 @@ func startContainer(context *cli.Context, spec *specs.Spec, action CtAct, criuOp
|
|
||||||
}
|
|
||||||
return r.run(spec.Process)
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+// IsCgroup2UnifiedMode returns whether we are running in cgroup 2 cgroup2 mode.
|
|
||||||
+func IsCgroup2UnifiedMode() (bool, error) {
|
|
||||||
+ var st syscall.Statfs_t
|
|
||||||
+ if err := syscall.Statfs("/sys/fs/cgroup", &st); err != nil {
|
|
||||||
+ return false, err
|
|
||||||
+ }
|
|
||||||
+ return st.Type == _cgroup2SuperMagic, nil
|
|
||||||
+}
|
|
||||||
--
|
|
||||||
2.21.0
|
|
||||||
|
|
261
runc.spec
261
runc.spec
@ -1,14 +1,15 @@
|
|||||||
%global with_devel 0
|
|
||||||
%global with_bundled 1
|
|
||||||
%global with_check 0
|
%global with_check 0
|
||||||
%global with_unit_test 0
|
|
||||||
%global with_debug 1
|
|
||||||
|
|
||||||
%if 0%{?with_debug}
|
|
||||||
%global _find_debuginfo_dwz_opts %{nil}
|
%global _find_debuginfo_dwz_opts %{nil}
|
||||||
%global _dwz_low_mem_die_limit 0
|
%global _dwz_low_mem_die_limit 0
|
||||||
|
|
||||||
|
%if 0%{?rhel} > 7 && ! 0%{?fedora}
|
||||||
|
%define gobuild(o:) \
|
||||||
|
go build -buildmode pie -compiler gc -tags="rpm_crashtraceback libtrust_openssl ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -linkmode=external -compressdwarf=false -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v %{?**};
|
||||||
%else
|
%else
|
||||||
%global debug_package %{nil}
|
%if ! 0%{?gobuild:1}
|
||||||
|
%define gobuild(o:) GO111MODULE=off go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -linkmode=external -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" -a -v %{?**};
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%global provider github
|
%global provider github
|
||||||
@ -16,152 +17,37 @@
|
|||||||
%global project opencontainers
|
%global project opencontainers
|
||||||
%global repo runc
|
%global repo runc
|
||||||
# https://github.com/opencontainers/runc
|
# https://github.com/opencontainers/runc
|
||||||
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
|
%global import_path %{provider}.%{provider_tld}/%{project}/%{repo}
|
||||||
%global import_path %{provider_prefix}
|
%global git0 https://%{import_path}
|
||||||
%global git0 https://github.com/opencontainers/runc
|
%global release_candidate rc95
|
||||||
%global commit0 bd013b6e4d13e7c9fb75ab8060013da5f9ebb6cf
|
|
||||||
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
|
|
||||||
|
|
||||||
Name: %{repo}
|
Name: %{repo}
|
||||||
Epoch: 2
|
|
||||||
Version: 1.0.0
|
Version: 1.0.0
|
||||||
Release: 332.dev.git%{shortcommit0}%{?dist}
|
Release: 336.%{release_candidate}%{?dist}
|
||||||
Summary: CLI for running Open Containers
|
Summary: CLI for running Open Containers
|
||||||
|
# https://fedoraproject.org/wiki/PackagingDrafts/Go#Go_Language_Architectures
|
||||||
|
#ExclusiveArch: %%{go_arches}
|
||||||
|
# still use arch exclude as the macro above still refers %%{ix86} in RHEL8.4:
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1905383
|
||||||
|
ExcludeArch: %{ix86}
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: %{git0}
|
URL: %{git0}
|
||||||
Source0: %{git0}/archive/%{commit0}/%{name}-%{shortcommit0}.tar.gz
|
Source0: %{git0}/archive/v1.0.0-%{release_candidate}.tar.gz
|
||||||
Patch1: cgroups-v2.patch
|
Provides: oci-runtime = 1
|
||||||
|
BuildRequires: golang >= 1.12.12-4
|
||||||
# https://fedoraproject.org/wiki/PackagingDrafts/Go#Go_Language_Architectures
|
|
||||||
ExclusiveArch: %{go_arches}
|
|
||||||
# If go_compiler is not set to 1, there is no virtual provide. Use golang instead.
|
|
||||||
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
|
|
||||||
BuildRequires: pkgconfig(libseccomp)
|
|
||||||
BuildRequires: go-md2man
|
|
||||||
BuildRequires: make
|
|
||||||
BuildRequires: git
|
BuildRequires: git
|
||||||
|
BuildRequires: go-md2man
|
||||||
%if ! 0%{?with_bundled}
|
BuildRequires: libseccomp-devel
|
||||||
BuildRequires: golang(github.com/Sirupsen/logrus)
|
Requires: criu
|
||||||
BuildRequires: golang(github.com/codegangsta/cli)
|
|
||||||
BuildRequires: golang(github.com/coreos/go-systemd/activation)
|
|
||||||
BuildRequires: golang(github.com/coreos/go-systemd/dbus)
|
|
||||||
BuildRequires: golang(github.com/coreos/go-systemd/util)
|
|
||||||
BuildRequires: golang(github.com/docker/docker/pkg/mount)
|
|
||||||
BuildRequires: golang(github.com/docker/docker/pkg/symlink)
|
|
||||||
BuildRequires: golang(github.com/docker/docker/pkg/term)
|
|
||||||
BuildRequires: golang(github.com/docker/go-units)
|
|
||||||
BuildRequires: golang(github.com/godbus/dbus)
|
|
||||||
BuildRequires: golang(github.com/golang/protobuf/proto)
|
|
||||||
BuildRequires: golang(github.com/opencontainers/runtime-spec/specs-go)
|
|
||||||
BuildRequires: golang(github.com/opencontainers/specs/specs-go)
|
|
||||||
BuildRequires: golang(github.com/seccomp/libseccomp-golang)
|
|
||||||
BuildRequires: golang(github.com/syndtr/gocapability/capability)
|
|
||||||
BuildRequires: golang(github.com/vishvananda/netlink)
|
|
||||||
BuildRequires: golang(github.com/vishvananda/netlink/nl)
|
|
||||||
%endif
|
|
||||||
Recommends: container-selinux >= 2:2.85-1
|
|
||||||
|
|
||||||
%ifnarch s390x
|
|
||||||
Recommends: criu
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The runc command can be used to start containers which are packaged
|
The runc command can be used to start containers which are packaged
|
||||||
in accordance with the Open Container Initiative's specifications,
|
in accordance with the Open Container Initiative's specifications,
|
||||||
and to manage containers running under runc.
|
and to manage containers running under runc.
|
||||||
|
|
||||||
%if 0%{?with_devel}
|
|
||||||
%package devel
|
|
||||||
Summary: %{summary}
|
|
||||||
BuildArch: noarch
|
|
||||||
|
|
||||||
%if 0%{?with_check}
|
|
||||||
BuildRequires: golang(github.com/Sirupsen/logrus)
|
|
||||||
BuildRequires: golang(github.com/coreos/go-systemd/dbus)
|
|
||||||
BuildRequires: golang(github.com/coreos/go-systemd/util)
|
|
||||||
BuildRequires: golang(github.com/docker/docker/pkg/mount)
|
|
||||||
BuildRequires: golang(github.com/docker/docker/pkg/symlink)
|
|
||||||
BuildRequires: golang(github.com/docker/go-units)
|
|
||||||
BuildRequires: golang(github.com/godbus/dbus)
|
|
||||||
BuildRequires: golang(github.com/golang/protobuf/proto)
|
|
||||||
BuildRequires: golang(github.com/opencontainers/runtime-spec/specs-go)
|
|
||||||
BuildRequires: golang(github.com/seccomp/libseccomp-golang)
|
|
||||||
BuildRequires: golang(github.com/syndtr/gocapability/capability)
|
|
||||||
BuildRequires: golang(github.com/vishvananda/netlink)
|
|
||||||
BuildRequires: golang(github.com/vishvananda/netlink/nl)
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Requires: golang(github.com/Sirupsen/logrus)
|
|
||||||
Requires: golang(github.com/coreos/go-systemd/dbus)
|
|
||||||
Requires: golang(github.com/coreos/go-systemd/util)
|
|
||||||
Requires: golang(github.com/docker/docker/pkg/mount)
|
|
||||||
Requires: golang(github.com/docker/docker/pkg/symlink)
|
|
||||||
Requires: golang(github.com/docker/go-units)
|
|
||||||
Requires: golang(github.com/godbus/dbus)
|
|
||||||
Requires: golang(github.com/golang/protobuf/proto)
|
|
||||||
Requires: golang(github.com/opencontainers/runtime-spec/specs-go)
|
|
||||||
Requires: golang(github.com/seccomp/libseccomp-golang)
|
|
||||||
Requires: golang(github.com/syndtr/gocapability/capability)
|
|
||||||
Requires: golang(github.com/vishvananda/netlink)
|
|
||||||
Requires: golang(github.com/vishvananda/netlink/nl)
|
|
||||||
|
|
||||||
Provides: oci-runtime = 1
|
|
||||||
Provides: golang(%{import_path}/libcontainer) = %{version}-%{release}
|
|
||||||
Provides: golang(%{import_path}/libcontainer/apparmor) = %{version}-%{release}
|
|
||||||
Provides: golang(%{import_path}/libcontainer/cgroups) = %{version}-%{release}
|
|
||||||
Provides: golang(%{import_path}/libcontainer/cgroups/fs) = %{version}-%{release}
|
|
||||||
Provides: golang(%{import_path}/libcontainer/cgroups/systemd) = %{version}-%{release}
|
|
||||||
Provides: golang(%{import_path}/libcontainer/configs) = %{version}-%{release}
|
|
||||||
Provides: golang(%{import_path}/libcontainer/configs/validate) = %{version}-%{release}
|
|
||||||
Provides: golang(%{import_path}/libcontainer/criurpc) = %{version}-%{release}
|
|
||||||
Provides: golang(%{import_path}/libcontainer/devices) = %{version}-%{release}
|
|
||||||
Provides: golang(%{import_path}/libcontainer/integration) = %{version}-%{release}
|
|
||||||
Provides: golang(%{import_path}/libcontainer/keys) = %{version}-%{release}
|
|
||||||
Provides: golang(%{import_path}/libcontainer/nsenter) = %{version}-%{release}
|
|
||||||
Provides: golang(%{import_path}/libcontainer/seccomp) = %{version}-%{release}
|
|
||||||
Provides: golang(%{import_path}/libcontainer/specconv) = %{version}-%{release}
|
|
||||||
Provides: golang(%{import_path}/libcontainer/stacktrace) = %{version}-%{release}
|
|
||||||
Provides: golang(%{import_path}/libcontainer/system) = %{version}-%{release}
|
|
||||||
Provides: golang(%{import_path}/libcontainer/user) = %{version}-%{release}
|
|
||||||
Provides: golang(%{import_path}/libcontainer/utils) = %{version}-%{release}
|
|
||||||
Provides: golang(%{import_path}/libcontainer/xattr) = %{version}-%{release}
|
|
||||||
|
|
||||||
%description devel
|
|
||||||
The runc command can be used to start containers which are packaged
|
|
||||||
in accordance with the Open Container Initiative's specifications,
|
|
||||||
and to manage containers running under runc.
|
|
||||||
|
|
||||||
This package contains library source intended for
|
|
||||||
building other packages which use import path with
|
|
||||||
%{import_path} prefix.
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?with_unit_test} && 0%{?with_devel}
|
|
||||||
%package unit-test
|
|
||||||
Summary: Unit tests for %{name} package
|
|
||||||
# If go_compiler is not set to 1, there is no virtual provide. Use golang instead.
|
|
||||||
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
|
|
||||||
|
|
||||||
%if 0%{?with_check}
|
|
||||||
#Here comes all BuildRequires: PACKAGE the unit tests
|
|
||||||
#in %%check section need for running
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# test subpackage tests code from devel subpackage
|
|
||||||
Requires: %{name}-devel = %{epoch}:%{version}-%{release}
|
|
||||||
|
|
||||||
%description unit-test
|
|
||||||
The runc command can be used to start containers which are packaged
|
|
||||||
in accordance with the Open Container Initiative's specifications,
|
|
||||||
and to manage containers running under runc.
|
|
||||||
|
|
||||||
This package contains unit tests for project
|
|
||||||
providing packages with %{import_path} prefix.
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -Sgit -n %{name}-%{commit0}
|
%autosetup -Sgit -n %{repo}-%{version}-%{release_candidate}
|
||||||
|
sed -i '/\#\!\/bin\/bash/d' contrib/completions/bash/%{name}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
mkdir -p GOPATH
|
mkdir -p GOPATH
|
||||||
@ -171,93 +57,28 @@ pushd GOPATH
|
|||||||
popd
|
popd
|
||||||
|
|
||||||
pushd GOPATH/src/%{import_path}
|
pushd GOPATH/src/%{import_path}
|
||||||
|
export GO111MODULE=off
|
||||||
export GOPATH=%{gopath}:$(pwd)/GOPATH
|
export GOPATH=%{gopath}:$(pwd)/GOPATH
|
||||||
|
export CGO_CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
|
||||||
|
export BUILDTAGS="selinux seccomp"
|
||||||
|
%gobuild -o %{name} %{import_path}
|
||||||
|
|
||||||
make BUILDTAGS="seccomp selinux" all
|
pushd man
|
||||||
|
./md2man-all.sh
|
||||||
sed -i '/\#\!\/bin\/bash/d' contrib/completions/bash/%{name}
|
popd
|
||||||
|
|
||||||
%install
|
%install
|
||||||
install -d -p %{buildroot}%{_bindir}
|
install -d -p %{buildroot}%{_bindir}
|
||||||
install -p -m 755 %{name} %{buildroot}%{_bindir}
|
install -p -m 755 %{name} %{buildroot}%{_bindir}
|
||||||
|
|
||||||
# generate man pages
|
|
||||||
man/md2man-all.sh
|
|
||||||
|
|
||||||
# install man pages
|
# install man pages
|
||||||
install -d -p %{buildroot}%{_mandir}/man8
|
install -d -p %{buildroot}%{_mandir}/man8
|
||||||
install -p -m 0644 man/man8/*.8 %{buildroot}%{_mandir}/man8/.
|
install -p -m 644 man/man8/* %{buildroot}%{_mandir}/man8
|
||||||
# install bash completion
|
# install bash completion
|
||||||
install -d -p %{buildroot}%{_datadir}/bash-completion/completions
|
install -d -p %{buildroot}%{_datadir}/bash-completion/completions
|
||||||
install -p -m 0644 contrib/completions/bash/%{name} %{buildroot}%{_datadir}/bash-completion/completions
|
install -p -m 0644 contrib/completions/bash/%{name} %{buildroot}%{_datadir}/bash-completion/completions
|
||||||
|
|
||||||
# source codes for building projects
|
|
||||||
%if 0%{?with_devel}
|
|
||||||
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
|
|
||||||
# find all *.go but no *_test.go files and generate devel.file-list
|
|
||||||
for file in $(find . -iname "*.go" \! -iname "*_test.go" | grep -v "^./Godeps") ; do
|
|
||||||
echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list
|
|
||||||
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file)
|
|
||||||
cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file
|
|
||||||
echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list
|
|
||||||
done
|
|
||||||
for file in $(find . -iname "*.proto" | grep -v "^./Godeps") ; do
|
|
||||||
echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list
|
|
||||||
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file)
|
|
||||||
cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file
|
|
||||||
echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list
|
|
||||||
done
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# testing files for this project
|
|
||||||
%if 0%{?with_unit_test} && 0%{?with_devel}
|
|
||||||
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
|
|
||||||
# find all *_test.go files and generate unit-test.file-list
|
|
||||||
for file in $(find . -iname "*_test.go" | grep -v "^./Godeps"); do
|
|
||||||
echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list
|
|
||||||
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file)
|
|
||||||
cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file
|
|
||||||
echo "%%{gopath}/src/%%{import_path}/$file" >> unit-test.file-list
|
|
||||||
done
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?with_devel}
|
|
||||||
sort -u -o devel.file-list devel.file-list
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if 0%{?with_check} && 0%{?with_unit_test} && 0%{?with_devel}
|
|
||||||
%if ! 0%{?with_bundled}
|
|
||||||
export GOPATH=%{buildroot}/%{gopath}:%{gopath}
|
|
||||||
%else
|
|
||||||
export GOPATH=%{buildroot}/%{gopath}:$(pwd)/Godeps/_workspace:%{gopath}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if ! 0%{?gotest:1}
|
|
||||||
%global gotest go test
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# FAIL: TestFactoryNewTmpfs (0.00s), factory_linux_test.go:59: operation not permitted
|
|
||||||
#%%gotest %%{import_path}/libcontainer
|
|
||||||
#%%gotest %%{import_path}/libcontainer/cgroups
|
|
||||||
# --- FAIL: TestInvalidCgroupPath (0.00s)
|
|
||||||
# apply_raw_test.go:16: couldn't get cgroup root: mountpoint for cgroup not found
|
|
||||||
# apply_raw_test.go:25: couldn't get cgroup data: mountpoint for cgroup not found
|
|
||||||
#%%gotest %%{import_path}/libcontainer/cgroups/fs
|
|
||||||
#%%gotest %%{import_path}/libcontainer/configs
|
|
||||||
#%%gotest %%{import_path}/libcontainer/devices
|
|
||||||
# undefined reference to `nsexec'
|
|
||||||
#%%gotest %%{import_path}/libcontainer/integration
|
|
||||||
# Unable to create tstEth link: operation not permitted
|
|
||||||
#%%gotest %%{import_path}/libcontainer/netlink
|
|
||||||
# undefined reference to `nsexec'
|
|
||||||
#%%gotest %%{import_path}/libcontainer/nsenter
|
|
||||||
#%%gotest %%{import_path}/libcontainer/stacktrace
|
|
||||||
#constant 2147483648 overflows int
|
|
||||||
#%%gotest %%{import_path}/libcontainer/user
|
|
||||||
#%%gotest %%{import_path}/libcontainer/utils
|
|
||||||
#%%gotest %%{import_path}/libcontainer/xattr
|
|
||||||
%endif
|
|
||||||
|
|
||||||
#define license tag if not already defined
|
#define license tag if not already defined
|
||||||
%{!?_licensedir:%global license %doc}
|
%{!?_licensedir:%global license %doc}
|
||||||
@ -269,21 +90,11 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/Godeps/_workspace:%{gopath}
|
|||||||
%{_mandir}/man8/%{name}*
|
%{_mandir}/man8/%{name}*
|
||||||
%{_datadir}/bash-completion/completions/%{name}
|
%{_datadir}/bash-completion/completions/%{name}
|
||||||
|
|
||||||
%if 0%{?with_devel}
|
|
||||||
%files devel -f devel.file-list
|
|
||||||
%license LICENSE
|
|
||||||
%doc MAINTAINERS_GUIDE.md PRINCIPLES.md README.md CONTRIBUTING.md
|
|
||||||
%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project}
|
|
||||||
%dir %{gopath}/src/%{import_path}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?with_unit_test} && 0%{?with_devel}
|
|
||||||
%files unit-test -f unit-test.file-list
|
|
||||||
%license LICENSE
|
|
||||||
%doc MAINTAINERS_GUIDE.md PRINCIPLES.md README.md CONTRIBUTING.md
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jun 14 2021 Jindrich Novy <jnovy@redhat.com> - 1.0.0-336.rc95
|
||||||
|
- add GO111MODULE=off
|
||||||
|
- Related: #1970747
|
||||||
|
|
||||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2:1.0.0-332.dev.gitbd013b6
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2:1.0.0-332.dev.gitbd013b6
|
||||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (runc-bd013b6.tar.gz) = 859f5600a0100a994279d7d10910ffaeaec89848cd690e884c1b4a90cbfbe8b6f1c613f81bf0c96a3c9ec527e44c9c3f4cf6873f6c4884520f92bca6e6f80c8d
|
SHA512 (v1.0.0-rc95.tar.gz) = c802a6e5f16cc0321642fc7adffe33819867c1779420f76b2cabd532edb5ac8c852beadcbcf6a3e895fe274f111c5623be5dcc822fef96e7e5259bf532174ba1
|
||||||
|
Loading…
Reference in New Issue
Block a user