package/libapparmor: new package
authorAngelo Compagnucci <angelo@amarulasolutions.com>
Fri, 27 Mar 2020 09:29:05 +0000 (10:29 +0100)
committerYann E. MORIN <yann.morin.1998@free.fr>
Mon, 20 Apr 2020 07:44:46 +0000 (09:44 +0200)
commitf2b6a2bb807a69b32bed721d8318cb82101517d6
treee85b268d0b8eb0ad70d056ce91093461cd6265df
parentfd4236a796de953e69b3ac120ef0c821a14e1ef0
package/libapparmor: new package

The layout of the package is not amenable to building both the library
and the utilities at once, so this package will only install the
library.

The other apparmor-related tools however will almost all want to always
link with the static library (it's hard-coded in their Makefiles, like:
AALIB = -Wl,-Bstatic -lapparmor -Wl,-Bdynamic -lpthread), so we also
force the build of the static library.

The kernel headers 3.16 at least are required, for CAP_AUDIT_READ.

We need to force the C standard to gnu99, otherwise:

  - autoconf uses wchar_t in C99 test, so considers it to be missing
    on toolchains without wchar, but wchar is not otherwise needed for
    libapparmor;

  - c99 is not enough, otherwise the build fails with errors like:
        kernel.c:503:15: error: expected declaration specifiers or ‘...’ before ‘(’ token
         extern typeof((__change_hat)) __old_change_hat __attribute__((alias ("__change_hat")));
                       ^

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
[yann.morin.1998@free.fr: strip down the patch to only build the lib]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Tested-by: Angelo Compagnucci <angelo@amarulasolutions.com>
DEVELOPERS
package/Config.in
package/libapparmor/Config.in [new file with mode: 0644]
package/libapparmor/libapparmor.hash [new file with mode: 0644]
package/libapparmor/libapparmor.mk [new file with mode: 0644]