mirror of
git://git.proxmox.com/git/lxc.git
synced 2025-03-15 06:50:25 +03: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>
24 lines
498 B
Bash
24 lines
498 B
Bash
#! /bin/sh
|
|
|
|
set -e
|
|
|
|
# remove diversion of apparmor feature pinning file, see preinst
|
|
aa_feature_remove_diversion() {
|
|
dpkg-divert --package lxc-pve --remove --rename \
|
|
--divert /usr/share/apparmor-features/features.stock \
|
|
/usr/share/apparmor-features/features
|
|
}
|
|
|
|
case "$1" in
|
|
abort-upgrade)
|
|
if dpkg --compare-versions "$2" 'lt' '2.1.1-3'; then
|
|
aa_feature_remove_diversion
|
|
fi
|
|
;;
|
|
remove|abort-install|disappear)
|
|
aa_feature_remove_diversion
|
|
;;
|
|
esac
|
|
|
|
exit 0
|