alpine-overlay/kubezero/cri-o/makefile-fix-install.patch

139 lines
6.4 KiB
Diff
Raw Normal View History

2022-04-13 17:07:07 +00:00
--- a/Makefile
+++ b/Makefile
@@ -9,11 +9,11 @@
PROJECT := github.com/cri-o/cri-o
CRIO_INSTANCE := crio_dev
-PREFIX ?= ${DESTDIR}/usr/local
+PREFIX ?= /usr/local
BINDIR ?= ${PREFIX}/bin
LIBEXECDIR ?= ${PREFIX}/libexec
MANDIR ?= ${PREFIX}/share/man
-ETCDIR ?= ${DESTDIR}/etc
+ETCDIR ?= /etc
ETCDIR_CRIO ?= ${ETCDIR}/crio
DATAROOTDIR ?= ${PREFIX}/share/containers
BUILDTAGS ?= containers_image_ostree_stub \
@@ -26,7 +26,7 @@
$(shell hack/seccomp_tag.sh) \
$(shell hack/selinux_tag.sh) \
$(shell hack/libsubid_tag.sh)
-CRICTL_CONFIG_DIR=${DESTDIR}/etc
+CRICTL_CONFIG_DIR = /etc
CONTAINER_RUNTIME ?= podman
BUILD_PATH := $(shell pwd)/build
BUILD_BIN_PATH := ${BUILD_PATH}/bin
@@ -420,68 +420,70 @@
install: .gopathok install.bin install.man install.completions install.systemd install.config
install.bin-nobuild:
- install ${SELINUXOPT} -D -m 755 bin/crio $(BINDIR)/crio
- install ${SELINUXOPT} -D -m 755 bin/crio-status $(BINDIR)/crio-status
- install ${SELINUXOPT} -D -m 755 bin/pinns $(BINDIR)/pinns
+ install ${SELINUXOPT} -D -m 755 bin/crio ${DESTDIR}$(BINDIR)/crio
+ install ${SELINUXOPT} -D -m 755 bin/crio-status ${DESTDIR}$(BINDIR)/crio-status
+ install ${SELINUXOPT} -D -m 755 bin/pinns ${DESTDIR}$(BINDIR)/pinns
install.bin: binaries install.bin-nobuild
install.man-nobuild:
- install ${SELINUXOPT} -d -m 755 $(MANDIR)/man5
- install ${SELINUXOPT} -d -m 755 $(MANDIR)/man8
- install ${SELINUXOPT} -m 644 $(filter %.5,$(MANPAGES)) -t $(MANDIR)/man5
- install ${SELINUXOPT} -m 644 $(filter %.8,$(MANPAGES)) -t $(MANDIR)/man8
+ install ${SELINUXOPT} -d -m 755 ${DESTDIR}$(MANDIR)/man5
+ install ${SELINUXOPT} -d -m 755 ${DESTDIR}$(MANDIR)/man8
+ install ${SELINUXOPT} -m 644 $(filter %.5,$(MANPAGES)) -t ${DESTDIR}$(MANDIR)/man5
+ install ${SELINUXOPT} -m 644 $(filter %.8,$(MANPAGES)) -t ${DESTDIR}$(MANDIR)/man8
install.man: $(MANPAGES) install.man-nobuild
install.config-nobuild:
- install ${SELINUXOPT} -d $(DATAROOTDIR)/oci/hooks.d
- install ${SELINUXOPT} -d $(ETCDIR_CRIO)/crio.conf.d
- install ${SELINUXOPT} -D -m 644 crio.conf $(ETCDIR_CRIO)/crio.conf
- install ${SELINUXOPT} -D -m 644 crio-umount.conf $(OCIUMOUNTINSTALLDIR)/crio-umount.conf
- install ${SELINUXOPT} -D -m 644 crictl.yaml $(CRICTL_CONFIG_DIR)
+ install ${SELINUXOPT} -d ${DESTDIR}$(ETCDIR_CRIO)/crio.conf.d
+ install ${SELINUXOPT} -d ${DESTDIR}$(ETCDIR)/containers/oci/hooks.d
+ install ${SELINUXOPT} -d ${DESTDIR}$(DATAROOTDIR)/oci/hooks.d
+ install ${SELINUXOPT} -D -m 644 crio.conf ${DESTDIR}$(ETCDIR_CRIO)/crio.conf
+ install ${SELINUXOPT} -D -m 644 crio-umount.conf ${DESTDIR}$(OCIUMOUNTINSTALLDIR)/crio-umount.conf
+ install ${SELINUXOPT} -D -m 644 crictl.yaml ${DESTDIR}$(CRICTL_CONFIG_DIR)
install.config: crio.conf install.config-nobuild
install.completions:
- install ${SELINUXOPT} -d -m 755 ${BASHINSTALLDIR}
- install ${SELINUXOPT} -d -m 755 ${FISHINSTALLDIR}
- install ${SELINUXOPT} -d -m 755 ${ZSHINSTALLDIR}
- install ${SELINUXOPT} -D -m 644 -t ${BASHINSTALLDIR} completions/bash/crio
- install ${SELINUXOPT} -D -m 644 -t ${FISHINSTALLDIR} completions/fish/crio.fish
- install ${SELINUXOPT} -D -m 644 -t ${ZSHINSTALLDIR} completions/zsh/_crio
- install ${SELINUXOPT} -D -m 644 -t ${BASHINSTALLDIR} completions/bash/crio-status
- install ${SELINUXOPT} -D -m 644 -t ${FISHINSTALLDIR} completions/fish/crio-status.fish
- install ${SELINUXOPT} -D -m 644 -t ${ZSHINSTALLDIR} completions/zsh/_crio-status
+ install ${SELINUXOPT} -d -m 755 ${DESTDIR}${BASHINSTALLDIR}
+ install ${SELINUXOPT} -d -m 755 ${DESTDIR}${FISHINSTALLDIR}
+ install ${SELINUXOPT} -d -m 755 ${DESTDIR}${ZSHINSTALLDIR}
+ install ${SELINUXOPT} -D -m 644 -t ${DESTDIR}${BASHINSTALLDIR} completions/bash/crio
+ install ${SELINUXOPT} -D -m 644 -t ${DESTDIR}${FISHINSTALLDIR} completions/fish/crio.fish
+ install ${SELINUXOPT} -D -m 644 -t ${DESTDIR}${ZSHINSTALLDIR} completions/zsh/_crio
+ install ${SELINUXOPT} -D -m 644 -t ${DESTDIR}${BASHINSTALLDIR} completions/bash/crio-status
+ install ${SELINUXOPT} -D -m 644 -t ${DESTDIR}${FISHINSTALLDIR} completions/fish/crio-status.fish
+ install ${SELINUXOPT} -D -m 644 -t ${DESTDIR}${ZSHINSTALLDIR} completions/zsh/_crio-status
install.systemd:
- install ${SELINUXOPT} -D -m 644 contrib/systemd/crio.service $(PREFIX)/lib/systemd/system/crio.service
- install ${SELINUXOPT} -D -m 644 contrib/systemd/crio-wipe.service $(PREFIX)/lib/systemd/system/crio-wipe.service
+ install ${SELINUXOPT} -D -m 644 contrib/systemd/crio.service ${DESTDIR}$(PREFIX)/lib/systemd/system/crio.service
+ install ${SELINUXOPT} -D -m 644 contrib/systemd/crio-wipe.service ${DESTDIR}$(PREFIX)/lib/systemd/system/crio-wipe.service
uninstall:
- rm -f $(BINDIR)/crio
- rm -f $(BINDIR)/crio-status
- rm -f $(BINDIR)/pinns
+ rm -f $(DESTDIR)$(BINDIR)/crio
+ rm -f $(DESTDIR)$(BINDIR)/crio-status
+ rm -f $(DESTDIR)$(BINDIR)/pinns
for i in $(filter %.5,$(MANPAGES)); do \
- rm -f $(MANDIR)/man5/$$(basename $${i}); \
+ rm -f $(DESTDIR)$(MANDIR)/man5/$$(basename $${i}); \
done
for i in $(filter %.8,$(MANPAGES)); do \
- rm -f $(MANDIR)/man8/$$(basename $${i}); \
+ rm -f $(DESTDIR)$(MANDIR)/man8/$$(basename $${i}); \
done
- rm -f ${BASHINSTALLDIR}/crio
- rm -f ${FISHINSTALLDIR}/crio.fish
- rm -f ${ZSHINSTALLDIR}/_crio
- rm -f ${BASHINSTALLDIR}/crio-status
- rm -f ${FISHINSTALLDIR}/crio-status.fish
- rm -f ${ZSHINSTALLDIR}/_crio-status
- rm -f $(PREFIX)/lib/systemd/system/crio-wipe.service
- rm -f $(PREFIX)/lib/systemd/system/crio.service
- rm -f $(PREFIX)/lib/systemd/system/cri-o.service
- rm -rf $(DATAROOTDIR)/oci/hooks.d
- rm -f $(ETCDIR_CRIO)/crio.conf
- rm -rf $(ETCDIR_CRIO)/crio.conf.d
- rm -f $(OCIUMOUNTINSTALLDIR)/crio-umount.conf
- rm -f $(CRICTL_CONFIG_DIR)/crictl.yaml
+ rm -f $(DESTDIR)${BASHINSTALLDIR}/crio
+ rm -f $(DESTDIR)${FISHINSTALLDIR}/crio.fish
+ rm -f $(DESTDIR)${ZSHINSTALLDIR}/_crio
+ rm -f $(DESTDIR)${BASHINSTALLDIR}/crio-status
+ rm -f $(DESTDIR)${FISHINSTALLDIR}/crio-status.fish
+ rm -f $(DESTDIR)${ZSHINSTALLDIR}/_crio-status
+ rm -f $(DESTDIR)$(PREFIX)/lib/systemd/system/crio-wipe.service
+ rm -f $(DESTDIR)$(PREFIX)/lib/systemd/system/crio.service
+ rm -f $(DESTDIR)$(PREFIX)/lib/systemd/system/cri-o.service
+ rm -f $(DESTDIR)$(ETCDIR_CRIO)/crio.conf
+ rm -rf $(DESTDIR)$(ETCDIR_CRIO)/crio.conf.d
+ rm -rf $(DESTDIR)$(ETCDIR)/containers/oci/hooks.d
+ rm -rf $(DESTDIR)$(DATAROOTDIR)/oci/hooks.d
+ rm -f $(DESTDIR)$(OCIUMOUNTINSTALLDIR)/crio-umount.conf
+ rm -f $(DESTDIR)$(CRICTL_CONFIG_DIR)/crictl.yaml
docs-validation:
$(GO_RUN) -tags "$(BUILDTAGS)" ./test/docs-validation