diff options
author | Radostin Stoyanov <rstoyanov@fedoraproject.org> | 2022-05-08 13:07:25 +0300 |
---|---|---|
committer | Andrei Vagin <avagin@gmail.com> | 2022-05-17 18:00:50 +0300 |
commit | 2b3763fe6a39033d4e3d3d80e28911d1737ac23b (patch) | |
tree | bbf5fee5ee6bd3141552a6689bca89055174adb9 | |
parent | cd0ed7e5491c7c827b887b2d80cf35e87819278b (diff) |
amdgpu: Set PLUGINDIR to /usr/lib/criu
Building the criu packages for Ubuntu/Debian fails with:
mkdir: cannot create directory '/var/lib/criu': Permission denied
This patch updates PLUGINDIR with the value /usr/lib/criu
Fixes: #1877
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
-rw-r--r-- | Makefile.install | 2 | ||||
-rw-r--r-- | criu/include/plugin.h | 4 | ||||
-rw-r--r-- | plugins/amdgpu/Makefile | 8 |
3 files changed, 8 insertions, 6 deletions
diff --git a/Makefile.install b/Makefile.install index aafb95469..c798637be 100644 --- a/Makefile.install +++ b/Makefile.install @@ -7,7 +7,7 @@ MANDIR ?= $(PREFIX)/share/man INCLUDEDIR ?= $(PREFIX)/include LIBEXECDIR ?= $(PREFIX)/libexec RUNDIR ?= /run -PLUGINDIR ?= /var/lib/criu +PLUGINDIR ?= $(PREFIX)/lib/criu # # For recent Debian/Ubuntu with multiarch support. diff --git a/criu/include/plugin.h b/criu/include/plugin.h index a1796b641..0115e6ea0 100644 --- a/criu/include/plugin.h +++ b/criu/include/plugin.h @@ -5,7 +5,9 @@ #include "common/compiler.h" #include "common/list.h" -#define CR_PLUGIN_DEFAULT "/var/lib/criu/" +#ifndef CR_PLUGIN_DEFAULT +#define CR_PLUGIN_DEFAULT "/usr/lib/criu/" +#endif void cr_plugin_fini(int stage, int err); int cr_plugin_init(int stage); diff --git a/plugins/amdgpu/Makefile b/plugins/amdgpu/Makefile index 971b93b51..367a52c99 100644 --- a/plugins/amdgpu/Makefile +++ b/plugins/amdgpu/Makefile @@ -15,7 +15,7 @@ DEPS_NOK := ; include $(__nmk_dir)msg.mk CC := gcc -PLUGIN_CFLAGS := -g -Wall -Werror -D _GNU_SOURCE -shared -nostartfiles -fPIC +PLUGIN_CFLAGS := -g -Wall -Werror -D _GNU_SOURCE -shared -nostartfiles -fPIC -DCR_PLUGIN_DEFAULT="$(PLUGINDIR)" PLUGIN_LDFLAGS := -lpthread -lrt -ldrm -ldrm_amdgpu ifeq ($(CONFIG_AMDGPU),y) @@ -50,16 +50,16 @@ clean: amdgpu_plugin_clean amdgpu_plugin_test_clean mrproper: clean install: - $(Q) mkdir -p $(PLUGINDIR) ifeq ($(CONFIG_AMDGPU),y) + $(Q) mkdir -p $(DESTDIR)$(PLUGINDIR) $(E) " INSTALL " $(PLUGIN_NAME) - $(Q) install -m 644 $(PLUGIN_SOBJ) $(PLUGINDIR) + $(Q) install -m 644 $(PLUGIN_SOBJ) $(DESTDIR)$(PLUGINDIR) endif .PHONY: install uninstall: ifeq ($(CONFIG_AMDGPU),y) $(E) " UNINSTALL" $(PLUGIN_NAME) - $(Q) $(RM) $(PLUGINDIR)/$(PLUGIN_SOBJ) + $(Q) $(RM) $(DESTDIR)$(PLUGINDIR)/$(PLUGIN_SOBJ) endif .PHONY: uninstall |