From d559b58fd4cc1646bbc5c4a9c0889678ce427e90 Mon Sep 17 00:00:00 2001 From: Aleksa Sarai Date: Sat, 15 Oct 2016 15:48:18 +1100 Subject: [PATCH 1/3] makefile: fix binary dependencies OCID_LINK is necessary to correctly build all of the binaries. This syntax is a GNU Make-ism[1] that allows you to specify a path dependency without rebuilding the target if the dependency is newer than the target. [1]: https://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html Signed-off-by: Aleksa Sarai --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 82a076c1..e142c08f 100644 --- a/Makefile +++ b/Makefile @@ -40,11 +40,12 @@ conmon: pause: make -C $@ -GO_SRC = $(shell find . -name \*.go) -ocid: $(GO_SRC) ${OCID_LINK} +GO_SRC = $(shell find . -name \*.go) + +ocid: $(GO_SRC) | ${OCID_LINK} go build --tags "$(BUILDTAGS)" -o $@ ./cmd/server/ -ocic: $(GO_SRC) +ocic: $(GO_SRC) | ${OCID_LINK} go build -o $@ ./cmd/client/ ocid.conf: ocid From f2f369f6f86e8b118e674def50f85fca62f398e9 Mon Sep 17 00:00:00 2001 From: Aleksa Sarai Date: Sat, 15 Oct 2016 15:51:39 +1100 Subject: [PATCH 2/3] systemd: move ocid.service to contrib/ In addition, remove the installation steps from the Makefile. In general, I personally don't like projects that install service files on `make install` -- that's the job of a package manager. Signed-off-by: Aleksa Sarai --- Makefile | 5 +++-- ocid.service => contrib/systemd/ocid.service | 0 2 files changed, 3 insertions(+), 2 deletions(-) rename ocid.service => contrib/systemd/ocid.service (100%) diff --git a/Makefile b/Makefile index e142c08f..53d15a71 100644 --- a/Makefile +++ b/Makefile @@ -100,11 +100,12 @@ install: all install -m 644 $(wildcard docs/*.8) $(PREFIX)/share/man/man8 install -d $(PREFIX)/share/man/man5 install -m 644 $(wildcard docs/*.5) $(PREFIX)/share/man/man5 - install -D -m 644 ocid.service $(PREFIX)/lib/systemd/system install -D -m 644 ocid.conf $(DESTDIR)/etc +install.systemd: + install -D -m 644 ocid.service $(PREFIX)/lib/systemd/system + uninstall: - rm -f $(PREFIX)/lib/systemd/system/ocid.service rm -f ${INSTALLDIR}/{ocid,ocic} rm -f $(PREFIX)/libexec/ocid/{conmon,pause} for i in $(wildcard docs/*.8); do \ diff --git a/ocid.service b/contrib/systemd/ocid.service similarity index 100% rename from ocid.service rename to contrib/systemd/ocid.service From b30ea458f52c88e28edf08faca2aab6b84f4f7b5 Mon Sep 17 00:00:00 2001 From: Aleksa Sarai Date: Sat, 15 Oct 2016 15:56:58 +1100 Subject: [PATCH 3/3] gitignore: ignore man page junk Signed-off-by: Aleksa Sarai --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 23993a7d..16f02f68 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ conmon/conmon conmon/conmon.o pause/pause pause/pause.o -/docs/ocid.8 -/docs/ocid.conf.5 +/docs/*.[58] +/docs/*.[58].gz vendor/src/github.com/kubernetes-incubator/cri-o ocid.conf