morgan pushed to branch main at The Tor Project / Applications / 
tor-browser-build


Commits:
ee82c7f8 by Nicolas Vigier at 2024-12-12T12:13:31+01:00
Bug 41311: Remove apparmor profile if abi 4.0 is not present

When abi 4.0 file not available, loading the apparmor profile is failing.
But the profile is only useful on Ubuntu 24.04 (and later), where the
abi 4.0 file is present.

We're doing something similar to:
https://github.com/CollaboraOnline/online/commit/5f7b37c7412c3e1d81d9c50a0ff8388087839f60

- - - - -


2 changed files:

- projects/linux-packages/config
- + projects/linux-packages/debian/postinst.in


Changes:

=====================================
projects/linux-packages/config
=====================================
@@ -201,6 +201,10 @@ input_files:
     content: "[% INCLUDE 'debian/docs.in' %]"
     refresh_input: 1
     enable: '[% c("var/build_deb_pkg") %]'
+  - filename: debian/postinst
+    content: "[% INCLUDE 'debian/postinst.in' %]"
+    refresh_input: 1
+    enable: '[% c("var/build_deb_pkg") %]'
   - filename: debian/rules
     content: "[% INCLUDE 'debian/rules.in' %]"
     refresh_input: 1


=====================================
projects/linux-packages/debian/postinst.in
=====================================
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+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") %]
+        fi
+        ;;
+esac



View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/ee82c7f8b1ef1f776fdad22ef20e313463fd3f58

-- 
View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/ee82c7f8b1ef1f776fdad22ef20e313463fd3f58
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