2023-01-29 22:18:22 +01:00
---
title: Installation
---
!!! danger
2023-01-31 22:13:35 +01:00
In order to not break your system, the default package configuration installs
2023-01-29 22:18:22 +01:00
all profiles in complain mode. They can be enforced later.
See the [Enforce Mode ](/enforce ) page.
## Requirements
**AppArmor**
An `apparmor` based Linux distribution is required. The basic profiles and
abstractions shipped with AppArmor must be installed.
**Desktop environment**
The following desktop environments are supported:
- [x] :material-gnome: Gnome
2023-04-24 13:18:57 +02:00
- [ ] :simple-kde: KDE *(work in progress)*
2023-01-29 22:18:22 +01:00
Also, please note wayland has better support than xorg.
**Build dependencies**
2023-04-19 19:57:31 +02:00
* Go >= 1.18
2023-01-29 22:18:22 +01:00
* Rsync
## :material-arch: Archlinux
`apparmor.d-git` is available in the [Arch User Repository][aur]:
2023-04-24 13:18:57 +02:00
```
yay -S apparmor.d-git # or your preferred AUR install method
```
Or without a AUR helper:
2023-01-29 22:18:22 +01:00
```sh
git clone https://aur.archlinux.org/apparmor.d-git.git
cd apparmor.d-git
2023-03-29 19:08:44 +02:00
makepkg -si
2023-01-29 22:18:22 +01:00
```
## :material-ubuntu: Ubuntu & :material-debian: Debian
Build the package from sources:
```sh
sudo apt install apparmor-profiles build-essential config-package-dev debhelper golang-go rsync git
git clone https://github.com/roddhjav/apparmor.d.git
cd apparmor.d
dpkg-buildpackage -b -d --no-sign
sudo dpkg -i ../apparmor.d_*_all.deb
```
2023-08-19 15:32:08 +02:00
!!! tip
If you have `devscripts` installed, you can use the one liner:
```sh
make dpkg
```
2023-01-29 22:18:22 +01:00
2023-02-05 01:22:21 +01:00
## :simple-suse: OpenSUSE
Build and install from source:
```sh
make
sudo make install
sudo systemctl restart apparmor
```
!!! note
RPM package is still a work in progress. Help is welcome.
2023-01-29 22:18:22 +01:00
## Partial install
2023-02-11 19:59:08 +01:00
For test purposes, you can install specific profiles with the following commands.
2023-01-29 22:18:22 +01:00
Abstractions, tunables, and most of the OS dependent post-processing is managed.
```sh
make
sudo make profile-names...
```
2023-02-11 19:59:08 +01:00
!!! warning
Partial installation is discouraged because profile dependencies are not fetched. To prevent some apparmor issues, the dependencies are automatically switched to unconfined (`rPx` -> `rPUx` ). The installation process warns on the missing profiles so that you can easily install them if desired. (PR is welcome see [#77 ](https://github.com/roddhjav/apparmor.d/issues/77 ))
For instance, `sudo make pass` gives:
```sh
Warning: profile dependencies fallback to unconfined.
2023-07-09 16:04:06 +02:00
@{bin}/wl-{copy,paste} rPx,
@{bin}/xclip rPx,
@{bin}/python3.[0-9]* rPx -> pass-import, # pass-import
@{bin}/pager rPx -> child-pager,
@{bin}/less rPx -> child-pager,
@{bin}/more rPx -> child-pager,
2023-02-11 19:59:08 +01:00
'.build/apparmor.d/pass' -> '/etc/apparmor.d/pass'
```
So, you can install the additional profiles `wl-copy` , `xclip` , `pass-import` , and `child-pager` if desired.
2023-08-19 15:32:08 +02:00
## Uninstall
- :material-arch: Archlinux `sudo pacman -R apparmor.d`
- :material-ubuntu: Ubuntu & :material-debian: Debian `sudo apt purge apparmor.d`
2023-01-29 22:18:22 +01:00
[aur]: https://aur.archlinux.org/packages/apparmor.d-git
[repo]: https://repo.pujol.io/
[keys]: https://repo.pujol.io/gpgkey