aboutsummaryrefslogtreecommitdiffstats
path: root/testing/apparmor
diff options
context:
space:
mode:
authorallangarret <allan.garret@gmail.com>2017-05-13 12:50:54 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2017-06-14 11:33:00 +0000
commit00b936fa46df92ae20f5d130217a0ad5487b2c92 (patch)
tree070c9d6eaa3cb64c3c8125cec991c4734a1a56d6 /testing/apparmor
parent5188d28b5db246fd32281e80e7a62d3694c68836 (diff)
downloadaports-00b936fa46df92ae20f5d130217a0ad5487b2c92.tar.bz2
aports-00b936fa46df92ae20f5d130217a0ad5487b2c92.tar.xz
testing/apparmor: new aport
Diffstat (limited to 'testing/apparmor')
-rw-r--r--testing/apparmor/0001-Remove-__BEGIN_DECLS-and-__END_DECLS-identifiers.patch53
-rw-r--r--testing/apparmor/0002-Provide-missing-secure_getenv-and-scandirat-function.patch175
-rw-r--r--testing/apparmor/0003-Added-missing-typedef-definitions-on-parser.patch42
-rw-r--r--testing/apparmor/0004-Define-RLIMIT_OFILE-if-needed.patch17
-rw-r--r--testing/apparmor/0005-Added-RLIMIT_RTTIME-option-conditionally.patch23
-rw-r--r--testing/apparmor/0006-Use-gettext-and-remove-latex.patch25
-rw-r--r--testing/apparmor/0007-Do-not-build-install-vim-file-with-utils-package.patch36
-rw-r--r--testing/apparmor/APKBUILD206
8 files changed, 577 insertions, 0 deletions
diff --git a/testing/apparmor/0001-Remove-__BEGIN_DECLS-and-__END_DECLS-identifiers.patch b/testing/apparmor/0001-Remove-__BEGIN_DECLS-and-__END_DECLS-identifiers.patch
new file mode 100644
index 0000000000..49422e7b7d
--- /dev/null
+++ b/testing/apparmor/0001-Remove-__BEGIN_DECLS-and-__END_DECLS-identifiers.patch
@@ -0,0 +1,53 @@
+diff --git a/libraries/libapparmor/include/sys/apparmor.h b/libraries/libapparmor/include/sys/apparmor.h
+index 752a5bd..0944c4c 100644
+--- a/libraries/libapparmor/include/sys/apparmor.h
++++ b/libraries/libapparmor/include/sys/apparmor.h
+@@ -22,7 +22,9 @@
+ #include <stdint.h>
+ #include <sys/types.h>
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+
+ /*
+ * Class of public mediation types in the AppArmor policy db
+@@ -191,6 +193,8 @@ extern int aa_policy_cache_remove(int dirfd, const char *path);
+ extern int aa_policy_cache_replace_all(aa_policy_cache *policy_cache,
+ aa_kernel_interface *kernel_interface);
+
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* sys/apparmor.h */
+diff --git a/libraries/libapparmor/include/sys/apparmor_private.h b/libraries/libapparmor/include/sys/apparmor_private.h
+index 6472de9..00bbee4 100644
+--- a/libraries/libapparmor/include/sys/apparmor_private.h
++++ b/libraries/libapparmor/include/sys/apparmor_private.h
+@@ -20,7 +20,9 @@
+ #include <stdio.h>
+ #include <sys/stat.h>
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+
+ int _aa_is_blacklisted(const char *name);
+
+@@ -33,6 +35,8 @@ int _aa_asprintf(char **strp, const char *fmt, ...);
+ int _aa_dirat_for_each(int dirfd, const char *name, void *data,
+ int (* cb)(int, const char *, struct stat *, void *));
+
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* sys/apparmor_private.h */
+--
+2.11.2
+
diff --git a/testing/apparmor/0002-Provide-missing-secure_getenv-and-scandirat-function.patch b/testing/apparmor/0002-Provide-missing-secure_getenv-and-scandirat-function.patch
new file mode 100644
index 0000000000..0d94d41516
--- /dev/null
+++ b/testing/apparmor/0002-Provide-missing-secure_getenv-and-scandirat-function.patch
@@ -0,0 +1,175 @@
+diff --git a/libraries/libapparmor/configure.ac b/libraries/libapparmor/configure.ac
+index 479ba6d..afbb8e2 100644
+--- a/libraries/libapparmor/configure.ac
++++ b/libraries/libapparmor/configure.ac
+@@ -81,7 +81,7 @@ AM_CONDITIONAL(HAVE_RUBY, test x$with_ruby = xyes)
+ AC_HEADER_STDC
+ AC_CHECK_HEADERS(unistd.h stdint.h syslog.h)
+
+-AC_CHECK_FUNCS([asprintf __secure_getenv secure_getenv])
++AC_CHECK_FUNCS([asprintf __secure_getenv secure_getenv scandirat])
+
+ AM_PROG_CC_C_O
+ AC_C_CONST
+diff --git a/libraries/libapparmor/src/Makefile.am b/libraries/libapparmor/src/Makefile.am
+index dd393a9..b7452ab 100644
+--- a/libraries/libapparmor/src/Makefile.am
++++ b/libraries/libapparmor/src/Makefile.am
+@@ -46,9 +46,9 @@ af_protos.h: /usr/include/netinet/in.h
+ LC_ALL=C sed -n -e "/IPPROTO_MAX/d" -e "s/^\#define[ \\t]\\+IPPROTO_\\([A-Z0-9_]\\+\\)\\(.*\\)$$/AA_GEN_PROTO_ENT(\\UIPPROTO_\\1, \"\\L\\1\")/p" $< > $@
+
+ lib_LTLIBRARIES = libapparmor.la
+-noinst_HEADERS = grammar.h parser.h scanner.h af_protos.h private.h
++noinst_HEADERS = grammar.h parser.h scanner.h af_protos.h secure_getenv.h scandirat.h private.h
+
+-libapparmor_la_SOURCES = grammar.y libaalogparse.c kernel.c scanner.c private.c features.c kernel_interface.c policy_cache.c
++libapparmor_la_SOURCES = grammar.y libaalogparse.c kernel.c scanner.c secure_getenv.c scandirat.c private.c features.c kernel_interface.c policy_cache.c
+ libapparmor_la_LDFLAGS = -version-info $(AA_LIB_CURRENT):$(AA_LIB_REVISION):$(AA_LIB_AGE) -XCClinker -dynamic -pthread \
+ -Wl,--version-script=$(top_srcdir)/src/libapparmor.map
+
+diff --git a/libraries/libapparmor/src/private.c b/libraries/libapparmor/src/private.c
+index 9378e22..b1c4805 100644
+--- a/libraries/libapparmor/src/private.c
++++ b/libraries/libapparmor/src/private.c
+@@ -39,10 +39,14 @@
+ #ifdef HAVE___SECURE_GETENV
+ #define secure_getenv __secure_getenv
+ #else
+- #error neither secure_getenv nor __secure_getenv is available
++ #include "secure_getenv.h"
+ #endif
+ #endif
+
++#ifndef HAVE_SCANDIRAT
++#include "scandirat.h"
++#endif
++
+ struct ignored_suffix_t {
+ const char * text;
+ int len;
+diff --git a/libraries/libapparmor/src/scandirat.c b/libraries/libapparmor/src/scandirat.c
+new file mode 100644
+index 0000000..1576a35
+--- /dev/null
++++ b/libraries/libapparmor/src/scandirat.c
+@@ -0,0 +1,63 @@
++#include <dirent.h>
++#include <string.h>
++#include <stdlib.h>
++#include <unistd.h>
++#include <fcntl.h>
++#include <inttypes.h>
++#include <errno.h>
++
++#include "scandirat.h"
++
++#ifndef HAVE_SCANDIRAT
++
++int scandirat(int dir_fd, const char *dirp, struct dirent ***namelist,
++ int (*filter)(const struct dirent *),
++ int (*compar)(const struct dirent **, const struct dirent **))
++{
++ int fd;
++ DIR *d;
++ struct dirent *de, **names=0, **tmp;
++ size_t cnt=0, len=0;
++ int old_errno = errno;
++
++
++ fd = openat(dir_fd, dirp, O_RDONLY|O_CLOEXEC);
++ if (fd == -1) return -1;
++
++ d = fdopendir(fd);
++
++ if (!d) {
++ close(fd);
++ return -1;
++ }
++
++ while ((errno=0), (de = readdir(d))) {
++ if (filter && !filter(de)) continue;
++ if (cnt >= len) {
++ len = 2*len+1;
++ if (len > SIZE_MAX/sizeof *names) break;
++ tmp = realloc(names, len * sizeof *names);
++ if (!tmp) break;
++ names = tmp;
++ }
++ names[cnt] = malloc(de->d_reclen);
++ if (!names[cnt]) break;
++ memcpy(names[cnt++], de, de->d_reclen);
++ }
++
++ closedir(d);
++
++ if (errno) {
++ if (names) while (cnt-->0) free(names[cnt]);
++ free(names);
++ return -1;
++ }
++ errno = old_errno;
++
++ if (compar) qsort(names, cnt, sizeof *names, (int (*)(const void *, const void *))compar);
++ *namelist = names;
++ return cnt;
++}
++
++#endif
++
+diff --git a/libraries/libapparmor/src/scandirat.h b/libraries/libapparmor/src/scandirat.h
+new file mode 100644
+index 0000000..6f4bf03
+--- /dev/null
++++ b/libraries/libapparmor/src/scandirat.h
+@@ -0,0 +1,13 @@
++#ifndef LIBAPPARMOR_SCANDIRAT_H
++#define LIBAPPARMOR_SCANDIRAT_H
++
++#include <dirent.h>
++
++#ifndef HAVE_SCANDIRAT
++int scandirat(int dir_fd, const char *dirp, struct dirent ***namelist,
++ int (*filter)(const struct dirent *),
++ int (*compar)(const struct dirent **, const struct dirent **));
++#endif
++
++#endif
++
+diff --git a/libraries/libapparmor/src/secure_getenv.c b/libraries/libapparmor/src/secure_getenv.c
+new file mode 100644
+index 0000000..b5eb46e
+--- /dev/null
++++ b/libraries/libapparmor/src/secure_getenv.c
+@@ -0,0 +1,15 @@
++#include <stdlib.h>
++#include <sys/auxv.h>
++
++#include "secure_getenv.h"
++
++#ifndef HAVE_SECURE_GETENV
++char *secure_getenv(const char *name)
++{
++ if (!getauxval(AT_SECURE)) {
++ return getenv(name);
++ }
++ return NULL;
++}
++#endif
++
+diff --git a/libraries/libapparmor/src/secure_getenv.h b/libraries/libapparmor/src/secure_getenv.h
+new file mode 100644
+index 0000000..b6269a8
+--- /dev/null
++++ b/libraries/libapparmor/src/secure_getenv.h
+@@ -0,0 +1,8 @@
++#ifndef LIBAPPARMOR_SECURE_GETENV_H
++#define LIBAPPARMOR_SECURE_GETENV_H
++
++#ifndef HAVE_SECURE_GETENV
++char *secure_getenv(const char *name);
++#endif
++
++#endif
+--
+2.11.2
+
diff --git a/testing/apparmor/0003-Added-missing-typedef-definitions-on-parser.patch b/testing/apparmor/0003-Added-missing-typedef-definitions-on-parser.patch
new file mode 100644
index 0000000000..9d70e0dfa9
--- /dev/null
+++ b/testing/apparmor/0003-Added-missing-typedef-definitions-on-parser.patch
@@ -0,0 +1,42 @@
+diff --git a/parser/missingdefs.h b/parser/missingdefs.h
+new file mode 100644
+index 0000000..9b2057e
+--- /dev/null
++++ b/parser/missingdefs.h
+@@ -0,0 +1,9 @@
++#ifndef PARSER_MISSINGDEFS_H
++#define PARSER_MISSINGDEFS_H
++
++typedef int (*__compar_fn_t) (const void *, const void *);
++typedef __compar_fn_t comparison_fn_t;
++typedef void (*__free_fn_t) (void *__nodep);
++
++#endif
++
+diff --git a/parser/parser_alias.c b/parser/parser_alias.c
+index f5b6da4..d50a72b 100644
+--- a/parser/parser_alias.c
++++ b/parser/parser_alias.c
+@@ -24,6 +24,7 @@
+ #include "immunix.h"
+ #include "parser.h"
+ #include "profile.h"
++#include "missingdefs.h"
+
+ struct alias_rule {
+ char *from;
+diff --git a/parser/parser_symtab.c b/parser/parser_symtab.c
+index 3e667d8..d5a8270 100644
+--- a/parser/parser_symtab.c
++++ b/parser/parser_symtab.c
+@@ -24,6 +24,7 @@
+
+ #include "immunix.h"
+ #include "parser.h"
++#include "missingdefs.h"
+
+ enum var_type {
+ sd_boolean,
+--
+2.11.2
+
diff --git a/testing/apparmor/0004-Define-RLIMIT_OFILE-if-needed.patch b/testing/apparmor/0004-Define-RLIMIT_OFILE-if-needed.patch
new file mode 100644
index 0000000000..804550aa0e
--- /dev/null
+++ b/testing/apparmor/0004-Define-RLIMIT_OFILE-if-needed.patch
@@ -0,0 +1,17 @@
+diff --git a/parser/parser_misc.c b/parser/parser_misc.c
+index f7772e6..90e8b9c 100644
+--- a/parser/parser_misc.c
++++ b/parser/parser_misc.c
+@@ -124,6 +124,9 @@ static struct keyword_table rlimit_table[] = {
+ {"core", RLIMIT_CORE},
+ {"rss", RLIMIT_RSS},
+ {"nofile", RLIMIT_NOFILE},
++#ifndef RLIMIT_OFILE
++#define RLIMIT_OFILE RLIMIT_NOFILE
++#endif
+ {"ofile", RLIMIT_OFILE},
+ {"as", RLIMIT_AS},
+ {"nproc", RLIMIT_NPROC},
+--
+2.11.2
+
diff --git a/testing/apparmor/0005-Added-RLIMIT_RTTIME-option-conditionally.patch b/testing/apparmor/0005-Added-RLIMIT_RTTIME-option-conditionally.patch
new file mode 100644
index 0000000000..18bd06dd0b
--- /dev/null
+++ b/testing/apparmor/0005-Added-RLIMIT_RTTIME-option-conditionally.patch
@@ -0,0 +1,23 @@
+diff --git a/parser/parser_yacc.y b/parser/parser_yacc.y
+index 3e2bcd2..a6f12e5 100644
+--- a/parser/parser_yacc.y
++++ b/parser/parser_yacc.y
+@@ -902,6 +902,7 @@ rules: rules TOK_SET TOK_RLIMIT TOK_ID TOK_LE TOK_VALUE opt_id TOK_END_OF_RULE
+ pwarn(_("RLIMIT 'cpu' no units specified using default units of seconds\n"));
+ value = tmp;
+ break;
++#ifdef RLIMIT_RTTIME
+ case RLIMIT_RTTIME:
+ /* RTTIME is measured in microseconds */
+ if (!end || $6 == end || tmp < 0)
+@@ -913,6 +914,7 @@ rules: rules TOK_SET TOK_RLIMIT TOK_ID TOK_LE TOK_VALUE opt_id TOK_END_OF_RULE
+ pwarn(_("RLIMIT 'rttime' no units specified using default units of microseconds\n"));
+ value = tmp;
+ break;
++#endif
+ case RLIMIT_NOFILE:
+ case RLIMIT_NPROC:
+ case RLIMIT_LOCKS:
+--
+2.11.2
+
diff --git a/testing/apparmor/0006-Use-gettext-and-remove-latex.patch b/testing/apparmor/0006-Use-gettext-and-remove-latex.patch
new file mode 100644
index 0000000000..1cabcb3641
--- /dev/null
+++ b/testing/apparmor/0006-Use-gettext-and-remove-latex.patch
@@ -0,0 +1,25 @@
+diff --git a/parser/Makefile b/parser/Makefile
+index 6709441..f7ec0bc 100644
+--- a/parser/Makefile
++++ b/parser/Makefile
+@@ -87,7 +87,7 @@ AAREDIR= libapparmor_re
+ AAREOBJECT = ${AAREDIR}/libapparmor_re.a
+ AAREOBJECTS = $(AAREOBJECT)
+ AARE_LDFLAGS = -static-libgcc -static-libstdc++ -L.
+-AALIB = -Wl,-Bstatic -lapparmor -Wl,-Bdynamic -lpthread
++AALIB = -Wl,-Bstatic -lapparmor -Wl,-Bdynamic -lpthread -lintl
+
+ ifdef USE_SYSTEM
+ # Using the system libapparmor so Makefile dependencies can't be used
+@@ -141,7 +141,7 @@ po/${NAME}.pot: ${SRCS} ${HDRS}
+
+ techdoc.pdf: techdoc.tex
+ timestamp=$(shell date --utc "+%Y%m%d%H%M%S%z" -r $< );\
+- while pdflatex "\def\fixedpdfdate{$$timestamp}\input $<" ${BUILD_OUTPUT} || exit 1 ; \
++ while true "\def\fixedpdfdate{$$timestamp}\input $<" ${BUILD_OUTPUT} || exit 1 ; \
+ grep -q "Label(s) may have changed" techdoc.log; \
+ do :; done
+
+--
+2.11.2
+
diff --git a/testing/apparmor/0007-Do-not-build-install-vim-file-with-utils-package.patch b/testing/apparmor/0007-Do-not-build-install-vim-file-with-utils-package.patch
new file mode 100644
index 0000000000..bbaa092bd8
--- /dev/null
+++ b/testing/apparmor/0007-Do-not-build-install-vim-file-with-utils-package.patch
@@ -0,0 +1,36 @@
+diff --git a/utils/Makefile b/utils/Makefile
+index 67caa0d..98fb8d7 100644
+--- a/utils/Makefile
++++ b/utils/Makefile
+@@ -32,7 +32,6 @@ MANPAGES = ${TOOLS:=.8} logprof.conf.5
+
+ all: docs
+ $(MAKE) -C po all
+- $(MAKE) -C vim all
+
+ .PHONY: docs
+ docs: ${MANPAGES} ${HTMLMANPAGES}
+@@ -58,7 +57,6 @@ install: ${MANPAGES} ${HTMLMANPAGES}
+ install -m 755 $(filter-out aa-easyprof, ${TOOLS}) ${BINDIR}
+ $(MAKE) -C po install DESTDIR=${DESTDIR} NAME=${NAME}
+ $(MAKE) install_manpages DESTDIR=${DESTDIR}
+- $(MAKE) -C vim install DESTDIR=${DESTDIR}
+ ln -sf aa-status.8 ${DESTDIR}/${MANDIR}/man8/apparmor_status.8
+ ${PYTHON} ${PYSETUP} install --prefix=${PYPREFIX} --root=${DESTDIR} --version=${VERSION}
+
+@@ -69,7 +67,6 @@ endif
+ clean: pod_clean
+ rm -f core core.* *.o *.s *.a *~
+ $(MAKE) -C po clean
+- $(MAKE) -C vim clean
+ $(MAKE) -C test clean
+ rm -rf staging/ build/
+ rm -f apparmor/*.pyc apparmor/rule/*.pyc
+@@ -100,4 +97,3 @@ check: check_severity_db check_pod_files
+ $(PYFLAKES) $$i || exit 1; \
+ done
+ $(MAKE) -C test check
+- $(MAKE) -C vim check
+--
+2.11.2
+
diff --git a/testing/apparmor/APKBUILD b/testing/apparmor/APKBUILD
new file mode 100644
index 0000000000..3da796d187
--- /dev/null
+++ b/testing/apparmor/APKBUILD
@@ -0,0 +1,206 @@
+# Contributor: Allan Garret <allan.garret@gmail.com>
+# Maintainer: Allan Garret <allan.garret@gmail.com>
+pkgname=apparmor
+pkgver=2.11.0
+_majorver=2.11
+pkgrel=0
+pkgdesc="Linux application security framework - mandatory access control for programs"
+url="http://wiki.apparmor.net/index.php/Main_page"
+arch="all"
+license="GPL"
+depends="bash"
+makedepends="bash sed python autoconf automake libtool bison flex swig gettext-dev python-dev linux-pam-dev linux-headers"
+
+subpackages="
+ libapparmor:libapparmor
+ libapparmor-doc:libapparmor_doc
+ libapparmor-dev:libapparmor_dev
+ $pkgname-utils:apparmor_utils:noarch
+ $pkgname-utils-doc:apparmor_utils_doc
+ $pkgname-profiles:apparmor_profiles:noarch
+ $pkgname-pam:apparmor_pam
+ $pkgname-vim:apparmor_vim:noarch
+ $pkgname-doc
+ $pkgname-lang
+ "
+source="
+ https://launchpad.net/$pkgname/$_majorver/$_majorver/+download/$pkgname-$pkgver.tar.gz
+
+ https://gitweb.gentoo.org/repo/gentoo.git/plain/sys-apps/apparmor/files/apparmor-init
+
+ 0001-Remove-__BEGIN_DECLS-and-__END_DECLS-identifiers.patch
+ 0002-Provide-missing-secure_getenv-and-scandirat-function.patch
+ 0003-Added-missing-typedef-definitions-on-parser.patch
+ 0004-Define-RLIMIT_OFILE-if-needed.patch
+ 0005-Added-RLIMIT_RTTIME-option-conditionally.patch
+ 0006-Use-gettext-and-remove-latex.patch
+ 0007-Do-not-build-install-vim-file-with-utils-package.patch
+ "
+
+builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ local i
+
+ cd "$builddir"
+
+ for i in "$srcdir"/*.patch; do
+ msg "Applying $i"
+ patch -p1 -i $i || return 1
+ done
+}
+
+build() {
+ cd "$builddir"/libraries/libapparmor
+ msg "Building: libapparmor"
+ ./autogen.sh
+ ./configure --prefix=/usr --with-python
+ make
+
+ cd "$builddir"
+ msg "Building: apparmor"
+ make -C parser
+
+ msg "Building: apparmor-utils"
+ make -C utils
+
+ msg "Building: apparmor-profiles"
+ make -C profiles
+
+ msg "Building: apparmor-pam"
+ make -C changehat/pam_apparmor
+
+ msg "Building: apparmor-vim"
+ make -C utils/vim
+}
+
+package() {
+ cd "$builddir"
+
+ make -C parser install DESTDIR="$pkgdir"
+ mv "$pkgdir"/lib "$pkgdir"/usr/lib
+ mv "$pkgdir"/sbin "$pkgdir"/usr/sbin
+ install -Dm755 "$srcdir"/apparmor-init \
+ "$pkgdir"/etc/init.d/apparmor
+}
+
+libapparmor() {
+ pkgdesc="AppArmor library"
+ makedepends="swig python-dev"
+ depends="bash sed python"
+
+ cd "$builddir"
+ make -C libraries/libapparmor install DESTDIR="$subpkgdir"
+
+ # Move development files
+ mkdir -p "$subpkgdir"-dev/usr
+ mv "$subpkgdir"/usr/include "$subpkgdir"-dev/usr/ || return 1
+ mkdir -p "$subpkgdir"-dev/usr/lib
+ mv "$subpkgdir"/usr/lib/libapparmor.a "$subpkgdir"-dev/usr/lib/ || return 1
+ mv "$subpkgdir"/usr/lib/pkgconfig "$subpkgdir"-dev/usr/lib/ || return 1
+
+ # Move doc files
+ mkdir -p "$subpkgdir-doc"/usr/share
+ mv "$subpkgdir"/usr/share/man "$subpkgdir-doc"/usr/share/
+}
+
+libapparmor_doc() {
+ pkgdesc="AppArmor Library (doc files)"
+
+ cd "$builddir"
+ for i in 2 3; do
+ find "$subpkgdir"/usr/share/man/man"$i" -type f -exec gzip -9v {} +
+ done
+}
+
+libapparmor_dev() {
+ pkgdesc="AppArmor Library (development files)"
+}
+
+
+apparmor_utils() {
+ pkgdesc="AppArmor userspace utilities"
+ depends="perl python bash"
+
+ cd "$builddir"
+ make -C utils install DESTDIR="$subpkgdir" BINDIR="$subpkgdir"/usr/bin
+
+ mkdir -p "$subpkgdir"-doc/usr/share
+ mv "$subpkgdir"/usr/share/man "$subpkgdir"-doc/usr/share/
+}
+
+apparmor_utils_doc() {
+ pkgdesc="AppArmor userspace utilites (doc files)"
+
+ cd "$builddir"
+ for i in 5 8; do
+ find "$subpkgdir"/usr/share/man/man"$i" -type f -exec gzip -9v {} +
+ done
+ cd "$subpkgdir"/usr/share/man/man8
+ rm apparmor_status.8 || return 1
+ ln -s aa-status.8.gz apparmor_status.8.gz || return 1
+}
+
+apparmor_profiles() {
+ pkgdesc="AppArmor sample pre-made profiles"
+ depends="apparmor"
+
+ cd "$builddir"
+ make -C profiles install DESTDIR="$subpkgdir"
+}
+
+apparmor_pam() {
+ pkgdesc="AppArmor PAM library"
+ depends="apparmor-libapparmor pam"
+
+ cd "$builddir"
+ make -C changehat/pam_apparmor install DESTDIR="$subpkgdir"/usr
+}
+
+apparmor_pam_doc() {
+ pkgdesc="AppArmor PAM library (doc files)"
+
+ cd "$builddir"
+ mkdir -p "$subpkgdir"/usr/share/doc/apparmor
+ install -Dm644 changehat/pam_apparmor/README \
+ "$subpkgdir"/usr/share/doc/apparmor/README.pam_apparmor
+}
+
+apparmor_vim() {
+ pkgdesc="AppArmor VIM support"
+ depends="vim"
+
+ cd "$builddir"/utils/vim
+ install -Dm644 apparmor.vim \
+ "$subpkgdir"/usr/share/vim/vimfiles/syntax/apparmor.vim
+}
+
+
+
+md5sums="899fd834dc5c8ebf2d52b97e4a174af7 apparmor-2.11.0.tar.gz
+eba7c18217cb914a99994c56b101e145 apparmor-init
+34eee6629204a2417b0e54f5b81444d0 0001-Remove-__BEGIN_DECLS-and-__END_DECLS-identifiers.patch
+f8087c822ef13cb7277410844dc66f2f 0002-Provide-missing-secure_getenv-and-scandirat-function.patch
+afaa80418a44156f577f0b62a41a24bd 0003-Added-missing-typedef-definitions-on-parser.patch
+1b0ad0793135450ac3e8a70fbcd1b118 0004-Define-RLIMIT_OFILE-if-needed.patch
+df073248ff8d05ef2bc29136e801018f 0005-Added-RLIMIT_RTTIME-option-conditionally.patch
+67f8a2784db5d8a37c0eac4205fb8348 0006-Use-gettext-and-remove-latex.patch
+7f910b6a581a5c51bf008d2350c13d0d 0007-Do-not-build-install-vim-file-with-utils-package.patch"
+sha256sums="b1c489ea11e7771b8e6b181532cafbf9ebe6603e3cb00e2558f21b7a5bdd739a apparmor-2.11.0.tar.gz
+6357f9645587de19c46d824215ca4c3be99c488e8da9bd0e403b69e33ba8ed07 apparmor-init
+1ac45ca27272ee4ccd5b8a067e398dd0a2d6e83d9cba0a364ea3d416072544b9 0001-Remove-__BEGIN_DECLS-and-__END_DECLS-identifiers.patch
+80e14eec84b15c79f1ae2c5614d605b1dfbeffaa24198f32b2465bbf622692be 0002-Provide-missing-secure_getenv-and-scandirat-function.patch
+7d59f2d4a5404a417439252379ee1caabbfa8da530ed7f3aef7ef480dcab226d 0003-Added-missing-typedef-definitions-on-parser.patch
+2490c4dea47c13ad90d3340217516d39e63ed06ea6eed5f2a83b758c48918750 0004-Define-RLIMIT_OFILE-if-needed.patch
+f1520516031f73cdb99836baafb5ea4b007d65e8b3038ce26ec9d1597bbe36e3 0005-Added-RLIMIT_RTTIME-option-conditionally.patch
+6d1a59bed4dc33a6acd51c491421c70bbd0f4994d97006a6cf114e3b79944e14 0006-Use-gettext-and-remove-latex.patch
+6d62c846f615a19f2db2ae2a9612abda2d379a7bafb399161ac1c9bb37016b33 0007-Do-not-build-install-vim-file-with-utils-package.patch"
+sha512sums="86b33c1cbbd256028dd5fdfaddc764c225845acd19c833223fce5cdd6164f997fe010d7b642791f834a3417b4ea847d77175fdfd89ea99ab2111933790d42b55 apparmor-2.11.0.tar.gz
+4ee4747ec98a0828beb690bf5e01bc112d958bff4c68d60fc0cbb9f0707bd8daecc011dba3916aa6e6368f460eedce7f2ce42aad9ccea49a5d898dcae3d01148 apparmor-init
+fbe93bfdc6469496aafddfe8f8c01d53adb5075a4547e40fb8fc5b5b972aa418a0a84e626e82602425ad48409fd078dabdf60132f5810f80aa3212e11cb7186e 0001-Remove-__BEGIN_DECLS-and-__END_DECLS-identifiers.patch
+988f4f6c27089ca68ef122066123099477e2e1dc7c849f93e3d0a92c2aa9a38ccbcd9e4d212329edad4ac4bbb7ee32dfbaab8b0039a661e2af391b6c830e6b54 0002-Provide-missing-secure_getenv-and-scandirat-function.patch
+029a94086ffa97b5eff55e23469ee199caf066761cad28a1f0d4b8c51c4ae927192651befc79505f0078cf81a79fa472c97bf8b0e5e4816fcd8f597ad129c431 0003-Added-missing-typedef-definitions-on-parser.patch
+3da30be6f964135c1fd85368f17bd503682af6a5dc3d3d3964f87d74330debdddbb9ada705aad35999904539e29d46118a58af88084646bf2faa8413b65e857c 0004-Define-RLIMIT_OFILE-if-needed.patch
+1606e18435ea8aec16546c9c15f1b4bdc9c15af0764b2f580c28b8597fbd3ea670a4fe6dcf16a6b97a340f4b6b52b578463b1359150141a37f668e7dc8f1b272 0005-Added-RLIMIT_RTTIME-option-conditionally.patch
+0e94e33cc919a76e7d59da578f0166ac9e6c2021b55d1a92ae1512e51f05d45a099a83a57625905112cf25e460e6078ae57bf7ee66da7caf0bc87fccdd0589ce 0006-Use-gettext-and-remove-latex.patch
+6d75ed791653457d58fea7ff29a8e8e52c4bf7e214daa1e1ad2dcd888521251c9a89279cecaed320d252b057f7db0c5440c0d8ca8f4e51af79f9511d44bbec16 0007-Do-not-build-install-vim-file-with-utils-package.patch"