Subject: Re: [bug#31237] [PATCH] gnu: Add runc.

From: [email-masked] (宋文武)
Date: Mon, 23 Apr 2018 11:25:51 +0800

Nils Gillmann <[email-masked]> writes:

> Ludovic Courtès transcribed 1.2K bytes:
>> Hello,
>> 
>> 宋文武 <[email-masked]> skribis:
>> 
>> > * gnu/packages/virtualization.scm (runc): New variable.
>> 
>> Nice!

>> 
>> > +(define-public runc
>> > +  (package
>> > +    (name "runc")
>> > +    (version "1.0.0-rc5")
>> 
>> If the actual release is going to be out soon, I’d be in favor of
>> waiting for it; an RC doesn’t sound great.  WDYT?

Sure, but it's not clear to me when the 1.0.0 release will be out...

>
> What I wanted to comment earlier from my experience packaging this:
> I was advised to follow the docker suggestions, where the dependency
> versions are known by recommended commit.

Okay, I have some ideas to use runc directly with rootfs bulit by guix,
I haven't looked into docker yet.

>
>> > +    (build-system gnu-build-system)
>> 
>> Would ‘go-build-system’ work better?  Or is it something of a hybrid
>> (apparently it has makefiles)?
>
> Same question here, since my runc package so far (without testing) just builds,
> with go-build-system.

Okay, I have to modify the unpack phase for the tarball. 

>
>> > +    (arguments
>> > +     '(#:tests? #f                      ; FIXME: 20/139 tests fail.
>> 
>> Have you looked a bit into them, just to see if it’s one of the usual
>> things (/bin/sh, networking, etc.) or if it’s more involved?

No I haven't, some fails are:

--- FAIL: TestFactoryNewTmpfs (0.00s)
	factory_linux_test.go:87: operation not permitted

FAIL	github.com/opencontainers/runc/libcontainer	0.047s
?   	github.com/opencontainers/runc/libcontainer/apparmor	[no test files]

--- 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
panic: runtime error: invalid memory address or nil pointer dereference [recovered]

--- FAIL: TestValidateRootlessMountUid (0.00s)
	rootless_test.go:96: Expected error to not occur when uid= not set in mount options: rootfs (/var) does not exist
	rootless_test.go:106: Expected error to not occur when setting uid=0 in mount options: rootfs (/var) does not exist
	rootless_test.go:112: Expected error to not occur when setting uid=2 in mount options and UidMapping[0].size is 10

--- FAIL: TestValidateValidSysctl (0.00s)
	validator_test.go:229: Expected error to not occur with {net.ctl=ctl} but got: "rootfs (/var) does not exist"
	validator_test.go:229: Expected error to not occur with {kernel.msgmax=ctl} but got: "rootfs (/var) does not exist"
	validator_test.go:229: Expected error to not occur with {fs.mqueue.ctl=ctl} but got: "rootfs (/var) does not exist"

--- FAIL: TestNsenterValidPaths (0.01s)
	nsenter_test.go:65: nsenter exits with a non-zero exit status

Look like it need /var, network namespace and other things?  But thoes
are unittest (runc also has integrationtest target)...  Need more
investment.

>> 
>> > +               (invoke "make"))))
>> 
>> Perhaps honor (parallel-job-count).

Thanks for the tip!  Now I think it's not needed, since the target only
run one 'go build' command, so there is nothing to be executed
parallel...

>> 
>> > +    (synopsis "Open container initiative runtime")
>> > +    (home-page "https://www.opencontainers.org/")
>> > +    (description
>> > +     "@command{runc} is a command line client for running applications
>> > +packaged according to the Open Container Initiative (OCI) format and is a
>>                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
>> An @uref would be nice.  :-)

Okay.

Pushed, thanks ludo and ng0 for the review!