[Git][tpo/applications/tor-browser-build][main] MB 415: Load apparmor profile when configuring deb package

morgan pushed to branch main at The Tor Project / Applications / tor-browser-build Commits: 27246fb1 by Nicolas Vigier at 2025-03-27T15:03:36+00:00 MB 415: Load apparmor profile when configuring deb package Use the command from /usr/share/debhelper/autoscripts/postinst-apparmor (from dh-apparmor package). - - - - - 1 changed file: - projects/linux-packages/debian/postinst.in Changes: ===================================== projects/linux-packages/debian/postinst.in ===================================== @@ -2,11 +2,22 @@ set -e +apparmor_profile='/etc/apparmor.d/[% c("var/system_pkg/pkg_name") %]' + case "$1" in install|upgrade|configure) # If abi 4.0 is not present, then remove the apparmor profile config if [ ! -e /etc/apparmor.d/abi/4.0 ]; then - rm -f /etc/apparmor.d/[% c("var/system_pkg/pkg_name") %] + rm -f "$apparmor_profile" fi ;; esac + +if [ "$1" = "configure" ]; then + if [ -f "$apparmor_profile" ]; then + # Reload the profile, including any abstraction updates + if aa-enabled --quiet 2>/dev/null; then + apparmor_parser -r -T -W "$apparmor_profile" || true + fi + fi +fi View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/27... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/27... You're receiving this email because of your account on gitlab.torproject.org.
participants (1)
-
morgan (@morgan)