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/27246fb14b80cfb22b6924f456b635fa82f8a2fb

-- 
View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/27246fb14b80cfb22b6924f456b635fa82f8a2fb
You're receiving this email because of your account on gitlab.torproject.org.


_______________________________________________
tbb-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to