Commit Graph

71 Commits

Author SHA1 Message Date
Michael Crosby 54a4439700 Merge pull request #1252 from FengtuWang/remove-i
remove `-i` option to avoid failure of jenkins in non-interactive mode.
2017-01-09 10:51:13 -08:00
Fengtu Wang b5d4da872c remove `-i` option to avoid failure of jenkins in non-interactive mode.
Signed-off-by: Fengtu Wang <wangfengtu@huawei.com>
2017-01-04 16:33:05 +08:00
Ma Shimiao 9befe82cde Makefile: add manpage cleanup
I think generated manpages should also need cleanup

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2016-12-16 14:33:05 +08:00
Mrunal Patel 34f23cb99c Merge pull request #1018 from cyphar/console-rewrite
Consoles, consoles, consoles.
2016-12-07 14:37:19 -08:00
Aleksa Sarai 972c176ae4
tests: fix all the things
This fixes all of the tests that were broken as part of the console
rewrite. This includes fixing the integration tests that used TTY
handling inside libcontainer, as well as the bats integration tests that
needed to be rewritten to use recvtty (as they rely on detached
containers that are running).

This patch is part of the console rewrite patchset.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-12-01 15:49:37 +11:00
Aleksa Sarai 1543444ada
contrib: add recvtty proof-of-concept
This is a proof-of-concept for the --console-socket API. It just acts as
a dumb input-output copy process (nowhere near as good as the internal
runC one since it doesn't handle console resizes or signals). It also
provides a test-friendly mode that will be used in the bats integration
tests.

This patch is part of the console rewrite patchset.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-12-01 15:49:36 +11:00
Wang Long 21bc1a6e00 delete unused variable
Signed-off-by: Wang Long <long.wanglong@huawei.com>
2016-11-30 20:35:46 +08:00
Daniel Martí b9d13467b9 Add shfmt to the validate make target
We need to run on a directory since shell files might have no extension.
There are few shell files, so speed should not be an issue.

Fixes #1166.
2016-11-17 13:55:59 +00:00
Michael Crosby 603c151e6c Move ambient capabilties behind build tag
This moves the ambient capability support behind an `ambient` build tag
so that it is only compiled upon request.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-11-02 10:59:59 -07:00
Shukui Yang 4853f3b628 Bug fix for make dbuild
Signed-off-by: Shukui Yang <yangshukui@huawei.com>
2016-09-26 12:04:50 +08:00
Mrunal Patel f516b5d082 Merge pull request #1022 from hqhq/add_privileged_for_dbuild
Add privileged to make dbuild
2016-09-13 10:07:10 -07:00
Shukui Yang 8b151933ed Fix make release error:
/bin/sh: 1: Syntax error: "(" unexpected
make: *** [release] Error 2
-SHELL ?= $(shell command -v bash 2>/dev/null)
+SHELL := $(shell command -v bash 2>/dev/null)

Signed-off-by: Shukui Yang <yangshukui@huawei.com>
2016-09-12 18:52:24 +08:00
Aleksa Sarai 37f1747aec
Merge branch 'pr-914'
Closes #914
2016-09-10 17:24:16 +10:00
Mrunal Patel c6b3e79d30 Merge pull request #1017 from WeiZhang555/version-dirty
Append string "-dirty" to version if git repo is unclean
2016-09-07 12:24:19 -07:00
Qiang Huang aeba315e44 Add privileged to make dbuild
So we don't get `mount: permission denied` when make dbuild.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-09-06 14:53:46 +08:00
Zhao Lei 54390f89a7 Introduce make release
So we can make all types of release binary with combination
of following flags:
 seccomp
 selinux
 apparmor
 static

All binary files are put in release/ dir, like:
 [root@zlosvm1 runc]# ls -l release
 total 53556
 -rwxr-xr-x 1 root root 9517965 Aug 24 16:59 runc
 -rwxr-xr-x 1 root root 9673533 Aug 24 17:00 runc.seccomp
 -rwxr-xr-x 1 root root 9705839 Aug 24 17:00 runc.seccomp.selinux
 -rwxr-xr-x 1 root root 9546175 Aug 24 16:59 runc.selinux
 -rwxr-xr-x 1 root root 8205015 Aug 24 16:59 runc.selinux.static
 -rwxr-xr-x 1 root root 8181789 Aug 24 16:59 runc.static
 ...
Closes #899

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
2016-09-06 11:22:34 +08:00
Jiuyue Ma 4bc8637393 Makefile: Fix wrong dependency of "integration" target
Change dependency of integration to runcimage.

Signed-off-by: Jiuyue Ma <majiuyue@huawei.com>
2016-09-06 08:38:32 +08:00
Zhang Wei 9f80653779 Append string "-dirty" to version if git repo is unclean
If runc binary is compiled from codes with modified but not commited
files, git commits should report "COMMIT-dirty" instead of single
"COMMIT" to warn users.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-09-04 16:08:39 +08:00
Qiang Huang 0c80599812 Combine runctestimage and runcimage
There is no need that keep them separate, it also
fixes #1006.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-08-30 09:46:47 +08:00
Kenfe-Mickael Laventure 9977d24388 Use git branch name as tag when building images
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-29 07:26:48 -07:00
Michael Crosby c5060ff303 Merge pull request #827 from crosbymichael/create-start
Implement create and start
2016-06-03 10:38:03 -07:00
Michael Crosby efcd73fb5b Fix signal handling for unit tests
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-05-31 11:10:47 -07:00
Qiang Huang 152ee95380 Add VERSION file to contain the version info
We need this because we need to get version info out of
go code, eg. build rpm package.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-05-30 10:24:22 +08:00
Dan Walsh 8b81b10397 Add bash completion support
I have taken the docker command completions code and reworked it for runc
support.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2016-05-25 15:18:43 -04:00
Aleksa Sarai dd4a897f5d *: enable full test suite on make test
Enable the full test suite to run on `make test`. They also all run
inside a Docker container for maximum reproducibility.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-05-03 17:15:49 +10:00
Qiang Huang 18612e6c7f Remove sniffTest
We have integration test now, not ideal though, but it
surely can replace sniffTest.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-04-26 16:20:45 +08:00
Mrunal Patel 94acd98156 Merge pull request #766 from hqhq/hq_makefile_man
Add target man in Makefile
2016-04-22 15:51:46 -07:00
Qiang Huang 3dadcf02f6 Add target man in Makefile
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-04-22 14:37:42 +08:00
Mike Brown e9f89e163f adds integration tests
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2016-04-21 19:09:27 -05:00
Ido Yariv 80cf52436a Speed up successive builds
By saving the packages that are dependencies of runc, successive build
times can be decreased by over 50%.

Signed-off-by: Ido Yariv <ido@wizery.com>
2016-04-12 18:48:52 -04:00
Ido Yariv 77ce689fe0 Don't use pre-defined GOPATH
All packages should be vendored, so there's no need to include the
pre-defined GOPATH in the search path.

Signed-off-by: Ido Yariv <ido@wizery.com>
2016-04-12 18:48:52 -04:00
Ido Yariv 8f250ceb47 Fix static builds
The runc symlink is only created when building non-static builds, so it
might be missing when building static builds. Fix this.

Signed-off-by: Ido Yariv <ido@wizery.com>
2016-04-12 18:48:52 -04:00
Mrunal Patel e874369984 Merge pull request #702 from cyphar/install-to-sbin
Makefile: install to /usr/local/sbin
2016-04-12 12:12:08 -07:00
Mrunal Patel f3c6d9e7cc Fix the build by removing go get for vet
golang.org/x/tools/cmd/vet has been removed as it is available in go cmd directly

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2016-04-07 09:36:08 -07:00
Aleksa Sarai 534d7a8ee4 Makefile: install to /usr/local/sbin
Since runC requires root in order to run, it makes more sense to put it
in /usr/local/sbin (which is traditionally for root-only utilities).
This also fixes the section number mismatch (man8 is usually for
administrative utilities in /usr/local/sbin).

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-03-31 01:15:05 +11:00
Qiang Huang a719ea5c61 Don't link runc every time
So we won't see the link message every time we make
runc. Also it use force remove when make clean, so
we don't see annoying error when do extra make clean.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-03-17 08:24:24 +08:00
Qiang Huang 7a4285484d Add make uninstall command
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-03-14 09:59:36 +08:00
Michael Crosby beb3e5e71a Add gitcommit to runc builds
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-11 15:20:00 -08:00
Doug Davis 595f593c24 Add the most basic sniff tests of runc
just so that we're not merging code into master w/o any tests at all.
I expect this to be removed once we have a real testing infrastructure.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-03-07 11:01:31 -08:00
Alexander Morozov 4a12ff6e58 Merge pull request #443 from BenHall/build
Build runC binary via a Docker container
2016-02-26 20:17:31 -08:00
Mrunal Patel 930dbb38a2 Merge pull request #328 from hqhq/hq_build_runc_everywhere
Make runc buildable everywhere
2016-02-25 23:22:00 -08:00
Ben Hall ec9d8769f0 Add a Dockerfile and a dbuild target. This allows you to build runC via Docker without having Golang installed on the host
Signed-off-by: Ben Hall <ben@benhall.me.uk>
2015-12-18 11:37:12 +00:00
Jessica Frazelle ecd6463101
static binary \o/
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-11-14 16:33:52 -08:00
Qiang Huang ed7edf771f Make runc buildable everywhere
Currently we need to clone github.com/opencontainers/runc to
GOPATH so we can make it, it's not friendly for developers.

We can resolve it by vendoring itself as a symlink in GOPATH.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-10-12 19:17:58 +08:00
Michael Crosby a8e0185d97 Add seccomp build tag
Add a seccomp build tag and also support in the Makefile to add or
remove build tags.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-09-11 12:03:57 -07:00
Marcos Lilljedahl 5bc1360d89 Add TESTFLAGS to Makefile targets
This commit allows to send `go test` arguments to current makefile
`test` and `localtest` targets.

A usage example would be `make test TESTFLAGS="-run=SomeTestFunction"`
to easily run a single test function.

Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>
2015-07-28 19:55:44 -03:00
Alexander Morozov adc6564042 Move test_Dockerfile to script dir
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-07-09 06:19:26 -07:00
Alexander Morozov 48ddedba65 Add ci target
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-07-09 06:19:26 -07:00
Mrunal Patel 53bab7d85f Prefer Godep dependencies in the GOPATH
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2015-06-30 14:07:56 -04:00
Alexander Morozov a87bc12f86 Add makefile targets for basic lint and testing
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-06-30 10:17:10 -07:00