The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/3565

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Building the tests fails on the current master. This commit should fix it.
```
./configure  --enable-doc=yes --enable-api-docs=yes --enable-bash=no --enable-tools=no  --enable-commands=no --enable-seccomp=yes --enable-capabilities=yes  --enable-apparmor=yes --enable-tests=yes
```

```shell
../lxc/lsm/apparmor.c: In function ‘apparmor_parser_exec’:
../lxc/lsm/apparmor.c:869:55: error: ‘APPARMOR_CACHE_DIR’ undeclared (first use in this function)
  869 |  execlp("apparmor_parser", "apparmor_parser", cmdbuf, APPARMOR_CACHE_DIR, args->file, NULL);
      |                                                       ^~~~~~~~~~~~~~~~~~
../lxc/lsm/apparmor.c:869:55: note: each undeclared identifier is reported only once for each function it appears in
../lxc/lsm/apparmor.c: In function ‘load_apparmor_profile’:
../lxc/lsm/apparmor.c:968:17: error: ‘APPARMOR_CACHE_DIR’ undeclared (first use in this function)
  968 |   ret = mkdir_p(APPARMOR_CACHE_DIR, 0755);
      |                 ^~~~~~~~~~~~~~~~~~
In file included from ../lxc/lsm/apparmor.c:19:
../lxc/lsm/apparmor.c:970:64: error: expected ‘)’ before ‘APPARMOR_CACHE_DIR’
  970 |    SYSERROR("Error creating AppArmor profile cache directory " APPARMOR_CACHE_DIR);
      |                                                                ^~~~~~~~~~~~~~~~~~
../../src/lxc/log.h:378:22: note: in definition of macro ‘ERROR’
  378 |  LXC_ERROR(&locinfo, format, ##__VA_ARGS__);   \
      |                      ^~~~~~
../lxc/lsm/apparmor.c:970:4: note: in expansion of macro ‘SYSERROR’
  970 |    SYSERROR("Error creating AppArmor profile cache directory " APPARMOR_CACHE_DIR);
      |    
```
From beff99393906f3bddff186993203a8b9c0ba9dfc Mon Sep 17 00:00:00 2001
From: Ruben Jenster <r.jens...@drachenfels.de>
Date: Fri, 23 Oct 2020 18:26:34 +0200
Subject: [PATCH] tests: Fix compilation with appamor enabled.

Signed-off-by: Ruben Jenster <r.jens...@drachenfels.de>
---
 src/tests/Makefile.am | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
index 2b66bc9cd5..664c6c47b1 100644
--- a/src/tests/Makefile.am
+++ b/src/tests/Makefile.am
@@ -564,6 +564,7 @@ AM_CFLAGS=-DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
 
 if ENABLE_APPARMOR
 AM_CFLAGS += -DHAVE_APPARMOR
+AM_CFLAGS += -DAPPARMOR_CACHE_DIR=\"$(APPARMOR_CACHE_DIR)\"
 endif
 
 if ENABLE_SECCOMP
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to