mirror of
https://git.proxmox.com/git/lxc
synced 2025-08-16 02:28:41 +00:00

Debian's apparmor package introduced feature-set pinning in Debian Stretch 9.4 to prevent problems with AA profiles packaged in Debian Stretch which target Debian Stretch's 4.9 based kernel. Since our LXC profiles rely on features not included in this feature set, we need to replace the pinned feature-set with our own. The features file is not a conf-file, so it is possible to just dpkg-divert it on installation/upgrades. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
26 lines
523 B
Bash
26 lines
523 B
Bash
#! /bin/sh
|
|
|
|
set -e
|
|
|
|
# divert apparmor feature pinning file
|
|
# Debian 9.4+ pins to a kernel 4.9 feature set which breaks mount
|
|
# mediation, among other things
|
|
aa_feature_add_diversion() {
|
|
dpkg-divert --package lxc-pve --add --rename \
|
|
--divert /usr/share/apparmor-features/features.stock \
|
|
/usr/share/apparmor-features/features
|
|
}
|
|
|
|
case "$1" in
|
|
upgrade)
|
|
if dpkg --compare-versions "$2" 'lt' '2.1.1-3'; then
|
|
aa_feature_add_diversion
|
|
fi
|
|
;;
|
|
*)
|
|
aa_feature_add_diversion
|
|
;;
|
|
esac
|
|
|
|
exit 0
|