-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mv contrib/cmd tests/cmd (except memfd-bind) #4377
mv contrib/cmd tests/cmd (except memfd-bind) #4377
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Makefile
Outdated
@@ -79,6 +79,8 @@ runc-bin: runc-dmz | |||
|
|||
.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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: all these should now be like "${INTEGRATION_ROOT}/../cmd/remap-rootfs/remap-rootfs"
@@ -214,7 +214,7 @@ function scmp_act_notify_template() { | |||
@test "runc run [seccomp] (SCMP_ACT_NOTIFY example config)" { | |||
# 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"${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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be another PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
The following commands are moved from
contrib/cmd
totests/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