Skip to content

Commit

Permalink
snapcraft: add apparmor part
Browse files Browse the repository at this point in the history
Let's ship newer version of AppArmor with support of new features.
Only needed for core22.

Signed-off-by: Alexander Mikhalitsyn <[email protected]>
  • Loading branch information
mihalicyn committed Jun 21, 2024
1 parent 2f352c7 commit 8591ed4
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1209,15 +1209,51 @@ parts:
- bin/pzstd
- bin/zstd

apparmor:
source: https://gitlab.com/apparmor/apparmor.git
source-depth: 1
source-tag: v4.0.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 "${CRAFT_PART_INSTALL}/bin"
cp /sbin/apparmor_parser "${CRAFT_PART_INSTALL}/bin/"
mkdir "${CRAFT_PART_INSTALL}/lib"
cp /lib/libapparmor.so* "${CRAFT_PART_INSTALL}/lib/"
set +ex
prime:
- bin/apparmor_parser
- lib/libapparmor.so.1
- lib/libapparmor.so.1.*

# Core components
lxc:
after:
- libseccomp
- apparmor
source: https://github.com/lxc/lxc
source-type: git
source-branch: stable-5.0
build-packages:
- libapparmor-dev
- libcap-dev
- libdbus-1-dev
- libgnutls28-dev
Expand Down

0 comments on commit 8591ed4

Please sign in to comment.