[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser-build][maint-14.0] Bug 41311: Remove apparmor profile if abi 4.0 is not present



Title: GitLab

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

Commits:

  • 36c06687
    by Nicolas Vigier at 2024-12-16T12:54:30+00: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:

Changes:

  • projects/linux-packages/config
    ... ... @@ -171,6 +171,10 @@ input_files:
    171 171
         content: "[% INCLUDE 'debian/docs.in' %]"
    
    172 172
         refresh_input: 1
    
    173 173
         enable: '[% c("var/build_deb_pkg") %]'
    
    174
    +  - filename: debian/postinst
    
    175
    +    content: "[% INCLUDE 'debian/postinst.in' %]"
    
    176
    +    refresh_input: 1
    
    177
    +    enable: '[% c("var/build_deb_pkg") %]'
    
    174 178
       - filename: debian/rules
    
    175 179
         content: "[% INCLUDE 'debian/rules.in' %]"
    
    176 180
         refresh_input: 1
    

  • projects/linux-packages/debian/postinst.in
    1
    +#!/bin/sh
    
    2
    +
    
    3
    +set -e
    
    4
    +
    
    5
    +case "$1" in
    
    6
    +    install|upgrade|configure)
    
    7
    +        # If abi 4.0 is not present, then remove the apparmor profile config
    
    8
    +        if [ ! -e /etc/apparmor.d/abi/4.0 ]; then
    
    9
    +            rm -f /etc/apparmor.d/[% c("var/system_pkg/pkg_name") %]
    
    10
    +        fi
    
    11
    +        ;;
    
    12
    +esac

  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx