# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only

  # Extra Mesa rules for desktop environments
  owner @{desktop_cache_dirs}/ w,
  owner @{desktop_cache_dirs}/mesa_shader_cache_db/ rw,
  owner @{desktop_cache_dirs}/mesa_shader_cache_db/index rw,
  owner @{desktop_cache_dirs}/mesa_shader_cache_db/marker rw,
  owner @{desktop_cache_dirs}/mesa_shader_cache_db/part@{int}/ rw,
  owner @{desktop_cache_dirs}/mesa_shader_cache_db/part@{int}/mesa_cache.db rwk,
  owner @{desktop_cache_dirs}/mesa_shader_cache_db/part@{int}/mesa_cache.idx rwk,
  owner @{desktop_cache_dirs}/mesa_shader_cache/ rw,
  owner @{desktop_cache_dirs}/mesa_shader_cache/@{hex2}/ rw,
  owner @{desktop_cache_dirs}/mesa_shader_cache/@{hex2}/@{hex38} rw,
  owner @{desktop_cache_dirs}/mesa_shader_cache/@{hex2}/@{hex38}.tmp rwk,
  owner @{desktop_cache_dirs}/mesa_shader_cache/index rw,
  owner @{desktop_cache_dirs}/mesa_shader_cache/marker rw,

  owner @{user_cache_dirs}/mesa_shader_cache/marker rw,

  owner @{user_cache_dirs}/mesa_shader_cache_db/ w,
  owner @{user_cache_dirs}/mesa_shader_cache_db/index rw,
  owner @{user_cache_dirs}/mesa_shader_cache_db/marker rw,
  owner @{user_cache_dirs}/mesa_shader_cache_db/part@{int}/ rw,
  owner @{user_cache_dirs}/mesa_shader_cache_db/part@{int}/mesa_cache.db rwk,
  owner @{user_cache_dirs}/mesa_shader_cache_db/part@{int}/mesa_cache.idx rwk,

# vim:syntax=apparmor
