mv contrib/cmd tests/cmd (except memfd-bind)#4377
Conversation
rata
left a comment
There was a problem hiding this comment.
This LGTM, but do you think this will be enough?
Maybe we can change the Makefile in some way, so those don't get build except for tests? Or print in "make all" some warning that test binaries are created, for a release you should use "make XXX"?
bc54f44 to
22583fc
Compare
|
Updated |
22583fc to
d86d8e9
Compare
|
|
||
| .PHONY: all | ||
| all: runc recvtty sd-helper seccompagent fs-idmap memfd-bind pidfd-kill remap-rootfs | ||
| @echo "*Note*: Only the runc binary should be installed to user environments." |
There was a problem hiding this comment.
Please add a new line after *Note*: , or add 8 spaces before Other binaries...?
I think it will looks more beautiful.
There was a problem hiding this comment.
Maybe something like
@echo "To distro maintainers: this is not make target you're looking for. Use runc or runc-static."There was a problem hiding this comment.
Or maybe don't make make more talkative at all.
|
In fact, we have
Edited: I miscounted it last night :) |
The following commands are moved from `contrib/cmd` to `tests/cmd`: - fs-idmap - pidfd-kill - recvtty - remap-rootfs - sd-helper - seccompagent Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
d86d8e9 to
f76489f
Compare
|
Updated as suggested |
|
Would moving things to |
When writing the above comment yesterday, I was going to suggest I think Also, two of the programs (recvtty and seccomagent) are also used as code examples, so they are not entirely "internal". |
| RECVTTY="${INTEGRATION_ROOT}/../../tests/cmd/recvtty/recvtty" | ||
| SD_HELPER="${INTEGRATION_ROOT}/../../tests/cmd/sd-helper/sd-helper" | ||
| SECCOMP_AGENT="${INTEGRATION_ROOT}/../../tests/cmd/seccompagent/seccompagent" | ||
| FS_IDMAP="${INTEGRATION_ROOT}/../../tests/cmd/fs-idmap/fs-idmap" | ||
| PIDFD_KILL="${INTEGRATION_ROOT}/../../tests/cmd/pidfd-kill/pidfd-kill" | ||
| REMAP_ROOTFS="${INTEGRATION_ROOT}/../../tests/cmd/remap-rootfs/remap-rootfs" |
There was a problem hiding this comment.
nit: all these should now be like "${INTEGRATION_ROOT}/../cmd/remap-rootfs/remap-rootfs"
| # Run the script used in the seccomp agent example. | ||
| # This takes a bare config.json and modifies it to run an example. | ||
| "${INTEGRATION_ROOT}/../../contrib/cmd/seccompagent/gen-seccomp-example-cfg.sh" | ||
| "${INTEGRATION_ROOT}/../../tests/cmd/seccompagent/gen-seccomp-example-cfg.sh" |
There was a problem hiding this comment.
| "${INTEGRATION_ROOT}/../../tests/cmd/seccompagent/gen-seccomp-example-cfg.sh" | |
| "${INTEGRATION_ROOT}/../cmd/seccompagent/gen-seccomp-example-cfg.sh" |
| RECVTTY="${INTEGRATION_ROOT}/../../tests/cmd/recvtty/recvtty" | ||
| SD_HELPER="${INTEGRATION_ROOT}/../../tests/cmd/sd-helper/sd-helper" | ||
| SECCOMP_AGENT="${INTEGRATION_ROOT}/../../tests/cmd/seccompagent/seccompagent" | ||
| FS_IDMAP="${INTEGRATION_ROOT}/../../tests/cmd/fs-idmap/fs-idmap" | ||
| PIDFD_KILL="${INTEGRATION_ROOT}/../../tests/cmd/pidfd-kill/pidfd-kill" | ||
| REMAP_ROOTFS="${INTEGRATION_ROOT}/../../tests/cmd/remap-rootfs/remap-rootfs" |
There was a problem hiding this comment.
IOW
| RECVTTY="${INTEGRATION_ROOT}/../../tests/cmd/recvtty/recvtty" | |
| SD_HELPER="${INTEGRATION_ROOT}/../../tests/cmd/sd-helper/sd-helper" | |
| SECCOMP_AGENT="${INTEGRATION_ROOT}/../../tests/cmd/seccompagent/seccompagent" | |
| FS_IDMAP="${INTEGRATION_ROOT}/../../tests/cmd/fs-idmap/fs-idmap" | |
| PIDFD_KILL="${INTEGRATION_ROOT}/../../tests/cmd/pidfd-kill/pidfd-kill" | |
| REMAP_ROOTFS="${INTEGRATION_ROOT}/../../tests/cmd/remap-rootfs/remap-rootfs" | |
| RECVTTY="${INTEGRATION_ROOT}/../cmd/recvtty/recvtty" | |
| SD_HELPER="${INTEGRATION_ROOT}/../cmd/sd-helper/sd-helper" | |
| SECCOMP_AGENT="${INTEGRATION_ROOT}/../cmd/seccompagent/seccompagent" | |
| FS_IDMAP="${INTEGRATION_ROOT}/../cmd/fs-idmap/fs-idmap" | |
| PIDFD_KILL="${INTEGRATION_ROOT}/../cmd/pidfd-kill/pidfd-kill" | |
| REMAP_ROOTFS="${INTEGRATION_ROOT}/../cmd/remap-rootfs/remap-rootfs" |
(not tested)
The following commands are moved from
contrib/cmdtotests/cmd:So as to clarify that distro maintainers should not include these binaries in their package.
ref: https://bugs.launchpad.net/ubuntu/+source/runc/+bug/2076981