Author: Nibaldo González (nibgonz@gmail.com)
Last Change: February 2021
Last Version: Version 15 is included in KDE Frameworks 5.80.0+ and is based on AppArmor 3.0.
This file is part of the KDE's KSyntaxHighlighting Framework.
Add syntax highlighting to KDE text editors (such as Kate, KWrite, KDevelop or any application that uses the KSyntaxHighlighting or KTextEditor Framework) for the AppArmor Security Profiles.
The apparmor.xml
file contains the definition of the syntax highlighting.
If you want to test the highlighting, you can find a sample AppArmor profile
in the test
folder.
For details on the syntax of AppArmor profiles, visit:
- AppArmor Documentation: https://gitlab.com/apparmor/apparmor/wikis/Documentation
- Man Page of apparmor.d: https://manpages.ubuntu.com/manpages/hirsute/en/man5/apparmor.d.5.html
- AppArmor Repository: https://gitlab.com/apparmor
The syntax highlighting definition files, of the KSyntaxHighlighting Framework, consist of XML files that are compiled in the KDE Frameworks libraries.
However, these XML files can also be stored in:
For local user | $HOME/.local/share/org.kde.syntax-highlighting/syntax/ |
For all users | /usr/share/org.kde.syntax-highlighting/syntax/ |
For Flatpak packages | $HOME/.var/app/package-name/data/org.kde.syntax-highlighting/syntax/ |
For Snap packages | $HOME/snap/package-name/current/.local/share/org.kde.syntax-highlighting/syntax/ |
On Windows | %USERPROFILE%\AppData\Local\org.kde.syntax-highlighting\syntax\ |
On macOS | $HOME/Library/Application Support/org.kde.syntax-highlighting/syntax/ |
For more details of KSyntaxHighlighting Framework, visit:
- Official Repository: https://invent.kde.org/frameworks/syntax-highlighting
- Documentation: https://docs.kde.org/?application=katepart&branch=trunk5&path=highlight.html
If you do not have the latest version of KDE Frameworks, you can manually install
the latest apparmor.xml
file.
Copy the apparmor.xml
file to the directory of the XML syntax definition files,
mentioned in the previous section.
Ex.: For local user:
mkdir -p $HOME/.local/share/org.kde.syntax-highlighting/syntax/
cp ./apparmor.xml $HOME/.local/share/org.kde.syntax-highlighting/syntax/
For all users:
sudo mkdir -p /usr/share/org.kde.syntax-highlighting/syntax/
sudo cp ./apparmor.xml /usr/share/org.kde.syntax-highlighting/syntax/
Syntax highlighting of AppArmor profiles is automatically applied to named files:
bin.*
, sbin.*
, usr.bin.*
, usr.sbin.*
, usr.lib.*
, usr.lib64.*
, usr.lib32.*
,
usr.libx32.*
, usr.libexec.*
, usr.local.bin.*
, usr.local.sbin.*
, usr.local.lib*
,
opt.*
, etc.cron.*
, snap.*
, snap-update-ns.*
& snap-confine.*
.
You can also force the syntax highlighting, by writing a comment with:
kate: syntax AppArmor Security Profile;
apparmor.xml Version |
Date | KDE Frameworks |
AppArmor Support |
Relevant Changes |
---|---|---|---|---|
15 | Feb. 19, 2021 | 5.80.0 | 3.0.0 | Improvements in the performance of RegExpr rules. |
12 | Oct. 02, 2020 | 5.75.0 | 3.0.0 | Add ABI rules and new profile flags. |
9 | Jun. 20, 2019 | 5.60.0 | 2.13.3 |
|
8 | Apr. 02, 2019 | 5.58.0 | 2.13.2 |
|
7 | Sep. 15, 2018 | 5.51.0 | 2.13.0 |
|
6 | Jul. 24, 2018 | 5.50.0 | 2.13.0 |
|
4 & 5 | Jan. 25, 2018 | 5.43.0 | 2.12.0 |
|
2 & 3 | Sep. 24, 2017 | 5.39.0 | 2.11.0 |
|
1 | Initial version, not published. |