Commit graph

122 commits

Author SHA1 Message Date
Louis Taylor
8c3e82e91d
Support src directory name other than cri-o
Signed-off-by: Louis Taylor <louis@kragniz.eu>
2018-03-04 02:16:18 +00:00
Daniel J Walsh
6f7e0e837a Have make file create the oci/hooks.d directory
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-03-02 12:14:16 -05:00
Antonio Murdaca
8ea79e755f
Merge pull request #1369 from rhatdan/selinuxopt
Fix SELINUXOPT handling
2018-02-24 16:47:53 +01:00
Daniel J Walsh
51b52191e7 Fix SELINUXOPT handling
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-02-24 04:49:29 -05:00
Daniel J Walsh
74cd1ec97c
Merge pull request #1359 from giuseppe/conmon-version
conmon: implement --version
2018-02-23 13:28:39 -05:00
Antonio Murdaca
7f82f9bbe8
Makefile: fix SELINUXOPT generation
This patch fixes selinuxopt generation as found in:

```
install /usr/sbin/selinuxenabled -D -m 644 crio.conf /etc/crio/crio.conf
```

The above is clearly wrong when installing the configuration because
`commmand -v` outputs the path of selinuxenabled as well, resulting in

/usr/bin/selinuxenabled -Z

This patch fixes that by just echoing the -Z as needed.

Issue introduced in
https://github.com/kubernetes-incubator/cri-o/pull/1363

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2018-02-23 16:06:01 +01:00
Giuseppe Scrivano
96a9afedf6
Makefile: split declarations to Makefile.inc
so that they can be reused by another Makefile

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-02-23 09:41:48 +01:00
Mrunal Patel
d30663558f
Merge pull request #1362 from wking/install-prerequisites
Makefile: Fix install.* prerequisites
2018-02-22 19:22:58 -08:00
Mrunal Patel
12d097da61
Merge pull request #1364 from wking/drop-man1-uninstall
Makefile: Drop man1 uninstall
2018-02-22 15:59:17 -08:00
W. Trevor King
10bc4ec96b Makefile: Drop man1 uninstall
This should have happened in f4883dd2 (Makefile: do not install man1
files, 2017-11-08, #1129).  It may have been missed due to the
man1/man8 typo from e61c672a (Add missing man pages and bash
completions for kpod, 2016-12-02, #230).

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-02-22 14:08:11 -08:00
W. Trevor King
fa6b189eb5 Makefile: Use 'command -v selinuxenabled' instead of hard-coded path
The hard-coded path landed in 488216f5 (Make sure selinuxenabled
exists before executing it, 2016-10-17, #154), but there's no need to
require that path.  Using 'command -v' (in POSIX [1]) supports anyone
who has selinuxenabled in their PATH.

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-02-22 13:54:34 -08:00
W. Trevor King
ada416b4e5 Makefile: Fix install.* prerequisites
Without this change, hitting these targets directly will fail.  For
example:

  $ make clean
  $ make MANDIR=/tmp install.man
  install  -d -m 755 /tmp/man5
  install  -d -m 755 /tmp/man8
  install  -m 644 docs/crio.conf.5 -t /tmp/man5
  install: cannot stat 'docs/crio.conf.5': No such file or directory
  make: *** [Makefile:150: install.man] Error 1

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-02-22 13:32:54 -08:00
Antonio Murdaca
af4585d655
Makefile: stub out ostree in unit tests
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2018-02-20 10:49:05 +01:00
Antonio Murdaca
6059a58877
releases: add releases
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2018-01-27 12:43:31 +01:00
W. Trevor King
8dbc2d1fff Makefile: Use 'git diff' to show gofmt changes
This makes fixing errors easier.  Before this commit, errors looked
like [1]:

  $ make gofmt
  !!! 'gofmt -s' needs to be run on the following files:
  ./lib/config.go
  make: *** [gofmt] Error 1

But that's not very helpful when your local gofmt thinks the file is
fine.  With this commit, errors will look like:

  $ make gofmt
  find . -name '*.go' ! -path './vendor/*' -exec gofmt -s -w {} \+
  git diff --exit-code
  diff --git a/lib/config.go b/lib/config.go
  index 1acca8c7..6a63b2b0 100644
  --- a/lib/config.go
  +++ b/lib/config.go
  @@ -2,7 +2,7 @@ package lib

   import (
          "bytes"
  -"io/ioutil"
  +       "io/ioutil"

          "github.com/BurntSushi/toml"
          "github.com/kubernetes-incubator/cri-o/oci"
  make: *** [Makefile:68: gofmt] Error 1

(or whatever, I just stuffed in a formatting error for demonstration
purposes).

Also remove the helper script in favor of direct Makefile calls,
because with Git handling difference reporting and exit status, this
becomes a simpler check.  find's -exec, !, and -path arguments are
specified in POSIX [2].

[1]: https://travis-ci.org/kubernetes-incubator/cri-o/jobs/331949394#L1075
[2]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-01-22 16:47:09 -08:00
W. Trevor King
826298483a hack/libdm_installed: Add a test for libdevmapper.h
Avoid crashing 'make' with:

  No package 'devmapper' found

by disabling the devmapper driver when the library it requires is not
installed.  Also give the libdm_no_deferred_remove script a more
specific name to avoid confusion.

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-01-19 11:43:24 -08:00
27c2eda635
Makefile: installing a config, requires a config
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2018-01-10 16:23:35 -05:00
Daniel J Walsh
3c1c6d047e Add -i flag to speed up compilation of cri-o packages
Instead of compiling all of the *.go files each time, the
-i flag will cause them to be only compiled if they changed.

This will make developers much happier.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-01-04 10:53:33 -05:00
Wei Wei
3006a2159a drop crioctl source code
Signed-off-by: Wei Wei <weiwei.inf@gmail.com>
2017-11-29 21:07:50 +08:00
Antonio Murdaca
8ae0aee7e5
hack: validate tests for crioctl deprecation
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-11-13 16:55:45 +01:00
Antonio Murdaca
e99a78edff
*: add crictl.yaml
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-11-12 01:54:19 +01:00
Antonio Murdaca
f4883dd27a
Makefile: do not install man1 files
kpod removal actually removed all man1 docs but the Makefile was still
referencing man1 stuff. CRI-O doesn't have man1 so let's drop that
altogether now.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-11-08 16:11:55 +01:00
Daniel J Walsh
c9b3d3df28
Merge pull request #1111 from mheon/remove_kpod
Remove kpod code after repository move
2017-11-07 14:44:40 -05:00
Shijiang Wei
d5ffe34758 fix "docker run" command in Makefile
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2017-11-04 16:51:47 +08:00
Matthew Heon
1bf6d20309 Remove kpod code after repository move
Signed-off-by: Matthew Heon <mheon@redhat.com>
2017-11-03 14:37:42 -04:00
Antonio Murdaca
63b1706de8
Makefile: output binaries under bin/
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-10-30 17:48:29 +01:00
Nalin Dahyabhai
9d0d48b2ce Rename $STORAGE_OPTS to $STORAGE_OPTIONS
Rename our $STORAGE_OPTS variable to $STORAGE_OPTIONS, so that the
storage library doesn't try to use its contents as default driver
options.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-10-24 21:52:16 -04:00
Daniel J Walsh
655b47fdc4 Strip out debuginfo and other content to make images smaller
This can be overriden by passing in the

make SHRINKFLAGS=

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-10-19 17:34:24 +00:00
Daniel J Walsh
6835afaa54 Change buildtags based on installed environment.
Determine if selinux is available before building cri-o with support.
Don't add ostree support to crio or any tools other then kpod.
cri-o does not use ostree.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-10-19 17:34:24 +00:00
Antonio Murdaca
e07ba4b2d1
version: fix version handling and kube info
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-10-17 10:44:50 +02:00
Mrunal Patel
a643e533d8 Skip building btrfs support if library isn't installed
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-10-03 13:18:36 -07:00
Mrunal Patel
d669878914 Merge pull request #937 from rhatdan/umount
Tell oci-umount where to remove mountpoints inside container
2017-09-27 13:57:10 -07:00
a22d04de4b
Makefile: break out the install target
Where `make install` still has the same behaviour, but you could instead
only `make install.bin` if you don't need the man pages.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-09-26 09:32:39 -04:00
Daniel J Walsh
51b2254742 Tell oci-umount where to remove mountpoints inside container
This patch set add crio-umount.conf file which tells oci-umount plugin
to look for leaked mount points in /var/lib/containers/storage/* and
/var/run/containers/*

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-25 15:21:17 -04:00
Antonio Murdaca
c1d158bba4
Makefile: always use vfs to test in container
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-09-17 10:19:32 +02:00
Antonio Murdaca
e26e48ec87
server: add inspect unit test
The inspect endpoint is used mainly in the CRI-O cAdvisor handler.
Let's make sure we don't break it by adding some trivial unit tests.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-09-17 10:19:29 +02:00
umohnani8
12512e418b Update kpod version and info to show beta version
Signed-off-by: umohnani8 <umohnani@redhat.com>
2017-09-10 12:17:43 -04:00
Mrunal Patel
e13803043a version: Add -dirty if compiled binary includes uncommited changes
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2017-09-08 16:17:57 -07:00
Mrunal Patel
086aa910d4 Bump up version to 1.0.0-rc.1
We add a VERSION file and pass the gitCommit and version
to the binary builds in the Makefile.

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-09-08 13:23:59 -07:00
Daniel J Walsh
d375aab45a When installing content make sure it gets labeled correctly.
This patch will check to see if SELinux is enabled and then pass
the -Z flag to the install command, which causes install to label
all created content with the system default labels.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-09-05 17:09:28 -04:00
Antonio Murdaca
9fac90525e
Makefile: force symlink to cri-o.service
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-08-28 14:59:35 +02:00
Antonio Murdaca
d26ad19327
Makefile: install alias, not symlink
ln -s errors out with file exists if you run make install.systemd twice
or more. This patch installs the alias directly w/o using a symlink so
it can be run multiple times w/o errors.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-08-27 16:03:13 +02:00
Mikkel Oscar Lyderik Larsen
a747fa0c00
build: Allow overwrite of BUILDTAGS variable
Signed-off-by: Mikkel Oscar Lyderik Larsen <m@moscar.net>
2017-08-05 14:19:06 +02:00
Nalin Dahyabhai
1e1d6a512f Build with ostree
Build using a locally-built copy of ostree in testing setups.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-07-24 13:03:07 -04:00
Giuseppe Scrivano
a30f84906c Makefile: do not rebuild tests every time "make" runs
bin2img/checkseccomp/copyimg are file targets and should not be .PHONY.
This prevents to build them if not necessary.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2017-07-22 11:37:24 +02:00
Nalin Dahyabhai
375ffaee03 Build all of our binaries with the same build tags
Build all of our binaries with the same build tags and the same LDFLAGS.
This means we add $(LDFLAGS) to bin2img, copyimg, and cri-o,
$(BUILDTAGS) to kpod, and both to crioctl and checkseccomp.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-07-21 10:28:10 -04:00
Daniel J Walsh
23c66c7bdf We need to support the name cri-o and crio for rpm and systemd
Adding these aliases will make it easier for users who forget to
use crio or cri-o.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-07-19 07:29:36 -04:00
umohnani8
26126085eb Man pages were being created empty
This patch causes the man pages to be created with the correct content.

Signed-off-by: umohnani8 <umohnani@redhat.com>
2017-07-10 17:20:42 -04:00
Mrunal Patel
762f508d9c lint: Use a fixed commit for gometalinter
Pulling latest code breaks our lint when unstable code is merged
into gometalinter.

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-07-10 13:06:57 -07:00
umohnani8
9595d7900e Add kpod version
Signed-off-by: umohnani8 <umohnani@redhat.com>
2017-06-27 16:48:24 -04:00