Skip to content

Commit

Permalink
Vendor apparmor (5.0-candidate) (canonical#607)
Browse files Browse the repository at this point in the history
This is required to take advantage of the improved apparmor rules in LXD
that enables running Oracular containers.
tomponline authored Nov 12, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents eb6af8a + 0f69aa1 commit be9575c
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1225,16 +1225,53 @@ parts:
- bin/pzstd
- bin/zstd

apparmor:
build-attributes: [core22-step-dependencies]
source: https://gitlab.com/apparmor/apparmor.git
source-commit: 84a6bc1b6dcdfeabb1ed3597f01e314f3bcee5c1 # v4.0.2
source-depth: 1
source-type: git
plugin: autotools
build-packages:
- g++
- bison
- flex
- autoconf-archive
- gettext
override-build: |-
set -ex
cd ./libraries/libapparmor
sh ./autogen.sh
sh ./configure --prefix=/
make
make install
cd ../../parser
make
make install
mkdir "${SNAPCRAFT_PART_INSTALL}/bin"
cp /sbin/apparmor_parser "${SNAPCRAFT_PART_INSTALL}/bin/"
mkdir "${SNAPCRAFT_PART_INSTALL}/lib"
cp /lib/libapparmor.so* "${SNAPCRAFT_PART_INSTALL}/lib/"
set +ex
prime:
- bin/apparmor_parser
- lib/libapparmor.so.1
- lib/libapparmor.so.1.*

# Core components
lxc:
build-attributes: [core22-step-dependencies]
after:
- apparmor
- libseccomp
source: https://github.com/lxc/lxc
source-type: git
source-commit: cb8e38aca27a23964941f0f011a8919aab8bebab # lxc-5.0.3
build-packages:
- libapparmor-dev
- libcap-dev
- libdbus-1-dev
- libgnutls28-dev

0 comments on commit be9575c

Please sign in to comment.